On Fri, 13 Feb 2004, Guy Hindell wrote: > First off, I'm no expert in Lyx or latex. However, I have recently been > trying to achieve a similar effect, in my case trying to make sure that > the preface (which I have after the TOC) has roman page numbers in the > footer rather than Arabic. After a bit of trawling usenet I found out to > use the \frontmatter command before my preface, and \mainmatter before the > first 'real' chapter. These clear and then reset a flag (@mainmatter) in > the book.cls file which controls the behaviour of the chapter headers, > page numbers etc. The preface chapter can then, surprisingly, be set as a > numbered chapter (which means it appears in the TOC) but because of the > different way the chapter header commands react to the setting of the > @mainmatter flag it doesn't get given a chapter number.
The parts of the book class (and its derivatives) is well covered in the LyX docs. In my case, the Preface is not a numbered chapter, but can be added to the ToC with this ERT: \addcontentsline{toc}{chapter}{Preface} \pagenumbering{roman} \setcounter{page}{1} \markboth{Preface}{Preface} The last command adds the text, "Preface", to both sides of each preface page after the first one. This is the same header format as for the ToC. At the end of the Preface is this ERT: \mainmatter \pagestyle{fancy} This changes page numbering to Arabic, starts with page number 1 and puts the chapter and section names in the header, both in all uppercase. Juergen pointed me to the \mark[left|right|both] command yesterday. A bit of experimentation and I understood how to use it. I would be delighted if there was an annotated index of _all_ LaTeX commands. Most of the time I have no idea of what command I need. I would never have found \markboth since I was looking under "chapter" and "header" for clues. Rich -- Dr. Richard B. Shepard, President Applied Ecosystem Services, Inc. (TM) <http://www.appl-ecosys.com>