\title{An R News Article Template}
\author{by the R News Editors}

\maketitle

This is a \LaTeX{} template for R News authors.
R News welcomes article submissions on any topic related to 
\R{} (\citep{R:Ihaka+Gentleman:1996}).

The file {\tt wrapper.tex} (that you should have downloaded
at the same time you downloaded this template) plays the role
of the complete R News issue document.  It includes this file
({\tt template.tex}), which is not itself a complete
\LaTeX{} document (it has no \verb|\begin{document}| or
\verb|\end{document}|).

Running {\tt pdflatex} on {\tt wrapper.tex} a couple of times
(to get the Figure references right) will produce
{\tt wrapper.pdf} which shows how this template file would be 
typeset within an R News issue.

\section*{Two-column figures and tables}

Currently, R News is typeset in two columns.
By default, figures and tables will occupy only one
column (see Figure \ref{figure:onecolfig}), 
but you can use the \verb|figure*| or
\verb|table*| environments to create a figure or
table that spans both columns (see Figures \ref{figure:bibexample}
and \ref{figure:bblexample}).

\begin{figure}
\vspace*{.1in}
\framebox[\textwidth]{\hfill \raisebox{-.45in}{\rule{0in}{1in}}
                      A picture goes here \hfill}
\caption{\label{figure:onecolfig}
A normal figure only occupies one column.}
\end{figure}

\section*{References}

The standard way to produce citations for R News is via the 
\verb|\citep| and \verb|\citet| commands 
and a {\tt .bib} file that contains the 
references in {\sc Bib}\TeX{} format.\footnote{We use the {\tt natbib}
package for citations.}  The citation in the very first 
paragraph of this template is of the form
\verb|\citep{R:Ihaka+Gentleman:1996}|.  Figure \ref{figure:bibexample}
shows an example file called {\tt example.bib} which contains 
a single reference.  

A bibliography is produced from {\tt example.bib}
by placing the following line in {\tt template.tex} (or 
whatever you end up calling it:
\begin{verbatim}
\bibliography{example}
\end{verbatim}
and running {\tt pdflatex} then {\tt bibtex} on the file 
{\tt wrapper.tex}.

You can make the R News editors job a bit easier if, at this point,
you replace the line:
\begin{verbatim}
\bibliography{example}
\end{verbatim}
with the contents of the file {\tt wrapper.bbl}.  Figure
\ref{figure:bblexample} shows what this{\tt wrapper.bbl}
looks like when produced from {\tt example.bib} 
(in Figure \ref{figure:bibexample}).

\begin{figure*}[b]
\begin{center}
\begin{boxedverbatim}
@ARTICLE{R:Ihaka+Gentleman:1996,
  AUTHOR = {Ross Ihaka and Robert Gentleman},
  TITLE = {R: A Language for Data Analysis and Graphics},
  JOURNAL = {Journal of Computational and Graphical Statistics},
  YEAR = 1996,
  VOLUME = 5,
  NUMBER = 3,
  PAGES = {299--314},
  URL = {http://www.amstat.org/publications/jcgs/}
}
\end{boxedverbatim}
\end{center}
\caption{\label{figure:bibexample}
The contents of a file called {\tt example.bib}.  This figure 
uses the {\tt figure*} environment to span
two columns.}
\end{figure*}

\begin{figure*}[b]
\begin{center}
\begin{boxedverbatim}
\begin{thebibliography}{1}
\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
\expandafter\ifx\csname url\endcsname\relax
  \def\url#1{{\tt #1}}\fi

\bibitem[Ihaka and Gentleman(1996)]{R:Ihaka+Gentleman:1996}
R.~Ihaka and R.~Gentleman.
\newblock R: A language for data analysis and graphics.
\newblock {\em Journal of Computational and Graphical Statistics}, 5\penalty0
  (3):\penalty0 299--314, 1996.
\newblock URL \url{http://www.amstat.org/publications/jcgs/}.

\end{thebibliography}
\end{boxedverbatim}
\end{center}
\caption{\label{figure:bblexample}
The contents of a file called {\tt wrapper.bbl}.  This figure also
uses the {\tt figure*} environment to span
two columns.}
\end{figure*}

\section*{Summary}

The steps involved in preparing an article for submission to R News
are as follows:

\begin{itemize}
\setlength{\itemsep}{0in}
\item download {\tt wrapper.tex}, {\tt template.tex}, and {\tt Rnews.sty}.
\item rename {\tt template.tex} to something more appropriate,
{\tt yourarticle.tex} say, and replace its
contents with the contents of your article.
\item (if appropriate) create a {\tt yourarticle.bib} file
and add \\
\verb|\bibliography{yourarticle}|\\
at the end of {\tt yourarticle.tex}.  
\item modify {\tt wrapper.tex} to include {\tt yourarticle} rather
than {\tt template}.
\item (if appropriate) run {\tt pdflatex} then
 {\tt bibtex} on {\tt wrapper.tex}
to create {\tt wrapper.bbl}. Replace \\
\verb|\bibliography{yourarticle}|\\
in {\tt yourarticle.tex} with
the contents of {\tt wrapper.bbl}.
\item run {\tt pdflatex} on {\tt wrapper.tex} a couple of times
(until all figure references are resolved) to produce {\tt wrapper.pdf}.
\item iterate until {\tt wrapper.pdf} looks right, then submit only 
the file {\tt yourarticle.tex} (plus any figure files). 
\end{itemize}


\begin{thebibliography}{1}
\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
\expandafter\ifx\csname url\endcsname\relax
  \def\url#1{{\tt #1}}\fi

\bibitem[Ihaka and Gentleman(1996)]{R:Ihaka+Gentleman:1996}
R.~Ihaka and R.~Gentleman.
\newblock R: A language for data analysis and graphics.
\newblock {\em Journal of Computational and Graphical Statistics}, 5\penalty0
  (3):\penalty0 299--314, 1996.
\newblock URL \url{http://www.amstat.org/publications/jcgs/}.

\end{thebibliography}
