LyXIndex - Indexpagestyle

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Jarrod
Posts: 2
Joined: Wed Dec 15, 2010 2:48 pm

Index - Indexpagestyle

Post by Jarrod »

Hello everybody,

I've started to work with Lyx and MiKTeX on Windows to migrate documentation from OpenOffice to Latex. The first steps went well and I suceed to change the overall layout to the given requirements.

I'm a newbie to LaTeX, so I'm stuck concerning the following item:
The page style of the first page of the index won't be the same style as all the other pages.

Currently I'm using "fancy" because I need to modifiy, header and footer also based on odd/even pages.

I searched a lot of forums, also the documentation of the Koma script but could not get it working.

This is what I understood so far.
When the index is printed, the layout is changed back to a default layout.
The command \indexpagestyle{fancy} can be used to change that.
I tried to add this command to the preamble or other positions.
Either LaTeX pops up with an error message or the command is ignored.
Either way the first index page would stay with the default page style.

Attached please find the sample code to reproduce this.

I would appreciate any hint or solution.

Thanks in advance

Jarrod
Test2.txt
Sample code
(4.04 KiB) Downloaded 210 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Index - Indexpagestyle

Post by meho_r »

You should redefine plain page style, which is automatically applied as you noticed. Short version:

Code: Select all

\makeatletter
\let\ps@plain\ps@fancy
\makeatother
The code goes either into the preamble or into an ERT box. Also, take a look here and here for more infos.
Jarrod
Posts: 2
Joined: Wed Dec 15, 2010 2:48 pm

Index - Indexpagestyle

Post by Jarrod »

Thanks a lot for your help!
I redefined the plain style in the preamble and it worked perfectly - for the Table of Contents as well as for the Index pages.

I've uploaded the corrected code sample, if somebody else might wonder how to apply this...
Test2.txt
(4.31 KiB) Downloaded 248 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Index - Indexpagestyle

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic accordingly as written in Section 3 of the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.


Best regards and welcome to the board
Thorsten
Post Reply