David Helmbold, October 2005, Revised October 2007

Similar documents
LaTeX A Tutorial. Mohsen Alimomeni, 2010

Helen Cameron. A Brief Overview of LATEX

Helen Cameron. A Brief Overview of LATEX

Intro to LATEX I. Aaron Erlich POLS/CSSS 510, Why LATEX? Programming Document Structure Floats Tables Lists Math

L A TEX Tutorial. 1 Introduction. 2 Running L A TEX. J. E. Rice. May 2010

Introduction to LaTeX. Paul Fodor Stony Brook University

Introduction to L A TEX

L A T E X Workshop. Bijulal D & Anu Thomas Industrial Engineering and Operations Research Indian Institute of Technology

Assessments for CS students:

Introduction to L A TEX

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

INTRODUCTION TO L A TEX

Getting Started with L A T E X for a Technical Document or Thesis

L A TEX Overview. Jiayi Liu. January 31, Colorado School of Mines

Latex Tutorial 1 L A TEX. 1.1 Text

Introduzione a LaTex. Fabrizio Messina

L A TEX for Psychological Researchers

Introduction to LATEX

T E X and L A T E X Document preparation tools

An Introduction to LATEX

Formatting with LaTeX

The Name of the Game. An Introduction to LATEX. Why L A TEX? The Name of the Game

Introduction to L A T E X

A Beginner s guide to L A TEX for CSCA67/MATA67. Kohilan Mohanarajan

A Very Brief Introduction to L A T E X MAT 3535

Introduction to LaTex 2ε. Based on The Not So Short Introduction to LaTeX 2ε by Tobias Oetiker et al., April 2001

A Short Introduction to L A TEX

Very Short Introduction to LaTeX

A LAT E X Tutorial. Evangelos Milios. March 15, 2004

Introduction to L A TEX

UNIX Writing Tools Primer for CS Graduate Students: Ispell, L A TEX, BibTex, Xfig, GNUPLOT, XV, etc.

A Brief Introduction to L A TEX

Latex Tutorial. CIS400 Senior Design 9/5/2013

INTRODUCTION TO L A TEX WHAT IS L A TEX?

L A TEX minicourse. dstowell, mag, sar, scannell,... September Typeset by FoilTEX

An introduction to LaTeX

What is LaTeX. Is a document markup language and document preparation system for the TeX typesetting program

LearningLatex. % This file walks you through some basic things with LaTex % Thanks to Patrick Lam and Maya Sen for letting me borrow their materials

Basic L A TEX. what is LaTeX?

L A TEX. The Logo. Introduction to L A TEX. Overview. Primary Benefits. Kinds of Documents. Bill Slough and Andrew Mertz

MATLAB for the Sciences

An Interactive Introduction to L A TEX

CSCM10 Research Methodology A Taster of L A TEX

WYSIWYG Systems. CSCM10 Research Methodology A Taster of L A TEX WYSIWYM. Advantages/Disadvantages of WYSIWYG Systems.

LaTeX. Information Literacy II EN(IL2) Course

Math 235: Introduction to LaTeX

An Interactive Introduction to L A TEX. Part 1: The Basics. John Lees-Miller. writel A TEX

How to get started in L A TEX

A Grasshopper s Approach to L A TEX

Introduction to LATEX

VERY VERY SHORT GUIDE TO LATEX

L A TEX From The Ground Up

Lecture 1. MA2730: Analysis I. Lecture slides for MA2730 Analysis I. Study and Assessment Components. MA L A TEX: topics for Lecture 1

How to L A TEX. George Wong, David Mykytyn. 6 October 2016

A quick guide to L A TEX

Lecture 1: Short summary of LaTeX basics

Typesetting Text. Spring 2013 TEX-Bit #1 Math 406

LaTeX is essentially a markup language

An Introduction to LATEX

An introduction to L A TEX for students

Pimp your thesis: a minimal introduction to L A T E X.

Document Preparation Word Processors

L A TEX: Eh? What is it, what isn t it, who cares? Andy Caird. LATEX: Eh? p.1/13

Introduction to L A TEX Part II

Appendix B: Latex survival guide

Tools for Scientific Writing with LAT E X. Johan Carlson

Workshop P. Stallinga 16-X-2012

An introduction. C.D. Emmery & M.M. van Zaanen. October 22, Tilburg University

The AES Convention Paper LATEX class Adam H. Lewenberg (October 18, 2008) 1

Introduction to L A TEX

Introduction to L A TEX Part II

Typesetting with TEX

