# Fix page numbering format for latex listings package (lstlistoflistings)

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"

\include{abstract}

\begin{spacing}{1.2}

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

\include{chapters/01-introduction}
...

-

## migrated from stackoverflow.comOct 18 '12 at 10:10

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

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.

-
Great! Thank you very much. This did the trick! –  theblubberin Oct 18 '12 at 10:50