my notes on getting started with latex

22
Introducing Bruce E Shapiro California State University, Northridge Last Revised: January 28, 2012 Abstract This document provides an short introduction to the Latex document preparation system. Its sole purpose is to help readers get started with L A T E Xin as little time as possible. Hopefully it will provide enough information for the reader to begin using Latex, and then to research specific details on their own, e.g., using one of the suggested references. Copyleft 2012. This work is licensed under the Creative Commons Attribution - Noncommercial - No Derivative Works 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/us/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. These notes were originally developed for students at California State University, Northridge. This is an approximate document and probably contains typographical errors. Please let me know if you’ve used these notes for a class and found them useful (or useless). Report any errors to [email protected]. All feedback, comments, suggestions for improvement, etc., is appreciated, especially if you’ve used these notes for a class, either at CSUN or elsewhere, from both instructors and students. Introducing L A T E X (rev. 2012.1) Page 1

Upload: others

Post on 12-Feb-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: My Notes on Getting Started with Latex

Introducing

Bruce E ShapiroCalifornia State University, Northridge

Last Revised: January 28, 2012

Abstract

This document provides an short introduction to the Latex document preparation system. Its solepurpose is to help readers get started with LATEXin as little time as possible. Hopefully it will provideenough information for the reader to begin using Latex, and then to research specific details on theirown, e.g., using one of the suggested references.

Copyleft « 2012. This work is licensed under the Creative Commons Attribution - Noncommercial - No Derivative Works3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/us/

or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.

These notes were originally developed for students at California State University, Northridge. This is an approximate document

and probably contains typographical errors. Please let me know if you’ve used these notes for a class and found them useful

(or useless). Report any errors to [email protected]. All feedback, comments, suggestions for improvement, etc., is

appreciated, especially if you’ve used these notes for a class, either at CSUN or elsewhere, from both instructors and students.

Introducing LATEX (rev. 2012.1) Page 1

Page 2: My Notes on Getting Started with Latex

Contents

I Before You Use LATEX the FirstTime 3

1 What is LATEX? 3

2 Where Can I Get LATEX? 32.1 Use it On Campus . . . . . . . . . . . 32.2 Download and Install at Home . . . . 3

3 How Do I Use LATEX? 4

II Typesetting With LATEX 5

4 Document Structure 54.1 The Basics . . . . . . . . . . . . . . . 54.2 Entering Text and Symbols . . . . . . 6

5 Document Layout 75.1 Margins and Text Alignment . . . . . 75.2 Paragraph Indentation and Spacing . . 85.3 Double-spacing . . . . . . . . . . . . . 85.4 Multiple Columns . . . . . . . . . . . 85.5 Forcing Page Breaks . . . . . . . . . . 95.6 Vertical and Horizontal Space . . . . . 95.7 Footnotes . . . . . . . . . . . . . . . . 95.8 Inserting Code . . . . . . . . . . . . . 95.9 Boxes Around Text . . . . . . . . . . . 105.10 Counters and labels . . . . . . . . . . 105.11 Headers and Footers . . . . . . . . . . 105.12 Including External Files . . . . . . . . 115.13 Lists . . . . . . . . . . . . . . . . . . . 11

6 Tabs, Tables, and Figures 126.1 Tabbing . . . . . . . . . . . . . . . . . 126.2 Tabular Arrays . . . . . . . . . . . . . 126.3 Floating Tables . . . . . . . . . . . . . 136.4 Inserting Pictures . . . . . . . . . . . . 13

7 Math Mode 157.1 Inline Equations . . . . . . . . . . . . 15

7.2 Display Equations . . . . . . . . . . . 157.3 Numbered Equations . . . . . . . . . . 157.4 Boxed equations . . . . . . . . . . . . 167.5 Aligned and Multi-line Equations . . . 16

7.5.1 The align Environment . . . . 167.5.2 The split Environment . . . . 167.5.3 The cases Environment . . . . 16

7.6 Superscripts and Subscripts . . . . . . 177.7 Roots and Fractions . . . . . . . . . . 177.8 Integrals . . . . . . . . . . . . . . . . . 177.9 Sums and Products . . . . . . . . . . . 187.10 Limits . . . . . . . . . . . . . . . . . . 187.11 Lines Above and Below Expressions . 187.12 Text Above and Below Expressions . . 187.13 Arrows Above & Below Expressions . 187.14 Chemical Reactions . . . . . . . . . . . 197.15 Large Parenthesis . . . . . . . . . . . . 197.16 Matrices and Arrays . . . . . . . . . . 19

A Symbol Tables 20A.1 Math Fonts . . . . . . . . . . . . . . . 20A.2 Math Accents . . . . . . . . . . . . . . 20A.3 Greek Letters . . . . . . . . . . . . . . 20A.4 Variable Size Symbols . . . . . . . . . 20A.5 Named Math Functions . . . . . . . . 20A.6 Brackets . . . . . . . . . . . . . . . . . 20A.7 Relational Symbols . . . . . . . . . . . 20A.8 AMS Relational Symbols . . . . . . . 21A.9 Binary Operations . . . . . . . . . . . 21A.10 AMS Binary Operations . . . . . . . . 21A.11 Standard Arrows . . . . . . . . . . . . 21A.12 AMS Arrows . . . . . . . . . . . . . . 21A.13 Miscellaneous Math Symbol . . . . . . 21A.14 Special Math Typesetting . . . . . . . 22A.15 Text Accents . . . . . . . . . . . . . . 22A.16 Special Symbols in Text Mode . . . . 22A.17 Text Font Styles . . . . . . . . . . . . 22A.18 Font Sizes . . . . . . . . . . . . . . . . 22

B References 22

Introducing LATEX (rev. 2012.1) Page 2

Page 3: My Notes on Getting Started with Latex

Part I

Before You Use LATEX the First Time

1 What is LATEX?

is a document preparation system for mathe-matics. The main things that distinguish it from aword processor (like Microsoft Word) are:

• All documents are stored as text files. Thismeans you can always look at them with al-most any program that reads text.

• The document you print normally a .pdf, .ps,or .dvi file, is separate from the document youedit, which is called a .tex file. Conversiontakes place in a process called typesetting.

• Formatting instructions are visibly embed-ded in the text by means of special commandsthat begin a backslash character (\), e.g.,

I \underlinelike onions!

. will be typeset as

I like onions!

• LATEX contains a lot of special commands formaking equations look precisely the sameway they do in textbooks.

To use LATEXyou must have three things installed onyour computer:

1. A LATEXsystem - this is a large collection ofbinary and script files that you will never usedirectly, but will access through (2).

2. A LATEX editor, such as Texmaker, TeXworks,TeXshop, or WinEdt. (Technically you coulduse any text editor but then you would have todo your typesetting from the command line.)

3. A pdf file viewer such as Acrobat Reader, Oku-lar, Evince.

2 Where Can I Get LATEX?

2.1 Use it On Campus

Latex is installed on all computers in the College ofScience of Science and Mathematics Computer Labs.Locations and hours are give at http://www.csun.

