>>
>>>>>
>>>>> You may refer to running headers with \leftmark and \rightmark.
>>>>> AFAIR, most classes require no other options than \pagestyle{fancy}
>>>>> to get these. What happens if you don't redefine \chead and \rhead as
>>>>> empty ?
>>>>>
>>>>>
>>>>
>>>>I don't know how \leftmark and \rightmark works.
>>>>
>>>>If i don't redefine \chead and \rhead then the chapter is presented in
>>>> the
>>>>header. that's ok, but chapters with no numbering are not displayed.
>>
>>
>> They won't work for unnumbered chapters.
>> Here I define commands for unnumbered chapters:
>> this one sends the chapter title in the TOC and on both right and page
>> headers,
>> but the page where the chapter begins:
>> \newcommand{\tocchap}[1]{\addcontentsline{toc}{chapter}{\protect\numberline
>> {}#1}\markboth{\textsc{#1}}{\textsc{#1}}\thispagestyle{plain}}
>> this one is the new \chapterstar to be used instead of \chapter*
>> \newcommand{\chapterstar}[1]{\chapter*{#1}\tocchap{#1}}
>> and the layout of the document is edited to get chapterstar in the style
>> list.
>>
>>>>The easiest thing would be just a macro like "\thepage", which give's
>>>> me
>>>>the name of the chapter.
>>
>> The command name is \chaptername, but it's more appropriate to use
>> \chaptermark and
>> \leftmark command to manage these: \chaptermark defines the running
>> header
>> and \leftmark retrieves it,
>> see the Companion for explanantions.
>>
>> I use fancyplain here, and a complete customization of the running
>> headers
>> for a report:
>> \renewcommand{\chaptermark}[1]{
>> \markboth{\textsc{\thechapter.\ #1}}{}}
>> \renewcommand{\sectionmark}[1]{
>> \markright{\textsc{\thesection\ #1}}}
>>
>> \rhead[\fancyplain{}{\it\leftmark}]{\fancyplain{\rm\thepage}{\rm\thepage}}
>> \chead{}
>> \lhead[\fancyplain{\rm\thepage}{\rm\thepage}]{\fancyplain{}{\it\rightmark}}
>>
>
>
> thank you for your code. it helps me to understand little more. the
> following code makes what i want -- but not for chapters with no
> numbering. why, please? how to fix?
>
> \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
> \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
> \lhead{\nouppercase{\leftmark}}
> \chead{}
> \rhead{}
>
>



i have just found a solution by myself. when i insert "\markboth{xxx}{}"
below the chapters without numbering (where "xxx" is the title of the
chapter), then the name of these special chapters are visible, too.

thank you



Reply via email to