An introduction to LaTeX

Learning LaTeX: The Basics

L A TEX incollaboration

A Short L A TEX Introduction

Introduction to Latex. A workshop by Dr. Ala Eshmawi

An Introduction to LATEX

An Introduction to L A TEX

Began as TeX, in 1982 (Knuth). Purely a typesetting tool. LaTeX added macros, maintaining TeX as it s typesetting engine (Lamport).

An Introduction to. Rado Ivanov CIS400 Senior Design Tutorial September 18, 2014

WYSIWYG Systems. CSCM10 Research Methodology Lecture 4 (11/2/16): A Taster of L A TEX WYSIWYM. Advantages/Disadvantages of WYSIWYG Systems

epub WU Institutional Repository

L A TEX. COMPSCI 111 / 111G Mastering Cyberspace: An introduction to practical computing. LaTeX. Development. Why?

CSCM10 Research Methodology A Taster of L A TEX

L A TEXcourse. Carmen Alonso Montes. 30th May-2nd June, 2016

An introduction to TeX. And other options for producing documents containing mathematics

Introduction to L A TEX

L A T E X FOSSEE. Department of Aerospace Engineering IIT Bombay. FOSSEE (IIT Bombay) LAT E X 1 / 58

A L A T E X quick start

عمادة البحث العلمي جامعة الملك سعود

Guide to using L A TEX

COMS 6100 Class note

Intro to LaTeX Workshop

Introduction to LaTeX. Christoph Pickl

What is T E X? T E X and L A T E X Document preparation tools. Setting and casting type. What Knuth was setting. Setting and casting type

Typing Mathematics. Darrin Doud

LaTeX: Scientific Document Writing

Note di Matematica instructions for authors

Workshop on LATEX 2ε. Asst. Prof. Dr. Kemal Bagzibagli Department of Economics. 20 May 2015

Transcription:

Short Intro to LATEX David Helmbold, October 2005, Revised October 2007 Goals: Introduce L A TEX... so you can read/edit L A TEX source... and use manual as reference rather than reading it

Outline: 1. A brief history of L A TEX 2. L A TEX commands and files 3. Structure of a L A TEX document 4. Special characters 5. Defining Macros 6. Environments and some common L A TEX commands 7. Math typesetting 8. Counters, labels, citations, and cross references... but little on BibTeX or pictures

Why use LATEX? Latex is a typesetting system that is especially good for typesetting mathematics. Customizable in many ways, and many publishers of journals or conference proceedings have their own L A TEXstyles. Many useful packages for preparing talks, letters, etc. etc. Powerful macro, cross referencing, and bibliography features The standard and in public domain

LATEXHistory Knuth (Turing Award, National Medal of Sciences, etc.) writing The Art of Computer Programming (series of 9? volumes) but bothered by typesetting Designed TEX for typesetting and mathematics, and MetaFont for fonts (mid 1970 s) In early 1980 s popular L A TEX 2.09 macro package for TEX introduced by Lamport separates out typography (how it looks) from content via predefined class or style files L A TEX re-implemented as L A TEX 2ε in 1993 and unifies many extensions to L A TEX Many packages available for doing many different things in L A TEX2ε

Commands and Files Unix Commands: > latex file.tex runs latex, creates.dvi > xdvi file.dvi previewer > dvips file.dvi creates.ps > pdflatex file.tex creates.pdf directly > bibtex file only if bibliography needed file.tex is your source L A TEX document file.aux is created and read by L A TEX for cross references, etc. (and used by bibtex) file.dvi is the device independent output produced by L A TEX, this can be converted into postscript or other stuff (pdflatex produces pdf directly) file.log the log file created by L A TEX

bibfile.bib a file of bibliography entries (created by you or group) file.bbl and file.blg are created by BibTeX, file.bbl is read by L A TEX to create bibliography, file.blg is the bibliography log file.

Structure of a LATEX document \documentclass[12pt]{article} % or book, theses, etc. % this part is the preamble % incorporate package or define macros here \usepackage{color} \usepackage{graphicx} % some styles have you setting the title and author % here and using a \maketitle below \begin{document} % this part is the body - stuff to be printed % it can \include or \input other.tex files \end{document}

Special Characters % comment character \ macro command # macro parameter some dinosaurs use $... $ or $$... $$ to enter/leave math mode, but \(... \) or \[... \] is better & column character ~ unbreakable space _ subscript (in math mode) ^ superscript (in math mode) { and } grouping/scoping symbols some others: @, and quotes vs quotes, <> give, blank line or \par means new paragraph, otherwise multiple whitespace collapsed to space