edu/csm/computing.htm.

2.2 Download and Install at Home

Instructions for a Linux Install

Install texlive (or texlive-all) and texmaker

from your package manager.

If they are not available, binary and source filescan be downloaded from http://www.tug.org/

texlive/acquire-netinstall.html and http://

www.xm1math.net/texmaker/download.html.

You will be able to use LATEXvia Texmaker from thecommand line ($Texmaker) or you can access the in-dividual commands such as $pdftex,$latex,... onthe command line. In the later case you may preferto use emacs instead of Texmaker.

Instructions for a Mac Install

You should install the following two packages:

1. Download The MacTex 2011 Distribution

from http://www.tug.org/mactex/2011/.The total download is around 2 GB. Afterthe download is finished, locate the downloadfile and run the installer.

Introducing LATEX (rev. 2012.1) Page 3

Page 4: My Notes on Getting Started with Latex

2. Download the latest version of Texmaker

from http://www.xm1math.net/texmaker/

download.html. After the download isfinished unpack the zip file and drag theTexmaker application to your Applications

folder.

We will use LATEX directly from Texmaker, whichyou can access from your Applications folder.

Instructions for Windows 7

You should install the following two packages:

1. MiKTeX from http://miktex.org/. TheBasic MiKTeX 2.9 Installer (164 MB) willbe enough for most purposes. After you down-load the file, run the installer. (This versioninstalls essential files only; if you need some-thing special, it will install it later.) If youdecide to download the complete system youhave download the MiKTeX 2.9 Installer (7MB), and then run the installer twice: onceto download the software (about 2 GB), thena second time to install the software.

2. Texmaker from http://www.xm1math.net/

texmaker/download.html. After you down-load the file, you have to run the installer once;then look for Texmaker in your Start menu.

3 How Do I Use LATEX?

There are two ways to use LATEX:

1. From the command line: (a) edit your doc-uments in a text editor such as emacs orNotepad; (b) convert your .tex files to .pdf

(or other formats) using a command such aspdflatex in the terminal (Linux or Macs)or command prompt (Windows); and (c) viewor print your .pdf file using Acrobat Reader,Preview, or Okular.

2. Using a LATEX-cognizant text editor such asTexmaker. You do everything in step 1 butinstead of using the Command Line you usemenus to invoke the various options. For ex-ample, using Texmaker, you would:

(a) Create a new document using the

File / New and then File / Save optionon the menu bar. Make sure the file nameends in .tex.

(b) Initialize the document with a basic tem-

plate using the Wizard / Quick-Startoptions on the menu bar.

(c) Edit the document using formatting com-mands as described in the rest of this doc-ument.

(d) Compile the document from to PDF us-

ing the PDFLaTeX button on the menubar.

(e) Check for any errors in the error window.

(f) View the PDF file using the View PDFbutton on the menubar.

Schematic of different LATEX file conversion commands avail-

able at the command prompt. Figure from Wikimedia

Commons under the Creative Commons Attribution-Share

Alike 3.0 Unported license at http://commons.wikimedia.

org/wiki/File:LaTeX_diagram.svg.

Introducing LATEX (rev. 2012.1) Page 4

Page 5: My Notes on Getting Started with Latex

Part II

Typesetting With LATEX

4 Document Structure

4.1 The Basics

documents are divided into two parts, called thepreamble and the body. We can think of themfiguratively like this:

PREAMBLE

BODY

The preamble tells information about the entire doc-ument, like the page size and which parts of you aregoing to use. The body contains the actual text ofyour document, along with local (rather than global)

formatting commands. For example, the block:

\documentclass[12pt,letterpaper]

article

\usepackage[latin1]inputenc

\usepackageamsmath

\usepackageamsfonts

\begindocument

\begincenterQuadratics\endcenter

The solution of $$ax^2+bx+c=0$$ is

$$x=\dfrac-b\pm\sqrtb^2-4ac

2a$$

And that’s \textitjust

the way it is.

\enddocument

will look something like this, when it is typeset:

Quadratics

The solution ofax2 + bx+ c = 0

is

x =−b±

√b2 − 4ac

2a

And that’s just the way it is.

1

The preamble starts with \documentclass andends with \begindocument

The body starts with the \begindocument andends with an \enddocument

Here is our schematic again:

\documentclass

... % preamble

\begindocument

... % body

\enddocument

The format of the \documentclass command is

\documentclass[options]class

where options can be omitted.

Standard classes are: book, report, article,letter and beamer (the last is for presentations).

Typical options are font and page size and orienta-tion, such as 10pt, 11pt, and 12pt, letterpaper,legalpaper,A4paper,landscape (default is por-trait), onecolum (default), and twocolumn.

Additional sets of commands are enabled by addingspecific packages,

\usepackagepackage name

Introducing LATEX (rev. 2012.1) Page 5

Page 6: My Notes on Getting Started with Latex

4.2 Entering Text and Symbols

In you pretty much just type the text content theway you want it just as you would in any word pro-cessor, with the following things to remember:

• Some characters have special meanings: #,

$,&,~, ,^,%,,,\• Begin a new paragraphs by skipping a line.

Paragraph indentation and spacing is dis-cussed in section ??.

• Formatting is controlled by markup with sim-ple commands like

\commandor command environments

\beginenv ...\endenv environments (things that look like\beginname ... \endname).

Commands mean do something now, likeenter a check mark (\checkmark) or insert apage break (\newpage).

Environments mean enter a new mode(\beginenv ) and don’t leave it until Itell you to (\endenv ), like

\begincenterAll of this will be

centered.

\endcenter• Equations and certain mathematical symbols

can only be included by using “math mode.”This is discussed in section 7.

There are over 4000 special symbols that can beused in LATEX 2ε; a comprehensive list (over 140pages) has been compiled by Scott Patkin and isavailable from CTAN at http://www.ctan.org/tex-archive/info/symbols/comprehensive/.Here are some examples:

©=\copyright †=\dag ‡= \ddagX=\checkmark §=\S ¶=\P£=\pounds z=\maltese r=\circledR

There are lots of ways to lots of non-English textcharacters , such as a or u, and entire alphabets.

The LATEX “special” characters, what they are used for, and how you can still manage to add them to your document.

Character Special Command Normal Meaning# \# Argument of a user-defined command.$ \$ Beginning and end of an equation.& \& Tab stop in an array or table.˜ \˜ Special accent, eg. ~o gives o

\ Subscript (in math mode), $a 3$ gives a3

ˆ \ˆ Special accent, eg. ^e gives e% \% Everything after a % is ignored as a com-

ment, through the end of the line \ Used in pair with to surround arguments

of functions and environments. \ Used in pair with to surround arguments

of functions and environments.\ \textbackslash Used to invoke a command or begin or end

an environment.

Introducing LATEX (rev. 2012.1) Page 6

Page 7: My Notes on Getting Started with Latex

5 Document Layout

Books, reports and articles are arranged hierarchi-cally into numbered chapters, sections, subsections,sub-subsections, paragraphs, and sub-paragraphs.Books and reports may also be divided into parts,which are larger than chapters. The syntax for start-ing a new chapter, section, etc, is, e.g.,

