Search form

Printing is different from typewriting, and TeX is different from other word processing tools. This file consists of reminders about things that require special attention so that TeX can format the input properly.

1. Running text

  • In TeX, the ends of words and sentences are marked by spaces, and it does not matter how many spaces are typed; one is as good as 100. TeX treats the end of a line in the input file as a space. Paragraphs are separated by blank lines.
  • TeX will automatically take care of hyphenating and breaking words at the end of lines, so you do not need to break words with hyphens. Do, however, hyphenate modifiers within a line of text, e.g., "author-prepared copy."
  • Quotation marks should be typed as pairs of opening and closing single quotes, e.g., ‘‘quoted text’’; do not use double quotes ("bad form").
  • Do not underline. In printing, text is emphasized by changing the type style, usually to slanted or italic type.
  • A number of common characters are interpreted as commands; therefore, if you want to use them in text, they must be preceded by a backslash (\): $ & % # { and } must be typed \$ \& \% \# \{ and \}.
  • Refrain from adding vertical or horizontal space. Concentrate on the content of the document and identifying its components with the structural markup commands rather than worrying about producing perfectly formatted pages.

2. Math

Mathematical expressions that are part of the running text are delimited by a single dollar sign ($), e.g., $\pi r^2$ yields πr2. To get the appropriately sized superscript or subscript in the roman font, use the \rm command, e.g., $J_{\rm HF}(t)$ produces JHF(t).

Displayed equations can be delimited in several ways. See the User Guide for details on display equation markup.

While it is possible for authors to assign their own equation numbers, it is easier to let LaTeX number them automatically. By default, LaTeX will number equations sequentially from the beginning of the paper to the end.

3. Cross-referencing

Cross-referencing equations, tables, and figures in text depends upon the use of "keys," which are defined by the user. The \label command is used to define cross-reference keys for LaTeX; \ref is used to refer to them. Keys are simply text strings that serve to label equations, tables, and figures, so that they may be referred to symbolically in the text. For sections and the like, place \label commands immediately after the markup command that starts the structure being referenced. For figure and table captions, place the \label command \caption, \tablecaption, or \figcaption , e.g.,

\tablecaption{This is a caption.\label{tab1}}

Do not put references to page numbers in your paper.

LaTeX keeps track of autonumbered counters and cross-reference information by maintaining an auxiliary file in the same working directory as the source file. The auxiliary file will have an extension of .aux. This file should not be deleted, since subsequent LaTeX processing uses the auxiliary data to resolve references, etc.

The auxiliary file mechanism makes it necessary to run LaTeX on a given source file more than once to ensure that the cross-reference information has been properly resolved. When changes are made that affect the number or the placement of equations, tables, and the like. LaTeX will issue a warning message that advises the user to "rerun to get cross-references right," in which case, LaTeX should be run again.

 

4. Useful External Packages

 

  • emulateapj

    Alexey Vikhlinin has created a LateX class file that mimics the tight, type set look of a published AASTeX paper. The class file, emulateapj.cls, and documentation can be obtained here

  • lineno

    To add line numbering to your paper obtain the lineno package. After obtaining the lineno.sty file, add these commands before the \begin{document} call near the top of your LaTeX manuscript:

    \usepackage{lineno}
    \linenumbers

    This places continuously running numbers in the left margin. See the user manual to determine how to use lineno's many other options. Note that while lineno works with AASTeX (v5.2) in both single and double column preprint modes, it does not mark both columns when used with the emulateapj classfile. Only one of the two columns are marked.

  • Trackchanges

    The Trackchanges style file allows multiple authors to edit and annotate a LaTeX document. After obtaining the trackchanges style files, simply add:

    \usepackage{trackchanges}
    \addeditor{ABC} % where ABC is an editor identifier

    to the top of your LaTeX manuscript before the \begin{document} call. The five commands used to most often are:

    \note[editor]{The note}
    \annote[editor]{Text to annotate}{The note}
    \add[editor]{Text to add}
    \remove[editor]{Text to remove}
    \change[editor]{Text to remove}{Text to add}

    where "editor" is the editor identifier defined earlier. The user manual provides numerous examples of the output and descriptions of the different options available.

  • Highlighting new and changed text in revised manuscripts with bold or colored font.

    Some authors highlight new or modified text in revised manuscripts using bold face to make it easier for the editor and referee to pick out the changes. This is a very useful practice that should be encouraged but its widespread acceptance may be hampered by the time required to remove the bold highlighting once the paper has been accepted. While there is no package currently available to do this here are a set of LaTeX commands to add this functionality to your papers.

    LaTeX command Function
    \newcommand{\btxt}[1]{{\bf #1}} Put the argument in bold
    \newcommand{\btxt}[1]{{\it \textcolor{blue}{ #1}}} Put the argument in blue italics
    \newcommand{\btxt}[1]{{#1}} Turn off the mark up. Generally commented out until needed.

    Note that the use of color requires the color style file. This should be a standard package in all modern LaTeX distributions but the style file has to be specifically called before color can be used. Place \usepackage{color} at the beginning of the manuscript before the \begin{document} call to allow color. Additional colors or fonts can be supplied by the user by modifying the commands accordingly. This functionality can be turned off by commenting out the initial command and using the last command.

    To use this functionality place one of the first two commands in the table above at the beginning of the manuscript before the \begin{document} call. The third command can be included but should be commented out, i.e. preface with a "%". Next, wrap any text that you want to highlight with the "\btxt" command. For example:

    "We have obtained \btxt{$BVRI$} photometry of the \btxt{exceptionally} long lived nova V723 Cas."

    will produce

    "We have obtained BVRI photometry of the exceptionally long lived nova V723 Cas."

    To turn off the bold highlighting simply activate the third definition and comment out the first, e.g.

    %\newcommand{\btxt}[1]{{\bf #1}}
    \newcommand{\btxt}[1]{{#1}}

  • Watermarking

    There are various style files available to add watermarks to LaTeX manuscripts. One of the best in terms of number of options available to control the watermarking features is draftwatermark. The user can set the angle, size, lightness and text within the style file. There is also an option to only mark the first page.

    Note that manuscripts submitted to the AAS Journals should not include any watermarking.

  • Merge multiple postscript files into a single file

    The assemble perl script by Robert Lupton will merge multiple postscript files into a single postscript file. K.Z. Stanek provides some documentation on its use here. Stanek's main use of assemble.pl is to create meeting posters but the code can also be used to make more compact paper figures by merging multiple component figures into a single one.

  • Merge multiple latex components into a single file

    For authors who use the \input and \include commands to reference external latex files such as tables and sections, it is sometimes necessary to "flatten" the LaTeX structure by merging all the external files into one. A strong advantabe of the single, flat LaTeX file is that the AAS journal's metric counters (e.g. ApJL manuscript length calculator) only accepted a single, combined LaTeX manuscript. Two source codes are available to merge LaTeX structures. One is a C code called flatten and the other is a Perl script called latexexpand.

  • Excel to LaTeX tables converters

    Two programs are available to covert Microsoft Excel tables into LaTeX tabular format: excel2latex and xl2latex.

  • Word to latex manuscripts converters

    Similarly, many programs are available to convert Microsoft Word files into LaTeX format. The programs are WordML2LaTeX, catdoc, word-to-latex, and word2latex.

 

Share: