On 15. juli 2010 13:49, Hellmut Weber wrote:
On 15.07.2010 03:42, Julien Rioux wrote:
On 13/07/2010 11:46 AM, Hellmut Weber wrote:
Hi list,
i don't remember whether this has already been discussed in this list...
I have a document (based on koma article) in which i use fancy headers.
That works very well in the main part of the document, but the the first
page of the index (at the end of my document) doesn't show any header or
footer information (not even a pager number).
On the second page of the index the header and footer info appears
correctly.
What can I do to get the header and footer strings on the first page of
the index?
TIA and happy LyXing
Hellmut
I don't know if it would work, but you could try Insert> TeX Code just
before the index, and fill this TeX Code box with
"\thispagestyle{plain}" or "\thispagestyle{fancy}"
If this doesn't work, you at least have some more keywords to try in
google.
Cheers,
Julien
Hi Julien,
thanks for your reply ;-)
You proposal helped me to pin down the effect somewhat more.
Since i'm using the koma scrlttr2 class i had to use the command
\thispagestyle{scrheadings} (which is used in my stye file for this
document too.
This doesn't solve my problem, though.
It seems that the LaTeX command \printindex{} which is generated by LyX
is the culprit.
I suppose it issues a command like \thispagestyle{empty} because it is
starting sort of a new chapter.
Exactly. The index is a chapter, like any other chapter. So it starts
with a "chapter-start" page. With koma-script, you can decide what a
chapter page should look like. And even better, you can select the style
for the index start page specifically. Try putting this in
your preamble, in order to have "scrheadings" on the index page:
\renewcommand{\indexpagestyle}{scrheadings}
Should work without further workarounds. "view->pdf" from LyX worked for
me with a test index.
\indexpagestyle can be set to any style that is supported by
\pagestyle and \thispagestyle. "plain", "scrheadings", and so on. The
latter also needs \usepackage{scrpage2}
See scrguien.pdf (comes with the latex koma-script packages) for more info.
Following this route i found a workaround. Her it is (in the hope that
may be helpful for somebody else)
* export my lyx file to LaTeX (pdflatex)
* run pdflatex from the command line on this a first time
(which generates an *.idx file)
* run makeindex on this file (without extension)
(which generates an *.ind file which will be input during the next
pdflatex run)
In my reply to your personal account i forgot the most important point ,-(
*** Edit the *.ind file ***
After the first line
\begin{theindex}
add the line
\thispagestyle{scrheadings}
* final run of pfdlatex on the *.tex source file
And here we are, the first page of the index has the desired header and
footer lines.
Happy LyXing
Hellmut