\section[short-title ]real-title

where real-title is the required title of the sec-tion, and the optional short-title is a shortertitle that is used for the table of contents andpage headers and footers. Similar commands are

used for \part, \subsection, \subsubsection,\paragraph, and \sub-paragraph.

If you want to omit the number, put an asterisk atthe end of the command, as in \subsubsection*.This will create the new section, subsection, etc.,but omit the number and leave it out of the table ofcontents.

The command

\tableofcontents

will automatically generate a table of contents fromall the numbered sections, subsections, etc.

Here is an example of sectioning commands. The typeset document is illustrated on the following page.

\documentclass

...

\titleMy Favorite Vaudevillians

\date

\begindocument

\begincenter\LARGE \textbfMy Favorite Vaudevillians\endcenter

\sectionThe Three Stooges

\subsectionHistory The original group was composed of Moe Howard, Samuel

("Shemp") Howard and Lary Fine. When Shemp quite, their brother Jerome Howard

("Curly"), joined the group ...

\subsectionFilms

Films included \textitTurn Back the Clock, ...

\sectionThe Marx Brothers

\subsectionHistoryThe Marx Brothers also started as a Vaudeville group of five

bothers, Chico (Leonard), Harpo (Arthur), Grocho (Julius), Gummo (Milton), and Zeppo

(Herbert) Marx. Gummu left the act after World War I, so he never appeared in any

films. ...

\subsectionFilms Their film career included \textitCocoanuts(1929), \textitAnimal

Crackers (1930), \textitMonkey Business(1931), ...

...

\enddocument

5.1 Margins and Text Alignment

The easiest way to control Margins is with thegeometry package. Putting

\usepackage[left=1.0in, right=1.0in,

top=1.0in,bottom=1.0in]geometry

in the preamble will give the entire document one-inch margins all around the page.

By default, text is both right and left justified.

To force all your text to be right-justified,

\beginflushright text \endflushright

To be left-justified:

\beginflushleft text \endflushleft

To be centered:

\begincenter text \endcenter

Introducing LATEX (rev. 2012.1) Page 7

Page 8: My Notes on Getting Started with Latex

My Favorite Vaudevillians

1 The Three Stooges

1.1 HistoryThe original group was composed of Moe Howard, Samuel (”Shemp”) Howard and Lary Fine.When Shemp quite, their brother Jerome Howard (”Curly”), joined the group ...

1.2 FilmsFilms included Turn Back the Clock, ...

2 The Marx Brothers

2.1 HistoryThe Marx Brothers also started as a Vaudeville group of five bothers, Chico (Leonard), Harpo(Arthur), Grocho (Julius), Gummo (Milton), and Zeppo (Herbert) Marx. Gummu left theact after World War I, so he never appeared in any films. ...

2.2 Films

Their film career included Cocoanuts(1929), Animal Crackers (1930), Monkey Business(1931),

...

1

5.2 Paragraph Indentation and Spacing

By default, new paragraphs are indented half aninch (except for the first paragraph of a new sec-tion, which is not indented), and there is no spacebetween paragraphs.

\setlength\parindent0pt

\setlength\parskip1ex

\setlength\parindent0pt sets the paragraphindentation to zero.

\setlength\parskip1ex sets the space be-tween paragraphs to the height of the letter x.

Units can be in any of in, cm, mm, pt, ex, em.One ex is the height of the letter x; one em is thewidth of the letter m. Points (pt) are equal to 1/72of an inch, so 72pt and 1in would be identical.

5.3 Double-spacing

To get double spacing, put the line

\usepackagesetspace

in your preamble, then put

\doublespace

where you want to begin double-spacing, and

\singlespace

where you want to return to single-spacing.

5.4 Multiple Columns

You can switch back and forth between one and twocolumns by using the commands

\twocolumn

\onecolumn

but they always skip to the start of the next pagebefore changing the columns.

To change the number of columns anywhere on apage, put

\usepackagemulticol

in the preamble, and use the environment

\beginmulticols2

Introducing LATEX (rev. 2012.1) Page 8

Page 9: My Notes on Getting Started with Latex

...

\endmulticols

You can replace the 2 with a 3 or 4 for 3 or 4 columntext.

5.5 Forcing Page Breaks

There are two types of forced page breaks you canuse:

\newpage fills up the rest of the current page withblank space and jumps to the top of the next page.

\pagebreak will try to spread out existing text toevenly fill out current page (by making paragraphbreaks bigger) and then skip to the next page. Ifyou put the command in the middle of a paragraphit will start the new page at the end of the para-graph.

5.6 Vertical and Horizontal Space

\hspace1in adds an extra inch of horizontal whitespace.

\vspace24pt adds an extra 24 points of verticalwhite space.

Any of the standard units can be used for eithercommand.

\hfill adds space to fill up the current line, as in

I \hfill Am \hfill Legend

will produce

I Am Legend.

\vfill adds vertical space to fill up the page.

\hrulefull fills up the current line with a horizontalline like this:

\dotfill fills up the current line with dots that looklike this: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5.7 Footnotes

Footnotes are inserted with the command\footnoteText of footnote. at the exact posi-

tion where the footnote marker should be. Foot-notes are normally numbered sequentially; tochange this you can use the argument num, as in\footnote[num]text of footnote. Footnotes arethen placed at the bottom of the page1. Each foot-note is indented.

To remove the indentation throughout your docu-ment put the following in your preamble:

\usepackage[hang,flushmargin]footmisc.

5.8 Inserting Code

The verbatim environment lets you add a block oftext exactly the way you type it, with no typesettingor command interpretation, as in this example:

Here is a Python program for least squares:

\beginverbatim

def fit(xd,yd):

SX=sum(xd)

SY=sum(yd)

SX2=sum([x*x for x in xd])

SXY = sum ([x*y for (x,y) in zip(xd,yd)])

n=len(xd)

M = np.array([[n, SX],\

[SX, SX2]])

B = np.array([SY, SXY])

return(np.linalg.solve(M, B))

\endverbatim

Here is a Python program for least squares:

def fit(xd,yd):

SX=sum(xd)

SY=sum(yd)

SX2=sum([x*x for x in xd])

SXY = sum ([x*y for (x,y) in zip(xd,yd)])

n=len(xd)

M = np.array([[n, SX],\

[SX, SX2]])

B = np.array([SY, SXY])

return(np.linalg.solve(M, B))

1

If you just want to include a short segment of codelike C123_=A_+B_ you can use the inline version ofthe verbatim environment,

\verb! code !

1like this!

Introducing LATEX (rev. 2012.1) Page 9

Page 10: My Notes on Getting Started with Latex

where the exclamation point (!) should be replacedby any character that is not include in code . Forexample, the following are equivalent:

\verb.C123_=A_+B_.

\verb^C123_=A_+B_^

and each will insert the string C123_=A_+B_ into yourdocument.

5.9 Boxes Around Text

The \fbox is convenient for putting boxes aroundtext; if you typeset \fboxlike this it will looklike this .

