LB wrote:
> Hello
>
> I have more of a latex question but I'm hoping that somebody would
> know the answer.
>
> I'm using Lyx 1.4.3 on Windows XP. The document I'm writing is in Book
> class.
>
> I'm writing a large document with a few chapters, sections and
> appendices. What I would like is to have a chapter name, section name
> or appendix name appear on the top of the page.
> For example if the current page is from "Chapter 1 Title of chapter 1"
> then on the top of the pages in this chapter I'd like to see "1 Title
> of chapter 1". As soon the reader reaches "Section 1.1 Title of
> section 1.1" the header would change to "1.1 Title of section 1.1"
> I'd like appendices to be handled like chapters. BTW to create
> appendix I have in ERT \appendix and then all subsequent chapters
> become appendices.
>
> I found the following code:
>
> \setlength{\headheight}{15pt}
> \pagestyle{fancy}
> \renewcommand{\chaptermark}[1]{%
What follows marks only the left-hand (odd) pages, and does nothing if
you're using single-sided.
> \markboth{\chaptername
> \ \thechapter.\ #1}{}}
So you probably want either:*
*    \markboth{\chaptername\ \thechapter.\ #1}{\chaptername\
\thechapter.\ #1}}
if you're doing double-sided, or:
    \markright{\chaptername\ \thechapter.\ #1}
if you're not.

Richard
**
> \fancyhf{}
> \fancyhead[LE,RO]{\thepage}
> \fancyhead[RE]{\textit{\nouppercase{\leftmark}}}
> \fancyhead[LO]{\textit{\nouppercase{\rightmark}}}
> \fancypagestyle{plain}{ %
> \fancyhf{} % remove everything
> \renewcommand{\headrulewidth}{0pt} % remove lines as well
> \renewcommand{\footrulewidth}{0pt}}
>
> which does put the section names in the header but it does not put
> chapter names nor appendix names in the header.  How can I modify this
> to include chapter names in the headers?
>
> Thank you very much
> Leo
>


-- 
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Reply via email to