From: Scott Kostyshak Date: Wed, 8 May 2013 03:56:24 +0000 (-0400) Subject: RJournal template and layout: move ERTs to layout X-Git-Tag: 2.1.0beta1~226 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4beba4e8f87ca218473448caf10563b99faf7b21;p=features.git 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. --- diff --git a/lib/layouts/RJournal.layout b/lib/layouts/RJournal.layout index 6f11bc0f73..e00d0e4381 100644 --- a/lib/layouts/RJournal.layout +++ b/lib/layouts/RJournal.layout @@ -30,6 +30,14 @@ AddToPreamble \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" diff --git a/lib/templates/RJournal.lyx b/lib/templates/RJournal.lyx index 841df269e7..d452eee58e 100644 --- a/lib/templates/RJournal.lyx +++ b/lib/templates/RJournal.lyx @@ -63,43 +63,6 @@ knitr \begin_body -\begin_layout Standard -\begin_inset Note Note -status open - -\begin_layout Plain Layout -You have to put the body of your article inside the -\begin_inset Quotes eld -\end_inset - -article -\begin_inset Quotes erd -\end_inset - - enviroment defined by RJournal.sty. -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - - -\backslash -begin{article} -\end_layout - -\end_inset - - -\end_layout - \begin_layout Standard \begin_inset ERT status open @@ -405,42 +368,6 @@ author.b@email \end_inset -\end_layout - -\begin_layout Standard -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - - -\backslash -end{article} -\end_layout - -\end_inset - - -\begin_inset Note Note -status open - -\begin_layout Plain Layout -Note -\backslash -begin{article} in the beginning of this article; now we close the -\begin_inset Quotes eld -\end_inset - -article -\begin_inset Quotes erd -\end_inset - - environment. -\end_layout - -\end_inset - - \end_layout \end_body