Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to know how we include header and footer over Table of Contents, List of Figures and Nomenclature? Do we need to renew any command? or any package is used to do that? Sample script would be helpful. I also want to get rid of page count on nomenclature page. Instead I want to start it on Introduction page. I am also interested to know whether we can put header and footer on Ist page of chapters?

The Sample Script is:

\documentclass{report}
\usepackage{titling}
\usepackage{fancyhdr}
\usepackage{lipsum} % for dummy text only

% Nomenclature
\usepackage{nomencl}
\makeglossary

\makeatletter

\newcommand\ackname{Acknowledgements}
  \newenvironment{acknowledgements}{%
      \begin{center}%
        \bfseries \ackname
        \@endparpenalty\@M
      \end{center}}%
     {\par}

 \newcommand\abname{Abstract}
  \newenvironment{abstracts}{%
      \begin{center}%
        \bfseries \abname
        \@endparpenalty\@M
      \end{center}}%
     {\par}


% These commands follow the titling package format for titles
% They define user commands to format the subtitle
\newcommand\presubtitle[1]{\gdef\@presubtitle{#1}}
\newcommand\postsubtitle[1]{\gdef\@postsubtitle{#1}}
% This command takes the subtitle as its argument, and uses the titling command
% \maketitlehookb plus the previously defined formatting commands to insert
% the subtitle into the titlepage. It also generates \thesubtitle for subsequent use
\newcommand\subtitle[1]{%
  \renewcommand{\maketitlehookb}{\@presubtitle#1\@postsubtitle}
  \newcommand\thesubtitle{#1}}
\makeatother
% Now we define the formatting for the subtitle
\presubtitle{\begin{center}\Large} % change this as needed
\postsubtitle{\end{center}}
% Now enter the regular title information, with the new \subtitle command
\title{My Thesis Title}
\author{A.M. Author}
\subtitle{My subtitle}

\lhead{\begin{tabular}{@{}l}\thetitle\ -- \thesubtitle\\\theauthor\end{tabular}}
\chead{}
\rhead{\begin{tabular}{r@{}}\leftmark\\\today\end{tabular}}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
% Set the width of the header rule. Make 0pt to remove the rule.
\renewcommand{\headrulewidth}{.5pt}
\renewcommand{\footrulewidth}{0.1pt}
% Make the head height match the size of the header
\setlength{\headheight}{24pt}
\pagestyle{fancy}
% Remove "Chapter" from the marks
\renewcommand{\chaptermark}[1]{%
  \markboth{\thechapter.\ #1}{}}
% These commands set up the headers. They are set up for even and odd pages the same
% Check the fancyhdr documentation for information on how to set them differently
% for odd and even pages




\begin{document}

\lipsum[1]

\pagenumbering{roman}

\lipsum[1]



\tableofcontents
\listoffigures
\printnomenclature
%% Print the nomenclature
\addcontentsline{toc}{chapter}{Terminology/Notation}

\setcounter{page}{1}
\pagenumbering{arabic}

\lipsum[1]


\appendix
\lipsum[1]

\bibliographystyle{plainnat}
\renewcommand{\bibname}{References} % changes default name Bibliography to References

\end{document}
share|improve this question
1  
Well it depends on your class. So to mimic your request: "sample script is helpful". –  Ulrike Fischer Jan 31 '12 at 13:15
    
Thanks for your effort! I went ahead and simplified your example a bit more, just to show you what I meant. Note that there's still a lot more to take out, stuff that isn't related to your problem at all. –  doncherry Jan 31 '12 at 14:23
1  
Just as an example, here's what a MWE might look like for your problem (I didn't include the nomenclature because I'm not familiar with that package): \documentclass{report} \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy} \begin{document} \tableofcontents \listoffigures \chapter{Foo} \lipsum[1] \begin{figure} Hello World \caption{My great figure} \end{figure} \end{document} –  doncherry Jan 31 '12 at 14:35

1 Answer 1

Add \thispagestyle{fancy} to each of the pages on which you're missing your page style:

\tableofcontents\thispagestyle{fancy}
\listoffigures\thispagestyle{fancy}
\printnomenclature\thispagestyle{fancy}

\thispagestyle only affects the page style of the current page, unlike \pagestyle, which sets a page style for the remainder of the document (unless it's changed again). I'm assuming \pagestyle doesn't work for these pages in your document because each of the commands triggers a \thispagestyle{plain} (i.e. only page numnber), which overrules the standard page style. The adaption I'm suggesting overrules that \thispagestyle{plain} yet again and yields the desired result.

If you don't want any headers and footers at all, use the page style empty, i.e. \thispagestyle{empty} on your nomenclature page.

share|improve this answer
    
I am getting "List Of Figures" on header for Nomenclature..How can i modify to get "Terminology/Notation" instead of List Of Figures? –  volatNumbers Jan 31 '12 at 16:21
    
also the page count is starting from Nomenclature instead of Introduction..What should be included to get rid of this error? –  volatNumbers Jan 31 '12 at 16:24
    
@volatNumbers These problems should be asked as separate questions (first make sure they haven't been asked via the search function). Once again, this site's purpose isn't resolving people's situations but providing answers to specific single problems, thus helping people to deal with their specific situations. –  doncherry Jan 31 '12 at 16:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.