An Introduction to L A T E X

Similar documents
How to make a presentation with L A TEX?

L A TEXtutorial. The very basics for typesetting research papers. Dr. Robin Roche. February 23, 2018

LaTeX in a nutshell. Master on Libre Software Miguel Vidal. September 24, GSyC/Libresoft URJC

Joy Allen. March 12, 2015

Biostatistics Student Seminar An Introduction To L A T E X

Latex Review Beamer: Presentations and Posters Citations & References. L A TEXWorkshop. Mai Ha Vu. University of Delaware.

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40

Freedom from Powerpoint

Introduction. How to use this book. Linear algebra. Mathematica. Mathematica cells

A GUI FOR EVOLVE ZAMS

A few words on white space control

Moving into the information age: From records to Google Earth

BASIC TECHNOLOGY Pre K starts and shuts down computer, monitor, and printer E E D D P P P P P P P P P P

A (Mostly) Correctly Formatted Sample Lab Report. Brett A. McGuire Lab Partner: Microsoft Windows Section AB2

Scripting Languages Fast development, extensible programs

1 Introduction. Multimedia, Vision and Graphics Laboratory

Biology 559R: Introduction to Phylogenetic Comparative Methods Topics for this week:

A Brief Introduction To. GRTensor. On MAPLE Platform. A write-up for the presentation delivered on the same topic as a part of the course PHYS 601

Presenting Tree Inventory. Tomislav Sapic GIS Technologist Faculty of Natural Resources Management Lakehead University

Using Microsoft Excel

The png2pdf program. Dipl.-Ing. D. Krause

ISIS/Draw "Quick Start"

CHEMDRAW ULTRA ITEC107 - Introduction to Computing for Pharmacy. ITEC107 - Introduction to Computing for Pharmacy 1

Lecture 1: Topics in Information Retrieval. Johan Bollen Old Dominion University Department of Computer Science

Appendix 4 Weather. Weather Providers

PH 120 Project # 2: Pendulum and chaos

AMS 132: Discussion Section 2

Students will explore Stellarium, an open-source planetarium and astronomical visualization software.

Lab 2: Photon Counting with a Photomultiplier Tube

General, Organic, And Biological Chemistry: Structures Of Life (4th Edition) PDF

High-Performance Scientific Computing

GENERAL, ORGANIC, AND BIOLOGICAL CHEMISTRY: STRUCTURES OF LIFE (4TH EDITION) BY KAREN C. TIMBERLAKE

How to Make or Plot a Graph or Chart in Excel

1.0 Mathematics in This Shell

ON SITE SYSTEMS Chemical Safety Assistant

CAAM420: Week 3 Wednesday Notes

Why knitr? Very first steps in knitr Reviewing knitr ATM.Rnw Further exercises. PhD Workshop Series in


Python. Tutorial. Jan Pöschko. March 22, Graz University of Technology

MA 580; Numerical Analysis I

MATLAB AND L A TEX EXAMPLES

EOS 102: Dynamic Oceans Exercise 1: Navigating Planet Earth

Using web-based Java pplane applet to graph solutions of systems of differential equations

Writing Mathematics. 1 LaTeX. 2 The Problem

FIT100 Spring 01. Project 2. Astrological Toys

Newton s Cooling Model in Matlab and the Cooling Project!

Contents. 6.1 Conditional statements 6.2 Iteration 6.3 Procedures and flow control

Experimental Physics I & II "Junior Lab" Fall Spring 2008

Comparing whole genomes

Interacting Galaxies

Theory versus Experiment: Analysis and Measurements of Allocation Costs in Sorting (With Hints for Applying Similar Techniques to Garbage Collection)

Submitted to Econometrica A SAMPLE DOCUMENT 1

CityGML XFM Application Template Documentation. Bentley Map V8i (SELECTseries 2)

MULTIVARIABLE MATHEMATICS: LINEAR ALGEBRA, MULTIVARIABLE CALCULUS, AND MANIFOLDS BY THEODORE SHIFRIN

Fundamentals of Computational Science

Stellarium Walk-through for First Time Users

