]> git.lyx.org Git - features.git/commitdiff
RJournal template and layout: move ERTs to layout
authorScott Kostyshak <skostysh@lyx.org>
Wed, 8 May 2013 03:56:24 +0000 (23:56 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Fri, 17 May 2013 02:51:22 +0000 (22:51 -0400)
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.

lib/layouts/RJournal.layout
lib/templates/RJournal.lyx

index 6f11bc0f7396027ad3ea3fc264cf5a22bffffaba..e00d0e4381f77b305f9a52ba6ab49e6e4cc5e102 100644 (file)
@@ -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"
index 841df269e7dc02c113a112785a553f5dff979a31..d452eee58e2c846b86230e2f005178dac925a7eb 100644 (file)
@@ -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