Better fix for bug 3510 (by me, Juergen, and Jean-Marc)

* lib/layouts/IEEEtran.layout: Add a proper definition to the
	preamble when using the MarkBoth environment (fix bug 3510).
	Allow inserting an optional argument for theorem like environments.
	Remove white space from begin of line in preamble stuff.

	* lib/templates/IEEEtran.lyx: Reintroduce the MarkBoth environment
	in the document body thanks to the fix above. Use optional argument
	instead of ERT in Theorem environment. Use the new --Separator--
	environment for splitting biography environments.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18767 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2007-06-13 22:50:17 +00:00
parent a529b7e6e7
commit 8561f4f2ca
2 changed files with 49 additions and 75 deletions

View File

@ -57,6 +57,7 @@ Style TheoremTemplate
LabelFont LabelFont
Shape Italic Shape Italic
EndFont EndFont
OptionalArgs 1
End End
@ -73,7 +74,7 @@ Style Theorem
LatexName thm LatexName thm
LabelString "Theorem #:" LabelString "Theorem #:"
Preamble Preamble
\newtheorem{thm}{Theorem} \newtheorem{thm}{Theorem}
EndPreamble EndPreamble
End End
@ -83,7 +84,7 @@ Style Lemma
LatexName lemma LatexName lemma
LabelString "Lemma #:" LabelString "Lemma #:"
Preamble Preamble
\newtheorem{lemma}{Lemma} \newtheorem{lemma}{Lemma}
EndPreamble EndPreamble
End End
@ -93,7 +94,7 @@ Style Corollary
LatexName cor LatexName cor
LabelString "Corollary #:" LabelString "Corollary #:"
Preamble Preamble
\newtheorem{cor}{Corollary} \newtheorem{cor}{Corollary}
EndPreamble EndPreamble
End End
@ -103,7 +104,7 @@ Style Proposition
LatexName prop LatexName prop
LabelString "Proposition #:" LabelString "Proposition #:"
Preamble Preamble
\newtheorem{prop}{Proposition} \newtheorem{prop}{Proposition}
EndPreamble EndPreamble
End End
@ -113,7 +114,7 @@ Style Conjecture
LatexName conject LatexName conject
LabelString "Conjecture #:" LabelString "Conjecture #:"
Preamble Preamble
\newtheorem{conject}{Conjecture} \newtheorem{conject}{Conjecture}
EndPreamble EndPreamble
End End
@ -123,7 +124,7 @@ Style Criterion
LatexName criter LatexName criter
LabelString "Criterion #:" LabelString "Criterion #:"
Preamble Preamble
\newtheorem{criter}{Criterion} \newtheorem{criter}{Criterion}
EndPreamble EndPreamble
End End
@ -133,7 +134,7 @@ Style Fact
LatexName fact LatexName fact
LabelString "Fact #:" LabelString "Fact #:"
Preamble Preamble
\newtheorem{fact}{Fact} \newtheorem{fact}{Fact}
EndPreamble EndPreamble
End End
@ -143,7 +144,7 @@ Style Axiom
LatexName axi LatexName axi
LabelString "Axiom #:" LabelString "Axiom #:"
Preamble Preamble
\newtheorem{axi}{Axiom} \newtheorem{axi}{Axiom}
EndPreamble EndPreamble
End End
@ -153,7 +154,7 @@ Style Definition
LatexName definitn LatexName definitn
LabelString "Definition #:" LabelString "Definition #:"
Preamble Preamble
\newtheorem{definitn}{Definition} \newtheorem{definitn}{Definition}
EndPreamble EndPreamble
End End
@ -163,7 +164,7 @@ Style Example
LatexName example LatexName example
LabelString "Example #:" LabelString "Example #:"
Preamble Preamble
\newtheorem{example}{Example} \newtheorem{example}{Example}
EndPreamble EndPreamble
End End
@ -173,7 +174,7 @@ Style Condition
LatexName condition LatexName condition
LabelString "Condition #:" LabelString "Condition #:"
Preamble Preamble
\newtheorem{condition}{Condition} \newtheorem{condition}{Condition}
EndPreamble EndPreamble
End End
@ -183,7 +184,7 @@ Style Problem
LatexName problem LatexName problem
LabelString "Problem #:" LabelString "Problem #:"
Preamble Preamble
\newtheorem{problem}{Problem} \newtheorem{problem}{Problem}
EndPreamble EndPreamble
End End
@ -193,7 +194,7 @@ Style Exercise
LatexName exacise LatexName exacise
LabelString "Exercise #:" LabelString "Exercise #:"
Preamble Preamble
\newtheorem{exacise}{Exercise} \newtheorem{exacise}{Exercise}
EndPreamble EndPreamble
End End
@ -203,7 +204,7 @@ Style Remark
LatexName remrk LatexName remrk
LabelString "Remark #:" LabelString "Remark #:"
Preamble Preamble
\newtheorem{remrk}{Remark} \newtheorem{remrk}{Remark}
EndPreamble EndPreamble
End End
@ -213,7 +214,7 @@ Style Claim
LatexName claim LatexName claim
LabelString "Claim #:" LabelString "Claim #:"
Preamble Preamble
\newtheorem{claim}{Claim} \newtheorem{claim}{Claim}
EndPreamble EndPreamble
End End
@ -223,7 +224,7 @@ Style Note
LatexName note LatexName note
LabelString "Note #:" LabelString "Note #:"
Preamble Preamble
\newtheorem{note}{Note} \newtheorem{note}{Note}
EndPreamble EndPreamble
End End
@ -233,7 +234,7 @@ Style Notation
LatexName notation LatexName notation
LabelString "Notation #:" LabelString "Notation #:"
Preamble Preamble
\newtheorem{notation}{Notation} \newtheorem{notation}{Notation}
EndPreamble EndPreamble
End End
@ -243,7 +244,7 @@ Style Case
LatexName case LatexName case
LabelString "Case #:" LabelString "Case #:"
Preamble Preamble
\newtheorem{case}{Case} \newtheorem{case}{Case}
EndPreamble EndPreamble
End End
@ -463,9 +464,13 @@ End
Style MarkBoth Style MarkBoth
LaTeXType Command LaTeXType Command
LaTeXName markboth LaTeXName IEEEmarkboth
Align Center Align Center
AlignPossible Center AlignPossible Center
Preamble
% protect against redefinition of \markboth by babel >= 3.6
\let\IEEEmarkboth=\markboth
EndPreamble
End End

