\documentstyle[12pt,fleqn,epsf]{article} %------------------------------------------------------------------- % - 10, 11 or 12pt is the size of the letters % fleqn tells LaTeX that you want "flush left equations", default % will center the equations % - epsf has to be part of the option list if you want to include % encapsulated PostScript files % - documentstyle can be article, report or book % report gives a title page, writes the abstract on the second page % and starts each chapter with a new page. It numerates equations as % follows: (2.1) is first equation in chapter 2. %------------------------------------------------------------------- %------------------------------------------------------------------- % The following commands give the FORMAT of the page: %------------------------------------------------------------------- \topmargin=-1.5cm \textheight=22cm \textwidth=16.5cm \hoffset=-1.5cm \pagestyle{plain} %------------------------------------------------------------------- % This pagestyle prints page numbers at the bottom of the page. % If you chose \pagestyle{empty} no number will be printed and % \pagestyle{headings} will give you section titles and page numbers % at the top line of each page. % if you want double spacing you need to include % \renewcommand{\baselinestretch}{2.0} % or % \setlength{\baselineskip}{0.8} %------------------------------------------------------------------- %------------------------------------------------------------------- % Here you specify... % the indentation length of each paragraph % (use \noindent e.g. after an equation if you want to cancel it % for that very paragraph) "ex" means length of the letter "x", % you may also use "cm", "mm" or "pt". These lengths can also be set % to zero. %------------------------------------------------------------------- \setlength{\parindent}{4ex} %------------------------------------------------------------------- % and how much space LaTeX shall leave between paragraphs: %------------------------------------------------------------------- \setlength{\parskip}{.2cm} %------------------------------------------------------------------- % LaTeX numbers sections automatically. This is the order: % chapter (not possible in `article', you can use it in % `report' or `book'. % section (has depth "1" in article) % subsection (depth "2") % subsubsection (depth "3") % paragraph % subparagraph % % In an "article" the following will number sections and subsections, % subsubsections etc. will have bold heading but no number: %------------------------------------------------------------------- \setcounter{secnumdepth}{2} %------------------------------------------------------------------- % How many entries do you want in the table of contents? % in "article" the following will cause sections, subsections and % subsubsections to be listed, but no paragraphs or subparagraphs: %------------------------------------------------------------------- \setcounter{tocdepth}{3} %------------------------------------------------------------------- % Since "fleqn" has been declared with the "documentstyle", % you can specify how much the equations are to be indented: %------------------------------------------------------------------- %\setlength{\mathindent}{2cm} %------------------------------------------------------------------- % The next command tells LaTeX to attribute equation numbers as (3.1) % etc. But don't forget to set the counter to zero at the beginning of % a section! Otherwise, it will write (3.12) if section 2 ended with % (2.11). The default (for "documentstyle = article" as in this example) % is that your equations get numbered from (1) all the way to the end % of the paper. For some people, that's a lot of equations! %------------------------------------------------------------------- \renewcommand{\theequation}{\mbox{\arabic{section}.\arabic{equation}}} %------------------------------------------------------------------- % You should experiment with some of these commands to see the % effect they have on your document. %------------------------------------------------------------------- %------------------------------------------------------------------ % Positioning FIGURES in LaTeX can be a real pain. The following % commands often help (they tell how much text there should be at % minimum per page and how much figure at maximum): %------------------------------------------------------------------ \renewcommand{\textfraction}{0.01} \renewcommand{\topfraction}{0.99} \renewcommand{\bottomfraction}{0.99} %------------------------------------------------------------------ % Remember that the command \clearpage must position all `floating % objects' before continuing with text. % But if that is not enough try to allow for a higher number of % figures and tables per page: %------------------------------------------------------------------ %\setcounter{topnumber}{3} %\setcounter{bottomnumber}{3} %\setcounter{totalnumber}{5} %================================================================== \begin{document} \input{psfig.tex} \begin{titlepage} \begin{center} ~\\ \vspace{5.0cm} \Large{\bf{Partha's First \LaTeX~Lesson}}\\ \vspace{2.0cm} \large{Charly Bank \& David McMillan\\ ~\\ 2nd Edition: \today} \end{center} \vspace{1cm} \abstract This document is a starting point for \LaTeX~beginners. As well, it may give some new ideas to veterans or intermediate users. This `lesson' is really a collection of practical examples with minimal explanation. We have tried to include whatever might be required to get started with \LaTeX~and produce decent looking reports with cool equations and data presentation. The required files are located in the directory {\bf /home/mcmillan/latex}. You can copy the files {\bf ex.tex}, {\bf hobbes.ps}, {\bf gnufig.tex} and {\bf Make}. Type \verb+Make+ and your \LaTeX~file will be compiled twice, converted to a postscript file and viewed with `Ghostview'. \end{titlepage} \tableofcontents \newpage %==================================================================== \section{Hello} More and more grad students are getting involved with \LaTeX. This text is to show some of the possibilities this document preparation system offers. It is not intended to be a \LaTeX~manual. Instead, it is intended as an example document and will be best used by comparing the source file with the final product. Some explanations are incorporated in the text and others are contained in the source code. %===================================================================== \section{Beginning of a \LaTeX~File} Leslie Lamport developed \LaTeX~by writing \TeX~macros. As such it is a program for preparing documents. Before \LaTeX~can set the text you have written, you need to make some declarations. The text itself, enclosed by \verb+\begin{document}+ and \verb+\end{document}+, follows these declarations. \subsection{Declarations} \label{subsec:declarations} Please see the source file for details on \verb+\documentstyle+ and declarations of format. The declarations before the beginning of the document are often referred to as the {\em preamble}. \subsection{Titlepage} Between \verb+\begin{titlepage}+ and \verb+\end{titlepage}+ you can create the first page of your document, usually showing the title and author in large, bold letters. This page will not be numbered. \subsection{Table of Contents} Every section and subsection in your document will automatically appear in the table of contents (toc). If you want to suppress the entry, insert an asterisk like so \verb+\subsection*{Heading}+. If you want the contents entry to be different from the heading, the command is \verb+\subsection[toc Entry]{Heading}+. See \S~\ref{subsec:declarations} for some information about section numbering and limiting table of contents entries in general. Your table of contents will appear wherever you put the command \verb+\tableofcontents+. The next section is an example of \verb+\subsubsection+. \subsection{Text} For the text part of your document, just type it in the way you normally would, separating your paragraphs with blank lines. \LaTeX~regards blank spaces and carriage returns equivalently. You can put in a `hard' space with the tilde character. \subsubsection[Example]{Subsubsection Heading} Note that there is no number for this section according to our preamble and the toc entry is different from the heading. We even added some garbage to the toc. \addcontentsline{toc}{subsubsection}{... how did this garbage come here?} \subsection{Numbering of Sections, Pages, Equations} \label{subsec:numbering} Sections, pages and equations are numbered automatically, although you have control over some aspects of the numbering. Details about page numbering can be found in the source code. Equations which are specified by the \verb+\begin{equation}+ and \verb+\end{equation}+ commands will be given numbers according to what you have specified in the preamble. %======================================================================== \section{Math Mode in \LaTeX} \subsection{Equation and Displaymath Commands} \label{subsec:eqcoms} Some examples from Linear Inverse Theory: The inverse problem can be written: \begin{equation} \label{eq:inversprob} \begin{array}{ll} \mbox{minimize} & \phi = \| {\bf s} \|^2 \nonumber\\ \mbox{subject to} & \bf A \! \cdot s = t \end{array} \end{equation} \noindent Often, new equations are added or really hard ones are eliminated to give the reader a break. It is very tedious to change all equation reference numbers in the text, so we let \LaTeX~take care of that by referencing the equation label as we see in Equation~\ref{eq:inversprob}. You can do the same with figures, bibliography entries and sections as seen in the source for \S~\ref{subsec:numbering}. Also, it's a good idea to include some reminder of what the reference is referring to! To put equations or symbols in your text enclose your math expression with the symbol \$. To get the minimum structure solution using an augmented matrix, we consider the derivative and minimize \[ \phi_m = \alpha_x \int w_x(x,z) \Bigl(\partial_x {\bf s}(x,z)\Bigr)^2 \,dx \,dz \,+\, \alpha_z \int w_z(x,z) \Bigl(\partial_z {\bf s}(x,z)\Bigr)^2 \,dx\,dz \] \noindent where $w_x$ and $w_z$ are weight functions. $\alpha_x$ and $\alpha_z$ balance derivatives in $x$ and $z$ directions against one another. The large parentheses were generated with the \verb+\Bigl(+ and \verb+\Bigr)+ commands. In general, \LaTeX~will size your brackets, braces and parentheses according to what's inside them if you use \verb+\left(+ and \verb+\right)+. \begin{equation} \label{eq:minstruc37} \begin{array}{ll} \mbox{minimize}& \phi_m = \alpha_x \parallel {\bf W}_{\!x}\, {\bf s} \parallel^2 \,=\,\alpha_z \parallel {\bf W}_{\!z} \, {\bf s} \parallel^2 \\ \mbox{subject to} & \phi_d = \parallel {\bf A \!\cdot s} - {\bf t}^{obs} \parallel^2 = \phi_d^\ast \end{array} \end{equation} \noindent where ${\bf W}_{\!x}$ and ${\bf W}_{\!z}$ are the forward difference matrices and $\phi_d^\ast$ is the target misfit. We form the augmented system of equations \[ \begin{array}{l} {\bf G \cdot s} = \tilde{\bf t} \\ \mbox{where\quad} {\bf G} = \left(\begin{array}{c} {\bf A} \\ \sqrt{\alpha_x}\,{\bf W}_{\!x} \\\sqrt{\alpha_z}\,{\bf W}_{\!z} \end{array}\right) \mbox{\quad and \quad} \tilde{\bf t} = \left( \begin{array}{c} {\bf t}^{obs} \\ 0 \\ 0 \end{array}\right) \end{array} \] \subsection{Arrays} Here are a couple of all purpose examples using the array environment in math mode. \[ \begin{array}{rcrcl} C^{+}\left(z\right) & = & e^{-kz}\cos kz & - & e^{k\left(z-2H\right)}\cos k\left(z-2H\right), \\ S^{+}\left(z\right) & = & e^{-kz}\sin kz & + & e^{k\left(z-2H\right)}\sin k\left(z-2H\right), \\ C^{-}\left(z\right) & = & e^{kz}\cos kz & + & e^{k\left(z-2H\right)}\cos k\left(z-2H\right), \\ S^{-}\left(z\right) & = & e^{kz}\sin kz & + & e^{k\left(z-2H\right)}\sin k\left(z-2H\right). \end{array} \] \[ \mbox{\boldmath$R$} = \left[ \begin{array}{cccc} \sigma_{1}^{} & 0 & \cdots & 0 \\ 0 & \sigma_{2}^{} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \sigma_{N}^{} \end{array} \right] \, , \] \[ \mbox{\boldmath$U$} = \left[ \begin{array}{cccc} | & | & & | \\ \mbox{\boldmath$u$}_{1}^{} & \mbox{\boldmath$u$}_{2}^{} & \cdots & \mbox{\boldmath$u$}_{P}^{} \\ | & | & & | \end{array} \right] . \] %===================================================================== \section{More Math Examples} \setcounter{equation}{0} %---------------------------------------------------------------------- % see declarations: we want equations to be counted as (section.equation) % starting with (x.1) now. %---------------------------------------------------------------------- In some ways the examples in this section are different from those in \S~\ref{subsec:eqcoms}. First, all subscripts and superscripts are included with braces, even if they are blank. If you have single character subscripts or superscripts (but not both), you don't need the braces. Blank ones are included because that pushes the supers up and the subs down, and it keeps them all at the same level. Second, you can make your bold vector symbols slanted by using \verb+\mbox+ and \verb+\boldmath+. The basic spacing commands in \LaTeX~are \verb+\,+ for a thin space, \verb+\:+ for a medium space, \verb+\;+ for a thick space and \verb+\!+ for a thin backspace. It's all a matter of preference and usually LaTeX~is versatile enough to make it do what you want. You can put limits on your integrals like so \[ \Phi_{0}^{} = \frac{4}{3} \pi G \int_{0}^{a_{e}^{}} \rho \! \left( a \right) \frac{\partial}{\partial a} \left[ \, \frac{3 a_{}^{2} - r_{}^{2}}{2a_{}^{3}} \, + \, \sum_{l=1}^{\infty} \frac{3 \epsilon_{l}^{}}{2l+1} \, \frac{r_{}^{l}}{a_{}^{l-2}} \, Y_{l}^{0} \, \right] \, da , \] \noindent or, if you like them above and below, \[ \Phi_{1}^{} = \frac{4}{3} \pi G \int \limits_{0}^{a_{1}^{}} \rho \! \left( a \right) \frac{\partial}{\partial a} \left[ \, \frac{a_{}^{3}}{r} \, + \, \sum_{l=1}^{\infty} \frac{3 \epsilon_{l}^{}}{2l+1} \, \frac{a_{}^{l+3}}{r_{}^{l+1}} \, Y_{l}^{0} \, \right] \, da . \] Taking the curl of the momentum equation and substituting the continuity equation and $\mbox{\boldmath$\Omega$}=\Omega\hat{\mbox{\boldmath$z$}}$ results in the vorticity equation \begin{equation} \mbox{\boldmath$\zeta$}_{t} - 2\Omega\mbox{\boldmath$u$}_{z} - \nu\nabla^{2}\mbox{\boldmath$\zeta$} = \mbox{\boldmath$0$} \end{equation} \noindent where $\mbox{\boldmath$\zeta$} = \nabla\times\mbox{\boldmath$u$}$ is the vorticity. These two functions form the transform pair \begin{equation} T\left( t \right) \; \Longleftrightarrow \; \frac{L}{2} \, sinc^{\,2} \left( \frac{\pi f L}{2} \right) \end{equation} The eigendecomposition of $\mbox{\boldmath$R$}_{p}^{}$ is then \begin{equation} \mbox{\boldmath$R$}_{p}^{} = \sum_{j=1}^{2M} \left( \lambda_{j}^{} + \sigma_{w}^{2} \right) \mbox{\boldmath$v$}_{j}^{}\mbox{\boldmath$v$}_{j}^{H} \;+ \sum_{j=2M+1}^{p+1} \sigma_{w}^{2}\,\mbox{\boldmath$v$}_{j}^{}\mbox{\boldmath$v$}_{j}^{H} \end{equation} \noindent where $\lambda_{j}^{}$, $1 \leq j \leq 2M$, are the {\em positive} eigenvalues of $\mbox{\boldmath$S$}_{p}^{}$ and $\mbox{\boldmath$v$}_{j}^{}$, $1 \leq j \leq 2M$, are the corresponding eigenvectors. These {\em principle} eigenvectors span the signal subspace of $\mbox{\boldmath$R$}_{p}^{}$ and are orthogonal to the remaining eigenvectors $\mbox{\boldmath$v$}_{j}^{}$, $2M+1 \leq j \leq p+1$, which span the noise subspace of $\mbox{\boldmath$R$}_{p}^{}$. There is a summary of some math symbols and things in Appendix~\ref{app:misc}. %========================================================================= \section{Floating Bodies} Floating bodies are figures and tables. Their placement is one of the weaker points of \LaTeX. It may happen --- especially if you have large figures --- that upon viewing the document you'll find this figure and all subsequent ones at the end of the document. Then, use the commands \verb+\newpage+ and \verb+\clearpage+. The latter \underline{must} place all floating objects that have not yet been included before going on. \subsection{Tables} Table~\ref{tab:well} on page~\pageref{tab:well} shows an example. Please refer to the source file for explanations. \begin{table}[htb] %------------------------------------------------------------------- % htb means here or top or bottom, i.e if possible LaTeX will position % the table here, if not, at the top of a following page or at the % bottom. %------------------------------------------------------------------- \begin{center} \caption{\label{tab:well} Water conductivity results from well samples.} %------------------------------------------------------------------- % The label enables LaTeX to refer to this table (number and page) %------------------------------------------------------------------- \begin{tabular}{|c||r|r@{.}l|} %------------------------------------------------------------------- % Tabular is similar to the array command in mathmode. If you want % vertical lines between the columns add the "|" between the "center", % "left" and "right" commands. In this example the first column is % centered, the second is right justified. They are separated by two % vertical lines. The third column is more sophisticated: % to get the entries centered around the decimal point we prepared % a sandwich with "r" and "l" being the bread and the text is in the % braces. Any text written in there will appear in all the rows. % In fact, this third column is two columns joined by the decimal point. % But we do not want the point to appear in the first row with the % explanations. The \multicolumn{no of columns}{arrangement}{text} % takes care of this. %------------------------------------------------------------------- \hline %------------------------------------------------------------------- % draws a horizontal line %------------------------------------------------------------------- Well Point & $\sigma$ & \multicolumn{2}{c|}{$k$} \\ \hline\hline 7 & 447 & &7 \\ 11 & 86 & 4&31 \\ 30 & 1735 & 48&9 \\ 82 & 773 & 4&53 \\ 234 & 1850 & 2&031 \\ \hline \end{tabular} \end{center} \end{table} \subsection{Figures} \label{subsec:figures} You may just leave an empty space to tape in a figure (e.g. figure \ref{fig:blank}). \begin{figure}[htb] \vspace*{3.0cm} \caption{You see nothing but a blank space. \label{fig:blank} } \end{figure} We've included an encapsulated postscript file (i.e. the postscript file must be surrounded by a `bounding box') into this document (see Figure \ref{fig:hobbes}). %----------------------------------------------------------------- % Don't forget to include the option 'epsf' in the declarations! % And you may have to specify the path to the filename. %----------------------------------------------------------------- \begin{figure}[htb] \begin{center} \begin{minipage}{8cm} \psfig{file=hobbes.ps,width=8cm,height=8cm} \caption{You see an encapsulated postscript file. \label{fig:hobbes} } \end{minipage} \end{center} \end{figure} And in Figure~\ref{fig:hobbes2} you have it twice with 2\,cm horizontal distance between the figures (note the distortion). We left the space at the bottom of this page empty on purpose so that the following list would not be split onto two different pages. \begin{figure}[htb] \begin{center} \begin{minipage}{16.5cm} \centerline{\psfig{file=hobbes.ps,width=2.5cm,height=4cm}\hspace{2cm} {\psfig{file=hobbes.ps,width=4cm,height=2.5cm}}} \caption{Same postscript file after a few jugs of beer. \label{fig:hobbes2}} \end{minipage} \end{center} \label{saturation} \end{figure} \clearpage %================================================================ \section{Lists} Here are some examples of numbering and listing things. The following is a proposed surveying timetable using a three person survey team: \begin{itemize} \item Day 1 (Baldwin Patrol Yard) \begin{enumerate} \item Morning: \begin{itemize} \item Set up survey grid (all available personnel). \end{itemize} \item Afternoon: \begin{itemize} \item EM (2 person team). \item VLF (1 person). \end{itemize} \end{enumerate} \item Day 2 (Baldwin Patrol Yard) \begin{itemize} \item EM (2 person team). \item VLF (1 person). \end{itemize} \item Day 3 (Baldwin Patrol Yard) \begin{itemize} \item EM (2 person team). \item Magnetics (1 person). \end{itemize} \item Day 4 (Gormley Sand and Gravel Pit) \begin{enumerate} \item Morning: \begin{itemize} \item Set up survey line (all available personnel). \vspace{1ex} \item VLF (1 person). \item Magnetics (1 person). \item Magnetics (1 person). \end{itemize} \item Afternoon: \begin{itemize} \item EM (1 person). \item Gravity (1 person). \item 3rd team member to assist where necessary. \end{itemize} \end{enumerate} \end{itemize} Nested enumerations will give you numbers, lower case letters then lowercase roman numerals (good for making up tests and assignments!). %======================================================================= \section{Listing References} \begin{description} \setlength{\itemsep}{-0.2ex} %------------------------------------------------------------------ % This command shortens the distance between items, if you don't % want the LaTeX default... %------------------------------------------------------------------- \item[] Arfken, G., 1985. {\it Mathematical Methods for Physicists,} Academic Press Inc., San Diego. \item[] Courtillot, V., J. Besse, 1987. Magnetic field reversals, polar wander, and core-mantle coupling, {\it Science,} {\bf 237}, 1140-1147. \item[] Jeffreys, H., 1976. {\it The Earth,} Cambridge University Press, Cambridge. \item[] Jones, G.M., 1977. Thermal interaction of the core and the mantle and long-term behaviour of the geomagnetic field, {\it J. Geophys. Res.,} {\bf 82}, 1703-1709. \end{description} %===================================================================== \section{Comments and Useful Commands} Comments in your file are marked by `\%' at the beginning of the line. When compiling, \LaTeX~will skip these lines. If you want to make a {\bf footnote}\footnote{This is how you make a footnote!}... Often it is necessary to use the \verb+\mbox+ command. For one, it is necessary in Math mode to include text into the equation. In normal text it tells \LaTeX~not to divide the contents of the `mbox'. E.g. this long german word ,,\mbox{Donaudampfschiffahrtskapit\"answhisyfa\ss}'' cannot be split because it is in an \verb+\mbox{...}+. The \verb+\begin{minipage}[pos]{width}+ lets you position figures or tables. Position is relative to the present line: \begin{minipage}[c]{12cm} \begin{minipage}[b]{3cm} this text is sitting on the line \end{minipage} \quad and \quad \begin{minipage}[t]{2cm} these words are hanging from the line \end{minipage} \quad but \quad \begin{minipage}[c]{3cm} this `minipage' is centered \end{minipage} \end{minipage} around the present line. \noindent See also section \S~\ref{subsec:figures} where this command is used to allow centering of the figures. To compile, type \verb+latex +{\sl filename} (commonly the file will have the extension {\sf tex}). \LaTeX~now prepares several files: \begin{itemize} \setlength{\topsep}{-0.2ex} \item[$\clubsuit$] {\sl file.}{\sf toc} contains the section headings that are to appear in the table of contents \item[$\diamondsuit$] {\sl file.}{\sf aux} contains labels and numbers of equations, figures etc. \item[$\heartsuit$] {\sl file.}{\sf log} contains all the error messages \item[$\spadesuit$] {\sl file.}{\sf dvi} is the print file \end{itemize} It is important to realize that \LaTeX~uses {\sl file.}{\sf toc} and {\sl file.}{\sf aux} created during the last run to develop the table of contents and the numbering of equations and figures during the present run. You have to run \LaTeX~twice to get the table of contents and references right. So, don't worry about some of the error messages you get on the first try. As grad students we will have to write a thesis. To avoid \LaTeX~compiling the whole text every single time it is reasonable to split the text into smaller files (e.g. title.tex, chapter1.tex, chapter2.tex,...) and prepare a master file that looks like \hspace*{2cm} \begin{minipage}[t]{10cm} declarations... \begin{verbatim} \includeonly{chapter2,chapter3} \begin{document} \include{title} \include{chapter1} \include{chapter2} \include{chapter3} \include{chapter4} \end{document} \end{verbatim} \end{minipage} \noindent In the case shown only chapters 2 and 3 will be compiled. However, \LaTeX~will not restart numbering pages, sections, equations and is still able to refer to labels in other chapters. Note that the extension {\sf tex} is omitted in the commands \verb+include+ and \verb+includeonly+ and that each \verb+include+ has \LaTeX~start a new page. Fortunately, somebody (we're not sure who) decided that your thesis should have a certain title page and a certain line spacing and a certain list of figures and... Well, to make a long story short, lazy students and procrastinators take note, there is a command here on our Geophysics and Astronomy system that will basically do everything for you. Just type \verb+get.thesis+ and a new directory called {\sl thesis} will be created and a bunch of files put in there. You'll get a couple of example chapter files, a title page file, bibliography file, etc. Just edit the text in these files and compile with \verb+ latex thesis+. All the gnitpicking details are taken care of for you! %===================================================================== \section{Viewing and Printing a \LaTeX~File} Use `{\sf xdvi} {\sl filename.}{\sf dvi}' after running \LaTeX~to view the file. Use `{\sf dvips} {\sl filename.}{\sf dvi}' to print the document (for options of `{\sf dvips}' see appendix \ref{dvips_app}). %To perform a \underline{spellcheck} on a \LaTeX-file %at the prompt type {\sf ispell }{\sl filename.}{\sf tex}'. %====================================================================== \appendix %----------------------------------------------------------------------- % from now on sections and subsections are being numbered differently %----------------------------------------------------------------------- \section{Miscellaneous Stuff} \label{app:misc} \subsection{Special Characters} There are special characters which must be preceded by a backslash when you want them to appear in your text. They are: \{ \} \# \$ \% \& \~ \_ \subsection{Style and Size} \noindent Styles: \\ \verb+\rm+ {\rm Roman}, \verb+\it+ {\it Italic}, \verb+\sl+ {\sl Slanted}, \verb+\bf+ {\bf Bold Face}, \verb+\sf+ {\sf Sans Serif}, \verb+\tt+ {\tt Typewriter}, \verb+\sc+ {\sc Small Caps} \noindent Sizes: \\ {\tiny tiny}, {\scriptsize scriptsize}, {\footnotesize footnotesize}, {\small small}, {\normalsize normalsize}, {\large large}, {\Large Large}, {\LARGE LARGE}, {\huge huge}, {\Huge Huge} \\ To get {\scriptsize this is scriptsize} type \verb+{\scriptsize this is scriptsize}+, etc. \noindent Accents in text: \\ \verb+\'e+ = \'e , \verb+\`e+ = \`e , \verb+\^a+ = \^a , \verb+\c{c}+ = \c{c} \subsection{Symbols in Math Mode} \noindent Greek letters: \begin{tabular}{clclclclcl} $\alpha$ & \verb+\alpha+ & $\beta$ & \verb+\beta+ & $\gamma$ & \verb+\gamma+ & $\delta$ & \verb+\delta+ & $\epsilon$ & \verb+\epsilon+ \\ $\varepsilon$ & \verb+\varepsilon+ & $\zeta$ & \verb+\zeta+ & $\eta$ & \verb+\eta+ & $\theta$ & \verb+\theta+ & $\vartheta$ & \verb+\vartheta+ \\ $\iota$ & \verb+\iota+ & $\kappa$ & \verb+\kappa+ & $\lambda$ & \verb+\lambda+ & $\mu$ & \verb+\mu+ & $\nu$ & \verb+\nu+ \\ $\xi$ & \verb+\xi+ & $\o$ & \verb+o+ & $\pi$ & \verb+\pi+ & $\varpi$ & \verb+\varpi+ & $\rho$ & \verb+\rho+ \\ $\varrho$ & \verb+\varrho+ & $\sigma$ & \verb+\sigma+ & $\varsigma$ & \verb+\varsigma+ & $\tau$ & \verb+\tau+ & $\upsilon$ & \verb+\upsilon+ \\ $\phi$ & \verb+\phi+ & $\varphi$ & \verb+\varphi+ & $\chi$ & \verb+\chi+ & $\psi$ & \verb+\psi+ & $\omega$ & \verb+\omega+ \\ $\Gamma$ & \verb+\Gamma+ & $\Delta$ & \verb+\Delta+ & $\Theta$ & \verb+\Theta+ & $\Lambda$ & \verb+\Lambda+ & $\Xi$ & \verb+\Xi+ \\ $\Pi$ & \verb+\Pi+ & $\Sigma$ & \verb+\Sigma+ & $\Upsilon$ & \verb+\Upsilon+ & $\Phi$ & \verb+\Phi+ & $\Psi$ & \verb+\Psi+ \\ $\Omega$ & \verb+\Omega+ & & & & & & &\\ \end{tabular} \noindent A selection of math symbols: \begin{tabular}{clclclclcl} $\perp$ & \verb+\perp+ & $\|$ & \verb+\|+ & $\nabla$ & \verb+\nabla+ & $\partial$ & \verb+\partial+ & $\infty$ & \verb+\infty+ \\ $\le$ & \verb+\le+ & $\ll$ & \verb+\ll+ & $\ge$ & \verb+\ge+ & $\gg$ & \verb+\gg+ & $\approx$ & \verb+\approx+ \\ $\pm$ & \verb+\pm+ & $\times$ & \verb+\times+ & $\odot$ & \verb+\odot+ & $\oplus$ & \verb+\oplus+ & $\otimes$ & \verb+\otimes+ \\ $\angle$ & \verb+\angle+ & $\triangle$ & \verb+\triangle+ & $\Box$ & \verb+\Box+ & $\circ$ & \verb+\circ+ & $\bigcirc$ & \verb+\bigcirc+ \\ $\Re$ & \verb+\Re+ & $\Im$ & \verb+\Im+ & $\mho$ & \verb+\mho+ & $\leadsto$ & \verb+\leadsto+& & \\ $\sum$ & \verb+\sum+ & $\int$ & \verb+\int+ & $\oint$ & \verb+\oint+ & $\prod$ & \verb+\prod+ & & \\ \end{tabular} \begin{tabular}{clclclcl} $\rightarrow$ & \verb+\rightarrow+ & $\longrightarrow$ & \verb+\longrightarrow+ & $\Rightarrow$ & \verb+\Rightarrow+ & $\Longrightarrow$ & \verb+\Longrightarrow+ \\ $\leftarrow$ & \verb+\leftarrow+ & $\leftrightarrow$ & \verb+\leftrightarrow+ & & etc. & \\ \end{tabular} \noindent Accents in mathmode: \begin{tabular}{clclclclcl} $\hat{a}$ & \verb+\hat{a}+ & $\breve{a}$ & \verb+\breve{a}+ & $\grave{a}$ & \verb+\grave{a}+ & $\bar{a}$ & \verb+\bar{a}+ & $\dot{a}$ & \verb+\dot{a}+ \\ $\vec{a}$ & \verb+\vec{a}+ & $\check{a}$ & \verb+\check{a}+ & $\acute{a}$ & \verb+\acute{a}+ & $\tilde{a}$ & \verb+\tilde{a}+ & $\ddot{a}$ & \verb+\ddot{a}+ \end{tabular} \noindent Function names which are to be printed normally: \\ \verb+\cos+ gives $\cos$ and similarly arccos, arcsin, arctan, arg, cos, cosh, cot, coth, deg, det, exp, lim, ln, log, max, min, sec, sin, sinh, tan, tanh. \section{Including Figures from GNUPLOT } For those familiar with \verb+gnuplot+, you can include your plots in a \LaTeX~document quickly and easily. Plus you can use the usual math mode commands and symbols in your axis labels. An advantage of this choice is that these plots will be included in the \verb+dvi+ file. Figure~\ref{fig:gnu} shows an example. \begin{figure}[htb] \begin{center} \input{gnufig.tex} \caption{Example from GNUPLOT. Include some explanation of the different lines, since the GNUPLOT key is kind of ugly. \label{fig:gnu} } \end{center} \end{figure} Here is the \verb+gnuplot+ script that generated the figure: \hspace*{2cm} \begin{minipage}[t]{10cm} \begin{verbatim} set term latex set output 'gnufig.tex' set nokey set xlabel 'Time before present (yr)' set xrange [0:1.6e+08] set xtics 0,4e+07,1.6e+08 set ylabel '$1/f$, $N \;\;\;$' plot 'prog.out' using 1:3 w lines 4 replot 'prog.out' using 1:5 w lines 2 replot 'prog.out' using 1:7 w lines 1 \end{verbatim} \end{minipage} \section{Calling dvips} \label{dvips_app} To print a dvi-file use `{\sf dvips} {\sl filename.}{\sf dvi} {\sl options}'. Some options that may be used are: \begin{tabular}{lll} command & purpose & default \\ {\tt -p}{\sl n} & start printout with page {\sl n} $^{\star}$ & first page \\ {\tt -n}{\sl n} & print {\sl n} number of pages & 100.000 pages \\ {\tt -l}{\sl n} & end printout with page {\sl n} $^{\star}$ & last page \\ {\tt -c}{\sl n} & prints {\sl n} copies of each page & 1 copy per page \\ {\tt -C}{\sl n} & prints {\sl n} copies of the entire document & 1 copy \\ {\tt -o} & produces a postscript file & output is {\sl filename.}{\sf ps} \\ \end{tabular} \noindent {\footnotesize Note $^{\star}$: Beware that the pagenumber is the one given by \LaTeX. This number may not coincide with the number printed on the page.} To print the entire document `{\sf hello}' on `mort' (300 dpi laserprinter in room 223) simply use the command `{\sf dvips hello.dvi}'. `{\sf dvips hello.dvi -p16 -n4 -c2}' prints four pages of the document {\sf hello} starting on page sixteen and hands out two copies per page. If you have incorporated encapsulated postscript files and want to preview the document with the figures you need to convert to postscript by typing \\ \hspace*{2cm} {\sf dvips} {\sl filename.}{\sf dvi} {\sf -o} \\ The command {\sf xdvi} will only show blank spaces where the figures are to be set. Use `Ghostview' to view text and figures as they would occur on the printed pages. \end{document}