I have a problem with the listings of my latex document. I am using the "listings" 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.




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




        \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"





1 Answer 1


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.

\cleardoublepage % or \newpage

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.

  • Great! Thank you very much. This did the trick! Commented Oct 18, 2012 at 10:50
  • thank you so much for that ! Commented Aug 31, 2021 at 23:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .