# LaTeX Pointers

These pages contain a summary of those LaTeX features that may be helpful to know to fill in and to "latex" your Web version of the NOAO observing run proposal form successfully. If you are new to LaTeX you may also find one of the Leslie Lamport books about LaTeX a handy guide. Questions or problems may be directed to us as well at noaoprop-help@noao.edu, including your "username" if your question is about a particular proposal problem.

## The Basics

This section covers what we think are the minimal LaTeX concepts needed for completing the Web version of your proposal.
• Paragraphs. Text entry into the forms should be straightforward - just start typing, or cut and paste from already existing text. Use the "return" key to keep your lines short ( < 80 characters) so you do not have to use the horizontal scroll to read your text. Use a blank line to separate paragraphs.

Normally there is no new paragraph indentation. This can be forced using the \hspace*{0.8cm} command at the beginning of the first line of the paragraph. If a line is indented for some reason and you do not want it to be, use \noindent before the line to turn off indentation.

• Sections. If you wish to have numbered sections in the "Scientific Justification" field of the proposal, this can be implemented with the \subsection command, e.g., \subsection{Introduction}, at the beginning of a new paragraph. Be warned, however, that the \subsection command takes up space, and you are limited to one page of printed text.

• Special characters. A few special characters are treated differently in LaTeX than one would normally expect if they are included in your running text.

• Several common characters have special meaning in LaTeX so need to be "escaped" with the "\" if you want to use them in your text: \%, \$, \&, \#, \_, \{, \}. • Quotation marks: The double quote is generated by typing two single quotes, for example,  or '' and not ". • Dashes: LaTeX supports three levels of dashes. A single "-" is used for hyphenation. A double "--" will produce a longer dash and is usually used to indicate ranges, e.g., 1--2. A triple "---" is used to produce an even longer dash and is used for isolating text, e.g., It was a rainy day---unlike our usual weather---and the picnic was canceled. • The ~: The tilde character is often used in LaTeX to force a space between two words and at the same time prevent automatic line breaking. Some examples where this may be useful are: Figure~1,$\lambda$~Orionis, 1.4~$\AA$. • Emphasizing text. It is straightforward to either {\it italicize} or {\bf boldface} text. Only the text in the brackets will be affected - you can even switch to {\rm roman} if you wish, which is the default. • Superscripts and subscripts. Superscripts and subscripts must be done in what is called "math" mode using either the "^" or the "_". So you would type, for example,$5^{2}$or$B_{V}$for 52 or BV. The$ is used as the delimiter for math mode. Remember above where these three characters, as well as the "curly braces" were mentioned as special characters in LaTeX?

• Lists. Two types of lists may be useful (there are others as well). One is a bulleted list and the other is an ordered or numbered list.

• Bulleted list:
\begin{itemize}
\item This would be item one preceded by a bullet.
\item This would be item two, and so forth.
\end{itemize}

• Ordered or numbered list:
\begin{enumerate}
\item This would be item one preceded by the number 1.
\item This would be item two preceded by the number 2, and so forth.
\end{enumerate}


## Math and Equations

LaTeX supports a "math" mode for inline mathematical equations, symbols, and equations set off from the text. Text input in math mode that appears to LaTeX to be mathematical variables will be italicized, but can be corrected by a font change, e.g.,$T_{\rm eff}$.

