lyx_mirror/lib/layouts/RJournal.layout
Scott Kostyshak 4beba4e8f8 RJournal template and layout: move ERTs to layout
The layout now takes care of \begin{article} and \end{article}
by using \AtBeginDocument and \AtEndDocument.

This cleans up the template a little by removing some ERT. The
user no longer needs to read the two notes explaining why the
ERT boxes were necessary. The user also does not need to think
about why this LaTeX environment exists.
2013-05-16 22:51:22 -04:00

72 lines
1.4 KiB
Plaintext

# \DeclareLaTeXClass[report,RJournal.sty,booktabs.sty,natbib.sty]{report (R Journal)}
Format 35
Input stdclass.inc
Provides natbib-internal 1
ClassOptions
Other a4paper
End
DefaultModule knitr
AddToPreamble
\usepackage{RJournal}
\usepackage[round]{natbib}
\bibliographystyle{abbrvnat}
\usepackage{booktabs}
% use Schunk, Sinput and Soutput environments defined by RJournal
<<include=FALSE>>=
render_sweave()
set_header(highlight = '')
knit_hooks$set(document = hook_rjournal)
@
\fancyhf{}
\fancyhead[LO,RE]{\textsc{Contributed Article}}
\fancyhead[RO,LE]{\thepage}
\fancyfoot[L]{The R Journal Vol. X/Y, Month, Year}
\fancyfoot[R]{ISSN 2073-4859}
\AtBeginDocument{%
\begin{article}
}
\AtEndDocument{%
\end{article}
}
EndPreamble
InsetLayout "Flex:Abstract"
LabelString "Abstract"
LatexType Command
LaTexName abstract
LyXType Custom
LabelFont
Color latex
EndFont
End
InsetLayout "Flex:Address"
LabelString "Address"
LatexType Command
LaTexName address
LyXType Custom
LabelFont
Color latex
EndFont
End
InsetLayout "Flex:Email"
LabelString "Email"
LatexType Command
LaTexName email
LyXType Custom
LabelFont
Color latex
EndFont
End