Getting boxes around verbatim text is more compli-cated, but you can use the following template (thisis what was used in this document) to make it work.First, include the line

\usepackagefancyvrb

in the preable. The following template will createa three-inch wide box with your code left-justifiedinside the box. If you want the box to be wider,change the width from 3in to something else. If youdon’t want the box to be in the center of your page,leave out the center environment.

\begincenter

\beginminipage3in

\beginVerbatim[frame=single]

%

% put you code here

%

\end Verbatim

\endminipage

\endcenter

For more details refer to the Latex reference onminipage and fancyvrb.

5.10 Counters and labels

thepage gives the current page number.

thechapter gives the current chapter number.

thesection gives the current section number.

To refer to a particular section, chapter, etc., you canlabel it. Immediately after the \section commandinclude a label command, for example,

\labelsection-Quadratics

Then to refer to that section, use

\refsection-Quadratics.

as in,

In section \refsection-Quadraticswe will learn how to solve the

quadratic equation (see page

\pagerefpage-quad).

To refer to a particular page, use the \pageref com-mand to refer to any label on that page, as in theabove example.

5.11 Headers and Footers

By default the page number is printed in the bot-tom center of the page, with no other headers andfooters.a

pagestyleempty in the preamble will turn off allheaders and footers, including page numbers.

To define your own headers and footers put

\usepackagefancyhdrin the preamble, then define your own style. Forsingle sided documents, still in the preamble:

\fancypagesytelmystyle

\lheadText for the top left of the page

\cheadText for the top center of the page

\rheadText for the top right of the page

\lfootText for the bottom left of the page

\cfootText for the bottom center of the page

\rfootText for the bottom right of the page

\renewcommand\footrulewidth0.4pt

\renewcommand\headrulewidth0.4pt

The footrulewidth and the headrulewidth givethe thickness of lines between the text and theheader and footer. By default the headrule is set

Introducing LATEX (rev. 2012.1) Page 10

Page 11: My Notes on Getting Started with Latex

to 0.4 pt and the foorule is set to zero. To turnthem off set them to 0pt.

To actually use the style, at the beginning of yourbody include the command

\pagestylemystyleIf you have two-sided text, then you have to specifythe header and the footer differently for the even andodd numbered pages. The shorthand for this is

\fancyfoot[LE,RO]text

\fancyhead[LO,RE]text

and so forth, where L, C, and R mean left, center,and right, and E and O mean even and odd.

You can insert page numbers with \thepage; chapternumbers with \thechapter; section numbers with\thesection, etc.

If you do not specify anything for the right header,the current section or chapter title will be placedthere. If you want to suppress this use

\fancyhead[R]

or to specify your own header there

\fancyhead[R]My Document Header

If you don’t want a line between the text andfooter and header, sent the footrulewidth andheadrulewidth to zero pt.

5.12 Including External Files

You can put any part of your document, includingthe preamble, into one or more external files:

\inputfilename.tex For example, you could put all of your files into sep-arate documents in the same folder:

\inputheaders.tex

\begindocument

\inputmydocument1.tex

\inputmydocument2.tex

...

\enddocument

If they are in different folders you should specifythe relative path (if you specify the absolute pathit won’t work if you move the file to a different ma-chine or are sharing it with a collaborator):

\input../myfile.tex

\input../../dir1/dir2/myfile.tex

\input./dir1/myfile.tex

where we “..” means one “go up to the en-closing folder” and “.” means inside the currentfolder, so that ./dir1/myfile.tex means look formyfile.tex in the subdirectory dir1 which is a sub-directory of the same folder where my main docu-ment is sitting; and ../myfile.tex means look inthe current folder’s parent directory.

5.13 Lists

The \enumerate environment produces numberedlists.

Each item in the list begins with the \item com-mand, which may span multiple paragraphs. Eachitem is indented.

Things I like:

\beginenumerate

\item I like onions

\item I like bagels

\item I like toast

\endenumerate

=⇒

Things I like:

1. I like onions

2. I like bagels

3. I like toast

The \itemize environment is used for itemized lists.

I am a frog because:

\beginitemize

\item I am green

\item I can swim

\item I eat flies

\enditemize

=⇒

I am a frog be-cause:

• I am green

• I can swim

• I eat flies

Lists may be nested to any depth. Enumerated listswill be numbered like an outline with labels 1., (a),i., A. To change the label on a list, use

\renewcommandlabel type counter optional-text

label is the name of list level you are re-defining. Values are labelenumi, labelenumii,

labelenumiii, labelenumiv.

Introducing LATEX (rev. 2012.1) Page 11

Page 12: My Notes on Getting Started with Latex

counter is the counter value to use. Normally enumi

is associated with label labelenumi, etc.

The starting value of the enumerate list counter canbe reset to any value. After the \enumerate butbefore the first \item, use

\setcounterenumi6

will start the list at item 7.

type is taken from the following table:

type Values

\arabic 1, 2, 3, 4, ...

\Roman I, II, III, IV, ...

\roman i, ii, iii, iv, ...

\alph a, b, c, d, ...

\ALPH A, B, C, D, ...

Thus

\renewcommand\labelnumii\Alphenumii.

changes the second level numbering to an upper-casealphabet character followed by a period.

Example of nested lists:

\beginenumerate

\item Frogs

\beginenumerate

\item Green

\item Eat flies

\item Swim

\endenumerate

\item Apples

\beginenumerate

\item Red

\item Fruit

\item Juicy

\endenumerate

\endenumerate

=⇒

1. Frogs

(a) Green

(b) Eat flies

(c) Swim

2. Apples

(a) Red

(b) Fruit

(c) Juicy

6 Tabs, Tables, and Figures

6.1 Tabbing

The \tabbing environment sets tab stops and canbe used to generate simple tables.

The first line of the \tabbing environment definesthe tab stops.

Each tab stop is defined by \= and the line is ter-

minated by the double slash \\

After the first line tab jumps are indicated by \> .

Each subsequent line of the \tabbing environment

must also be terminated by \\ .

For example:

\begintabbing

Math \hspace2cm \= is \hspace1cm \= kool \\

Physics \>is \>boring \\

Video Games \> rock \> my socks off

\endtabbing

Math is koolPhysics is boringVideo Games rock my socks off

6.2 Tabular Arrays

The \tabular environment generates aligned colum-nar arrays in text mode. The \array environmentworks the same way, but in math mode.

\begintabularcolumns ... \endtabular

columns =xxx...x where each x=r, l, or c, to in-dicate whether or not the corresponding columnshould be right justified, left justified, or centered.

The vertical line character (—) may be used toindicate that lines should be placed between thecolumns, thus

\begintabular|l|l|ccc| ... \endtabular

denotes a 5-column table where the first two columnsare left justified, the right 3 columns are centered,and there are lines between the 1st and 2nd columns,the 2nd and 3rd columns, and on the left and righthand edge of the table.

\hline can be used to place horizontal lines betweenrows in the table.

Jumping to the next column is specified within a rowby & (Ampersand character).

