L A TEX 2ε 93 L A TEX 2ε Tobias Oetiker Hubert Partl, Irene Hyna and Elisabeth Schlegl Version 3.20, 09 August, 2001 CTEX 3.20
ii Tobias Oetiker c 2000 LShort GNU GNU GNU 675 Mass Ave, Cambridge, MA 02139, USA
L A TEX 2.09 Hubert Partl <partl@mail.boku.ac.at> Zentraler Informatikdienst der Universität für Bodenkultur Wien Irene Hyna <Irene.Hyna@bmwf.ac.at> Bundesministerium für Wissenschaft und Forschung Wien Elisabeth Schlegl <no email> in Graz Jörg Knappen L A TEX 2ε CTAN CTAN:/tex-archive/info/lshort/german comp.text.tex
iv Rosemary Bailey, Friedemann Brauer, Jan Busa, Markus Brühwiler, David Carlisle, José Carlos Santos, Mike Chapman, Christopher Chin, Carl Cerecke, Chris McCormack, Wim van Dam, Jan Dittberner, Michael John Downes, David Dureisseix, Elliot, David Frey, Robin Fairbairns, Jörg Fischer, Erik Frisk, Frank, Kasper B. Graversen, Alexandre Guimond, Cyril Goutte, Greg Gamble, Neil Hammond, Rasmus Borup Hansen, Joseph Hilferty, Björn Hvittfeldt, Martien Hulsen, Werner Icking, Jakob, Eric Jacoboni, Alan Jeffrey, Byron Jones, David Jones, Johannes-Maria Kaltenbach, Michael Koundouros, Andrzej Kawalec, Alain Kessi, Christian Kern, Jörg Knappen, Kjetil Kjernsmo, Maik Lehradt, Alexander Mai, Martin Maechler, Aleksandar S Milosevic, Claus Malten, Kevin Van Maren, Lenimar Nunes de Andrade, Hubert Partl, John Refling, Mike Ressler, Brian Ripley, Young U. Ryu, Bernd Rosenlecher, Chris Rowley, Hanspeter Schmid, Craig Schlenter, Christopher Sawtell, Geoffrey Swindale, Josef Tkadlec, Didier Verna, Fabian Wernli, Carl-Gustav Werner, David Woodhouse, Chris York, Fritz Zaucker, Rick Zaccone, and Mikhail Zotov.
v CTEX CTEX ID overview.tex things.tex controlong typeset.tex cxterm math.tex, lssym.tex aloft spec.tex ganzhi custom.tex!
L A TEX[1] L A TEX TEX[2] L A TEX 2ε L A TEX [1, 3] L A TEX PC Mac UNIX VMS L A TEX L A TEX Local Guide [4] L A TEX L A TEX L A TEX L A TEX 2ε L A TEX L A TEX L A TEX L A TEX L A TEX L A TEX EPS L A TEX L A TEX
vii L A TEX TEX CTAN http://www.ctan.org ftp ftp://www.ctan.org ftp://ctan.tug.org ftp://ftp.dante.de ftp://ftp.tex.ac.uk CTAN url CTAN CTAN: L A TEX CTAN:/tex-archive/systems L A TEX Tobias Oetiker <oetiker@ee.ethz.ch> Department of Electrical Engineering, Swiss Federal Institute of Technology CTAN:/tex-archive/info/lshort http://bbs.ctex.org
iii vi 1 1 1.1............................ 1 1.1.1 TEX............................ 1 1.1.2 L A TEX........................... 1 1.2 L A TEX............................ 2 1.2.1............... 2 1.2.2......................... 3 1.2.3........................ 3 1.3 L A TEX........................... 4 1.3.1......................... 5 1.3.2......................... 5 1.3.3 L A TEX........................ 5 1.3.4............................ 6 1.4........................... 7 1.5...................... 8 1.6............................. 9 1.6.1........................... 9 1.6.2............................ 11 1.7 L A TEX.......................... 11 1.7.1......................... 13 1.8............................. 13 2 15 2.1........................ 15
ix 2.2............................ 17 2.2.1......................... 17 2.2.2............................ 18 2.3.......................... 19 2.4.......................... 19 2.4.1............................ 19 2.4.2..................... 20 2.4.3 ( )........................ 20 2.4.4 ( )....................... 20 2.4.5 (... )........................ 20 2.4.6............................ 21 2.4.7................... 21 2.5........................ 21 2.5.1....................... 24 2.6............................ 24 2.7........................... 25 2.8............................. 27 2.9................................ 27 2.10................................ 28 2.11................................ 28 2.11.1 Itemize, Enumerate, and Description.......... 29 2.11.2 Flushleft, Flushright, and Center............ 29 2.11.3 Quote, Quotation, and Verse.............. 30 2.11.4......................... 30 2.11.5............................ 31 2.12............................... 33 2.13........................... 36 3 37 3.1............................. 37 3.2........................ 39 3.3........................ 39 3.4............................. 43 3.5............................. 44 3.6................................ 46 3.7........................... 46
x 3.8............................. 47 3.9............................. 48 3.10............................ 50 4 57 4.1 EPS.......................... 57 4.2............................. 59 4.3................................ 60 4.4.......................... 61 4.5 Verbatim........................... 61 4.6 L A TEX...................... 62 5 L A TEX 64 5.1.................... 64 5.1.1....................... 65 5.1.2....................... 66 5.1.3.................... 66 5.2............................ 67 5.2.1....................... 67 5.2.2 Danger, Will Robinson, Danger............. 70 5.2.3............................ 70 5.3....................... 70 5.3.1............................ 70 5.3.2......................... 71 5.3.3......................... 72 5.3.4......................... 72 5.4............................ 73 5.5.................... 75 5.6................................ 76 5.7............................ 78 80 82
1.1 TEX....................... 2 1.2 L A TEX.................... 8 1.3 L A TEX................... 8 4.1 fancyhdr....................... 62 5.1 Example Package......................... 67 5.2........................... 74
1.1............................... 10 1.2............................ 10 1.3 L A TEX................... 12 1.4 The Predefined Page Styles of L A TEX............... 13 2.1........................ 22 2.2............................ 24 2.3....................... 34 3.1.......................... 50 3.2........................... 50 3.3........................... 50 3.4............................ 51 3.5............................ 51 3.6........................... 52 3.7................................ 52 3.8............................... 52 3.9........................... 52 3.10............................. 53 3.11............................ 53 3.12 AMS............................ 53 3.13 AMS..................... 53 3.14 AMS......................... 54 3.15 AMS............................. 54 3.16 AMS................... 55 3.17 AMS......................... 55 3.18 AMS.......................... 56 3.19............................. 56
xiii 4.1 graphicx.................... 58 4.2...................... 60 5.1................................ 68 5.2............................. 68 5.3................. 69 5.4............................. 69 5.5 TEX.......................... 73
L A TEX 2ε L A TEX L A TEX 1.1 1.1.1 TEX TEX Donald E. Knuth[2] 1977 Knuth TEX TEX 1982 1989 8 TEX TEX π 3.14159 TEX Tech ch Ach Loch ch ASCII TEX TeX 1.1.2 L A TEX L A TEX L A TEX Leslie Lamport[1] TEX 1994 Frank Mittelbach L A TEX 3 L A TEX L A TEX 2.09 L A TEX 2ε L A TEX 2ε
2 ²±.mf METAfont ²±.pk ² ± ².tfm ²± copy editor ²±.tex ²± TEX.dvi driver... ispell emacs... AMS-Package Plain LATEX 2ε... xdvi dvips ±.log printer screen PostScript Fonts Typesetting 1.1: TEX L A TEX 2ε Lay-tech Lah-tech ASCII L A TEX 2ε LaTeX L A TEX 2ε Lay-tech two e LaTeX2e 1.1 TEX L A TEX 2ε Kees van der Laan wots.tex 1.2 L A TEX 1.2.1
1.2 L A TEX 3 L A TEX L A TEX TEX L A TEX L A TEX WYSIWYG 1 MS Word Corel Wordperfect L A TEX L A TEX 1.2.2 L A TEX L A TEX 1.2.3 WYSIWYG L A TEX L A TEX 1 What you see is what you get.
4 L A TEX L A TEX PostScript The L A TEX Companion [3] L A TEX L A TEX TEX L A TEX L A TEX ;-) L A TEX 2 3 L A TEX 1.3 L A TEX L A TEX ASCII L A TEX L A TEX 2 L A TEX does not work well for people who have sold their souls... 3 L A TEX3
1.3 L A TEX 5 1.3.1 L A TEX space L A TEX L A TEX It does not matter whether you enter one or several spaces after a word. An empty line starts a new paragraph. It does not matter whether you enter one or several spaces after a word. An empty line starts a new paragraph. 1.3.2 L A TEX L A TEX L A TEX # $ % ^ & _ { } ~ \ \# \$ \% \^{} \& \_ \{ \} \~{} # $ % ˆ & { } \ \\ 4 1.3.3 L A TEX L A TEX commands 4 $\backslash$ \
6 \ L A TEX {} {} L A TEX I read that Knuth divides the people working with \TeX{} into \TeX{}nicians and \TeX perts.\\ Today is \today. I read that Knuth divides the people working with TEX into TEXnicians and TEXperts. Today is 8th March 2003. parameter curly braces { } square brace L A TEX You can \textsl{lean} on me! You can lean on me! Please, start a new line right here!\newline Thank you! Please, start a new line right here! Thank you! 1.3.4 L A TEX % L A TEX % This is an % stupid % Better: instructive <---- example: Supercal% ifragilist% icexpialidocious This is an example: Supercalifragilisticexpialidocious %
1.4 7 verbatim comment \usepackage{verbatim} %This is another %\begin{comment} %rather stupid, %but helpful %\end{comment} %example for embedding %comments in your document. \begin{comment} \end{comment} 1.4 L A TEX L A TEX \documentclass{...} L A TEX \usepackage{...} 5 \begin{document} L A TEX L A TEX L A TEX 5 \documentclass \begin{document}
8 \end{document} 1.2 L A TEX 1.3 1.5 8 L A TEX L A TEX L A TEX L A TEX L A TEX L A TEX L A TEX \documentclass{article} \begin{document} Small is beautiful. \end{document} 1.2: L A TEX \documentclass[a4paper,11pt]{article} % define the title \author{h.~partl} \title{minimalism} \begin{document} % generates the title \maketitle % insert the table of contents \tableofcontents \section{start} Well, and here begins my lovely article. \section{end} \ldots{} and here it ends. \end{document} 1.3: L A TEX
1.6 9 1. L A TEX ASCII Unix Windows ASCII.tex 2. L A TEX.dvi latex foo.tex 3. DVI xdvi foo.dvi PS dvips -Pcmz foo.dvi -o foo.ps xdvi dvips.dvi X11 DVI DVI PostScript Unix.dvi 1.6 1.6.1 L A TEX \documentclass L A TEX \documentclass[options]{class} class 1.1 L A TEX 2ε options 1.2 L A TEX \documentclass[11pt,twoside,a4paper]{article} L A TEX 11 A4
10 1.1: article report book slides sans serif FoilTEX a a CTAN:/tex-archive/macros/latex/contrib/supported/foiltex 1.2: 10pt, 11pt, 12pt 10pt a4paper, letterpaper,... letterpaper a5paper b5paper executivepaper legalpaper fleqn leqno titlepage, notitlepage document title article book onecolumn, twocolumn L A TEX one column two column twoside, oneside L A TEX article report book twoside openright, openany article Chapter report book
1.7 L A TEX 11 1.6.2 L A TEX L A TEX \usepackage[options]{package} package options L A TEX 1.3 L A TEX The L A TEX Companion [3] L A TEX L A TEX 2ε 1.7 L A TEX L A TEX extensions.tex L A TEX TEX latex.sty L A TEX \usepackage L A TEX.dtx TEX L A TEX.dtx L A TEX.ins.dtx L A TEX.dtx.ins L A TEX.ins.dtx L A TEX.dvi L A TEX DVI dvips.log
12.toc.lof.toc.lot.toc.aux.aux.idx L A TEX makeindex 4.3 1.3: L A TEX normalfontdoc L A TEX doc.dtx a The L A TEX Companion [3] exscale ltexscale.dtx normalfontfontenc L A TEX font encoding ltoutenc.dtx ifthen if... then do... otherwise do.... ifthen.dtx The L A TEX Companion [3] latexsym L A TEX latexsym.dtx The L A TEX Companion [3] makeidx 4.3 The L A TEX Companion [3] syntonly inputenc ASCII ISO Latin-1 ISO Latin-2 437/850 IBM Apple Macintosh Next ANSI-Windows inputenc.dtx a latex doc.dtx dvi
1.8 13.ind.idx.ilg makeindex 1.7.1 L A TEX header/footer page styles \pagestyle{style} 1.4 1.4: The Predefined Page Styles of L A TEX. plain headings empty \thispagestyle{style} The L A TEX Companion [3] 4.4 1.8 L A TEX \include{filename} filename.tex L A TEX filename.tex
14 L A TEX \included \includeonly{filename,filename,... } L A TEX \include \includeonly \include \includeonly \input{filename} syntonly L A TEX L A TEX DVI L A TEX \usepackage{syntonly} \syntaxonly
L A TEX 2ε 2.1 DAAC 1 L A TEX L A TEX \\ L A TEX % Example 1 1 Swiss German UVA (Um s Verrecken Anders)
16 \ldots when Einstein introduced his formula \begin{equation} e = m \cdot c^2 \;, \end{equation} which is at the same time the most widely known and the least well understood physical formula. % Example 2 \ldots from which follows Kirchoff s current law: \begin{equation} \sum_{k=1}^{n} I_k = 0 \;. \end{equation} Kirchhoff s voltage law can be derived \ldots % Example 3 \ldots which has several advantages. \begin{equation} I_D = I_F - I_R \end{equation} is the core of a very different transistor model. \ldots L A TEX L A TEX L A TEX \section{the Structure of Text and
2.2 17 Language} 2.2 2.2.1 L A TEX linebreak L A TEX 5.3.2 L A TEX \\ or \newline \\* \newpage \linebreak[n], \nolinebreak[n], \pagebreak[n] and \nopagebreak[n] n n 0 4 n 4 L A TEX break new break L A TEX L A TEX L A TEX overfull hbox L A TEX
18 2 \sloppy L A TEX underfull hbox \fussy L A TEX 2.2.2 TEX \hyphenation{word list} - \begin{document} babel babel hyphenation Hyphenation FORTRAN, Fortran fortran \hyphenation{fortran Hy-phen-a-tion} \- L A TEX I think this is: su\-per\-cal\-% i\-frag\-i\-lis\-tic\-ex\-pi\-% al\-i\-do\-cious I think this is: supercalifragilisticexpialidocious 2 L A TEX \documentclass draft L A TEX
2.3 19 \mbox{text} My phone number will change soon. It will be \mbox{0116 291 2319}. The parameter \mbox{\emph{filename}} should contain the name of the file. My phone number will change soon. It will be 0116 291 2319. The parameter filename should contain the name of the file. \fbox \mbox 2.3 L A TEX Command Example Description \today 8th March 2003 Current date in the current language \TeX TEX The name of your favorite typesetter \LaTeX L A TEX The name of the Game \LaTeXe L A TEX 2ε The current incarnation of L A TEX 2.4 2.4.1 " L A TEX Please press the x key. Please press the x key.
20 2.4.2 L A TEX daughter-in-law, X-rated\\ pages 13--67\\ yes---or no? \\ $0$, $1$ and $-1$ daughter-in-law, X-rated pages 13 67 yes or no? 0, 1 and 1 : - 2.4.3 ( ) L A TEX \~ http://www.rich.edu/\~{}bush \\ http://www.clever.edu/$\sim$demo http://www.rich.edu/ bush http://www.clever.edu/ demo 2.4.4 ( ) L A TEX Its $-30\,^{\circ}\mathrm{C}$, I will soon start to super-conduct. Its 30 C, I will soon start to super-conduct. 2.4.5 (... ) \ldots
2.5 21 Not like this... but like this:\\ New York, Tokyo, Budapest, \ldots Not like this... but like this: New York, Tokyo, Budapest,... 2.4.6 ff fi fl ffi... ff fi fl ffi... \mbox{} %Not shelfful\\ %but shelf\mbox{}ful shelfful shelfful 2.4.7 L A TEX 2.1 o i j \i \j H\^otel, na\"\i ve, \ el\ eve,\\ sm\o rrebr\o d,! Se\~norita!,\\ Sch\"onbrunner Schlo\ss{} Stra\ss e Hôtel, naïve, élève, smørrebrød, Señorita!, Schönbrunner Schloß Straße 2.5 L A TEX 1. 3 Johannes Braams babel 3,,...
22 2. L A TEX L A TEX Local Guide [4] \documentclass \usepackage[language]{babel} babel Local Guide [4] babel L A TEX babel babel German äöü babel "o \"o ö L A TEX 1994 12 L A TEX 2ε L A TEX 2ε inputenc \usepackage[encoding]{inputenc} ä 132 2.1:. ò \ o ó \ o ô \^o õ \~o ō \=o ȯ \.o ö \"o ç \c c ŏ \u o ǒ \v o ő \H o o \c o ọ \d o ō \b o oo \t oo œ \oe Œ \OE æ \ae Æ \AE å \aa Å \AA ø \o Ø \O l \l L \L ı \i j \j!?
2.5 23 ISO-LATIN 1 Unix 228 Operating system Mac Unix Windows OS/2 encoding applemac latin1 ansinew cp850 TEX- TEX 7 ASCII 128 TEX TEX EC EC fontenc \usepackage[t1]{fontenc}
24 2.5.1 L A TEX \usepackage[german]{babel} L A TEX Kapitel 2.2 2.2:. "a ä "s ß " " "< "> \dq 2.6 L A TEX L A TEX ~ \@ Mr.~Smith was happy to see her\\ cf.~fig.~5\\ I like BASIC\@. What about you? Mr. Smith was happy to see her cf. Fig. 5 I like BASIC. What about you?
2.7 25 \frenchspacing L A TEX \frenchspacing \@ 2.7 L A TEX article \section{...} \subsection{...} \subsubsection{...} \paragraph{...} \subparagraph{...} report book \part{...} \chapter{...} article L A TEX \part \appendix 4 L A TEX \tableofcontents L A TEX 4 article
26 * \section{help} \section*{help} \chapter[title for the table of contents]{a long and especially boring title, shown in the text} \maketitle \maketitle \title{...}, \author{...} \date{...} \author \and 8 1.3 L A TEX 2ε book \frontmatter \begin{document} \chapter*{preface} L A TEX \mainmatter \appendix \backmatter
2.8 27 2.8 L A TEX \label{marker}, \ref{marker} and \pageref{marker} marker \label L A TEX \ref \pageref \label 5 A reference to this subsection \label{sec:this} looks like: see section~\ref{sec:this} on page~\pageref{sec:this}. A reference to this subsection looks like: see section 12 on page 27. 2.9 \footnote{footnote text} put 6 7 Footnotes\footnote{This is a footnote.} are often used by people using \LaTeX. Footnotes a are often used by people using L A TEX. a This is a footnote. 5 \label 6 put 7 8 8 :-).
28 2.10 \underline{text} L A TEX \emph{text} \emph{if you use emphasizing inside a piece of emphasized text, then \LaTeX{} uses the \emph{normal} font for emphasizing.} If you use emphasizing inside a piece of emphasized text, then L A TEX uses the normal font for emphasizing. L A TEX : \textit{you can also \emph{emphasize} text if it is set in italics,} \textsf{in a \emph{sans-serif} font,} \texttt{or in \emph{typewriter} style.} You can also emphasize text if it is set in italics, in a sans-serif font, or in typewriter style. 2.11 \begin{environment} text \end{environment} environment \begin{aaa}...\begin{bbb}...\end{bbb}...\end{aaa}
2.11 29 2.11.1 Itemize, Enumerate, and Description itemize enumerate description \flushleft \begin{enumerate} \item You can mix the list environments to your taste: \begin{itemize} \item But it might start to look silly. \item[-] With a dash. \end{itemize} \item Therefore remember: \begin{description} \item[stupid] things will not become smart because they are in a list. \item[smart] things, though, can be presented beautifully in a list. \end{description} \end{enumerate} 1. You can mix the list environments to your taste: But it might start to look silly. - With a dash. 2. Therefore remember: Stupid things will not become smart because they are in a list. Smart things, though, can be presented beautifully in a list. 2.11.2 Flushleft, Flushright, and Center flushleft flushright center \\ L A TEX \begin{flushleft} This text is\\ left-aligned. \LaTeX{} is not trying to make each line the same length. \end{flushleft} This text is left-aligned. L A TEX is not trying to make each line the same length. \begin{flushright} This text is right-\\aligned. \LaTeX{} is not trying to make each line the same length. \end{flushright} This text is rightaligned. L A TEX is not trying to make each line the same length.
30 \begin{center} At the centre\\of the earth \end{center} At the centre of the earth 2.11.3 Quote, Quotation, and Verse quote A typographical rule of thumb for the line length is: \begin{quote} On average, no line should be longer than 66 characters. \end{quote} This is why \LaTeX{} pages have such large borders by default and also why multicolumn print is used in newspapers. A typographical rule of thumb for the line length is: On average, no line should be longer than 66 characters. This is why L A TEX pages have such large borders by default and also why multicolumn print is used in newspapers. quotation verse quotation verse \\ I know only one English poem by heart. It is about Humpty Dumpty. \begin{flushleft} \begin{verse} Humpty Dumpty sat on a wall:\\ Humpty Dumpty had a great fall.\\ All the King s horses and all the King s men\\ Couldn t put Humpty together again. \end{verse} \end{flushleft} I know only one English poem by heart. It is about Humpty Dumpty. Humpty Dumpty sat on a wall: Humpty Dumpty had a great fall. All the King s horses and all the King s men Couldn t put Humpty together again. 2.11.4 \begin{verbatim} \end{verbatim} L A TEX
2.11 31 \verb+text+ + * The \verb \ldots command \ldots \begin{verbatim} 10 PRINT "HELLO WORLD "; 20 GOTO 10 \end{verbatim} The \ldots command... 10 PRINT "HELLO WORLD "; 20 GOTO 10 \begin{verbatim*} the starred version of the verbatim environment emphasizes the spaces in the text \end{verbatim*} the starred version of the verbatim environment emphasizes the spaces in the text \verb \verb* like this :-) like this :-) verbatim \verb 2.11.5 tabular L A TEX \begin{tabular}{table spec} table spec l r c p{ width}
32 tabular & \\ \hline \cline{j-i} j i \begin{tabular}{ r l } \hline 7C0 & hexadecimal \\ 3700 & octal \\ \cline{2-2} 11111000000 & binary \\ \hline \hline 1984 & decimal \\ \hline \end{tabular} 7C0 hexadecimal 3700 octal 11111000000 binary 1984 decimal \begin{tabular}{ p{4.7cm} } \hline Welcome to Boxy s paragraph. We sincerely hope you ll all enjoy the show.\\ \hline \end{tabular} Welcome to Boxy s paragraph. We sincerely hope you ll all enjoy the show. @{...} @{} \begin{tabular}{@{} l @{}} \hline no leading space\\ \hline \end{tabular} no leading space \begin{tabular}{l} \hline leading space left and right\\ \hline \end{tabular} leading space left and right 9 \begin{tabular} 9 tools dcolumn
2.12 33 @{.}. (&) \multicolumn \begin{tabular}{c r @{.} l} Pi expression & \multicolumn{2}{c}{value} \\ \hline $\pi$ & 3&1416 \\ $\pi^{\pi}$ & 36&46 \\ $(\pi^{\pi})^{\pi}$ & 80662&7 \\ \end{tabular} Pi expression Value π 3.1416 π π 36.46 (π π ) π 80662.7 \begin{tabular}{ c c } \hline \multicolumn{2}{ c }{Ene} \\ \hline Mene & Muh! \\ \hline \end{tabular} Mene Ene Muh! supertabular longtabular 2.12 L A TEX L A TEX L A TEX L A TEX
34 figure table \begin{figure}[placement specifier] or \begin{table}[placement specifier] 2.3 0pt 1.05em TEX 73 5.5 \begin{table}[!hbp] [!hbp] L A TEX (b) (p) (!) [tbp] L A TEX 10 L A TEX L A TEX h L A TEX L A TEX 10 2.3:... h t b p! a a
2.12 35 [h] L A TEX [ht] table figure \caption{caption text} L A TEX \listoffigures and \listoftables \tableofcontents \caption \caption[short]{llllloooooonnnnnggggg} \label \ref Figure~\ref{white} is an example of Pop-Art. \begin{figure}[!hbp] \makebox[\textwidth]{\framebox[5cm]{\rule{0pt}{5cm}}} \caption{five by Five in Centimetres.} \label{white} \end{figure} (h) 11 L A TEX (!) (b) L A TEX 11
36 \clearpage or even the \cleardoublepage command. L A TEX \cleardoublepage L A TEX L A TEX 2ε PostScript 2.13 \caption \section \section \footnote \phantom. \protect \protect \protect \section{i am considerate \protect\footnote{and protect my footnotes}}
TEX AMS-L A TEX 1 3.1 L A TEX mathematics \( \) $ $ \begin{math} \end{math} Add $a$ squared and $b$ squared to get $c$ squared. Or, using a more mathematical approach: $c^{2}=a^{2}+b^{2}$ Add a squared and b squared to get c squared. Or, using a more mathematical approach: c 2 = a 2 + b 2 \TeX{} is pronounced as $\tau\epsilon\chi$.\\[6pt] 100~m$^{3}$ of water\\[6pt] This comes from my $\heartsuit$ TEX is pronounced as τɛχ. 100 m 3 of water This comes from my \[ \] \begin{displaymath} \end{displaymath} L A TEX equation 1 CTAN:/tex-archive/macros/latex/required/amslatex
38 Add $a$ squared and $b$ squared to get $c$ squared. Or, using a more mathematical approach: \begin{displaymath} c^{2}=a^{2}+b^{2} \end{displaymath} And just one more line. Add a squared and b squared to get c squared. Or, using a more mathematical approach: c 2 = a 2 + b 2 And just one more line. \label \ref \begin{equation} \label{eq:eps} \epsilon > 0 \end{equation} From (\ref{eq:eps}), we gather \ldots From (3.1), we gather... ɛ > 0 (3.1) $\lim_{n \to \infty} \sum_{k=1}^n \frac{1}{k^2} = \frac{\pi^2}{6}$ n lim n k=1 1 k = π2 2 6 \begin{displaymath} \lim_{n \to \infty} \sum_{k=1}^n \frac{1}{k^2} = \frac{\pi^2}{6} \end{displaymath} lim n n k=1 1 k 2 = π2 6 1. \, \quad \qquad 2. 3. \textrm{...} \begin{equation} \forall x \in \mathbf{r}: \qquad x^{2} \geq 0 \end{equation} x R : x 2 0 (3.2)
3.2 39 \begin{equation} x^{2} \geq 0\qquad \textrm{for all }x\in\mathbf{r} \end{equation} x 2 0 for all x R (3.3) blackboard bold amsfonts amssymb \mathbb \begin{displaymath} x^{2} \geq 0\qquad \textrm{for all }x\in\mathbb{r} \end{displaymath} x 2 0 for all x R 3.2 {...} \begin{equation} a^x+y \neq a^{x+y} \end{equation} a x + y a x+y (3.4) 3.3 50 3.10 Lowercase Greek letters \alpha, \beta, \gamma,... \Gamma, \Delta,... 2 $\lambda,\xi,\pi,\mu,\phi,\omega$ λ, ξ, π, µ, Φ, Ω ^ _ 2 L A TEX 2ε Alpha A
40 $a_{1}$ \qquad $x^{2}$ \qquad $e^{-\alpha t}$ \qquad $a^{3}_{ij}$\\ $e^{x^2} \neq {e^x}^2$ a 1 x 2 e αt a 3 ij e x2 e x2 square root \sqrt n : \sqrt[n] L A TEX \surd $\sqrt{x}$ \qquad $\sqrt{ x^{2}+\sqrt{y} }$ \qquad $\sqrt[3]{2}$\\[3pt] $\surd[x^2 + y^2]$ x x2 + y [x 2 + y 2 ] 3 2 \overline \underline $\overline{m+n}$ \qquad $\underline{m+n}$ m + n m + n \overbrace \underbrace $\underbrace{ a+b+\cdots+z }_{26}$ a + b + + z } {{ } 26 tilde 50 3.1 \widetilde \widehat prime \begin{displaymath} y=x^{2}\qquad y =2x\qquad y =2 \end{displaymath} y = x 2 y = 2x y = 2 Vectors arrow symbols \vec \overrightarrow \overleftarrow A B \begin{displaymath} \vec a\quad\overrightarrow{ab} \end{displaymath} a AB \cdot
3.3 41 \begin{displaymath} v = {\sigma}_1 \cdot {\sigma}_2 {\tau}_1 \cdot {\tau}_2 \end{displaymath} v = σ 1 σ 2 τ 1 τ 2 L A TEX \arccos \cos \csc \exp \ker \limsup \min \arcsin \cosh \deg \gcd \lg \ln \Pr \arctan \cot \det \hom \lim \log \sec \arg \coth \dim \inf \liminf \max \sin \sinh \sup \tan \tanh \[\lim_{x \rightarrow 0} \frac{\sin x}{x}=1\] sin x lim x 0 x = 1 modulo function \bmod a mod b \pmod x a (mod b) fraction \frac{...}{...} 1/2 $1\frac{1}{2}$~hours \begin{displaymath} \frac{ x^{2} }{ k+1 }\qquad x^{ \frac{2}{k+1} }\qquad x^{ 1/2 } \end{displaymath} 1 1 2 hours x 2 k + 1 x 2 k+1 x 1/2 {... \choose...} {... \atop...} 3 \begin{displaymath} {n \choose k}\qquad {x \atop y+2} \end{displaymath} ( ) n k x y + 2 \stackrel 3 amsmath \binom \genfrac \newcommand{\newatop}[2]% \genfrac{}{}{0pt}{1}{#1}{#2}} \atop
42 \begin{displaymath} \int f_n(x) \stackrel{!}{=} 1 \end{displaymath} f N (x)! = 1 integral operator \int sum operator \sum product operator \prod ^ _ 4 \begin{displaymath} \sum_{i=1}^{n} \qquad \int_{0}^{\frac{\pi}{2}} \qquad \prod_\epsilon n i=1 π 2 0 ɛ \end{displaymath} braces delimiters TEX [ \{ \updownarrow 52 3.8 \begin{displaymath} {a,b,c}\neq\{a,b,c\} \end{displaymath} a, b, c {a, b, c} \left TEX \right \left \right.! \begin{displaymath} 1 + \left( \frac{1}{ 1-x^{2} } \right) ^3 \end{displaymath} ( ) 3 1 1 + 1 x 2 \big, \Big, \bigg \Bigg 5 4 AMS-L A TEX / 5 11pt 12pt exscale amsmath
3.4 43 $\Big( (x+1) (x-1) \Big) ^{2}$\\ $\big(\big(\bigg(\bigg($\quad $\big\}\big\}\bigg\}\bigg\}$\quad $\big\ \Big\ \bigg\ \Bigg\ $ ( ) 2 (x + 1)(x 1) ( ((( } }}} three dots \ldots \cdots \vdots \ddots diagonal dots 3.5 \begin{displaymath} x_{1},\ldots,x_{n} \qquad x_{1}+\cdots+x_{n} \end{displaymath} x 1,..., x n x 1 + + x n 3.4 TEX \, 3 18 quad ( ), \: 4 5 18 quad ( ) \; 18 quad ( ) \ \quad ( ) \qquad ( ) \quad M \! 3 18 quad ( ) \newcommand{\ud}{\mathrm{d}} \begin{displaymath} \int\!\!\!\int_{d} g(x,y) \, \ud x\, \ud y \end{displaymath} instead of \begin{displaymath} \int\int_{d} g(x,y)\ud x \ud y \end{displaymath} instead of g(x, y) dx dy D g(x, y)dxdy D d AMS-L A TEX \iint, \iiint, \iiiint \idotsint amsmath
44 \newcommand{\ud}{\mathrm{d}} \begin{displaymath} \iint_{d} \, \ud x \, \ud y \end{displaymath} D dx dy testmath.tex AMS-L A TEX The LaTeX Companion 3.5 arrays array arrays tabular \\ \begin{displaymath} \mathbf{x} = \left( \begin{array}{ccc} x_{11} & x_{12} & \ldots \\ x_{21} & x_{22} & \ldots \\ \vdots & \vdots & \ddots \end{array} \right) \end{displaymath} X = x 11 x 12... x 21 x 22........ array. \begin{displaymath} y = \left\{ \begin{array}{ll} a & \textrm{if $d>c$}\\ b+x & \textrm{in the morning}\\ l & \textrm{all day long} \end{array} \right. \end{displaymath} a y = b + x l if d > c in the morning all day long tabular array \begin{displaymath} \left(\begin{array}{c c} 1 & 2 \\ \hline 3 & 4 \end{array}\right) \end{displaymath} ( ) 1 2 3 4
3.5 45 equation system eqnarray eqnarray* equation eqnarray eqnarray* eqnarray eqnarray* {rcl} \\ \begin{eqnarray} f(x) & = & \cos x \\ f (x) & = & -\sin x \\ \int_{0}^{x} f(y)dy & = & \sin x \end{eqnarray} x 0 f(x) = cos x (3.5) f (x) = sin x (3.6) f(y)dy = sin x (3.7) \setlength\arraycolsep{2pt} {\setlength\arraycolsep{2pt} \begin{eqnarray} \sin x & = & x -\frac{x^{3}}{3!} +\frac{x^{5}}{5!}-{} \nonumber\\ & & {}-\frac{x^{7}}{7!}+{}\cdots \end{eqnarray}} sin x = x x3 3! + x5 5! x7 7! + (3.8) \begin{eqnarray} \lefteqn{ \cos x = 1 -\frac{x^{2}}{2!} +{} } \nonumber\\ & & {}+\frac{x^{4}}{4!} -\frac{x^{6}}{6!}+{}\cdots \end{eqnarray} cos x = 1 x2 2! + + x4 4! x6 6! + (3.9) \nonumber L A TEX amsmath split align
46 3.6 phantom L A TEX ^ _ L A TEX \phantom \begin{displaymath} {}^{12}_{\phantom{1}6}\textrm{C} \qquad \textrm{versus} \qquad {}^{12}_{6}\textrm{C} \end{displaymath} 12 6 C versus 12 6 C \begin{displaymath} \Gamma_{ij}^{\phantom{ij}k} \qquad \textrm{versus} \qquad \Gamma_{ij}^{k} \end{displaymath} Γ k ij versus Γ k ij 3.7 TEX \textrm \textrm \mathrm \mathrm 6 \begin{equation} 2^{\textrm{nd}} \quad 2^{\mathrm{nd}} \end{equation} 2 nd 2 nd (3.10) L A TEX 6 AMS-L A TEX \textrm
3.8... 47 \displaystyle (123), \textstyle (123), \scriptstyle (123) and \scriptscriptstyle (123). \begin{displaymath} \mathop{\mathrm{corr}}(x,y)= \frac{\displaystyle \sum_{i=1}^n(x_i-\overline x) (y_i-\overline y)} {\displaystyle\biggl[ \sum_{i=1}^n(x_i-\overline x)^2 \sum_{i=1}^n(y_i-\overline y)^2 \biggr]^{1/2}} \end{displaymath} n (x i x)(y i y) i=1 corr(x, Y ) = [ n n ] 1/2 (x i x) 2 (y i y) 2 i=1 i=1 \left[ \right] 3.8... L A TEX \newtheorem{name}[counter]{text}[section] name text counter name section \newtheorem \begin{name}[text] This is my interesting theorem \end{name} \newtheorem
48 % definitions for the document % preamble \newtheorem{law}{law} \newtheorem{jury}[law]{jury} %in the document \begin{law} \label{law:box} Don t hide in the witness box \end{law} \begin{jury}[the Twelve] It could be you! So beware and see law~\ref{law:box}\end{jury} \begin{law}no, No, No\end{law} Law 1 Don t hide in the witness box Jury 2 (The Twelve) It could be you! So beware and see law 1 Law 3 No, No, No Jury Law \flushleft \newtheorem{mur}{murphy}[section] \begin{mur} If there are two or more ways to do something, and one of those ways can result in a catastrophe, then someone will do it.\end{mur} Murphy 3.8.1 If there are two or more ways to do something, and one of those ways can result in a catastrophe, then someone will do it. Murphy 3.9 L A TEX \mathbf \boldmath \begin{displaymath} \mu, M \qquad \mathbf{m} \qquad \mbox{\boldmath $\mu, M$} \end{displaymath} µ, M M µ, M
3.9 49 amsbsy amsmath bm \boldsymbol \begin{displaymath} \mu, M \qquad \boldsymbol{\mu}, \boldsymbol{m} \end{displaymath} µ, M µ, M
50 3.10 3.12 3.16 7 AMS amssymb AMS CTAN:/tex-archive/macros/latex/required/amslatex 3.1: â \hat{a} ǎ \check{a} ã \tilde{a} á \acute{a} à \grave{a} ȧ \dot{a} ä \ddot{a} ă \breve{a} ā \bar{a} a \vec{a} Â \widehat{a} Ã \widetilde{a} 3.2: α \alpha θ \theta o o υ \upsilon β \beta ϑ \vartheta π \pi φ \phi γ \gamma ι \iota ϖ \varpi ϕ \varphi δ \delta κ \kappa ρ \rho χ \chi ɛ \epsilon λ \lambda ϱ \varrho ψ \psi ε \varepsilon µ \mu σ \sigma ω \omega ζ \zeta ν \nu ς \varsigma η \eta ξ \xi τ \tau 3.3: Γ \Gamma Λ \Lambda Σ \Sigma Ψ \Psi \Delta Ξ \Xi Υ \Upsilon Ω \Omega Θ \Theta Π \Pi Φ \Phi 7 David Carlisle symbols.tex Josef Tkadlec
3.10 51 3.4: \not < < > > = = \leq or \le \geq or \ge \equiv. \ll \gg = \doteq \prec \succ \sim \preceq \succeq \simeq \subset \supset \approx \subseteq \supseteq = \cong \sqsubset a \sqsupset a \Join a \sqsubseteq \sqsupseteq \bowtie \in \ni, \owns \propto \vdash \dashv = \models \mid \parallel \perp \smile \frown \asymp : : / \notin \neq or \ne a latexsym 3.5: + + - ± \pm \mp \triangleleft \cdot \div \triangleright \times \ \setminus \star \cup \cap \ast \sqcup \sqcap \circ \vee, \lor \wedge, \land \bullet \oplus \ominus \diamond \odot \oslash \uplus \otimes \bigcirc \amalg \bigtriangleup \bigtriangledown \dagger \lhd a \rhd a \ddagger \unlhd a \unrhd a \wr
52 3.6: \sum \bigcup \bigvee \bigoplus \prod \bigcap \bigwedge \bigotimes \coprod \bigsqcup \bigodot \int \oint \biguplus 3.7: \leftarrow or \gets \longleftarrow \uparrow \rightarrow or \to \longrightarrow \downarrow \leftrightarrow \longleftrightarrow \updownarrow \Leftarrow = \Longleftarrow \Uparrow \Rightarrow = \Longrightarrow \Downarrow \Leftrightarrow \Longleftrightarrow \Updownarrow \mapsto \longmapsto \nearrow \hookleftarrow \hookrightarrow \searrow \leftharpoonup \rightharpoonup \swarrow \leftharpoondown \rightharpoondown \nwarrow \rightleftharpoons \iff (bigger spaces) \leadsto a a latexsym 3.8: ( ( ) ) \uparrow \Uparrow [ [ or \lbrack ] ] or \rbrack \downarrow \Downarrow { \{ or \lbrace } \} or \rbrace \updownarrow \Updownarrow \langle \rangle or \vert \ or \Vert \lfloor \rfloor \lceil \rceil / / \ \backslash. (dual. empty) \lgroup \arrowvert 3.9: \rgroup \lmoustache \Arrowvert \bracevert \rmoustache
3.10 53 3.10:... \dots \cdots. \vdots... \ddots \hbar ı \imath j \jmath l \ell R \Re I \Im ℵ \aleph \wp \forall \exists \mho a \partial \prime \emptyset \infty \nabla \triangle \Box a \Diamond a \bot \top \angle \surd \diamondsuit \heartsuit \clubsuit \spadesuit \neg or \lnot \flat \natural \sharp a latexsym 3.11: \dag \S c \copyright \ddag \P \pounds 3.12: AMS \ulcorner \urcorner \llcorner \lrcorner \lvert \rvert \lvert \rvert 3.13: AMS Ϝ \digamma κ \varkappa ℶ \beth ℸ \daleth ג \gimel
54 3.14: AMS \lessdot \gtrdot \doteqdot or \Doteq \leqslant \geqslant \risingdotseq \eqslantless \eqslantgtr \fallingdotseq \leqq \geqq \eqcirc \lll or \llless \ggg or \gggtr \circeq \lesssim \gtrsim \triangleq \lessapprox \gtrapprox \bumpeq \lessgtr \gtrless \Bumpeq \lesseqgtr \gtreqless \thicksim \lesseqqgtr \gtreqqless \thickapprox \preccurlyeq \succcurlyeq \approxeq \curlyeqprec \curlyeqsucc \backsim \precsim \succsim \backsimeq \precapprox \succapprox \vdash \subseteqq \supseteqq \Vdash \Subset \Supset \Vvdash \sqsubset \sqsupset \backepsilon \therefore \because \varpropto \shortmid \shortparallel \between \smallsmile \smallfrown \pitchfork \vartriangleleft \vartriangleright \blacktriangleleft \trianglelefteq \trianglerighteq \blacktriangleright 3.15: AMS \dashleftarrow \dashrightarrow \multimap \leftleftarrows \rightrightarrows \upuparrows \leftrightarrows \rightleftarrows \downdownarrows \Lleftarrow \Rrightarrow \upharpoonleft \twoheadleftarrow \twoheadrightarrow \upharpoonright \leftarrowtail \rightarrowtail \downharpoonleft \leftrightharpoons \rightleftharpoons \downharpoonright \Lsh \Rsh \rightsquigarrow \looparrowleft \looparrowright \leftrightsquigarrow \curvearrowleft \curvearrowright \circlearrowleft \circlearrowright
3.10 55 3.16: AMS \nless \ngtr \varsubsetneqq \lneq \gneq \varsupsetneqq \nleq \ngeq \nsubseteqq \nleqslant \ngeqslant \nsupseteqq \lneqq \gneqq \nmid \lvertneqq \gvertneqq \nparallel \nleqq \ngeqq \nshortmid \lnsim \gnsim \nshortparallel \lnapprox \gnapprox \nsim \nprec \nsucc \ncong \npreceq \nsucceq \nvdash \precneqq \succneqq \nvdash \precnsim \succnsim \nvdash \precnapprox \succnapprox \nvdash \subsetneq \supsetneq \ntriangleleft \varsubsetneq \varsupsetneq \ntriangleright \nsubseteq \nsupseteq \ntrianglelefteq \subsetneqq \supsetneqq \ntrianglerighteq \nleftarrow \nrightarrow \nleftrightarrow \nleftarrow \nrightarrow \nleftrightarrow 3.17: AMS \dotplus \centerdot \intercal \ltimes \rtimes \divideontimes \Cup or \doublecup \Cap or \doublecap \smallsetminus \veebar \barwedge \doublebarwedge \boxplus \boxminus \circleddash \boxtimes \boxdot \circledcirc \leftthreetimes \rightthreetimes \circledast \curlyvee \curlywedge
56 3.18: AMS \hbar ħ \hslash k \Bbbk \square \blacksquare S \circleds \vartriangle \blacktriangle \complement \triangledown \blacktriangledown \Game \lozenge \blacklozenge \bigstar \angle \measuredangle \sphericalangle \diagup \diagdown \backprime \nexists Ⅎ \Finv \varnothing ð \eth \mho 3.19: ABCdef \mathrm{abcdef} ABCdef \mathit{abcdef} ABCdef \mathnormal{abcdef} ABC \mathcal{abc} A BC \mathcal{abc} mathrsfs ABC \mathcal{abc} eucal with option: mathcal or \mathscr{abc} eucal with option: mathscr ABCdef \mathfrak{abcdef} eufrak ABC \mathbb{abc} amsfonts or amssymb
L A TEX L A TEX L A TEX Manual [1] The L A TEX Companion [3] 4.1 EPS L A TEX figure table L A TEX L A TEX The L A TEX Companion [3] L A TEX Manual [1] 1 L A TEX Encapsulated PostScript(EPS) EPS PostScript 2 D. P. Carlisle graphicx graphics 3 PostScript graphicx 1. EPS 4 1 XFig, CorelDraw!, Freehand, Gnuplot,... 2 PostScript GhostScript CTAN:/tex-archive/support/ghostscript Windows OS/2 GSview 3 CTAN:/tex-archive/macros/latex/required/graphics 4 EPS PostScript
58 2. graphicx \usepackage[driver]{graphicx} driver dvi postscript dvips TEX driver graphicx.dvi.eps 3. \includegraphics[key=value,... ]{file} file keys values keys 4.1 4.1: graphicx width height angle scale \begin{figure} \begin{center} \includegraphics[angle=90, width=0.5\textwidth]{test} \end{center} \end{figure} test.eps 90 0.5 Apple LaserWriter EPS EPS EPS
4.2 59 1.0 73 5.5 [8] [11] 4.2 thebibliography \bibitem{marker} marker \cite{marker} \begin{thebibliography} {99} L A TEX 99 Partl [1] has proposed that... Partl~\cite{pa} has proposed that \ldots \begin{thebibliography}{99} \bibitem{pa} H.~Partl: \emph{german \TeX}, TUGboat Volume~9, Issue~1 (1988) \end{thebibliography} [1] H. Partl: German TEX, TUGboat Volume 9, Issue 1 (1988) BibTEX BibTEX TEX BibTEX
60 4.2: \index{hello} hello, 1 \index{hello!peter} Peter, 3 hello \index{sam@\textsl{sam}} Sam, 2 \index{lin@\textbf{lin}} Lin, 7 \index{jenny textbf} Jenny, 3 \index{joe textit} Joe, 5 4.3 L A TEX makeindex 5 The L A TEX Companion [3] L A TEX makeidx \usepackage{makeidx} \makeindex \index{key} key 4.2 key L A TEX \index L A TEX (.idx).idx makeindex 5 8 makeidx
4.4 61 makeindex filename makeindex.ind L A TEX \printindex L A TEX 2ε showidx 4.4 Piet van Oostrum fancyhdr 6 L A TEX \rightmark \leftmark chapter section \chapter \rightmark \leftmark \chaptermark \sectionmark \subsectionmark \rightmark \leftmark \chaptermark 4.1 fancyhdr 4.5 Verbatim verbatim verbatim verbatim verbatim verbatim verbatim 6 CTAN:/tex-archive/macros/latex/contrib/supported/fancyhdr
62 \documentclass{book} \usepackage{fancyhdr} \pagestyle{fancy} % with this we ensure that the chapter and section % headings are in lowercase. \renewcommand{\chaptermark}[1]{\markboth{#1}{}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \fancyhf{} % delete current setting for header and footer \fancyhead[le,ro]{\bfseries\thepage} \fancyhead[lo]{\bfseries\rightmark} \fancyhead[re]{\bfseries\leftmark} \renewcommand{\headrulewidth}{0.5pt} \renewcommand{\footrulewidth}{0pt} \addtolength{\headheight}{0.5pt} % make space for the rule \fancypagestyle{plain}{% \fancyhead{} % get rid of headers on plain pages \renewcommand{\headrulewidth}{0pt} % and the line } 4.1: fancyhdr verbatim \verbatiminput{filename} ASCII verbatim verbatim tools [9] 4.6 L A TEX L A TEX CTAN(http://www.ctan.org/) geometry hyphenat.ins.dtx readme.txt
4.6 L A TEX 63 (a) TEX (b) 1..ins L A TEX.sty 2..sty.../localtexmf /tex/latex Windows OS/2 3. L A TEX tetex, fptex texhash; web2c maktexlsr; MikTeX initexmf -update-fndb.dtx 1..dtx L A TEX.dvi L A TEX 2. L A TEX.idx 5 3. makeindex -s gind.ist name ( name ) 4..dtx L A TEX 5..ps.pdf.glo(glossary) 4 5 makeindex -s gglo.ist -o name.gls name.glo 5.dtx L A TEX
L A TEX L A TEX L A TEX L A TEX 5.1 L A TEX package \begin{lscommand} \ci{dum} \end{lscommand} \dum lscommand \ci \dum \dum \dum lscommand
5.1 65 L A TEX 5.1.1 \newcommand{name}[num]{definition} name definition num 9 \tnss The Not So Short Introduction to L A TEX 2ε \newcommand{\tnss}{the not so Short Introduction to \LaTeXe} This is \tnss \ldots{} \tnss This is The not so Short Introduction to L A TEX 2ε... The not so Short Introduction to L A TEX 2ε #1 #2... #9 \newcommand{\txsit}[1] {This is the \emph{#1} Short Introduction to \LaTeXe} % in the document body: \begin{itemize} \item \txsit{not so} \item \txsit{very} \end{itemize} This is the not so Short Introduction to L A TEX 2ε This is the very Short Introduction to L A TEX 2ε L A TEX \newcommand \renewcommand \newcommand
66 L A TEX \providecommand \newcommand L A TEX 2ε L A TEX 6 5.1.2 \newcommand \newenvironment \newenvironment{name}[num]{before}{after} \newcommand \newenvironment before after \end{name} \newenvironment \newenvironment{king} {\rule{1ex}{1ex}% \hspace{\stretch{1}}} {\hspace{\stretch{1}}% \rule{1ex}{1ex}} \begin{king} My humble subjects \ldots \end{king} My humble subjects... num \newcommand L A TEX \renewenvironment \newenvironment \rule 78 \stretch 72 \hspace 72 5.1.3 L A TEX
5.2 67 \usepackage % Demo Package by Tobias Oetiker \ProvidesPackage{demopack} \newcommand{\tnss}{the not so Short Introduction to \LaTeXe} \newcommand{\txsit}[1]{the \emph{#1} Short Introduction to \LaTeXe} \newenvironment{king}{\begin{quote}}{\end{quote}} 5.1: Example Package..sty \ProvidesPackage{package name} \ProvidesPackage L A TEX L A TEX 5.1 5.2 5.2.1 L A TEX 5.1 5.2 5.3 {\small The small and \textbf{bold} Romans ruled} {\Large all of great big \textit{italy}.} The small and bold Romans ruled all of great big Italy. L A TEX 2ε
68 L A TEX L A TEX 5.4 curly braces L A TEX He likes {\LARGE large and {\small small} letters}. He likes large and small letters. } \par 1 1 \par 5.1: \textrm{...} roman \textsf{...} sans serif \texttt{...} typewriter \textmd{...} medium \textbf{...} bold face \textup{...} upright \textit{...} italic \textsl{...} slanted \textsc{...} small caps \emph{...} emphasized \textnormal{...} document font 5.2: \tiny \scriptsize \footnotesize \small \normalsize \large tiny font very small font quite small font small font normal font large font \Large \LARGE \huge \Huge larger font very large font huge largest
5.2 69 5.3: size 10pt (default) 11pt option 12pt option \tiny 5pt 6pt 6pt \scriptsize 7pt 8pt 8pt \footnotesize 8pt 9pt 10pt \small 9pt 10pt 11pt \normalsize 10pt 11pt 12pt \large 12pt 12pt 14pt \Large 14pt 14pt 17pt \LARGE 17pt 17pt 20pt \huge 20pt 20pt 25pt \Huge 25pt 25pt 25pt {\Large Don t read this! It is not true. You can believe me!\par} Don t read this! It is not true. You can believe me! {\Large This is not true either. But remember I am a liar.}\par This is not true either. But remember I am a liar. 5.4: Command Example Output \mathcal{...} $\mathcal{b}=c$ B = c \mathrm{...} $\mathrm{k}_2$ \mathbf{...} $\sum x=\mathbf{v}$ K 2 x = v \mathsf{...} $\mathsf{g\times R}$ G R \mathtt{...} $\mathtt{l}(b,c)$ L(b, c) \mathnormal{...} $\mathnormal{r_{19}}\neq R_{19}$ R 19 R 19 \mathit{...} $\mathit{ffi}\neq ffi$ ffi ffi
70 L A TEX \begin{large} This is not true. But then again, what is these days \ldots \end{large} This is not true. But then again, what is these days... 5.2.2 Danger, Will Robinson, Danger L A TEX L A TEX \newcommand \newcommand{\oops}[1]{\textbf{#1}} Do not \oops{enter} this room, it s occupied by a \oops{machine} of unknown origin and purpose. Do not enter this room, it s occupied by a machine of unknown origin and purpose. \textbf \textbf \texbf 5.2.3 Remember! The MO RE fonts you use in a document, the more readable and beautiful it becomes. 5.3 5.3.1
5.3 71 \linespread{factor} \linespread{1.3} 1.5 \linespread{1.6} 1 5.3.2 L A TEX \setlength{\parindent}{0pt} \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} 0 plus minus TEX TEX 0.8ex 1.5ex 2 \indent \parindent \noindent 2 indentfirst
72 L A TEX 5.3.3 L A TEX \hspace{length} \hspace* \hspace length 5.5 \hspace{1.5cm} 1.5 1.5 \stretch{n} \hspace{\stretch{n}} x\hspace{\stretch{1}} x\hspace{\stretch{3}}x x x x 5.3.4 L A TEX \vspace{length} \vspace* \vspace \stretch \pagebreak Some text \ldots \vspace{\stretch{1}} \pagebreak
5.4 73 5.5: TEX mm cm in pt em ex millimetre 1/25 inch centimetre = 10 mm inch = 25.4 mm point 1/72 inch 1 3 mm approx width of an M in the current font approx height of an x in the current font \\[length] \bigskip \smallskip 5.4 L A TEX 2ε \documentclass paper size L A TEX 5.2 layout 3!... L A TEX MS Word 4 66 L A TEX L A TEX 3 CTAN:/tex-archive/macros/latex/required/tools 4
i3 74 L A TEX i4 i 5 6i Header 2i Body i7 Margin Notes i9 i 10 i1 i 11 8i Footer 1 one inch + \hoffset 2 one inch + \voffset 3 \oddsidemargin = 22pt 4 \topmargin = 22pt 5 \headheight = 13pt 6 \headsep = 19pt 7 \textheight = 595pt 8 \textwidth = 360pt 9 \marginparsep = 7pt 10 \marginparwidth = 106pt 11 \footskip = 27pt \marginparpush = 5pt (not shown) \hoffset = 0pt \voffset = 0pt \paperwidth = 597pt \paperheight = 845pt 5.2:
5.5 75 \setlength{parameter}{length} \addtolength{parameter}{length} \setlength 1 \addtolength{\hoffset}{-0.5cm} \addtolength{\textwidth}{1cm} calc setlength 5.5 L A TEX \textwidth \settoheight{lscommand}{text} \settodepth{lscommand}{text} \settowidth{lscommand}{text}
76 L A TEX \flushleft \newenvironment{vardesc}[1]{% \settowidth{\parindent}{#1:\ } \makebox[0pt][r]{#1:\ }}{} \begin{displaymath} a^2+b^2=c^2 \end{displaymath} \begin{vardesc}{where}$a$, $b$ -- are adjunct to the right angle of a right-angled triangle. $c$ -- is the hypotenuse of the triangle and feels lonely. a 2 + b 2 = c 2 Where: a, b are adjunct to the right angle of a right-angled triangle. c is the hypotenuse of the triangle and feels lonely. d finally does not show up here at all. Isn t that puzzling? $d$ -- finally does not show up here at all. Isn t that puzzling? \end{vardesc} 5.6 L A TEX L A TEX TEX L A TEX tabular \includegraphics
5.6 77 \parbox[pos]{width}{text} \begin{minipage}[pos]{width} text \end{minipage} pos c, t b width parbox minipage \parbox L A TEX \mbox L A TEX \makebox[width][pos]{text} width 5 \width \height \depth \totalheight width pos c l r s \framebox \makebox \makebox \framebox 5 0pt
78 L A TEX \makebox[\textwidth]{% c e n t r a l}\par \makebox[\textwidth][s]{% s p r e a d}\par \framebox[1.1\width]{guess I m framed now!} \par \framebox[0.8\width][r]{bummer, I am too wide} \par \framebox[1cm][l]{never mind, so am I} Can you read this? c e n t r a l s p r e a d Guess I m framed now! Bummer, I am too wide never mind, Can you so am readi this? 6 L A TEX \raisebox{lift}[depth][height]{text} \width \height \depth \totalheight \raisebox{0pt}[0pt][0pt]{\large% \textbf{aaaa\raisebox{-0.3ex}{a}% \raisebox{-0.7ex}{aa}% \raisebox{-1.2ex}{r}% \raisebox{-2.2ex}{g}% \raisebox{-4.5ex}{h}}} he shouted but not even the next one in line noticed that something terrible had happened to him. Aaaaaaar g h he shouted but not even the next one in line noticed that something terrible had happened to him. 5.7 \rule[lift]{width}{height} 6...
5.7 79 \rule{3mm}{.1pt}% \rule[-1mm]{5mm}{1cm}% \rule{3mm}{.1pt}% \rule[1mm]{1cm}{5mm}% \rule{3mm}{.1pt} \rule Struts tabular \begin{tabular}{ c } \hline \rule{1pt}{4ex}pitprop \ldots\\ \hline \rule{0pt}{4ex}strut\\ \hline \end{tabular} Pitprop... Strut
[1] Leslie Lamport. L A TEX: A Document Preparation System. Addison- Wesley, Reading, Massachusetts, second edition, 1994, ISBN 0-201- 52983-1. [2] Donald E. Knuth. The TEXbook, Volume A of Computers and Typesetting, Addison-Wesley, Reading, Massachusetts, second edition, 1984, ISBN 0-201-13448-9. [3] Michel Goossens, Frank Mittelbach and Alexander Samarin. The L A TEX Companion. Addison-Wesley, Reading, Massachusetts, 1994, ISBN 0-201-54199-8. [4] Each L A TEX installation should provide a so-called L A TEX Local Guide which explains the things which are special to the local system. It should be contained in a file called local.tex. Unfortunately, some lazy sysops do not provide such a document. In this case, go and ask your local L A TEX guru for help. [5] L A TEX3 Project Team. L A TEX 2ε for authors. Comes with the L A TEX 2ε distribution as usrguide.tex. [6] L A TEX3 Project Team. L A TEX 2ε for Class and Package writers. Comes with the L A TEX 2ε distribution as clsguide.tex. [7] L A TEX3 Project Team. L A TEX 2ε Font selection. Comes with the L A TEX 2ε distribution as fntguide.tex. [8] D. P. Carlisle. Packages in the graphics bundle. Comes with the graphics bundle as grfguide.tex, available from the same source your L A TEX distribution came from.
81 [9] Rainer Schöpf, Bernd Raichle, Chris Rowley. A New Implementation of L A TEX s verbatim Environments. Comes with the tools bundle as verbatim.dtx, available from the same source your L A TEX distribution came from. [10] Graham Williams. The TeX Catalogue is a very complete listing of many TEX and L A TEX related packages. Available online from CTAN:/tex-archive/help/Catalogue/catalogue.html [11] Keith Reckdahl. Using EPS Graphics in L A TEX 2ε Documents which explains everything and much more than you ever wanted to know about EPS files and their use in L A TEX documents. Available online from CTAN:/tex-archive/info/epslatex.ps
\!, 43 ", 19 $, 37 \(, 37 \), 37 \,, 38, 43 -, 19, 19 \-, 18, 19, 19., space after, 24..., 20.aux, 12.dtx, 11.dvi, 11.idx, 12.ilg, 13.ind, 13.ins, 11.lof, 12.log, 11.lot, 12.sty, 11.tex, 11.toc, 12 \:, 43 \;, 43 \@, 24 \[, 37 \\, 17, 29, 30, 32, 73 \\*, 17 \], 37 ~, 24 A4 paper, 10 A5 paper, 10 acute, 21 \addtolength, 75 æ, 21 amsbsy, 49 amsfonts, 39, 56 amsmath, 41 43, 45, 49 amssymb, 39, 50 \and, 26 \appendix, 25, 26 \arccos, 41 \arcsin, 41 \arctan, 41 \arg, 41 array, 44 arrow symbols, 40 article class, 10 \atop, 41 \author, 26 B5 paper, 10 babel, 18, 22 \backmatter, 26
83 backslash, 5 \backslash, 5 base font size, 10 \begin, 28 \bibitem, 59 \Big, 42 \big, 42 \Bigg, 42 \bigg, 42 \bigskip, 73 \binom, 41 blackboard bold, 39 bm, 49 \bmod, 41 bold face, 68 bold symbols, 48 \boldmath, 48 \boldsymbol, 49 book class, 10 braces, 42 calc, 75 \caption, 35, 36 \cdot, 40 \cdots, 43 center, 29 \chapter, 25 \chaptermark, 61 \choose, 41 \ci, 64 \cite, 59 \cleardoublepage, 36 \clearpage, 36 \cline, 32 commands, 5 \!, 43 \(, 37 \), 37 \,, 38, 43 \-, 18 \:, 43 \;, 43 \@, 24 \[, 37 \\, 17, 29, 30, 32, 73 \\*, 17 \], 37 \addtolength, 75 \and, 26 \appendix, 25, 26 \arccos, 41 \arcsin, 41 \arctan, 41 \arg, 41 \atop, 41 \author, 26 \backmatter, 26 \backslash, 5 \begin, 28 \bibitem, 59 \Big, 42 \big, 42 \Bigg, 42 \bigg, 42 \bigskip, 73 \binom, 41 \bmod, 41 \boldmath, 48 \boldsymbol, 49 \caption, 35, 36 \cdot, 40 \cdots, 43 \chapter, 25
84 \chaptermark, 61 \choose, 41 \ci, 64 \cite, 59 \cleardoublepage, 36 \clearpage, 36 \cline, 32 \cos, 41 \cosh, 41 \cot, 41 \coth, 41 \csc, 41 \date, 26 \ddots, 43 \deg, 41 \depth, 77, 78 \det, 41 \dim, 41 \displaystyle, 46 \documentclass, 9, 17 \dq, 24 \dum, 64 \emph, 28, 68 \end, 28 \exp, 41 \fbox, 19 \footnote, 27, 36 \footnotesize, 68 \frac, 41 \framebox, 77 \frenchspacing, 25 \frontmatter, 26 \fussy, 18 \gcd, 41 \genfrac, 41 \height, 77, 78 \hline, 32 \hom, 41 \hspace, 66, 72 \Huge, 68 \huge, 68 \hyphenation, 18 \idotsint, 43 \iiiint, 43 \iiint, 43 \iint, 43 \include, 13, 14 \includegraphics, 58, 76 \includeonly, 14 \indent, 71 \index, 60 \inf, 41 \input, 14 \int, 42 \item, 29 \ker, 41 \label, 27, 38 \LARGE, 68 \Large, 68 \large, 68 \LaTeX, 19 \LaTeXe, 19 \ldots, 20, 43 \left, 42 \leftmark, 61 \lg, 41 \lim, 41 \liminf, 41 \limsup, 41 \linebreak, 17 \linespread, 71 \listoffigures, 35