On Sat, Jun 09, 2007 at 08:41:52AM +0200, Jürgen Spitzmüller wrote:

> http://bugzilla.lyx.org/show_bug.cgi?id=3510
> 
> The problem is an interference of newer babel bundles with the way \markboth 
> is defined (if \markboth is defined after babel, babel somehow gets the 
> language in uppercase and complains about an unknown language ENGLISH).
> 
> The only solution I know (besides not calling babel) is to define \markboth 
> before babel, i.e. do not use the MarkBoth paragraph style (which is somewhat 
> awkward anyway) but define \markboth in preamble.
> 
> I did this in the template, which compiles again here. Looks like the
> IEEEtran > layout would need some overhaul in general, but I won't do that.

Sorry for stepping in so late, but I think that it is useful to directly
see on screen the info provided by MarkBoth. I had already solved the
bug but forgot to share the solution. Shame on me.

I propose to add the following to the 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. Using these versions, when you change the language,
% you have to accordingly substitute both 'ENGLISH' and 'english' below.
[EMAIL PROTECTED]@english

See the attached sample .lyx file. A drawback is that when changing the
document language to something else than english, say "american", one
has to update the above line to read
[EMAIL PROTECTED]@american
but maybe it is better than having to write the \markboth command
in the preamble.

I didn't try hard to find an automatic solution along the lines of the
\DeclareRobustCommand above, but I really don't have time to go
through the babel code. Maybe someone else could do it.

Josè, let me know if you prefer the solution above to having \markboth
in the preamble.

-- 
Enrico
#LyX 1.4.4 created this file. For more info see http://www.lyx.org/
\lyxformat 245
\begin_document
\begin_header
\textclass IEEEtran
\begin_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. Using these versions, when you change the language,
% you have to accordingly substitute both 'ENGLISH' and 'english' below.
[EMAIL PROTECTED]@english
\end_preamble
\language english
\inputencoding default
\fontscheme default
\graphics default
\float_placement tbh
\paperfontsize default
\spacing single
\papersize default
\use_geometry false
\use_amsmath 0
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 2
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\end_header

\begin_body

\begin_layout Title
Your Title: And maybe a bit extra
\end_layout

\begin_layout Author
\begin_inset Note Note
status collapsed

\begin_layout Standard
Remember that initial submissions don't show the authors
\end_layout

\begin_layout Standard
names so you'll need to make this a 'Comment'.
\end_layout

\end_inset

Your Name, Your Co-Author
\begin_inset Foot
status collapsed

\begin_layout Standard
Your name is with xyz Department\SpecialChar \ldots{}

\end_layout

\end_inset


\end_layout

\begin_layout Abstract
This paper presents a simple template for IEEEtran documents.
 
\end_layout

\begin_layout Keywords
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
status collapsed

\begin_layout Standard
Don't panic the section numbering may look different in
\end_layout

\begin_layout Standard
LyX but LaTeX uses the correct Roman numerals and
\end_layout

\begin_layout Standard
Alpha for section counters.
\end_layout

\begin_layout Standard
It's just that LyX doesn't handle counters other than arabic
\end_layout

\begin_layout Standard
numerals.
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
PARstart{T}{here}
\end_layout

\end_inset

 is a need for a little Evil Red Text in the first paragraph.
 Refer to the IEEEtran documentation (sample document) for more details.
\end_layout

\begin_layout Section
Previous Work
\end_layout

\begin_layout Standard
This is only a template remember.
\end_layout

\begin_layout Section
Methodology
\end_layout

\begin_layout Theorem
\begin_inset ERT
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.
\end_layout

\begin_layout Lemma
If you don't want a theorem or lemma name don't add one.
\end_layout

\begin_layout Proof
And here's the proof!
\end_layout

\begin_layout Section
Results
\end_layout

\begin_layout Standard
\begin_inset Float figure
placement htbp
wide false
sideways false
status open

\begin_layout Standard
\align center

\family sans
A single column figure goes here
\end_layout

\begin_layout Caption
Captions go 
\emph on
under
\emph default
 the figure
\end_layout

\end_inset


\begin_inset Float table
placement htbp
wide false
sideways false
status open

\begin_layout Caption
Table captions go 
\emph on
above
\emph default
 the table
\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="2" columns="2">
<features>
<column alignment="center" valignment="top" leftline="true" width="0pt">
<column alignment="center" valignment="top" leftline="true" rightline="true" 
width="0pt">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\begin_layout Standard
delete
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
this
\end_layout

\end_inset
</cell>
</row>
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\begin_layout Standard
example
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
table
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Section
Conclusions
\end_layout

\begin_layout Standard
\begin_inset Note Comment
status collapsed

\begin_layout Standard
\begin_inset Note Note
status collapsed

\begin_layout Standard
Change this paragraphs style to 'Standard' to enable
\end_layout

\begin_layout Standard
BibTeX bibliography generation.
\end_layout

\begin_layout Standard
Remember though that your final submission is supposed to have
\end_layout

\begin_layout Standard
all the bibliography entries embedded in the latex file.
 This means
\end_layout

\begin_layout Standard
you eventually have to copy the .bbl file into the latex file and
\end_layout

\begin_layout Standard
remove the bibtex lines.
\end_layout

\end_inset


\begin_inset LatexCommand \bibtex[IEEEbib]{your_biblio_file}

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Biography
\begin_inset ERT
status collapsed

\begin_layout Standard

{
\end_layout

\end_inset

Your Name
\begin_inset ERT
status collapsed

\begin_layout Standard

}
\end_layout

\end_inset

 All about you and the what your interests are.
 Don't forget to put your name in between a pair of {}'s that are set as
 raw TeX.
\end_layout

\begin_layout Standard
\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

\begin_layout Biography
\begin_inset ERT
status collapsed

\begin_layout Standard

{
\end_layout

\end_inset

Coauthor
\begin_inset ERT
status collapsed

\begin_layout Standard

} 
\end_layout

\end_inset

Same again for the co-author.
\end_layout

\end_body
\end_document

Reply via email to