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.

does anybody know how to make the first page of the abbreviation list have the page number? My abbrev. list is made of 3 pages and only the other two have the correct page numbering (roman). The first page is plain.

\documentclass[12pt, a4paper]{report}

\linespread{1.6}
\usepackage{natbib}
\usepackage{color}
\usepackage{geometry}

\geometry{includeheadfoot,
  headheight=14pt,
  left=4cm,
  right=2cm,
  top=2.5cm,
  bottom=2.5cm}

\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage[intoc]{nomencl}

\makenomenclature

\usepackage{makeidx}

\makeindex

\usepackage{hyperref}

\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}

\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black}

\fancyhf{}
\fancyhead[C]{\thepage}
\pagestyle{fancy}

\fancypagestyle{plain}
\fancyhf{} 
\fancyhead[C]{\thepage}

\renewcommand{\headrulewidth}{0pt}
\renewcommand{\nomname}{List of Abbreviations}

\begin{document}

\pagenumbering{gobble}
\urlstyle{same}
\title{} \author{Andrea Lagna} \date{}

\maketitle

\renewcommand{\abstractname}{}

\begin{abstract}

\end{abstract}

\chapter*{Acknowledgments}

\tableofcontents
\newpage

\cleardoublepage

\pagenumbering{roman}

\listoffigures 
\addcontentsline{toc}{chapter}{List of Figures}
\thispagestyle{fancy} 

\listoftables 
\addcontentsline{toc}{chapter}{List of Tables}
\thispagestyle{fancy} 

\printnomenclature 
\thispagestyle{fancy} 

\pagenumbering{arabic}

\chapter*{Introduction}\addcontentsline{toc}{chapter}{Introduction} 
\thispagestyle{fancy} 

\nomenclature{ILT}{I Like This} 

\clearpage

\addcontentsline{toc}{chapter}{Bibliography}

\bibliographystyle{apsr}

\bibliography{bibliothesis}

\end{document}
share|improve this question
    
Welcome to TeX.sx! your example isn't really minimal. it contains several components (e.g. bibliography) that aren't needed, but more importantly, it doesn't generate any nomenclature file to illustrate the problem you inquired about. –  barbara beeton Jan 6 '13 at 13:29
    
hello thanks. sorry i'm new to latex. what do you mean to generate nomenclature file? Do you want me to upload the actual pdf page with the list of abbreviations? –  Andrea Lagna Jan 6 '13 at 13:38
    
you need some actual \nomenclature{...} entries in the file. they will cause a separate nomenclature file to be generated that will be read in by the \printnomenclature command. however, a \thispagestyle{...} command isn't read in until after processing of the preceding command is complete, so if you have a multi-page list (of any kind -- contents, list of tables, nomenclature, ...) the page style will be applied only to the last page of that section. i may not be able to help with that, since i don't use nomencl, but other potential assistants will need the "improved" file. –  barbara beeton Jan 6 '13 at 13:49
    
Thanks very much. I added the \nomenclature{} in the not so Minimal WE. That's interesting what you say. The fact is that the page number appears on the first page of both the LOT and LOF (but these two are only single-page lists) –  Andrea Lagna Jan 6 '13 at 14:09
    
any help? I'm submitting the thesis tomorrow and I'd love to sort out that issue. They're very strict with layout rules at my uni –  Andrea Lagna Jan 6 '13 at 14:57
add comment

1 Answer

I know I am late, but here is a solution: To have the first page of the nomenclature carry your fancy page style, issue

\renewcommand{\nompreamble}{\thispagestyle{fancy}}

in your preamble.

Moreover, to have the roman numbering continue through the nomenclature, issue a \clearpage after \printnomenclature, otherwise the following \pagenumbering{arabic} will be applied to the last page of the nomenclature. To summarize, it should look like this:

...
\renewcommand{\nompreamble}{\thispagestyle{fancy}}
\printnomenclature 
\clearpage
\pagenumbering{arabic}
...

The real problem, however, is the way you (try to) change the plain page style. This style will automatically applied on all first pages of chapters, so also on the first page of the nomenclature. You missed the braces, it should look like this:

\fancypagestyle{plain}{% an opening brace here
  \fancyhf{} 
  \fancyhead[C]{\thepage}
}% a closing brace here

That way, the redefinition of \nompreamble is not necessary.

share|improve this answer
    
Shouldn't this be \thispagestyle{plain} (as the nomenclature is a chapter)? –  lockstep Feb 16 '13 at 13:04
    
@lockstep No, as this leads exactly to the swallowed page number on the first page of the nomenclature. –  mafp Feb 16 '13 at 13:07
    
Strange ... normally, plain displays the page number. –  lockstep Feb 16 '13 at 13:09
    
@lockstep Of course. And now I see the real culprit... –  mafp Feb 16 '13 at 13:15
1  
Dang ... could it be \fancypagestyle}{plain} without a second argument? –  lockstep Feb 16 '13 at 13:17
add comment

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.