Introducing LATEX (rev. 2012.1) Page 12

Page 13: My Notes on Getting Started with Latex

A table may be centered on a page or column byusing the \center environment.

For example

\begintabular|c|c|

\hline Name & Grade \\

\hline Tom & A\\

\hline Dick & C\\

\hline Harry & B+\\

\hline

\endtabular

=⇒Name Grade

Tom A

Dick C

Harry B+

6.3 Floating Tables

Sequentially numbered, captioned tables are pro-duced by wrapping tabular environments with thetable environment.

\begintable[where ]\captioncaption-text \begintabular· · · · · ·tablar contents· · ·\endtabular\endtable

This places the caption at the top of the table; it canalso be placed at the bottom of the table, immedi-ately following the \endtabular.To refer to the table number elsewhere in the doc-ument insert a \label command immediately afterthe \caption.

Tables are numbered sequentially through the docu-ment (or chapter).

where may contain any of the following: h = here(put the table here); t = top (at the top of the cur-rent page, or the next page if it won’t fit); p = page(on a separate page); b = bottom (on the bottom ofthe current page).

6.4 Inserting Pictures

Put the following in your preamble:

\includegraphicx

Then at the exact spot where you want to includeyour picture, put

\includegraphics[size ]filename

size options are width=3in, scale=.5, orheight=43mm.

filename should be specified relative to directorythat your .tex file is sitting in. While in theory youcould use an absolute file name, if you were to zipthe folder and mail the package to a collaborate thenit wouldn’t work.

The type of graphics format varies from system tosystem. Generally .png, .tif, and .jpg work ev-erywhere. If you are using PDFLaTeX you can alsouse .pdf files as pictures. If you are using purelatex (which converts files to .dvi format, and notto .pdf) it will also accept encapsulated postscriptfiles, .eps.

The following example will insert the filepictures/fred.png in your document and makeit one-inch wide:

\includegraphics[width=1in]pictures/fred.pngYou can add a caption and a figure number to apicture the same way as with a table by using thefigure environment.

\beginfigure[h]

\caption...

\labelfigure:my-figure

\begincenter

\includegraphics[width=2.54cm]fred.png

\endcenter

\endfigure

The location can be h (here); p (page); t (top); or b(bottom) and mean the same thing as with a table

environment.

The wrapfigure environment will allow you to wraptext around a figure. To do so, put

\usepackagewrapfig

in the preamble, then

Introducing LATEX (rev. 2012.1) Page 13

Page 14: My Notes on Getting Started with Latex

\beginwrapfigurer1.1in

\begincenter

\includegraphics[width=1in]

happy.png

\endcenter

\captionA happy computer!

\endwrapfigure

Alignment can normally be either l for left,or r for right. Lowercase l or r forces thefigure to start precisely where specified (andmay cause it to run over page breaks), whilecapital L or R allows the figure to float.

Figure 1: Ahappy com-puter!

If you defined your document astwosided, the alignment can alsobe i for inside or o for outside,as well as I or O. The width is, ofcourse, the width of the figure. Inmost cases wrapfigure adds toomuch vertical spacing, which youcan reduce by adding appropriate\vspacex commands with neg-atives arguments in the desiredlocations. A negative vertical space means reducethe vertical space.

You can include multiple graphics in the same figureby using the \subfigure command:

\beginwrapfigurel4.2in

\subfigure[Cray 2.]\includegraphics[height=1in]Cray.jpg

\subfigure[Apple 1.]\includegraphics[height=1in]Apple.jpg

\subfigure[IBM PC.]\includegraphics[height=1in]IBMPC.jpg

\captionThree computers.

\endwrapfigure

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque porttitor fringilla nisi nec tempus.Fusce ac est arcu, sodales scelerisque sapien. Nulla facilisi. Phasellus eu elit massa. Etiam quis hen-drerit elit. Nunc commodo dignissim pretium. Aenean neque enim, pretium a placerat vel, venenatisid nulla. In eget diam turpis. Donec tempus placerat nunc ut fringilla. Integer aliquam, urna nonpellentesque interdum, mauris neque consectetur nisi, ut aliquam odio augue eu sapien. Donec mattis

(a) Cray 2. (b) Apple 1. (c) IBM PC.

Figure 2: Three computers.

iaculis nunc id vestibu-lum. Quisque ultricesultricies libero sed luc-tus. Curabitur com-modo, dolor vitae biben-dum lacinia, neque anteultricies neque, et gravidadolor arcu eu eros. Nunceget justo et ipsum sollic-itudin imperdiet. Nullamet diam erat. Sed mattisligula in magna dictum porta. Quisque a adipiscing tellus. Sed hendrerit, urna quis facilisis condimentum,leo nunc sollicitudin nisi, a ornare urna purus quis eros. Ut id erat at nunc rutrum varius. Vivamus acturpis at enim pulvinar ultrices nec et libero. Phasellus ut nibh nibh. Fusce tincidunt purus ac sem lobortisporttitor. Morbi in risus eros, eu egestas neque.

Introducing LATEX (rev. 2012.1) Page 14

Page 15: My Notes on Getting Started with Latex

7 Math Mode

LATEXhas two modes: text mode and math mode.All equations are written in math mode. All text iswritten in text mode.

7.1 Inline Equations

An equation that is included in the flow of text, with-out breaking to a new line, is called an inline equa-tion. Inline equations must begin and end with a

dollar sign, $ .

An examples of inline equations is y =∫ ba e−αx2dx.

For example, one can typeset

Functions of the form f(t) = 1(1 + e−t) are known

as sigmoid functions. Sigmoidal functions have the

interesting property that they satisfy the logistic dif-

ferential equation y′ = y(1− y)

with

Functions of the form $f(t)=1(1+e^-t)$

are known as \textitsigmoid functions.

Sigmoidal functions have the interesting

property that they satisfy the

\textitlogistic differential equation

$y’=y(1-y)$

Even to insert special characters like∑

or∫

you

need to use math mode, e.g., as $\sum$ or $\int$ .

7.2 Display Equations

In display mode an equation is placed on a line byitself surrounded by white space. By default, it iscentered in the middle of the line, although equa-tions can be optionally right or left justified.

There are two ways to insert display equations; thereis no advantage to either of these over the other. Youcan either surround your display equation by double-dollar-signs, e.g., $$ at both the beginning and theend of the equation, or you can begin the equation

with \[ and end it with \] . Thus to typeset

x =−b±

√b2 − 4ac

2a

you can use either

\[x=\frac-b\pm\sqrtb^2-4ac2a\]

or

$$x=\frac-b\pm\sqrtb^2-4ac2a$$

7.3 Numbered Equations

Equations can be automatically numbered with theequation environment:

\beginequation

\labeleq-quad

x=\frac-b\pm\sqrtb^2-4ac2a

\endequation

which will be typeset as:

x =−b±

√b2 − 4ac

2a(1)

To suppress the equation number use

\beginequation*· · · \endequation* , which

is equivalent to $$· · · $$ .

The argument to \label can be any string; it is stan-dard practice to preface it with something like eq orequation so that it will be easy to identify as anequation in the source code.

