Rich Shepard wrote:

  I'm using lyx-1.3.5 on linux with the koma-script report class. The
preamble set up fancyheaders:

\usepackage{fancyhdr}
\pagestyle{fancy}

I recommend you drop the above two lines, and use the support in lyx:
layout->document and set "page style" to "fancy". If pagestyle is
set to anything else it might override the preamble. If it is indeed
set to "fancy" then this preamble stuff becomes superfluous. You will still need
the rest as lyx doesn't have a dialog for setting up the fancy header.


\fancyhf{}
\fancyhead[LE,RO]{\slshape \rightmark}
\fancyhead[LO,RE]{\slshape \leftmark}
\fancyfoot[C]{\thepage}
%\renewcommand{headrulewidth}{0.4pt}
%\renewcommand{footrulewidth}{0pt}

  (I got compile errors about the foot rule so I commented those out.)

So far I've only begun the Introduction so I have only one page beyond the
title page. That page is numbered (right-aligned, not centered) as '3'. So I

My guess is that layout->document is overriding the pagestyle.

pulled down TLC2 looking for the \resetcounter{page}{} command, but could
not find it. I did find a reference to \pagenumbering, but the compiler got
indigestion over that and spit it out. I also tried
\renewcommand{\thepage}{1} in a couple of locations around the first chapter
heading, but that too was violently regurgitated.

Use \setcounter{page}{1}. Don't "renew" a counter, use \setcounter. There are also commands for doing math on counters if you ever need that.

When doing preamble work, always take a look at the various layout->document
options to see if support (or partial support) exists already. If support exists
(such as for fancy headers) use that. If a setting is offered for something but your alternative isn't listed, then you have to use the preamble. In such cases, leave
the setting at "default", so it doesn't override the preamble with some
explicit setting.


Helge Hafting

Reply via email to