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 have a problem with the listings of my latex document. I am using the "listing*s*" package (not the "listing" package).

Although the pagenumbering is still set to "roman" right after the titlepage, the \lstlistoflistings command produces a page where the numbering is "arabic". Apparently I am not the only one with that problem. Is this maybe a bug of the listings package? Can somebody help me with this?

Here is a code sample of my .tex file.

    ...
    \begin{document}
    \dominitoc[e] 
    \pagestyle{empty}

    \include{titlepage}

    \pagenumbering{roman}

    \include{firstquote} % page numbering ok "i"
    \include{preamble} % page numbering ok "ii"

    \pagestyle{headings} 

    \include{abstract}

    \begin{spacing}{1.2}

        \renewcommand{\contentsname}{Table of Contents}
        \tableofcontents % page numbering ok "iii"
        \listoffigures % page numbering ok "iv"
        \listoftables % page numbering ok "v"
        \lstlistoflistings % here is the page that produces de problem, page numbering "1"

    \end{spacing}

    \pagenumbering{arabic}

    \addtolength{\parskip}{0.25\baselineskip}

    \include{chapters/01-introduction}
    ...
share|improve this question

migrated from stackoverflow.com Oct 18 '12 at 10:10

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer 1

up vote 3 down vote accepted

You have reset the page numbering to \arabic by \pagenumbering{arabic}. The page numbering style is used that is active, when the page is shipout. Add a \newpage, \clearpage, or \cleardoublepage before.

\begin{spacing}{1.2}
  ...
  \lstlistoflistings
\end{spacing}
\cleardoublepage % or \newpage
\pagenumbering{arabic}

Consider using \frontmatter and \mainmatter, if you are using a document class that provides it (book, memoir, …). These commands take care of starting new pages and the page numbering.

share|improve this answer
    
Great! Thank you very much. This did the trick! –  theblubberin Oct 18 '12 at 10:50
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.