To refer to equation 1 use either \reflabel or\eqreflabel . The eqref command automati-cally includes parenthesis, so that \eqrefeq-quadlooks like (1), while \refeq-quad looks like 1.

The global properties of equations are controlled byarguments to the \documentclass command in thepreamble:

leqno will put all equation numbers on the left-handmargin (by default they are on the right).

fleqn will make all equations flush-left (by defaultthey are centered)

Introducing LATEX (rev. 2012.1) Page 15

Page 16: My Notes on Getting Started with Latex

7.4 Boxed equations

To put a box around an inline equation like

y =∫f(x)dx use

\fbox$y=\int f(x)dx$

To put a box around a display equation, as in

u =

∫f(x)dx

use \boxed$y=\int f(x)dx$.\boxed works with both numbered and unnumberedequations.

7.5 Aligned and Multi-line Equations

7.5.1 The align Environment

There are several ways to align equations vertically.The simplest is with the align environment. Forexample,

x = 1 (2)

y = 2 + x (3)

z = 3 + 2x+ y (4)

where all the equal signs are aligned vertically, canbe typeset using align as can be written using

\beginalign

x&=1\\

y&=2+x\\

z&=3+2x+y

\endalign

The ampersand & is used as an alignment character(like a tab stop) inside and align.

The double-backslash \\ is used to indicate the

start of a new line inside the align.

To suppress all of the equation numbers use \align*instead of align.

\nonumber will suppress the specific equation num-ber of the line on which it is placed (and the equationcounter will not be incremented).

7.5.2 The split Environment

Long equations that require more than one line canbe typeset with split. The ampersand & and

double-backslash \\ are used for alignment and line

splitting within the split environment:

\beginequation

\beginsplit

\sum_n=0^\infty ar^n & =

a + ar + ar^2 + ar^3 + \cdots \\

& = \dfraca1-r

\endsplit

\endequation

Note that only one equation number is assigned toa split equation

∞∑n=0

arn = a+ ar + ar2 + ar3 + · · ·

=a

1− r

(5)

The split environment can only be used withinthe equation or equation* environments, not the

shorthand $$· · · $$ or \[ · · · \] forms

7.5.3 The cases Environment

The cases environment is used when the right-handside of an equation has multiple cases:

|x| =−x, x < 0

x, x ≥ 0(6)

As with split and align the ampersand & and

double-backslash \\ are used for alignment and new

line. Use \text to include text in the equation:

\beginequation

\int x^n \: dx =

\begincases

\dfracx^n+1n+1 + C,

&\text if n\neq -1\\

\lngx + C, &\text if n = -1

\endcases

\endequation

Introducing LATEX (rev. 2012.1) Page 16

Page 17: My Notes on Getting Started with Latex

which is typeset as

∫xn dx =

xn+1

n+ 1+ C, if n 6= −1

lnx+ C, if n = −1(7)

7.6 Superscripts and Subscripts

Use the carat ^ for superscripts, shift- 6 on US-

keyboards, as in $x^2$ for x2.

Use the underscore for subscripts, e.g., $Y 3$ forY3.

If the subscript or superscript is longer than a singlecharacter it must be enclosed in curly brackets, e.g.,$x^a+b$ gives xa + b while $x^a+b$ gives xa+b.

Subscripts or superscripts on subscripts are denotedby appropriate nesting of curly brackets.

$$x_i+j,k_i = \fracp^i q^jr_k_i$$

xi+j,ki =piqj

rki

7.7 Roots and Fractions

\sqrtx gives√x.

\sqrt[n]x gives n√x.

\fracnumerator denominator gives text-sizefractions, as in a+b

c+d .

\dfracnumerator denominator enlarges thenumerator and denominator so that each is text-

sized, as ina+ b

c+ d.

\tfracnumerator denominator gives text-sized equations in a display equation,

tfrac = a+bc+d =

a+ b

c+ d= frac

They can also be nested in display equations,

a+ pq

c+ d=

a+p

q

c+ d

which was typeset with

\fraca+\fracpqc+d

on the left side of the equation and

\fraca+\dfracpqc+d

on the right.

Roots and fractions can be combined, as in

$$\sqrt1+\frac1x=

\sqrt1+\tfrac1x$$

√1 +

1

x=√

1 + 1x

or

$$\fraca\sqrtb+\fraccd =

\fraca\sqrtb+\dfraccd,$$

a√b+ c

d

=a√b+

c

d

,

7.8 Integrals

\int \oint\iint \iiiint\iiint \limits

These are used for single, double, and triple inte-grals.

Limits are specified as subscripts or superscripts. Toget the limit to be beneath the integral sign (e.g., fora volume or surface multiple integral) use \limits(which means to interpret the subscript the way itis interpreted for \lim).

∫ b

a

f(x) dx = F (b)− F (a)

∮Γ

g(λ) dλ =

∫ 1

0

∫ x

−x

∫ 1−x2−y2

0

f(x, y, z)dzdydz∫∫∫V

dV =4

3πr3

Introducing LATEX (rev. 2012.1) Page 17

Page 18: My Notes on Getting Started with Latex

which can be typeset with the following:

$$\int_a^b f(x) dx = F(b)-F(a)$$

$$\oint_\Gamma g(\lambda)

d\lambda = \int_0^1 \int_-x^x

\int_0^1-x^2-y^2 f(x,y,z) dz dy dz$$

$$\iiint\limits_V dV =

\frac43\pi r^3$$

7.9 Sums and Products

\sum gives a summation.

\prod gives a product.

Begin and end values are specified as subscripts (be-gin values) and superscripts (end values).

For display mode, start and end values are automat-ically placed below and above the sybmol, so that

$$\sum k=1^\inftyp k$$ becomes

∞∑k=1

pk

while in text mode, they are placed in normal sub-

script mode, and $\sum k=1^\inftyp k$ be-

comes∑∞

k=1 pk (there was only a single dollar signaround the second form; otherwise they were identi-cal).

The format for sums and products is the same,

so that $$\prod k=1^10\dfrack+1k+2$$becomes

10∏k=1

k + 1

k + 2

7.10 Limits

\lim is used for a limit.

The target of a limit is specified as a subscript usingthe underscore. In text mode

$$\lim_x\to\infty

\frac3x^2+4x7x^2+2=\frac37$$

looks like limx→∞3x2+4x7x2+2

= 37 , while in display mode

it becomes

limx→∞

3x2 + 4x

7x2 + 2=

3

7

7.11 Lines Above and Below Expressions

\overlineexpression draws a line over an ex-pression.

\underlineexpression draws a line under an ex-pression

We define by AB the line segment connectingpoints A and B.

We denote the complex conjugate of z = a+biby

z = a+ bi = a− bi

We define by $\overlineAB$ the line segment

connecting points $A$ and $B$.

We denote the complex conjugate of $z=a+bi$ by

$$\overlinez=\overlinea+bi=a-bi$$

7.12 Text Above and Below Expressions

\overbraceexpression puts a horizontal braceabove an expression. Superscripted \text expres-sions will be written above the brace.

