On Wed, Jun 13, 2007 at 09:47:44AM +0200, Jean-Marc Lasgouttes wrote:

> Concerning the \markboth problem, what about the following simpler
> approach? The only problem I could see is that hyphenation could be
> incorrect in headings, but this looks like a useless feature to me.

Elementary, my dear Watson!

I think that you found the cleanest solution, Jean-Marc.
So, what about the attached?

-- 
Enrico
Index: lib/templates/IEEEtran.lyx
===================================================================
--- lib/templates/IEEEtran.lyx  (revision 18756)
+++ lib/templates/IEEEtran.lyx  (working copy)
@@ -3,11 +3,6 @@
 \begin_document
 \begin_header
 \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
 \inputencoding default
 \font_roman default
@@ -44,25 +39,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 +80,21 @@ This paper presents a simple template fo
 simplicity, beauty, elegance
 \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
 Introduction
 \begin_inset Note Note
@@ -164,29 +155,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 18756)
+++ lib/layouts/IEEEtran.layout (working copy)
@@ -57,6 +57,7 @@ Style TheoremTemplate
        LabelFont
          Shape               Italic
        EndFont
+       OptionalArgs          1
 End
 
 
@@ -73,7 +74,7 @@ Style Theorem
        LatexName             thm
        LabelString           "Theorem #:"
        Preamble
-         \newtheorem{thm}{Theorem}
+       \newtheorem{thm}{Theorem}
        EndPreamble
 End
 
@@ -83,7 +84,7 @@ Style Lemma
        LatexName             lemma
        LabelString           "Lemma #:"
        Preamble
-         \newtheorem{lemma}{Lemma}
+       \newtheorem{lemma}{Lemma}
        EndPreamble
 End
 
@@ -93,7 +94,7 @@ Style Corollary
        LatexName             cor
        LabelString           "Corollary #:"
        Preamble
-         \newtheorem{cor}{Corollary}
+       \newtheorem{cor}{Corollary}
        EndPreamble
 End
 
@@ -103,7 +104,7 @@ Style Proposition
        LatexName             prop
        LabelString           "Proposition #:"
        Preamble
-         \newtheorem{prop}{Proposition}
+       \newtheorem{prop}{Proposition}
        EndPreamble
 End
 
@@ -113,7 +114,7 @@ Style Conjecture
        LatexName             conject
        LabelString           "Conjecture #:"
        Preamble
-         \newtheorem{conject}{Conjecture}
+       \newtheorem{conject}{Conjecture}
        EndPreamble
 End
 
@@ -123,7 +124,7 @@ Style Criterion
        LatexName             criter
        LabelString           "Criterion #:"
        Preamble
-         \newtheorem{criter}{Criterion}
+       \newtheorem{criter}{Criterion}
        EndPreamble
 End
 
@@ -133,7 +134,7 @@ Style Fact
        LatexName             fact
        LabelString           "Fact #:"
        Preamble
-         \newtheorem{fact}{Fact}
+       \newtheorem{fact}{Fact}
        EndPreamble
 End
 
@@ -143,7 +144,7 @@ Style Axiom
        LatexName             axi
        LabelString           "Axiom #:"
        Preamble
-         \newtheorem{axi}{Axiom}
+       \newtheorem{axi}{Axiom}
        EndPreamble
 End
 
@@ -153,7 +154,7 @@ Style Definition
        LatexName             definitn
        LabelString           "Definition #:"
        Preamble
-         \newtheorem{definitn}{Definition}
+       \newtheorem{definitn}{Definition}
        EndPreamble
 End
 
@@ -163,7 +164,7 @@ Style Example
        LatexName             example
        LabelString           "Example #:"
        Preamble
-         \newtheorem{example}{Example}
+       \newtheorem{example}{Example}
        EndPreamble
 End
 
@@ -173,7 +174,7 @@ Style Condition
        LatexName             condition
        LabelString           "Condition #:"
        Preamble
-         \newtheorem{condition}{Condition}
+       \newtheorem{condition}{Condition}
        EndPreamble
 End
 
@@ -183,7 +184,7 @@ Style Problem
        LatexName             problem
        LabelString           "Problem #:"
        Preamble
-         \newtheorem{problem}{Problem}
+       \newtheorem{problem}{Problem}
        EndPreamble
 End
 
@@ -193,7 +194,7 @@ Style Exercise
        LatexName             exacise
        LabelString           "Exercise #:"
        Preamble
-         \newtheorem{exacise}{Exercise}
+       \newtheorem{exacise}{Exercise}
        EndPreamble
 End
 
@@ -203,7 +204,7 @@ Style Remark
        LatexName             remrk
        LabelString           "Remark #:"
        Preamble
-         \newtheorem{remrk}{Remark}
+       \newtheorem{remrk}{Remark}
        EndPreamble
 End
 
@@ -213,7 +214,7 @@ Style Claim
        LatexName             claim
        LabelString           "Claim #:"
        Preamble
-         \newtheorem{claim}{Claim}
+       \newtheorem{claim}{Claim}
        EndPreamble
 End
 
@@ -223,7 +224,7 @@ Style Note
        LatexName             note
        LabelString           "Note #:"
        Preamble
-         \newtheorem{note}{Note}
+       \newtheorem{note}{Note}
        EndPreamble
 End
 
@@ -233,7 +234,7 @@ Style Notation
        LatexName             notation
        LabelString           "Notation #:"
        Preamble
-         \newtheorem{notation}{Notation}
+       \newtheorem{notation}{Notation}
        EndPreamble
 End
 
@@ -243,7 +244,7 @@ Style Case
        LatexName             case
        LabelString           "Case #:"
        Preamble
-         \newtheorem{case}{Case}
+       \newtheorem{case}{Case}
        EndPreamble
 End
 
@@ -463,9 +464,13 @@ End
 
 Style MarkBoth
        LaTeXType             Command
-       LaTeXName             markboth
+       LaTeXName             IEEEmarkboth
        Align                 Center
        AlignPossible         Center
+       Preamble
+       % protect against redefinition of \markboth by babel >= 3.6
+       \let\IEEEmarkboth=\markboth
+       EndPreamble
 End
 
 

Reply via email to