ApJtemplate

Latex template for The American Astronomical Society Journals

Category

Other

License

Free to use (MIT)

File

template.tex

template.texRead-only preview
\input{top-apj}

% Headers for odd and even pages, respectively:
\shorttitle{ApJ Template}
% If more than two authors, use {\em et al.}
\shortauthors{Cubillos {\em et al.}}


\begin{document}

\title{Latex Template for ApJ Papers}


%% AUTHOR/INSTITUTIONS FOR AASTEX6.1:
\author{Patricio~E.~Cubillos}
\affiliation{Space Research Institute, Austrian Academy of Sciences,
              Schmiedlstrasse 6, A-8042, Graz, Austria}
\affiliation{Planetary Sciences Group, Department of
             Physics, University of Central Florida, Orlando, FL 32816-2385}

\author{Joseph~Harrington}
\affiliation{Planetary Sciences Group, Department of
             Physics, University of Central Florida, Orlando, FL 32816-2385}

\author{Third~Author}
\affiliation{Planetary Sciences Group, Department of
             Physics, University of Central Florida, Orlando, FL 32816-2385}

%% AUTHOR/INSTITUTIONS FOR EMULATE APJ:
% \author{Patricio~E.~Cubillos\altaffilmark{1,2},
% Joseph~Harrington\altaffilmark{1},
% and
% Third~Author\altaffilmark{1}
% }
% \affil{\sp{1} Planetary Sciences Group, Department of
%               Physics, University of Central Florida, Orlando, FL 32816-2385\\
%        \sp{2} Space Research Institute, Austrian Academy of Sciences,
%               Schmiedlstrasse 6, A-8042, Graz, Austria}

\email{author@email.org}

% %% Extra info for aastex:
% \received{Yesterday}
% \revised{Today}
% \accepted{Tonight}
% \published{Tomorrow}
% \submitjournal{AASJournal}