\underbraceexpression puts a horizontal bracebelow an expression. Subscripted \text expressionswill be written below the brace.

For example,

f(x) = f(a) +

\underbrace(x-a)f’(a)_\textLinear Term +

\overbrace\frac12(x-a)^2

f’’(a)^\textQuadratic Term + \cdots

will be typeset as

f(x) = f(a) + (x− a)f ′(a)︸ ︷︷ ︸Linear Term

+

Quadratic Term︷ ︸︸ ︷1

2(x− a)2f ′′(a) + · · ·

7.13 Arrows Above & Below Expressions

The following provide variable length arrows aboveor below expression :

\overleftarrowexpression \overrightarrowexpression

Introducing LATEX (rev. 2012.1) Page 18

Page 19: My Notes on Getting Started with Latex

\overleftrightarrowexpression \underleftarrowexpression \underrightarrowexpression \underleftrightarrowexpression For example

$$\overleftrightarrowAPBXC =

\overleftarrowAPB +

\overrightarrowBXC$$

gives ←−−−−−→APBXC =

←−−−APB +

−−−→BXC

7.14 Chemical Reactions

Rate constants in simple chemical reactions can beattached to arrows with overset and underset:

X + Yk1k2Z,A+B

k3→ C

$$X+Y \undersetk_2\overset k_1

\rightleftharpoons Z,

A+B \oversetk_3\rightarrow C$$

Longer expressions can use xleftarrow andxrigharrow

A+Bcombine to form−−−−−−−−−−→ C

$$A+B \xrightarrow

\textcombine to formC$$

7.15 Large Parenthesis

Variable size parenthesis (or brackets) as in[√p

q+

(a+ b

c

)+ d

]use pairs of \left and \right commands.

$$\left[ \sqrt\fracpq +

\left( \fraca+bc \right)

+ d \right]$$

Every \left must have a \right.

The argument of the \right corresponding to a par-ticular \left can be different. This allows one toopen a pair with a different type of bracket than itis closed with, e.g., (

a+ b

c

]+ d

Use \left. ... \right] to only get one bracket.For example, ∫ b

a2xdx = x2

∣∣∣∣ba

matches the \right| with a \left. in

$$\left.\int_a^b 2x dx = x^2\right|_a^b$$

Use \ to get the curly-bracket.

7.16 Matrices and Arrays

The matrix family gives a number of shorthand ma-trix environments:

$$\beginpmatrix a & b \\ c & d \endpmatrix,

\beginBmatrix a & b \\ c & d \endBmatrix,

\beginbmatrix a & b \\ c & d \endbmatrix,

\beginvmatrix a & b \\ c & d \endvmatrix,

\beginVmatrix a & b \\ c & d \endVmatrix,

\beginmatrix a & b \\ c & d \endmatrix$$

produces(a bc d

),

a bc d

,

[a bc d

],

∣∣∣∣a bc d

∣∣∣∣ ,∥∥∥∥a bc d

∥∥∥∥ , a bc d

In each of these environments, elements are centeredin their appropriate columns, the ampersand & isused to skip to the next element and the double back-slash is used to indicate the end of a line.

For more precise control, the array environmentmay be used. Its structure is identical to thetabular environment, except that tabular mayonly be used in text mode and array may only beused in math mode. Fore example, the partitionedmatrix a b c

p q r

x y z

can be typeset with array,

$$\left(

\beginarraycc|c

a & b & c \\

p & q & r \\

\hline

x & y & z

\endarray

\right) $$

Introducing LATEX (rev. 2012.1) Page 19

Page 20: My Notes on Getting Started with Latex

A Symbol Tables

A.1 Math Fonts

\mathbbA,B,C,D,E,F,G,H, I, J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z

\mathcalA,B, C,D, E ,F ,G,H, I,J ,K,L,M,N ,O,P,Q,R,S, T ,U ,V,W,X ,Y,Z

\mathfrakA,B,C,D,E,F,G,H, I, J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z

\mathbfA,B,C,D,E,F,G,H, I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z

A.2 Math Accents

a \hata a \acutea a \bara

a \dota a \brevea a \checka

a \gravea ~a \veca a \ddota

a \tildea

A.3 Greek Letters

α \alpha κ \kappa σ \sigma

β \beta λ \lambda ς \varsigma

γ \gamma µ \mu τ \tau

δ \delta ν \nu υ \upsilon

ε \epsilon ξ \xi φ \phi

ε \varepsilon o o ϕ \varphi

ζ \zeta π \pi χ \chi

η \eta $ \varpi ψ \psi

θ \theta $ \varpi ω \omega

ϑ \vartheta ρ \rho

γ \gamma % \varrho

Γ \Gamma Ξ \Xi Φ \Phi

∆ \Delta Π \Pi Ψ \Psi

Θ \Theta Σ \Sigma Ω \Omega

Λ \Lambda Υ \Upsilon

A.4 Variable Size Symbols

∑ ∑\sum

⋂ ⋂\bigcap

⊙ ⊙\bigodot∏ ∏

\prod⋃ ⋃

\bigcup⊗ ⊗

\bigotimes∐ ∐\coprod

⊔ ⊔\bigsqcup

⊕ ⊕\bigoplus∫ ∫

\int∮ ∮

\oint⊎ ⊎

\biguplus∨ ∨\bigvee

∧ ∧\bigwedge

A.5 Named Math Functions

\arccos \cos \csc \exp \ker \limsup

\arcsin \cosh \deg \gcd \lg \ln

\arctan \cot \det \hom \lim \log

\arg \coth \dim \inf \liminf \max

\min \Pr \sec \sin

\sinh \sup \tan \tanh

A.6 Brackets

The \left and \right commands may be applied to each of thesesymbols.

( ( / / ↑ \uparrow | |

) ) \ \backslash ↓ \downarrow ‖ \|

[ [ b \lfloor l \updownarrow 〈 \langle

] ] c \rfloor ⇑ \Uparrow 〉 \rangle

\ d \lceil ⇓ \Downarrow

\ e \rceil m \Updownarrow

A.7 Relational Symbols

≤ \le ≥ \ge 6= \neq

≤ \leq ≥ \geq.= \doteq

\ll \gg ≈ \approx

⊂ \subset ⊃ \supset ∼= \cong

⊆ \subseteq ⊇ \supseteq ≡ \equiv

@ \sqsubset A \sqsupset ∝ \propto

v \sqsubseteq w \sqsupseteq ∼ \sim

∈ \in 3 \ni ' \simeq

` \vdash a \dashv ‖ \parallel

|= \models ⊥ \perp ‖ \|

\asymp ./ \bowtie | \mid

\succ \succeq _ \frown

≺ \prec \preceq ^ \smile

Introducing LATEX (rev. 2012.1) Page 20

Page 21: My Notes on Getting Started with Latex

A.8 AMS Relational Symbols

Requires \usepackageamssymb

5 \leqq ⊃ \supset $ \circeq

6 \leqslant k \supseteqq , \triangleq

0 \eqslantless w \precapprox ∼ \thicksim

. \lesssim \vDash ≈ \thickapprox

/ \lessapprox \Vvdash C \vartriangleleft

u \approxeq ` \smallsmile E \trianglelefteq