• Inline equations. Short equations can be included in your text as inline equations. Generally these are enclosed in $'s to indicate math mode. For example,$a_{1} > x^{2n} / y^{2n}$would appear in your processed document as a1 > x2n / y2n. • Special symbols. Many of the special symbols provided by LaTeX, as well as some of those defined by the proposal LaTeX style file, must be used in math mode. This is probably best shown by examples. Printed OutputLaTeX Input 2 Ori$\chi^2$Ori v sin i$v \sin i$z ~ 2.5 z$\sim$2.5 MgII 2798 MgII$\lambda$2798 107-108 M 10$^{7}$--10$^{8}$M$_{\sun}$H ( ~ 6563Å) H$\alpha$($\lambda \sim 6563 \AA$) +45 +45$^{\circ}$/ = 105${\lambda/\Delta\lambda = 10^{5}}$• Equations. Equations can also be entered in the text fields and offset from the main body of the text using the equation environment. This environment automatically enters math mode. The equations will also be numbered sequentially. $$m(z) = constant + 5 \log(z) + 1.086(1 - q_\circ)z + ...}$$  • Spacing in math mode. LaTeX attempts to space the information entered in either math mode or the equation environment automatically, regardless of the spacing indicated. The following commands provide you with some control of this spacing, for example,$\sqrt{2} \, x$. • \, thin space • \! negative thin space • \: medium space • \; thick space ## Tables Tabular data are often entered in the "Technical Description" section of the proposal available from the "Enter Observing Runs" page. There are several LateX environments that work well for this information. Or you may wish to use the HTML formatted tables available to you with the "Enter Tables" button on the proposal form which will automatically format and append the tables to the end of the "Run Details" page of your LaTeX proposal. • The verbatim environment. Text within this environment will appear as it is typed in the fields of your document, with no predefined formatting. \begin{verbatim} Object RA DEC V Object 1 11 35 +10 12.6 Object 2 12 50 +05 17.9 Object 3 13 31 +22 15.1 Object 4 15 00 +21 10.2 Object 5 16 37 -07 18.1 \end{verbatim}  • The tabular environment. The {llll} string following the \begin{tabular} command below controls whether or not the data are "c"entered or "l"eft or "r"ight justified in the columns - there must be an entry for each column. The "&" is used as a column delimiter. The "\\" is a new line command. Note that tabular entries may be in "math" mode. \begin{tabular}{llll} Object 1 &$\alpha=  13~11~34.4$&$\delta=  +11~35~42$&$ B=  12.38$\\ Object 2 &$\alpha=  13~23~01.8$&$\delta=  +12~22~47$&$ V=  16.13$\\ Object 3 &$\alpha=  15~31~38.8$&$\delta=  +10~31~10$&$ B=  13.82$\\ Object 4 &$\alpha=  16~01~29.0$&$\delta=  +14~25~53$&$ V=  17.58$\\ \end{tabular}  • The table environment. The tabular environment can be wrapped in a table environment as below. This produces sequentially numbered tables and allows one to include a table caption. In the example below the table is also centered on the page. The {ccrccc} string following the \begin{tabular} command controls whether or not the data are "c"entered or "l"eft or "r"ight justified in the columns - there must be an entry for each column. The "\\" is a new line command. The "&" is used as a column delimiter. \begin{table} \begin{center} \caption{Exposure Calculations (time in minutes)} \begin{tabular}{ccrccc} Mag Range & Number of Stars & Time & Total Time & Cumulative Time & Notes \\$< 9$& 17 & 9 & 153 & 153 & . \\ 9-9.5 & 13 & 12 & 156 & 309 & . \\ 9.5-10.0 & 4 & 14 & 56 & 365 & . \\ 10.0-10.5 & 3 & 21 & 63 & 428 & . \\ 10.5-11.0 & 3 & 28 & 84 & 512 & . \\ 11.0-11.5 & 5 & 35 & 175 & 687 & (one good winter night) \\ 11.5-12.0 & 12 & 43 & 516 & 1203 & . \\ 12.0-12.5 & 20 & 64 & 1280 & 2483 & . \\ \end{tabular} \end{center} \end{table}  ## Additonal Hints We include here some additional hints from answers to questions that have come from users over the semesters. • When used within the affiliation field of the proposal form, the accent symbols \, \' and \= need to be specified as \a, \a' and \a= since the affiliation is in a tabbing environment. • The Angstrom symbol, \AA, can be written as \AA\ to leave a space after the symbol in the printed text. ## LaTeX Errors If you are new to LaTeX, the messages produced by the "Run LaTeX" button may look like gibberish, but they really can help you find the errors in formatting that need to be corrected in your text fields before the proposal can be submitted for review. The error messages have been massaged by us to help in this process. If it is not obvious from the messages on this output page what the errors might be, try pressing the "Check Proposal" or the "Save and Verify" buttons on any of the proposal form pages to see if this will isolate the errors so they may be found by you more quickly. Listed below are a few common messages produced by LaTeX that are not covered on the output page from the "Run LaTeX" button. Errors are serious and must be fixed. Warnings should be investigated and fixed if necessary. • Overfull \hbox: This message usually indicates that a line is too long for its field. The units of the number that follows this message are PostScript units where 72 units = 1 inch. So you can estimate the severity of this "warning" message, but you should really look at the PostScript version of the proposal to be sure the output looks ok. You may need to shorten the text in this field to correct any overly long lines. • !Undefined control sequence: This message generally refers to a LaTeX command in the text that does not exist. For instance, if you used the \noindent command but incorrectly spelled it, e.g., \noident, this "error" message would be generated. LaTeX tries to identify the bad command by printing the line where it occurs and forcing a line break in that line where the undefined command is used. • Error messages from tabular/table errors can be very obscure. Go to the table and look for obvious errors. • Columns, including column labels, must be separated by an &. • The notation following \begin{tabular} must have an entry for each column, e.g., {cccc} for four centered columns. • Each \begin statement must be matched with an \end statement. • LaTeX tries its best to identify the location of the text that generates warning and error messages. But that can be difficult to do. So if the line given to you looks ok, look at the text preceding the line number to see if there is a problem. • LaTeX likes "matching" commands. So look for unmatched curly braces and square brackets, unmatched$'s indicating math mode, \begin commands that are not followed by \end commands, etc.