SuperCELL Data Programmer and ACTiSys IR Programmer User s Guide

Comp 11 Lectures. Mike Shah. July 12, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 12, / 33

THE COMPLETE IDIOT'S GUIDE TO ASTROLOGY (2ND EDITION) BY MADELINE GERWICK-BRODEUR, LISA LENARD

INTRODUCING EINSTEIN'S RELATIVITY BY RAY D'INVERNO DOWNLOAD EBOOK : INTRODUCING EINSTEIN'S RELATIVITY BY RAY D'INVERNO PDF

TikZ Tutorial. KSETA Doktorandenworkshop 2014 Christian Amstutz, Tanja Harbaum, Ewa Holt July 21,

Inorganic Chemistry By James R. Bowser

Bloomsburg University Weather Viewer Quick Start Guide. Software Version 1.2 Date 4/7/2014

Comp 11 Lectures. Dr. Mike Shah. August 9, Tufts University. Dr. Mike Shah (Tufts University) Comp 11 Lectures August 9, / 34

PPT PRESENTATION. What works, and what doesn t. Associate Dean USF Graduate School. Revised

Biologia Molecular da Célula (Portuguese Edition)

Introduction to Computational Neuroscience

CZECHOSLOVAK JOURNAL OF PHYSICS. Instructions for authors

Discrete Mathematics

C:\Dokumente und Einstellungen \All Users\Anwendungsdaten \Mathematica. C:\Dokumente und Einstellungen \albert.retey\anwendungsdaten \Mathematica

Topic: The Standard Format for Importing

Using the kbordermatrix package

v Prerequisite Tutorials GSSHA WMS Basics Watershed Delineation using DEMs and 2D Grid Generation Time minutes

Planets And Moons In Our Universe: Fun Facts And Pictures For Kids (The Cosmos And The Galaxy) PDF

Agile modeling for INF5150

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications. Gerwin Klein Formal Methods

Voltage, Current, Resistance and Power Report Tips

Integrating WeBWorK into Textbooks

USE OF MATLAB TO UNDERSTAND BASIC MATHEMATICS

Science Analysis Tools Design

TMHMM2.0 User's guide

Bay Area Scientists in Schools Presentation Plan

ISSP User Guide CY3207ISSP. Revision C

Green s Functions Computation

INSTRUCTIONS FOR PRODUCING CAMERA-READY MANUSCRIPT USING MS-WORD FOR PUBLICATION IN CONFERENCE PROCEEDINGS *

To whom correspondence should be addressed;

ADVICE ON MATHEMATICAL WRITING

Notater: INF3331. Veronika Heimsbakk December 4, Introduction 3

STAT 3008 Applied Regression Analysis Tutorial 1: Introduction LAI Chun Hei

THE STANDARD MODEL IN A NUTSHELL BY DAVE GOLDBERG DOWNLOAD EBOOK : THE STANDARD MODEL IN A NUTSHELL BY DAVE GOLDBERG PDF

Dynamics of the Atmosphere GEMPAK Lab 3. 3) In-class exercise about geostrophic balance in the real atmosphere.

Collaborative topic models: motivations cont

Creating Questions in Word Importing Exporting Respondus 4.0. Importing Respondus 4.0 Formatting Questions

module, with the exception that the vials are larger and you only use one initial population size.

ARGUS.net IS THREE SOLUTIONS IN ONE

Biology: The Study of Life

BY DEBORAH BARRETT - LEADERSHIP COMMUNICATION (4TH EDITION) ( ) [HARDCOVER] BY DEBORAH BARRETT

Fundamentals of Special and General Relativity

Tutorial 8 Raster Data Analysis

CSCE 155N Fall Homework Assignment 2: Stress-Strain Curve. Assigned: September 11, 2012 Due: October 02, 2012

Transcription:

An Introduction to L A T E X or Why Word Sucks MS012A Research Papers Ethics

Tools Preamble Running LAT E X WYSIWYG What You See Is What You Get Include programs like Word, OpenOffice, FrameMaker etc. Pros Easy to use for beginners. You get what you want (usually). Usable for simple letters, memos, flyers etc. Cons You have to be the designer. Hard to be consistent.