Can usually get these special characters with backslash prefix, like \{ prints as { Can also use a verbatim command: \verb+\+ prints as \ Note \\ forces a new line in the output (use \backslash) some like \~ have special meaning (ni\~na gives niña )

Macros Very useful for shorthand and notation Definition: \newcommand{\macroname}{meaning} \newcommand{\macroname}[numparams]{meaning} Macros can take arguments: \newcommand{\norm}[1]{ #1 _{2}} \newcommand{\anynorm}[2]{ #1 _{#2}} now \( \norm{xy} \) prints as xy 2 and \( \anynorm{x}{\infty} \) prints as x (note math mode)

More on macros \renewcommand like \newcommand for re-defining macros (plain TEX uses a \def command) Macro names containing \@ are usually class/package internal Use \mbox{ math mode) } to ensure in paragraph mode (rather than Macro name eats the trailing spaces: \newcommand{\from}{from} causes \from one to five to print as fromone to five but {\from} one to five prints as from one to five With \newcommand{\froms}[1]{from #1} \froms{sea} to shining sea prints as from sea to shining sea

Standard environments Usage: \begin{env-name} stuff \end{env-name} env-name can be: document, centering, quote, verbatim, itemize, enumerate, tabular, tabbing, etc. itemize, enumerate use \item commands to start items Example: \begin{enumerate} \item first item \item and another \end{enumerate} 1. first item 2. and another

Builtin Macros use to get comments a \emph{text} b a text b can nest \textbf{text} text \textit \texttt etc {\normalsize text} text {\Huge text} text many sizes a\hspace{0.2in}b a b \"o{o} ö \ \ \. \~ etc Other useful commands: \section \subsection \subsubsection \paragraph \chapter \newpage \hspace{15pt} \vspace{2ex} \hfill \vfill * versions of commands

Typesetting Math Use \(... \) for in-line and \[... \] for displayed math Spaces ignored, operator/relation spacing automatic : \( 3 a+c =2\) is 3a + c = 2 use \mbox{} for words inside math, compare: caffeine = 100mg shots caffeine = 100mg shots example input produces x_i \leq \sqrt{10} x i 10 x 2 {x \choose 3} 2 3 \sum_{i=1}^{10} i^{2} \frac{\gamma}{\lambda+\frac{1}{2}} 10 i=1 i2 γ λ + 1 2

Some Predefined Commands like \sum are: \prod \int elipses: \cdots \ldots symbols: \forall \exists \infty \emptyset \Re relations: \geq \leq = \neq \subset \in \approx often used with \not functions: \log \ln \min \sin \cos \lim \gcd accents: \tilde{a} \hat{a} a get ã â a lots of arrows, etc.

Fancy Example Uses \left \right for delimiters and array environment for alignment (use tabular environment in text) \[ f(n,k) = \left\{ \begin{array}{ll} n-k^2 & \mbox{if \(n>0\)} \\ 0 & \mbox{otherwise} \end{array} \right. \] f(n, k) = n k 2 if n > 0 0 otherwise

\begin{equation} \end{equation} produces numbered equation, eqnarray gives 3-column alignment \begin{eqnarray} 3ab &=& 9a^2 \\ b &=& 3a \end{eqnarray} 3ab = 9a 2 (1) b = 3a (2) star forms (e.g. \begin{eqnarray*} ) suppress numbering

Figure 1: A Rock Cross Referencing Enumerate, figure (caption), theorem, equation environments generate numbers. Access with \label and \ref \begin{figure} \begin{center} \resizebox{1.0in}{!}{\includegraphics{rock.jpg}} \end{center} \caption{a Rock} \label{f:rock} \end{figure} In Figure~\ref{f:rock} we see a rock. In Figure 1 we see a rock.

Bibliography Use \bibliographystyle{plain} and \bibliography{mybib} commands (usually at end of file) after making a mybib.bib file with references (See BibTex sections of manuals for more info) Then in document you can use \cite{key} to cite the paper associated with key in mybib.bib Bibliography and numbers generated automatically by bibtex program Run bibtex, and then run L A TEX twice

References The Not So Short Introduction to LATEX 2e and other guides, see: http://www.latex-project.org/guides/ L A TEX Users Guide and Reference Manual by Leslie Lamport The L A TEX Companion by Goossens, Mittelbach, Samarin google Latex documentation This document prepared using Doug Nychka s L A TEX template (8/13/2004).