[Tugindia] Help with headers mistake in previous mail

V. Sharma vs272 at cam.ac.uk
Wed Sep 3 15:58:27 CEST 2003


There was a mistake in the previous message in the preamble so i am 
resending this with the correct preamble i am sorry for the goof up.


I am using the package fancyhdr in documentclass book(koma-script)onesided: 
\documentclass[12pt,oneside,english,liststotoc]{scrbook} I would like to 
use \include \input commands for different chapters of the master document. 
I would like different header styles to each chapter. I have some success 
but am unable to do it as above. I outline my attempt and request the list 
to suggest a solution. I have the following preamble

\usepackage{chapterbib}
\usepackage{cite}
\makeatletter\def\@cite#1#2{({#1\if at tempswa,#2\fi})}
\def\@biblabel#1{#1.}
\let\oldthebibliography=\thebibliography
\renewcommand{\thebibliography}{%
\makeatletter%
\renewcommand{\section}[2]{}%
\renewcommand\@mkboth[2]{}%
\oldthebibliography}
%\usepackage{rotating}%
\usepackage{textcomp}
\usepackage{rotfloat}
%\usepackage{dcolumn}

\usepackage{fancyhdr}
\pagestyle{fancy}
%\renewcommand{\chaptermark}[1]{\markboth{\MakeLowercase{#1}}{}}
%\renewcommand{\sectionmark}[1]{\markright{\MakeLowercase{\thesection\ #1}}}
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{#1}}{}}
\renewcommand{\sectionmark}[1]{\markright{\MakeUppercase{\thesection\ #1}}}
\fancyhf{} \fancyhead[RO]{\tiny\rightmark} \fancyhead[LO]{\small
\leftmark} \fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt} \fancypagestyle{plain}{
  \fancyhead{}
  \renewcommand{\headrulewidth}{0pt} } 
%_________________________________________________________________ I have 
the above preamble in the master document with chapters as separate files 
added as \include{chapter1} etc. The bibliography goes at the end of the 
master file. I then used the following in ERT placed just before the lists 
to prevent any header entry on the right side.{commenting out the 
\fancyhead[RO] command}


%________________________________________________________
\fancyhf{} %\fancyhead[RO]{\tiny\rightmark}
\fancyhead[LO]{\small \leftmark} \fancyfoot[C]{\thepage}
%________________________________________________________


I would like to change to the header setting of the chapters to what is set
up in the preamble when the chapter files are inputted. How do I do it? [In
a single Latex file (without any input/include files)placing the following
after the lists does the trick:
 %change the header on chapter pages
%________________________________________________ 
\fancyhf{}
\fancyhead[RO]{\tiny\rightmark} \fancyhead[LO]{\small \leftmark}
\fancyfoot[C]{\thepage}
% ____________________________________________


Further placing the following immediately before the \bibliogrpahy command
prevents the right header and gives the correct left header

%change the header on bibliography page
%________________________________________________________
\fancyhf{} %\fancyhead[RO]{\tiny
rightmark}
\fancyhead[LO]{\small \bibname} \fancyfoot[C]{\thepage}
%________________________________________________________]

It maybe more of a question for fancyhdr but I am sure the latex gurus would
have an answer to this

Thanks for your help


vivek





More information about the tugindia mailing list