On Tue, Jun 12, 2007 at 10:55:41PM +0200, Juergen Spitzmueller wrote: > Enrico Forestieri wrote: > > > As regards the OptArgs, do you have something specific in mind? > > I just noticed an [ERT] OptArg in the template (author or something). There > might be others.
Yes, you're right. All theorem like environments accept an optional argument. Updated patch attached. -- Enrico
Index: lib/templates/IEEEtran.lyx =================================================================== --- lib/templates/IEEEtran.lyx (revision 18750) +++ lib/templates/IEEEtran.lyx (working copy) @@ -44,25 +44,6 @@ \begin_body -\begin_layout Standard -\begin_inset Note Note -status open - -\begin_layout Standard -To specify the left and right header, go to -\family sans -Document\SpecialChar \menuseparator -Settings\SpecialChar \menuseparator -Preamble -\family default - and change the definition there. -\end_layout - -\end_inset - - -\end_layout - \begin_layout Title Your Title: And maybe a bit extra \end_layout @@ -104,6 +85,66 @@ This paper presents a simple template fo simplicity, beauty, elegance \end_layout +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Standard +To specify the left and right header, go to +\family sans +Document\SpecialChar \menuseparator +Settings\SpecialChar \menuseparator +LaTeX Preamble +\family default + and change the definition there. + You could also use the MarkBoth environment as shown in the note below, + but be warned that in this case the preamble will be cluttered by further + definitions, needed to workaround a babel bug. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status collapsed + +\begin_layout Standard +In order to use the MarkBoth environment, you have to separate left and + right pages material through +\begin_inset Quotes eld +\end_inset + +}{ +\begin_inset Quotes erd +\end_inset + + in ERT as follows: +\end_layout + +\begin_layout Standard +\align center +This is for left pages +\begin_inset ERT +status collapsed + +\begin_layout Standard + +}{ +\end_layout + +\end_inset + +and this is for right pages +\end_layout + +\end_inset + + +\end_layout + \begin_layout Section Introduction \begin_inset Note Note @@ -164,29 +205,22 @@ Methodology \end_layout \begin_layout Theorem -\begin_inset ERT +\begin_inset OptArg status collapsed \begin_layout Standard - -[ -\end_layout - -\end_inset - Theorem name -\begin_inset ERT -status collapsed - -\begin_layout Standard - -] \end_layout \end_inset - For a named theorem or theorem-like environment you need to use a little - evil red text (LaTeX mode) around the name. +For a named theorem or theorem-like environment you need to insert the name + through +\family sans +Insert\SpecialChar \menuseparator +Short Title +\family default +, as done here. \end_layout \begin_layout Lemma Index: lib/layouts/IEEEtran.layout =================================================================== --- lib/layouts/IEEEtran.layout (revision 18750) +++ lib/layouts/IEEEtran.layout (working copy) @@ -57,6 +57,7 @@ Style TheoremTemplate LabelFont Shape Italic EndFont + OptionalArgs 1 End @@ -466,6 +467,18 @@ Style MarkBoth LaTeXName markboth Align Center AlignPossible Center + Preamble + % Note: the following fixes a bug with older versions of babel + % http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=babel/3238 + \DeclareRobustCommand{\FOREIGNLANGUAGE}[1]{% + \lowercase{\foreignlanguage{#1}}} + % More recent babel versions already have the above definition, but + % introduce yet another related bug, cured by the following workaround + [EMAIL PROTECTED]@language + [EMAIL PROTECTED] + [EMAIL PROTECTED] + + EndPreamble End