l \lessdot a \smallfrown A \sqsupset

≪ \lll l \bumpeq < \succcurlyeq

≶ \lessgtr m \Bumpeq 3 \curlyeqsucc

+ \doteqdot = \geqq % \succsim

G \between > \geqslant v \succapprox

t \pitchfork 1 \eqslantgtr B \vartriangleright

v \backsim & \gtrsim D \trianglerighteq

w \backsimeq ' \gtrapprox 4 \preccurlyeq

j \subseteqq m \gtrdot 2 \curlyeqprec

b \Subset ≫ \ggg q \shortparallel

@ \sqsubset ≷ \gtrless : \risingdotseq

\Vdash R \gtreqless ; \fallingdotseq

p \shortmid T \gtreqqless ∝ \varpropto

- \precsim P \eqcirc J \blacktriangleleft

∴ \therefore ∵ \because \backepsilon

A.9 Binary Operations

± \pm ∩ \cap \circ

∓ \mp ∪ \cup • \bullet

× \times ] \uplus \diamond

÷ \div u \sqcap C \lhd

· \cdot t \sqcup B \rhd

? \star ∨ \vee E \unlhd

∗ \ast ∧ \wedge D \unrhd

† \dagger ⊕ \oplus \oslash

‡ \ddagger \ominus \odot

q \amalg ⊗ \otimes © \bigcirc

\Box ♦ \Diamond 4 \bigtriangleup

o \wr / \triangleleft 5 \bigtriangledown

\ \setminus . \triangleright

A.10 AMS Binary Operations

Requires \usepackageamssymbu \dotplus f \curlywedge \boxminus

e \Cap d \Cup \boxdot

Z \barwedge \circledcirc > \divideontimes

ᵀ \intercal o \rtimes [ \doublebarwedge

\boxtimes n \ltimes r \smallsetminus

\boxplus \circleddash g \curlyvee

Y \veebar ~ \circledast i \rightthreetimes

\boxminus \centerdot h \leftthreetimes

A.11 Standard Arrows

← \leftarrow ←− \longleftarrow

⇐ \Leftarrow ⇐= \Longleftarrow

→ \rightarrow −→ \longrightarrow

⇒ \Rightarrow =⇒ \Longrightarrow

↔ \leftrightarrow ←→ \longleftrightarrow

⇔ \Leftrightarrow ⇐⇒ \Longleftrightarrow

7→ \mapsto 7−→ \longmapsto

← \hookleftarrow → \hookrightarrow

\leftharpoonup \rightharpoonup

\leftharpoondown \rightharpoondown

\rightleftharpoons \leadsto

↑ \uparrow ↓ \downarrow

⇑ \Uparrow ⇓ \Downarrow

↑ \uparrow ⇑ \Uparrow

↓ \downarrow ⇓ \Downarrow

l \updownarrow m \Updownarrow

\nearrow \searrow

l \updownarrow m \Updownarrow

A.12 AMS Arrows

99K \dashrightarrow L99 \dashleftarrow

⇔ \leftleftarrows \leftrightarrows

W \Lleftarrow " \looparrowleft

\leftrightharpoons x \curvearrowleft

\downdownarrows y \curvearrowright

\upuparrows \upharpoonleft

\downharpoonleft \upharpoonright

! \leftrightsquigarrow ⇒ \rightrightarrows

\rightleftarrows \twoheadrightarrow

\rightarrowtail # \looparrowright

\rightleftharpoons \Lsh

\circlearrowright \Rsh

\circlearrowleft ( \multimap

\downharpoonright \rightsquigarrow

A.13 Miscellaneous Math Symbol

. . . \ddots · · · \cdots... \vdots

. . . \ldots ℵ \aleph ′ \prime

∀ \forall ∞ \infty ~ \hbar

∅ \emptyset ∃ \exists \Box

ı \imath ∇ \nabla ¬ \neg

♦ \Diamond \jmath√

\surd

[ \flat 4 \triangle ` \ell

> \top \ \natural ♣ \clubsuit

℘ \wp ⊥ \bot ] \sharp

♦ \diamondsuit < \Re ‖ \|

\ \backslash ♥ \heartsuit = \Im

∠ \angle ∂ \partial ♠ \spadesuit

Introducing LATEX (rev. 2012.1) Page 21

Page 22: My Notes on Getting Started with Latex

A.14 Special Math Typesetting

abc \widetildeabc abc \widehatabc←−abc \overleftarrowabc

−→abc \overrightarrowabc

abc \overlineabc abc \underlineabc︷︸︸︷abc \overbraceabc abc︸︷︷︸ \underbraceabc√abc \sqrtabc

n√abc \sqrt[n]abc

f ′ f’ abcxyz

\fracabcxyz

A.15 Text Accents

These may only be used in text mode, and are not valid in math mode.

o \’o o \‘o o \^o o \"o o \~o

o \=o o \.o o \uo o \vo o \Ho

oo \too o \co o. \do o¯

\bo o \ro

A.16 Special Symbols in Text Mode

œ \oe Œ \OE æ ae Æ \AE a \aa

A \AA ø \o Ø \O l \l L \L

ß ss SS \SS ¡ !‘ ¿ ?‘ † \dag

§ \S ‡ \ddag ¶ \P & \& € \texteuro

U \yen $ \$ % \% \_ £ \pounds

© \copyright « \textcopyleft

® \textregistered ₩ \textwon

฿ \textbaht b \textborn

° \textdegree l \textleaf

₤ \textlira m \textmarried

\textmusicalnote \textnumero

A.17 Text Font Styles

\rm Roman \it italic \sc Small Caps\bf boldface \sl slanted \sf Sans Serif\tt typewriter

A.18 Font Sizes

\tiny the quick brown fox

\scriptsize the quick brown fox

\footnotesize the quick brown fox

\small the quick brown fox

\normalsize the quick brown fox\large the quick brown fox\Large the quick brown fox\LARGE the quick brown fox\huge the quick brown fox\Huge the quick brown fox

B References

Online References: There are many good online references forLATEX. Because of the fluidity of the internet, the URL’s maychange.

The LaTeX Reference Manual : http://home.gna.org/

latexrefman/

Latex Reference Pages: http://herbert.the-little-red-haired-girl.org/html/latex2e/

The LaTeX Tutorial : http://www.tug.org/tutorials/tugindia/

The LaTeX Wikibook : http://en.wikibooks.org/wiki/LaTeX

The Not So Short Introduction to LaTeX http://tobi.oetiker.

ch/lshort/

Print References

These are just a couple that I like; there are lots of good ones.

Gratzer G, More Math into LATEX, 4th Edition, Springer (2007).

Kopka H and Daly P. A Guide to LaTeX2e. Addison Wesley (2003).

Mittelback F et. al. The LaTeX Companion. Addison Wesley(2004).

Introducing LATEX (rev. 2012.1) Page 22