View File

@ -1,13 +1,8 @@
#LyX 1.5.0svn created this file. For more info see http://www.lyx.org/ #LyX 1.5.0svn created this file. For more info see http://www.lyx.org/
\lyxformat 271 \lyxformat 274
\begin_document \begin_document
\begin_header \begin_header
\textclass IEEEtran \textclass IEEEtran
\begin_preamble
% The following definition specifies the text on the headers:
% Use this instead of the "MarkBoth" paragraph style
\markboth{This is for left pages}{and this is for right pages}
\end_preamble
\language english \language english
\inputencoding default \inputencoding default
\font_roman default \font_roman default
@ -44,25 +39,6 @@
\begin_body \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 \begin_layout Title
Your Title: And maybe a bit extra Your Title: And maybe a bit extra
\end_layout \end_layout
@ -104,6 +80,21 @@ This paper presents a simple template for IEEEtran documents.
simplicity, beauty, elegance simplicity, beauty, elegance
\end_layout \end_layout
\begin_layout MarkBoth
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
\begin_layout Section \begin_layout Section
Introduction Introduction
\begin_inset Note Note \begin_inset Note Note
@ -164,29 +155,22 @@ Methodology
\end_layout \end_layout
\begin_layout Theorem \begin_layout Theorem
\begin_inset ERT \begin_inset OptArg
status collapsed status collapsed
\begin_layout Standard \begin_layout Standard
[
\end_layout
\end_inset
Theorem name Theorem name
\begin_inset ERT
status collapsed
\begin_layout Standard
]
\end_layout \end_layout
\end_inset \end_inset
For a named theorem or theorem-like environment you need to use a little For a named theorem or theorem-like environment you need to insert the name
evil red text (LaTeX mode) around the name. through
\family sans
Insert\SpecialChar \menuseparator
Short Title
\family default
, as done here.
\end_layout \end_layout
\begin_layout Lemma \begin_layout Lemma
@ -396,22 +380,7 @@ status collapsed
raw TeX. raw TeX.
\end_layout \end_layout
\begin_layout Standard \begin_layout --Separator--
\begin_inset ERT
status collapsed
\begin_layout Standard
% This LaTeX comment is needed to force LyX to generate two separate environment
s
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout \end_layout