If you cannot run a proposal without any error messages and cannot determine how to get rid of them please contact us for assistance at noaoprop-help@noao.edu, including your "username" for the proposal that is causing problems.

## NOAOprop LaTeX Definitions

\let\la=\lesssim
\let\ga=\gtrsim
\def\case#1#2{\hbox{$\frac{#1}{#2}$}}
\def\slantfrac#1#2{\hbox{$\,^#1\!/_#2$}}
\def\onehalf{\slantfrac{1}{2}}
\def\onethird{\slantfrac{1}{3}}
\def\twothirds{\slantfrac{2}{3}}
\def\onequarter{\slantfrac{1}{4}}
\def\threequarters{\slantfrac{3}{4}}
\def\ubvr{\hbox{$U\!BV\!R$}}
\def\ub{\hbox{$U\!-\!B$}}
\def\bv{\hbox{$B\!-\!V$}}
\def\vr{\hbox{$V\!-\!R$}}
\def\ur{\hbox{$U\!-\!R$}}
\def\ion#1#2{#1$\;${\small\rm\@Roman{#2}}\relax}

\let\jnl@style=\rm
\def\ref@jnl#1{{\jnl@style#1}}
\def\aj{\ref@jnl{AJ}}
\def\araa{\ref@jnl{ARA\&A}}
\def\apj{\ref@jnl{ApJ}}
\def\apjl{\ref@jnl{ApJ}}
\def\apjs{\ref@jnl{ApJS}}
\def\ao{\ref@jnl{Appl.~Opt.}}
\def\apss{\ref@jnl{Ap\&SS}}
\def\aap{\ref@jnl{A\&A}}
\def\aapr{\ref@jnl{A\&A~Rev.}}
\def\aaps{\ref@jnl{A\&AS}}
\def\azh{\ref@jnl{AZh}}
\def\baas{\ref@jnl{BAAS}}
\def\jrasc{\ref@jnl{JRASC}}
\def\memras{\ref@jnl{MmRAS}}
\def\mnras{\ref@jnl{MNRAS}}
\def\pra{\ref@jnl{Phys.~Rev.~A}}
\def\prb{\ref@jnl{Phys.~Rev.~B}}
\def\prc{\ref@jnl{Phys.~Rev.~C}}
\def\prd{\ref@jnl{Phys.~Rev.~D}}
\def\pre{\ref@jnl{Phys.~Rev.~E}}
\def\prl{\ref@jnl{Phys.~Rev.~Lett.}}
\def\pasp{\ref@jnl{PASP}}
\def\pasj{\ref@jnl{PASJ}}
\def\qjras{\ref@jnl{QJRAS}}
\def\skytel{\ref@jnl{S\&T}}
\def\solphys{\ref@jnl{Sol.~Phys.}}
\def\sovast{\ref@jnl{Soviet~Ast.}}
\def\ssr{\ref@jnl{Space~Sci.~Rev.}}
\def\zap{\ref@jnl{ZAp}}
\def\nat{\ref@jnl{Nature}}
\def\iaucirc{\ref@jnl{IAU~Circ.}}
\def\aplett{\ref@jnl{Astrophys.~Lett.}}
\def\apspr{\ref@jnl{Astrophys.~Space~Phys.~Res.}}
\def\bain{\ref@jnl{Bull.~Astron.~Inst.~Netherlands}}
\def\fcp{\ref@jnl{Fund.~Cosmic~Phys.}}
\def\gca{\ref@jnl{Geochim.~Cosmochim.~Acta}}
\def\grl{\ref@jnl{Geophys.~Res.~Lett.}}
\def\jcp{\ref@jnl{J.~Chem.~Phys.}}
\def\jgr{\ref@jnl{J.~Geophys.~Res.}}
\def\memsai{\ref@jnl{Mem.~Soc.~Astron.~Italiana}}
\def\nphysa{\ref@jnl{Nucl.~Phys.~A}}
\def\physrep{\ref@jnl{Phys.~Rep.}}
\def\physscr{\ref@jnl{Phys.~Scr}}
\def\planss{\ref@jnl{Planet.~Space~Sci.}}
\def\procspie{\ref@jnl{Proc.~SPIE}}
\let\astap=\aap
\let\apjlett=\apjl
\let\apjsupp=\apjs
\let\applopt=\ao


Updated: 10Aug99