\begin{abstract}
  This template shows some basic features of a LaTeX template for a
  manuscript in The Astrophysical Journal (ApJ) style.  You can find
  the source code for this template in
  \href{https://github.com/pcubillos/ApJtemplate}
  {github.com/pcubillos/ApJtemplate}.
  Lorem Ipsum is simply dummy text of the printing and typesetting
  industry. Lorem Ipsum has been the industry's standard dummy text ever
  since the 1500s, when an unknown printer took a galley of type and
  scrambled it to make a type specimen book. It has survived not only
  five centuries, but also the leap into electronic typesetting,
  remaining essentially unchanged. It was popularised in the 1960s with
  the release of Letraset sheets containing Lorem Ipsum passages, and
  more recently with desktop publishing software like Aldus PageMaker
  including versions of Lorem Ipsum.
\end{abstract}

% http://journals.aas.org/authors/keywords2013.html
\keywords{methods: statistical --
          planetary systems   --
          techniques: photometric}


\section{Introduction}
\label{introduction}

This is an introductory section.  Start with some broad background and,
as you advance, give more specific details concerning your research.
Usually, the last paragraph of the introduction details the content in
the rest of the sections.

In Section \ref{sec:observations}, we describe observations, show some
examples of how to cite other papers.  In Section
\ref{sec:compile}, we show how to compile this document, show a Figure
example and give some quick grammar lessons.  In Section
\ref{sec:science}, we present a physical interpretation of our data
and show a Table example.  Finally, in Section \ref{sec:conclusions}
we conclude.

\section{Observations}
\label{sec:observations}

We observed exoplanets, many of them.  Sometimes we deal with theory,
but most of the time we reduce data.

This text shows how to cite other people's papers.
\citet{HarringtonEtal2006sciuandbphas} is a citation to a paper.
Citations can also be in parenthesis
\citep[e.g.,][]{HarringtonEtal2007natHD149026b}.  Multiple papers can
be cited in one go \citep{StevensonEtal2010natGJ436b,
  StevensonEtal2012apjHD149026b, StevensonEtal2012apjGJ436c,
  BlecicEtal2013apjWASP14b, BlecicEtal2014apjWASP43b,
  CubillosEtal2013apjWASP8b, CubillosEtal2014apjTrES1,
  CampoEtal2011apjWASP12b, NymeyerEtal2011apjWASP18b}.

The references information is kept in bibtex format.  Bibtex entries
are generally obtained from
\href{http://adsabs.harvard.edu/abstract_service.html}{ADS}, and
should be stored in a bibfile (see `bibfile-template.bib').


\section{Compiling Latex}
\label{sec:compile}

To properly compile a latex document that uses bibtex (this one, for
example) you need to run these set of commands from the prompt:
\newline
\indent \texttt{latex template} \newline
\indent \texttt{bibtex template} \newline
\indent \texttt{latex template} \newline
\indent \texttt{latex template} \newline
\indent \texttt{latex template} \newline

The multiple latex calls are necessary to let LaTeX properly set the
cross references.  However, you can compile the document with this single command: \newline
\indent \texttt{latbibdo template} \newline

If you include the following functions into your bash file
(\sim/.bashrc for Unix, or \sim/.bash\_profile for OSX)%
\footnote{Take a look at the .tex source code to copy-paste these
  commands.}: \newline

\footnotesize \noindent
latexcl()\{ rm -f \$*.bbl \$*.blg \$*.dvi \$*.log \$*.aux \$*.ps \$*.pdf; \} \\
lblll()\{ latex \$* ; bibtex \$* ; latex \$* ; latex \$* ; latex \$*; \} \\
pspdfembed()\{ ps2pdf -dMaxSubsetPct=100 -dCompatibilityLevel=1.3 -dSubsetFonts=true -dEmbedAllFonts=true \$*; \} \\
latpdf()\{ dvips -R0 -P pdf -t letter -f \$* | pspdfembed - - > \$*.pdf \& \} \\
latbibdo()\{ latexcl \$*; lblll \$* ; latpdf \$* \& \} \\
latexdo()\{ latexcl \$* ; latex \$* ; latex \$* ; latex \$* ; latpdf \$* \& \} \\
\normalsize

%% Here they are clean, so you can include them in your bash:
% latexcl () { rm -f $*.bbl $*.blg $*.dvi $*.log $*.aux $*.ps $*.pdf; }
% lblll () { latex $*; bibtex $*; latex $*; latex $*; latex $*; }
% pspdfembed () { ps2pdf -dMaxSubsetPct=100 -dCompatibilityLevel=1.3 -dSubsetFonts=true -dEmbedAllFonts=true $*; }
% latpdf () { dvips -R0 -P pdf -t letter -f $* | pspdfembed - - > $*.pdf & }
% latbibdo () { latexcl $*; lblll $*; latpdf $* & }
% latexdo () { latexcl $*; latex $*; latex $*; latex $*; latpdf $* & }

Alternatively, if you want to use pdflatex, put this set of functions
in your bash:

\footnotesize
latex () \{ pdflatex "\$@" ; \}\\
latexcl () \{ rm -f "\$@".bbl "\$@".blg "\$@"Notes.bib "\$@".out "\$@".dvi "\$@".log "\$@".aux "\$@".lof "\$@".lot "\$@".toc "\$@".ps "\$@".pdf; \} \\
lblll () \{ latex "\$@" ; bibtex "\$@" ; latex "\$@" ; latex "\$@"; latex "\$@"; \}\\
latbibdo () \{ latexcl "\$@"; lblll "\$@" ; \}\\
latexdo () \{ latexcl "\$@" ; latex "\$@" ; latex "\$@" ; latex "\$@" ; \}\\
\normalsize
% Here they are clean, so you can include them in your .bashrc:
%latbibdo () { latexcl "$@"; lblll "$@" ; }
%latex () { pdflatex "$@" ; }
%latexcl () { rm -f "$@".bbl "$@".blg "$@"Notes.bib "$@".out "$@".dvi "$@".log "$@".aux "$@".lof "$@".lot "$@".toc "$@".ps "$@".pdf; }
%latexdo () { latexcl "$@" ; latex "$@" ; latex "$@" ; latex "$@" ; }
%lblll () { latex "$@" ; bibtex "$@" ; latex "$@" ; latex "$@" ; latex "$@"; }

For the plain latex commands (the first option) you can include .ps or .eps figures (see Section \ref{sec:figures}). For pdflatex (the second option) you can include .pdf figures.

To delete all non-source files, run: \newline
\indent \texttt{latexcl template} \newline

To get a PDF file from a .tex document from a clean run, do: \newline
\indent \texttt{latexdo template} \newline

latexdo will delete your non-source files (.pdf, .aux, etc.) and run latex
several times to get all the page and section references right.


\subsection{Top File}

The \texttt{top-apj.tex} file contains the latex header.  In there you
can choose the document class between \texttt{aastex6.cls} (default),
\texttt{emulateapj.cls}, or others (e.g., \texttt{article.cls}).  You
can also add additional packages, set the bibliography style, and add
your favorite commands.  Other than that, you do not need to mess much
with the top file.


\subsection{Figures}
\label{sec:figures}

Figure \ref{fig:writing} depicts the paper writing process.  It is
very useful to keep a record of the source plotting code into the .tex
source file (see comment in the Fig caption), so you can
easily find how you made the plot and make updates.  Because you will
have to re-make the plot. Yes, many times.

\begin{figure}[tb]
\centering
\includegraphics[width=\linewidth, clip]{figs/paperwriting.ps}
\caption{The Paper Publication Process.  The following clause seems to be
  universal: ``The closer you are to finish a paper, the longer it
  takes to make any significant improvement.''  On other news,
  although this figure in particular has a title, in papers, figure titles
  appear as the first sentence fragment of the
  caption, as seen in this caption, rather than at the top of the
  graphic.}
\label{fig:writing}
% SOURCE: /home/patricio/ast/esp01/code/lib/python/xkcd/paperwritting.py
\end{figure}


\subsection{Grammar}
\label{sec:grammar}

And now some grammar: `which' introduces a clause that adds a new fact,
and must be set between commas.  For example: ``There was an earthquake
in Chile, which isn't really any news.''  `That' introduces a clause
that explains or limits, and has no surrounding commas.  For example:
``Class O-stars that lie in the constellation of Orion have small proper
motion.''

Use the ``Oxford'' comma in lists.  For example, ``I love my parents, Lady Gaga, and Humpty Dumpty.'', NOT ``I love my parents, Lady Gaga and Humpty Dumpty.''

Use a hyphen to connect two adjectives acting as a single adjective on
a noun.  You have a bad-pixel map, not a bad pixel map.  The former is
a map of bad pixels.  The latter could be a pixel map, but a bad one.
The hyphen breaks the ambiguity.  However, do {\em not}\/ use a hyphen
between an adverb and an adjective, as the adverb could never modify
the noun and there is no ambiguity: ``We applied a poorly made mask,''
not, ``we applied a poorly-made mask.''  Note that this is a change in
practice from before 2000 or so.  Also, do not hyphenate inside names
or between a number and its units: ``our 3 hour Markov-Chain Monte
Carlo run,'' not ``our 3-hour Markov-Chain Monte-Carlo run.''


\section{Science}
\label{sec:science}

This section gives a scientific interpretation of the analyzed data.
The \texttt{'\textbackslash micro'} macross provides the unslanted mu,
`{\micro}' to be used for units of values, for example: {\micron} or
{\microbar}.  Another nice feature are \texttt{'\$\textbackslash
  ttt\{n\}\$'} for a 'ten-to-the-n' ($\ttt{n}$) and
\texttt{'\$\textbackslash tttt\{n\}\$'} for 'times-ten-to-the-n'
($\tttt{n}$).

Table \ref{table:parameters} is a table.  Tables are well behaved;
most of the time they appear right (or close to) where you put them.
Figures are not.  The can show up anywhere in the pdf.   Be patient.

\begin{table}[ht]
\centering
\caption{\label{table:parameters} Light curve parameters}
\begin{tabular}{lc}
\hline
\hline
Parameter                           & Value           \\
\hline
Eclipse depth (counts)              & 98.1            \\
Eclipse duration (phase)            & 0.1119          \\
Eclipse mid point (phase)           & 0.5015          \\
Eclipse ingress/egress time (phase) & 0.013           \\
Ramp slope (counts/phase)           & 0.006           \\
System flux (counts)                & 25815           \\
\hline
% SOURCE: /home/patricio/ast/esp01/analyses/ligtcurve/attempt_547/results.txt
\end{tabular}
\end{table}


Deluxe tables, like Table \ref{table:allplanets} are great. If they
are too long, they automatically split and continue in the next
page. Everything looks fine in Aastex6; however, in emulateapj the
format seems to fail.
Deluxe table may be a bit tricky. If you surround it with the table
environment, you can specify where to place them (e.g., top, bottom).
However, if you do, long tables wont automatically break into separate
pages.  So, there is a trade off.

%\begin{table}[t]
% deluxetable works well for aastex6, not so much for emulateapj:
\begin{deluxetable*}{lr@{}lr@{}lrrccrrrccrr}
\tabletypesize{\footnotesize}
%\tablecolumns{14}
%\tablewidth{\textwidth}
\tablecaption{Planets \label{table:allplanets}}

\tablehead{\colhead{Name}                          &
           \multicolumn{2}{c}{Mass}                &
           \multicolumn{2}{c}{Radius}              &
           \colhead{\Teq}                          &
           \colhead{$\Omega$}                      &
           \colhead{$a$}                           &
           \colhead{$M$\sb{s}}                     &
           \colhead{Age}                           &
           \colhead{$\Omega\sb{\rm rot}$}          &
           \colhead{Flux}                          &
           \colhead{$L\sb{\rm h}$}                 &
           \colhead{$L\sb{\rm e}$}                 &
           \colhead{$L\sb{\rm h}$/$L\sb{\rm e}$}   &
           \colhead{Ref.\,\tnm{a}}                 \\
           \colhead{}                              &
           \multicolumn{2}{c}{\mearth}             &
           \multicolumn{2}{c}{\rearth}             &
           \colhead{}                              &
           \colhead{}                              &
           \colhead{}                              &
           \colhead{\msun}                         &
           \colhead{}                              &
           \colhead{$\Omega\sb{\odot}$}            &
           \colhead{erg\,s$\sp{-1}$\,cm$\sp{-2}$}  &
           \colhead{s$\sp{-1}$}                    &
           \colhead{s$\sp{-1}$}                    &
            \colhead{}                              }
\startdata
55 Cnc e      & $ 8.38$ & $\pm 0.39$               & $ 2.08$ & $\pm 0.16$             &         1957 &       15.6 & $0.015$ & $0.91$ & $  10.2$ & $1.4$ & $142697.6$ & $3\times10^{30}$ & $3\times10^{30}$ & $\cdots$ & De11 \\
55 Cnc e      & $ 8.38$ & $\pm 0.39$               & $ 2.08$ & $\pm 0.16$             &         1957 &       15.6 & $0.015$ & $0.91$ & $  10.2$ & $1.4$ & $142697.6$ & $\cdots$ & $\cdots$ & $\cdots$ & De11 \\
55 Cnc e      & $ 8.38$ & $\pm 0.39$               & $ 2.08$ & $\pm 0.16$             &         1957 &       15.6 & $0.015$ & $0.91$ & $  10.2$ & $1.4$ & $142697.6$ & $\cdots$ & $\cdots$ & $\cdots$ & De11 \\
55 Cnc e      & $ 8.38$ & $\pm 0.39$               & $ 2.08$ & $\pm 0.16$             &         1957 &       15.6 & $0.015$ & $0.91$ & $  10.2$ & $1.4$ & $142697.6$ & $\cdots$ & $\cdots$ & $\cdots$ & De11 \\
\enddata
% The minipage environment keeps the table footer within the page
% width when the table occupies the full width.
% Use \vspace to adjust latex quirks with the vertical spacing.
%\begin{minipage}{\textwidth}%\vspace{0.4cm}
\tablenotetext{a}{
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
}
%\end{minipage}
\end{deluxetable*}
%\end{table}

\subsection{Non-ApJ Templates}
This template is also compatible with other class files (e.g.,
article).  This can come in handy when preparing proposals.
Especially for this case, take a look at the \texttt{top-apj.tex} file
to enable the compact and or bullet-point Refenreces list.

\section{Conclusions}
\label{sec:conclusions}

These are our conclusions.  Although this example has used a colloquial
dialogue, real papers should use a formal writting style.  After the
conclusions we include some acknowledgments.

Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text ever
since the 1500s, when an unknown printer took a galley of type and
scrambled it to make a type specimen book. It has survived not only
five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with
the release of Letraset sheets containing Lorem Ipsum passages, and
more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum.


\acknowledgments

We thank A.\ Friend and B.\ Foe for helpful discussions and
improvements to the paper.  We thank the anonymous referee for his/her
time and valuable comments.  We thank contributors to Numpy
\citep{vanderWaltEtal2011numpy}, SciPy \citep{JonesEtal2001scipy},
Matplotlib \citep{Hunter2007ieeeMatplotlib}, AstroPy
\citep{Astropy2013aaAstroPy}, IPython \citep{PerezGranger2007ipython},
and the Python Programming Language; the
free and open-source community; the developers of the aastex6.1 latex
template \citep{AASteam2016aastex61}; the NASA Astrophysics Data System;
and the JPL Solar System Dynamics group for software and services.
Part of this work is based on observations made with the {\em Spitzer
  Space Telescope}, which is operated by the Jet Propulsion
Laboratory, California Institute of Technology under a contract with
NASA.  Support for this work was provided by NASA through an award
issued by JPL/Caltech and through the NASA Science Mission
Directorate's Astrophysics Data Analysis Program, grant XXY00ZZZ1110.
Jill held a NASA Earth and Space Science Fellowship.  Tom was a
Fulbright Scholar.  The Reproducible Research Compendium (RRC) of this
article is available at \href{http://tinyurl.com/2fcpre6}
{https://github.com/pcubillos/CubillosEtal2017\_RRCtemplate}.

\bibliography{template}

\begin{appendices}

\section{Bayesian Credible Region}
\label{sec:CredRegion}

In the Bayesian context, given the posterior probability density,
$p(\theta|{\bf D})$, of a parameter, $\theta$, given the dataset,
${\bf D}$, the highest posterior density region (or credible
region), $R$, is defined by
\begin{equation}
C = \int\sb{R} {\rm d}\theta\;p(\theta|{\bf D})
\label{eq:CredRegion}
\end{equation}
where C is the probability contained in the credible region.  The
region $R$ is selected such that the posterior probability of any
point inside $R$ is larger than that of any point outside.  We like
Eq.\ (\ref{eq:CredRegion}).

\end{appendices}

\end{document}
Preview
ApJtemplate preview
ApJtemplate LaTeX Template | Bibby | Bibby AI