Tools Preamble Running LAT E X Structure Oriented Writing Include programs like L A T E X, scribe, html, xml. Pros Cons Concentrate on the subject. Easy to get a consistent, good design. Best suited for articles, reports, books, mathematical formulas etc. Many commands to learn. The commands are in the text. Awkward in the beginning.

Tools Preamble Running LAT E X T E X & L A T E X T E X L A T E X was created by Donald Knuth (http: //www-cs-faculty.stanford.edu/~knuth/). is freely available. is extendable. was created by Leslie Lamport. (http: //research.microsoft.com/users/lamport/), and is based on T E X adds macros, packages, indexes etc. is more user friendly than T E X. is easily extendable.

Tools Preamble Running LAT E X L A T E X L A T E X is just a command line program that you can run from any prompt. For *NIX L A T E X is often installed as a default. If it is not, just install it from the package-system of your distribution. For Windows Use the MiKT E X package (http://miktex.org/). Use via CygWin (http://cygwin.com/). CygWin emulates Linux for Windows. For OS X Install via MacPorts (http://www.macports.org/) or Fink (http://www.finkproject.org/). There are also standalone versions.

Tools Preamble Running LAT E X Editor You just need an ordinary text editor for editing L A T E X-files. Some of them might be a little better suited for the job however. Which editor you use is a matter of preference, but personally I have a few favorites.

Tools Preamble Running LAT E X Editor Emacs/XEmacs Emacs (http://www.gnu.org/software/emacs/ or http://www.xemacs.org/) is a wonderful editor that works on all platforms that you are likely to use L A T E X on. It has good support for L A T E X right out of the box, but by installing AUCTex (http://www.gnu.org/software/auctex/) a lot of extra functionality is provided, including live preview. Emacs is available for *Unix (Install via package manager). OS X (Several, I like http: //homepage.mac.com/zenitani/emacs-e.html). Windows (I like XEmacs for Windows).

Tools Preamble Running LAT E X Editor Vim Vim (http://www.vim.org/) is a very powerful, light weight editor. On *NIX, it is installed by default. There is no GUI (check out gvim), and it might have a steep learning curve, but when you know how to use it, it is very fast and powerful to use.

Tools Preamble Running LAT E X Editor Texmaker. Texmaker (http://www.xm1math.net/texmaker/) is a cross platform editor that have many enhancments for working with L A T E X.

Tools Preamble Running LAT E X IDEs There are several IDEs available, for writing L A T E X documents. Some examples are: Linux Kile is good. Install from your package manager Windows T E XnicCenter (http://www.toolscenter.org/) OS X TexShop (http://www.uoregon.edu/~koch/texshop/) For an all-in-one install of L A T E X, TexShop and several other tools, use MacTex (http://www.tug.org/mactex/)

Tools Preamble Running LAT E X rubber If you prefer to use the command line for making your documents, there are some tools that might help you. Some people create makefiles to create their documents. In stead of creating one for yourself, you can use rubber (http: //www.pps.jussieu.fr/~beffara/soft/rubber/), a script that automates many of things you otherwise would have had to do manually.

Tools Preamble Running LAT E X JabRef You will be creating a database of the papers that you read. Although using a plain text editor will work just fine, using a program to manage your references might make things a bit more easy. JabRef (http://jabref.sourceforge.net/) makes it easy to manage your database, with a nice GUI. It is java-based, so it works on most common platforms. If you are on OS X, BibDesk (http://bibdesk.sourceforge.net/) is a good, native alternative (my personal preferense).

Tools Preamble Running LAT E X The Preamble An Example \ documentclass [11 pt, a4paper, e n g l i s h ] { a r t i c l e } \ usepackage [ l a t i n 1 ] { inputenc } \ usepackage [ T 1 ] { fontenc } \ usepackage { babel } \ usepackage { u r l } \ t i t l e { L i t e r a t u r e Survey } \ author { \ \ Oslo U n i v e r s i t y College \ \ \ u r l { simen. hagen@iu. hio. no } } \ date { January 21 st, 2008} %% Leave t h i s out %% and i t w i l l use todays date.

Tools Preamble Running LAT E X The body An Example \ begin { document } \ m a k e t i t l e \ begin { a b s t r a c t } In t h i s section I write my abstract. An abstract is the authors version of a short summary. I t often includes a short guide to the a r t i c l e. \ end { a b s t r a c t } \ section { I n t r o d u c t i o n } This i s a l i t e r a t u r e survey on a t o p i c t h a t I have chosen \ c i t e {MEGA}. \ section {A chapter } In t h i s part I w i l l write some important information about the topic that I have chosen \ cite [ page~2]{mega}. \ section { Conclusion } Now i t is time to wrap up and think of something very impressive to say. \ bibliography { example } \ bibliographystyle { p l a i n } \ end { document }

Tools Preamble Running LAT E X The Resulting Page Literature Survey Oslo University College simen.hagen@iu.hio.no January 21st, 2008 Abstract In this section I write my abstract. An abstract is the authors version of a short summary. It often includes a short guide to the article. 1 Introduction This is a literature survey on a topic that I have chosen[1]. 2 A chapter In this part I will write some important information about the topic that I have chosen[1, page 2]. 3 Conclusion Now it is time to wrap up and think of something very impressive to say. References [1] Siri Fagernes and. The MEGA project - virtual emotions in mixed reality. Technical Report N 50/2002, Telenor Research and Development, Fornebu, Norway, 2002. 1

Tools Preamble Running LAT E X How to run L A T E X You can use any text editor to write your L A T E X-files. The L A T E X-file typically ends with the extension.tex. I would recommend Emacs since it has many functions to help you write your code. When you have written the document, you run the L A T E X-program with the following command: $ latex <my_latex_file>.tex If all goes well, your code compiles without errors, and it produces a.dvi document. You can view this document with any dvi viewer, e.g. xdvi in a UNIX environment, or with yap if you are using windows (and the MiKTeX-package for windows). You can also convert your.dvi files into.ps with dvips, or to.pdf with dvipdf. You could also use the command pdflatex instead of the normal latex to produce a.pdf directly.

Basics Math Figures Document Classes Any document written in L A T E X need to have a document class. The document class defines how the document will be rendred on the page. The example on the previous slides used the article style, but there are others available. The most common ones are: article report book There is also a letter class, and more can be downloaded or you can create your own. For your survey, the article class should be used.

Basics Math Figures Classes and properties There are a number of properties you can set that influences the document created. The syntax for the command is \ documentclass [ options ] { class } The class is as on the previous slide, and you can have several options, dependent on the class you have chosen. Below is a list of a few of the possibilities. 10pt 11pt 12pt letterpaper a4paper onecolumn twocolumn oneside twoside draft final

Basics Math Figures Writing Text You write text just as normal, plain text. There are a few reserved characters (see table below). Commands start with a \. Commands can occur anywhere in the text. You signal a new paragraph with a blank line.

Basics Math Figures Reserved Characters Character Write Character Write # \# } \} $ \$ _ \_ % \% ^ \textasciicircum & \& ~ \textasciitilde { \{ \ \textbackslash

Basics Math Figures Sections It is common practice to divide a document into parts. In L A T E Xthere are several commands, taking the form \section_comand{title}. These commands are: part chapter section paragraph subsection subparagraph subsubsection These commands produce sectioning numbers, and are automatically added to a table of context. There is also a version of the sectoning commands, on the form \section_comand*{title}, that do not produce sectioning numbers, or produce an entry into the table of context.

Basics Math Figures Text Formating You can mark text in several different ways. Here is a list of the most common ways: Command \emph{...} \textbf{...} \textsc{...} \texttt{...} Result Italic Bold CAPITALISE Typewriter It is also possible to combine the text formating to have Italic Bold or BOLD CAPITALISE.

Basics Math Figures Creating Lists \ begin { i t e m i z e } \ item Item number one \ item Item number two \ item Item number three \ item And so on... \ end { i t e m i z e } Item number one Item number two Item number three And so on... \ begin { enumerate } \ item Item number one \ item Item number two \ item Item number three \ item And so on... \ end { enumerate } 1 Item number one 2 Item number two 3 Item number three 4 And so on...

Basics Math Figures Creating Lists... Continued \ begin { d e s c r i p t i o n } \ item [ Term 1] Term number one \ item [ Term 2] Term number two \ item [ Term 3] Term number three \ item [ Term 4] And so on... \ end { d e s c r i p t i o n } Term 1 Term number one Term 2 Term number two Term 3 Term number three Term 4 And so on...

Basics Math Figures Verbatim Text Sometimes it is necessary to type something that should appear exactly as typed, without L A T E X formating it. You can achieve this by using verbatim text. The text will appear exactly as typed, in a typewriter font. Using \verb+my text+ gives you verbatim text within a line. It will quote all text that appears within the + -markers. You can use any marker you like, not just +, as long as the marker do not occur in the text you are quoting.

Basics Math Figures Verbatim Text cont... You can also create an environment, and in this case, it will make space above and below. You use it like this: \ begin { verbatim } \ textbf {Some t e k s t. } \ end { verbatim } \textbf{some tekst.}

Basics Math Figures Program Listings You may also want to refer to a program file, or some code that you have written. You can use \verb for this, but you can also use the package listings. It will pretty print your code for you, and it support most popular languages, including L A T E X. \ l s t s e t { language =[ ] TeX} \ l s t s e t { b a s i c s t y l e =\ s c r i p t s i z e } \ l s t i n p u t l i s t i n g [ f i r s t l i n e =1, l a s t l i n e =12]{ example 1. tex } \ begin { l s t l i s t i n g }... some code... \ end { l s t l i s t i n g }

Basics Math Figures Math in L A T E X It is easy to write formulas in L A T E X. You can write inline formulas like A = B 2 + C 2. This is written like $A = \sqrt{b^2 + C^2}$.

Basics Math Figures Math in L A T E X You can also write larger formulas that are written in a new paragraph. Then you would write: \ begin { equation } A = \ sqrt {B^2 + C^2} \ end { equation } to get the the following: A = B 2 + C 2 (1) As you can see, this equation have a number, and this number can be referenced.

Basics Math Figures Math in L A T E X \ begin { displaymath } A = \ sqrt {B^2 + C^2} \ end { displaymath } Which gives you this: A = B 2 + C 2 In this case there is no equation number. You could also use the short hand version that can be written $$... $$.

Basics Math Figures Using Illustrations It is easy to include graphics in L A T E X, but you have to include an extra package to do it. \usepackage{graphicx} Then, somewhere in your document you write: \includegraphics[height=3cm]{some_picture}. L A T E X, unfortunately, only understands.eps pictures (Encapsulated PostScript). If you use pdfl A T E X, it understands a few more formats (.jpg,.png and.pdf). You do not have to specify the extension.

Basics Math Figures Floating Figures You can create floating figures. L A T E X will place a floating figure wherever it finds room for it. It is the preferred way of doing tables, pictures etc. Using the example from the previous slide, we can create a floating figure like this: \ begin { f i g u r e } [ t ] \ centering \ i n c l u d e g r a p h i c s [ h e i ght =3cm ] { some_ p i c t u r e } \ caption { This i s my l i t t l e p i c t u r e } \ end { f i g u r e } If you make your images and figures floating, you will save yourself a lot of problems later on.

Basics Math Figures Cross references Often, we want to refer to something in our text, like a figure or table. And often, particularly if we are using floating figures, we do not know where they are, exactly. Enter the cross reference. Before we can reference anything, we have to create a label. If we expand the example from the previous slide, we can create a label like this: \ begin { f i g u r e } [ t ] \ centering \ i n c l u d e g r a p h i c s [ h e i g h t =3cm ] { some_ p i c t u r e } \ caption { This i s my l i t t l e p i c t u r e } \ label { p i c t u r e } \ end { f i g u r e } We can now reference the page that the label occur on by using \pageref{picture}, or the figure number by using \ref{picture}. For more diverse reference-naming, see the package varioref.

BIBT E X For starters Running The Database BIBT E X is an external program that helps you manage your references when writing in L A T E X. First you have to create a database of your references. You can then use L A T E X commands to access the reference trough a key that you have defined. When you have written your document and made your references, you start by funning L A T E X on your document. You will get a couple of messages complaining that there are missing references, but that is normal. Now you run BIBT E X on that file, and finally you run L A T E X two more times. You should now have your bibliography.

Running The Database Creating the database At some point you have to create the database. It is just a text file (with a.bib extension), formated in a particular way. There are several different types of entries in the database (see for example http://www.cs.arizona.edu/~collberg/ Teaching/07.231//bibtex.html for a list). Some of the more common are: article An article from a journal or magazine. book A book with an explicit publisher. proceedings An article in a conference proceedings. techreport A report published by a school or other institution, usually numbered within a series.

The Entries For starters Running The Database In the database, each entry starts with an @, and all the fields in the database is enclosed within curly-braces ( { and } ). Below is a sample entry: @techreport { Mega, author = { S i r i Fagernes and }, t i t l e = { The {MEGA} P r o j e c t V i r t u a l Emotions i n Mixed R e a l i t y }, i n s t i t u t i o n = { Telenor Research and Development }, year = 2002, number = {N 50/ 2002}, address = { Fornebu, Norway } }

References For starters Running The Database When we have created an entry and want to refer to it, we use the \cite[extra]{key} command. If we write the following \ section { I n t r o d u c t i o n } This i s a l i t e r a t u r e survey on a t o p i c t h a t I have chosen \ c i t e {MEGA}. We get

References For starters Running The Database If we give some additional information to te command, like this \ section {A chapter } In t h i s part I w i l l write some important information about the topic that I have chosen \ cite [ page~2]{mega}. We get

The Result For starters Running The Database When everything is done, and you have produced the final document, you might get something like this:

Reference style For starters Running The Database There are four basic styles available for how your referencing and bibliography will look. They are plain, unsrt, abbrv and alpha. There is also a host of other styles that you can install and use in you documents, but these four should be present on all systems. You can set which style by using the command \bibliographystyle{<style>}.

Reference style For starters Running The Database To insert the bibliography, you give the command \bibliography{<bib-databases>}, where <bib-databases> is a comma-separated list of the database files that you use in your document. So, given that your database is called example, you could add the following commands where you want the bibliography to appear. \bibliographystyle{plain} \bibliography{example}

Books For starters Running The Database This is a nice introduction and reference book to L A T E X. It has lots of examples and useful information. (Link to amazon)

Books For starters Running The Database This is a very good reference book, and is quite a bit more advanced than the Guide to L A T E X. It is considered to be THE reference to L A T E X. (Link to amazon)

Running The Database More Information Dag Langmyr has some good L A T E X references in Norwegian at his homepage http://heim.ifi.uio.no/~dag/. You can find a simple introduction to L A T E X at http: //www.cs.hmc.edu/tech_docs/qref/latex/. There is a good hypertext reference at http: //www.giss.nasa.gov/tools/latex/ltx-2.html. L A T E X by Example is another easy to use reference: http: //cs5.ecok.edu/byexample/byexample.html. L A T E X help on commands http://www-h.eng.cam.ac.uk/help/tpl/ textprocessing/tetex/latex/latex2e-html/

Running The Database Even More Information There is a L A T E X FAQ at http://www.tex.ac.uk/cgi-bin/texfaq2html. AUCT E X is a package for GNU Emacs and XEmacs for writing T E X and L A T E X files: http://www.gnu.org/software/auctex/. CTAN is the Comprehensive T E X Archive Network, and has a lot of information about T E Xand L A T E X: http://www.ctan.org/. CTAN also has The Not So Short Introduction to, also known as in 131 minutes. http://www.ctan.org/tex-archive/info/ lshort/english/lshort.pdf.