More Latex and Julia and How to Use It to Prepare a Homework

Total Page:16

File Type:pdf, Size:1020Kb

More Latex and Julia and How to Use It to Prepare a Homework Numerical and Scientific Computing with Applications David F. Gleich CS 314, Purdue By the end of this class, August 31, 2016 • Understand what LaTeX is More LaTeX and Julia and how to use it to prepare a homework. • See functions in Julia and Next class how they help make code HOMEWORK DUE! easy and reusable. Intro to floating point arithmetic • Your last questions about G&C - Chapter 5 Julia! Next next class • Go over common mistakes on the quiz. Labor day! Take a day off Logistics 1. Final exam We will have the final EARLY (December 2) based on the results of the poll which overwhelmingly picked this option. Course Survey Matlab only 33 Numpy/Scipy only 5 Both 16 Latex 9 Taylor series 23 Topics Monte Carlo, ODEs, Matrices Stuff Julia & Mandelbrot sets! Quiz Results … at end of class ... LaTeX • A document typesetting system designed for beautiful mathematical documents. • TeX was designed by Donald Knuth • LaTeX was designed by Leslie Lamport • Both won Turing awards - Nobel prize of CS • You need to “compile” your documents. pdflatex myfile.tex # produces myfile.pdf Recommended packages + editors Windows • MiKTex and TexStudio Mac • MacTex and TexStudio or TexMaker Linux • TeXLive (or apt-get / yum package) + Kile or TexStudio Online • Overleaf • Juliabox Notebooks Making a simple document \documentclass{article} \usepackage[margin=1in]{geometry} \title{My document} \author{David and Collaborators} \begin{document} \maketitle \section{Problem 1} \section*{Solution} \section{Problem 1} \section*{Solution} \end{document} demo Editing a homework demo Back to Julia! .
Recommended publications
  • Here Comes Number Two
    LATEX Documents ALATEX source file is an ordinary text file with interspersed typography markup. It may be created with any text editor (Notepad, Textedit, A gedit, emacs, vim) or with a dedicated LATEX editor with syntax LTEX highlighting (Texstudio, Texmaker). This text file will then be processed by a T X engine: Leif Andersson E latex, pdflatex, lualatex, xelatex The result is a .pdf file, which may be printed or read on screen. The Environment A Short Document The most fundamental LATEX component is the Environment. Inside an environment the text gets a special layout and/or special commands are defined. \documentclass{article} \usepackage{fourier} This is a paragraph with some This is a paragraph with some \usepackage[swedish]{babel} surrounding text. \begin{document} surrounding text. \begin{itemize} H¨ar kommer texten till mitt banbrytande dokument. \item This is the first point. This is the first point. \end{document} \item And here comes number two. • And here comes number two. \begin{enumerate} • The part between \documentclass and \begin{document} is \item Multiple levels are possible 1. Multiple levels are possible called the preamble, and may contain definitions special to this \item They get automatically 2. They get automatically document. In particular it may call on packages with the indented and enumerated. indented and enumerated. \end{enumerate} \usepackage command. \item The last point The last point • There are also style options \end{itemize} We also have some text after the \documentclass[a4paper,12pt]{article} We also have some text after different items. the different items. Documentclasses Special Characters To get Write Used for A Standard LTEX: $ \$ Start and end of math article report book letter memoir beamer % \% Comment to end of line Journals and conferences often have their own classes.
    [Show full text]
  • Tlaunch: a Launcher for a TEX Live System
    TLaunch: a launcher for a TEX Live system Siep Kroonenberg June 29, 2017 This manual is for tlaunch, the TEX Live Launcher, version 0.5.3. Copyright © 2017 Siep Kroonenberg. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. Contents 1 The launcher5 1.1 Introduction............................5 1.1.1 Localization........................6 1.2 Modes...............................6 1.2.1 Normal mode.......................6 1.2.2 Initializing.........................6 1.2.3 Forgetting.........................6 1.3 Using scripts............................7 1.4 The ini file.............................7 1.4.1 Location..........................7 1.4.2 Encoding..........................7 1.4.3 Syntax...........................7 1.4.4 The Strings section....................9 1.4.5 Sections for filetype associations (FTAs)........9 1.4.6 Sections for utility scripts................ 10 1.4.7 The built-in functions.................. 10 1.4.8 Menus and buttons.................... 11 1.4.9 The General section.................... 12 1.5 Editor choice............................ 12 1.6 Launcher-based installations................... 13 1.6.1 The tlaunchmode script................. 14 1.6.2 TEX Live Manager..................... 14 2 The launcher at the RUG 15 2.1 Historical.............................. 15 2.2 RES desktops........................... 16 2.3 Components of the rug TEX installation............ 16 2.4 Directory organization...................... 17 2.5 Fixes for add-ons......................... 17 2.5.1 TeXnicCenter....................... 17 2.5.2 TeXstudio......................... 18 2.5.3 SumatraPDF........................ 18 2.5.4 LyX............................. 18 3 CONTENTS 4 2.6 Moving the XeTEX font cache.................
    [Show full text]
  • Written & Oral Presentation: Computer Tools
    Written & Oral Presentation: Computer Tools Aleksandar Donev Courant Institute, NYU1 [email protected] 1Course MATH-GA.2840-004, Spring 2018 February 7th, 2018 A. Donev (Courant Institute) Tools 2/7/2018 1 / 13 Outline 1 LaTex A. Donev (Courant Institute) Tools 2/7/2018 2 / 13 LaTex What is LaTex? Some content taken from Wikipedia. TeX is a typesetting system: \allow anybody to produce high-quality books using minimal effort, and to provide a system that would give exactly the same results on all computers, at any point in time." Knuth had the idea to use mathematics to typeset mathematics! LaTex is a markup language for technical writing, with special emphasis on math-heavy writing, built on top of Tex: \TeX handles the layout side, while LaTeX handles the content side for document processing." What's a markup language and how does it differ from WYSIWYG ("what you see is what you get") word processors like Microsoft Word? Compare to html, and contrast interpreted versus compiled languages. Using LaTex: write-format-preview (compare to code-compile-execute). A. Donev (Courant Institute) Tools 2/7/2018 3 / 13 LaTex Why LaTex? Advantages of LaTex: (interactive) Abstract: Separate presentation from content: focus on the content and not visual appearance. Portable: LaTex files are simple text files so perfectly portable and easy to open/edit/share/diff. Flexible: Change appearance/format by changing one word, e.g., the document class. Extensible: macros allow one to add new functionality. Any advantages of WYSIWYG? (interactive) LyX is a combination of the two: Focus on content but also see it on your screen! (Lyx Demo, including change tracking).
    [Show full text]
  • How to Write a Paper and Format It Using LATEX
    How To Write a Paper and Format it Using LATEX Jennifer E. Hoffman1, 2, ∗ 1Department of Physics, Harvard University, Cambridge, Massachusetts 02138, USA 2School of Engineering & Applied Sciences, Harvard University, Cambridge, Massachusetts 02138, USA (Dated: July 30, 2020) The goal of this document is to demonstrate how to write a paper. We walk through the process of outlining, writing, formatting in LATEX, making figures, referencing, and checking style and content. Source files are available at: http://hoffman.physics.harvard.edu/example-paper/. I. GETTING STARTED 8. Rewrite your abstract, taking into account what you have learned from the process of writing the paper. As You should start writing your paper while you are you fine-tune your abstract, you may find it helpful to working on your experiment. Prof. George Whitesides refer to Nature's instructions for writing an abstract says: \A paper is not just an archival device for stor- [2] and for clear communication more generally [3]. ing a completed research program; it is also a structure for planning your research in progress. If you clearly As you contemplate the paper you have just writ- understand the purpose and form of a paper, it can be ten, put yourself in the shoes of the reviewers (includ- immensely useful to you in organizing and conducting ing your collaborators). You already work many, many your research. A good outline for the paper is also a hours/week, and you don't really want to spend more good plan for the research program. You should write time reading this paper. So you're going to be very happy and rewrite these plans/outlines throughout the course if the figures are pretty, the text flows logically, the ref- of the research.
    [Show full text]
  • Complete Issue 40:3 As One
    TUGBOAT Volume 40, Number 3 / 2019 General Delivery 211 From the president / Boris Veytsman 212 Editorial comments / Barbara Beeton TEX Users Group 2019 sponsors; Kerning between lowercase+uppercase; Differential “d”; Bibliographic archives in BibTEX form 213 Ukraine at BachoTEX 2019: Thoughts and impressions / Yevhen Strakhov Publishing 215 An experience of trying to submit a paper in LATEX in an XML-first world / David Walden 217 Studying the histories of computerizing publishing and desktop publishing, 2017–19 / David Walden Resources 229 TEX services at texlive.info / Norbert Preining 231 Providing Docker images for TEX Live and ConTEXt / Island of TEX 232 TEX on the Raspberry Pi / Hans Hagen Software & Tools 234 MuPDF tools / Taco Hoekwater 236 LATEX on the road / Piet van Oostrum Graphics 247 A Brazilian Portuguese work on MetaPost, and how mathematics is embedded in it / Estev˜aoVin´ıcius Candia LATEX 251 LATEX news, issue 30, October 2019 / LATEX Project Team Methods 255 Understanding scientific documents with synthetic analysis on mathematical expressions and natural language / Takuto Asakura Fonts 257 Modern Type 3 fonts / Hans Hagen Multilingual 263 Typesetting the Bangla script in Unicode TEX engines—experiences and insights Document Processing / Md Qutub Uddin Sajib Typography 270 Typographers’ Inn / Peter Flynn Book Reviews 272 Book review: Hermann Zapf and the World He Designed: A Biography by Jerry Kelly / Barbara Beeton 274 Book review: Carol Twombly: Her brief but brilliant career in type design by Nancy Stock-Allen / Karl
    [Show full text]
  • The Gsemthesis Class∗
    The gsemthesis class∗ Emmanuel Rousseaux [email protected] February 9, 2015 Abstract This article introduces the gsemthesis class for LATEX. The gsemthesis class is a PhD thesis template for the Geneva School of Economics and Management (GSEM), University of Geneva, Switzerland. The class provides utilities to easily set up the cover page, the front matter pages, the pages headers, etc. with respect to the official guidelines of the GSEM Faculty for writing PhD dissertations. This class is released under the LaTeX Project Public License version 1.3c. ∗This document corresponds to gsemthesis v0.9.4, dated 2015/02/09. 1 Contents 1 Introduction3 2 Usage 3 2.1 Requirements..................................3 2.2 Getting started.................................3 2.3 Configuring your editor to store files in UTF-8...............4 2.4 Writing the dissertation in French......................4 2.5 Configuring and printing the cover page...................4 2.6 Configuring and printing the front matter pages...............4 2.7 Introduction and conclusion..........................5 2.8 Bibliography..................................5 2.8.1 Configure TeXstudio to run biber...................5 2.8.2 Configure Texmaker to run biber...................5 2.8.3 Configure Rstudio/knitr to run biber.................5 2.8.4 Basic commands............................6 2.8.5 Using you own bibliography management configuration......6 2.9 Draft mode...................................6 2.10 Miscellaneous..................................6 3 Minimal working example7 4 Implementation8 4.1 Document properties..............................8 4.2 Colors......................................8 4.3 Graphics.....................................8 4.4 Link management................................9 4.5 Maths......................................9 4.6 Page headers management...........................9 4.7 Bibliography management........................... 10 4.8 Cover page..................................
    [Show full text]
  • Introduction to Latex & Overleaf
    Introduction Features A Basic LATEX Document Some LATEX Examples Installing and Using LATEX References Introduction to LATEX & Overleaf Ricky Patterson UVa Library 27 Sep 2018 (View source: https://www.overleaf.com/read/vshrryxvbhjw) Intro to LATEX & Overleaf 27 Sep 2018, (View source: Ricky Patterson https://www.overleaf.com/read/vshrryxvbhjw) 1 / 18 Introduction Features A Basic LATEX Document Some LATEX Examples Installing and Using LATEX References Outline Introduction Features A Basic LATEX Document Example Document Preamble ndocumentclass Packages Body Typing Text Caveats Formatting Some LATEX Examples Tables and Figures Mathematics AIntro to LATEX & Overleaf 27 Sep 2018, (View source: InstallingRicky and Patterson Using Lhttps://www.overleaf.com/read/vshrryxvbhjw)TEX 2 / 18 References Introduction Features A Basic LATEX Document Some LATEX Examples Installing and Using LATEX References Introduction I LATEX is a document preparation system for high quality typesetting I Not a Word Processor - Allows authors to focus on content rather than appearance. I Frequently used in the preparation of scientific or technical documents, but can be used to create letters, dissertations, music scores, calendars, presentations, etc., etc., etc. Intro to LATEX & Overleaf 27 Sep 2018, (View source: Ricky Patterson https://www.overleaf.com/read/vshrryxvbhjw) 3 / 18 However... I Steep learning curve I Not WYSIWYG I Can’t easily convert to and from Word, etc. Introduction Features A Basic LATEX Document Some LATEX Examples Installing and Using LATEX
    [Show full text]
  • Latex in Twenty Four Hours
    Plan Introduction Fonts Format Listing Tabbing Table Figure Equation Bibliography Article Thesis Slide A Short Presentation on Dilip Datta Department of Mechanical Engineering, Tezpur University, Assam, India E-mail: [email protected] / datta [email protected] URL: www.tezu.ernet.in/dmech/people/ddatta.htm Dilip Datta A Short Presentation on LATEX in 24 Hours (1/76) Plan Introduction Fonts Format Listing Tabbing Table Figure Equation Bibliography Article Thesis Slide Presentation plan • Introduction to LATEX Dilip Datta A Short Presentation on LATEX in 24 Hours (2/76) Plan Introduction Fonts Format Listing Tabbing Table Figure Equation Bibliography Article Thesis Slide Presentation plan • Introduction to LATEX • Fonts selection Dilip Datta A Short Presentation on LATEX in 24 Hours (2/76) Plan Introduction Fonts Format Listing Tabbing Table Figure Equation Bibliography Article Thesis Slide Presentation plan • Introduction to LATEX • Fonts selection • Texts formatting Dilip Datta A Short Presentation on LATEX in 24 Hours (2/76) Plan Introduction Fonts Format Listing Tabbing Table Figure Equation Bibliography Article Thesis Slide Presentation plan • Introduction to LATEX • Fonts selection • Texts formatting • Listing items Dilip Datta A Short Presentation on LATEX in 24 Hours (2/76) Plan Introduction Fonts Format Listing Tabbing Table Figure Equation Bibliography Article Thesis Slide Presentation plan • Introduction to LATEX • Fonts selection • Texts formatting • Listing items • Tabbing items Dilip Datta A Short Presentation on LATEX
    [Show full text]
  • How to Make a Presentation with LATEX? Introduction to Beamer
    1 / 45 How to make a presentation with LATEX? Introduction to Beamer Hafida Benhidour Department of computer science King Saud University December 19, 2016 2 / 45 Contents Introduction to LATEX Introduction to Beamer 3 / 45 Introduction to LATEX I LATEXis a computer program for typesetting text and mathematical formulas. I Uses commands to create mathematical symbols. I Not a WYSIWYG program. It is a WYWIWYG (what you want is what you get) program! I The document is written as a source file using a markup language. I The final document is obtained by converting the source file (.tex file) into a pdf file. 4 / 45 Advantages of Using LATEX I Professional typesetting: best output. I It is the standard for scientific documents. I Processing mathematical (& other) symbols. I Knowledgeable and helpful user group. I Its FREE! I Platform independent. 5 / 45 Installing LATEX I Linux: 1. Install TeXLive from your package manager. 2. Install a LATEXeditor of your choice: TeXstudio, TexMaker, etc. I Windows: 1. Install MikTeX from http://miktex.org (this is the LATEXcompiler). 2. Install a LATEXeditor of your choice: TeXstudio, TeXnicCenter, etc. I Mac OS: 1. Install MacTeX (this is the LATEXcompiler for Mac). 2. Install a LATEXeditor of your choice. 6 / 45 TeXstudio 7 / 45 Structure of a LATEXDocument All latex documents have the following structure: n documentclass[...] f ... g n usepackage f ... g n b e g i n f document g ... n end f document g I Commands always begin with a backslash n: ndocumentclass, nusepackage. I Commands are case sensitive and consist of letters only.
    [Show full text]
  • Pharmtex Quick Guide Date Issued: 15 JAN 2019 Version: 1.2 Author: Christian Hove Rasmussen Contact: [email protected] Website
    PharmTeX Quick Guide Version 1.2 Quick Guide Report Title: PharmTeX Quick Guide Date Issued: 15 JAN 2019 Version: 1.2 Author: Christian Hove Rasmussen Contact: [email protected] Website: http://pharmtex.org PHARMTEX QUICK GUIDE Page 1 of 6 PharmTeX Quick Guide Version 1.2 1. INTRODUCTION PharmTeX is an open-source framework for creating publishing-ready reports directly from figure and table files. The framework is based on LaTeX, the gold standard for typesetting scientific documents. PharmTeX is released under the GNU Affero General Public License Version 3 (AGPLv3). This user guide has the objective of giving you as a PharmTeX user the ability to: • Set up PharmTeX on your computer. • Initialize a report. • Use PharmTeX features to put in various key report components. • Finalize a report to make it ready for publishing. 2. SETTING UP PHARMTEX In this guide, we will assume that you are using the PharmTeX software bundles. They are available on pharmtex.org under Downloads. Currently, versions for Windows and Linux are available. Please download the one suitable for your operating system. Once the ZIP file is downloaded, double-click it to open it and drag-and-drop the "pharmtex" folder within to C:\Users\USERNAME on Windows 10 and /home/USERNAME on Linux (takes about 15 min to extract). When you are done, the location and contents on Windows 10 should be as shown in Figure 1, with USERNAME matching your Windows login name: Figure 1. PharmTeX software bundle location PharmTeX software bundle location. Once the bundle is in place, please download the example document ZIP file from pharmtex.org (located under Downloads).
    [Show full text]
  • Creación Y Edición De Documentos Con LATEX
    Creación y edición de documentos con LATEX Michelle Núñez Galindo Diana Dueñas Chávez Grupo de Ingeniería Lingüística Instituto de Ingeniería UNAM 23 de octubre de 2017 Primera clase Instalación Editor en Windows: TexMaker Editor en Linux: Gummi Editor en iOS: TexWorks Overleaf Overleaf es un editor de LATEX en línea: https://www.overleaf.com Ventajas: I No necesitas instalar ningún programa, sólo conexión a internet I Sólo creas una cuenta con tu correo electrónico y una contraseña I Puedes compartir tus documentos con otras personas y trabajar simultáneamente I Tiene un visualizador de PDF que te permite ver cómo va quedando tu documento Overleaf Qué es LATEX I Es una herramienta que sirve para editar textos con alta calidad tipográfica. I Ayuda a la preparación de textos científicos o que contienen fórmulas matemáticas. I Se deriva de la palabra griega texnologia. Historia de LATEX I Donald Knuth crea un lenguaje de composición tipográfica llamado TEX en 1977, posteriormente Leslie Lamport crea un conjunto de macros de TEXen 1984, con la intención de hacer más fácil el uso de esta composición tipográfica. I En 1993 se estandariza LATEX. Se establece un compilador que carga paquetes solo si son necesarios. Cada año se ofrece una nueva versión. Ventajas de usar LATEX I Brinda un soporte muy adecuado para la composición de fórmulas matemáticas. I Los usuarios tienen que aprender órdenes muy sencillas para saber la estructura lógica del documento. I Permite generar fácilmente estructuras complejas como notas al pie, referencias, tablas de contenido o bibliografía. I El diseño y el formato son consistentes en todo el documento.
    [Show full text]
  • TEX Collection 2021
    � https://tug.org/texcollection � AsTEX (French) CervanTEX (Spanish) proTEXt: an easy to install TEX system for MS Windows: based on MiKTEX, with the TEXstudio editor front-end. T X CSTUG (Czech/Slovak) Collection 2021 T X Live: a rich T X system to be installed on hard disk or a portable device E CT X (Chinese) E E E such as a USB stick. Comes with support for most modern systems, CyrTUG (Russian) including GNU/Linux, macOS, and Windows. DANTE (German) MacTEX: an easy to install TEX system for macOS: the full TEX Live DK-TUG (Danish) distribution, with the TEXShop front-end and other Mac tools. Estonian User Group CTAN: a snapshot of the Comprehensive TEX Archive Network, a set of 휀휙휏 (Greek) servers worldwide making TEX software publically available. DVD GuIT (Italian) GUST (Polish) proTEXt ist ein einfach zu installierendes TEX-System für MS Windows, basierend auf MiKTEX und TEXstudio als Editor. GUTenberg (French) TEX Live ist ein umfangreiches TEX-System zur Installation auf Festplatte GUTpt (Portuguese) oder einem portablen Medium, z. B. USB-Stick. Binaries für viele Platformen ÍsTEX (Icelandic) sind enthalten. ITALIC (Irish) MacTEX ist ein einfach zu installierendes TEX-System für macOS, mit einem DANTE KTUG (Korean) vollständigen TEX Live, sowie TEXShop als Editor und weiteren Programmen. www.dante.de CTAN ist ein weltweites Netzwerk von Servern für T X-Software. Auf der Lietuvos TEX’o Vartotojų E Grupė (Lithuanian) DVD befindet sich ein Abzug des deutschen CTAN-Knotens dante.ctan.org. MaTEX (Hungarian) O Nordic TEX Group gutenberg.eu.org proT Xt T X Live (Scandinavian) proTEXt : un système TEX pour Windows facile à installer, basé sur MikTEX E E avec l’éditeur T Xstudio.
    [Show full text]