• Home   /
• Archive by category "1"

## Bibliography Wrong Page Number Latex

Well, this is troubling. You really need to make a minimum working example, or we can't help you nearly as easily. When you don't provide a minimum working example, you're essentially asking the community to shoulder a burden to help you, rather than doing your best to answer it yourself first. That makes it much less likely that someone will help you, since it entails so much extra work.

Here, for example, your text doesn't even compile; there's no , and you have an ed file which we don't have any access to. You've also got a huge number of packages here, any one of which could be the culprit; you should remove them, one at a time, until you've got the minimum packages included in which you still encounter the problem.

Your problem here looks to be pretty simple, though, although it's hard to tell given the example we have an the information that we don't have; it looks like you're adding the contents line too late. That is, you're issuing after you've already included all the information for your chapter, so LaTeX gets its page number after the chapter information has been inserted and paginated. If you add it before that, right after you issue your command, you should be all right. Try this:

That resolved the problem on my install, with . Using instead didn't seem to make any difference. Of course, I didn't have the inputted file, so it's hard to say if that will make a difference. That's another place where a minimum working example would have helped everyone.

Hope that helps.

Page numbering in LaTeX uses Arabic numbers by default, but this can be changed to use Roman numerals and/or letters. You can also combine several numbering styles in a single document, this article explains how.

## Introduction

Setting a numbering style is straightforward

\documentclass{article}\usepackage[utf8]{inputenc}   \pagenumbering{roman}   \begin{document}\tableofcontents   \section{Testing section} ...   \end{document}

The command will set the page numbering to lowercase Roman numerals.

Open an example in ShareLaTeX

## Numbering styles

There are several numbering styles, at the introduction the lower-case Roman numerals were presented, let's see a second example:

\documentclass{article}\usepackage[utf8]{inputenc}   \pagenumbering{alph}   \begin{document}\tableofcontents   \section{Testing section} ...   \end{document}

As mentioned before, following command is used to set the layout of the page number.

Below, a list of styles available for page numbering:

• : arabic numerals
• : lowercase roman numerals
• : uppercase roman numerals
• : lowercase letters
• : uppercase letters

The position where the number appear in the page is determined by the page style used in the document. See the Headers and footers section for more information.

Open an example in ShareLaTeX

## Using two page numbering styles in a single document

In books, is customary to use Roman numerals for the pages before the first chapter/section, and Arabic numbers for the rest of the document. There are two commands available in the book document class that accomplish this:

\documentclass{book}\usepackage[utf8]{inputenc}   \begin{document}   \frontmatter   \addcontentsline{toc}{chapter}{Foreword}\Some text...   \addcontentsline{toc}{chapter}{Dummy entry} Some text...   \tableofcontents   \mainmatter   \chapter{First Chapter}   This will be an empty chapter...   \end{document}

The commands that control the page numbering are:

The pages after this command and before the command , will be numbered with lowercase Roman numerals.
This will restart the page counter and change the style to Arabic numbers.

Open an example in ShareLaTeX

If your document class is not book or you need more control over the page counter and the numbering style, see the next example:

\documentclass{article}\usepackage[utf8]{inputenc}\usepackage[english]{babel}   \pagenumbering{roman}   \begin{document}\tableofcontents   \section{First section}\setcounter{page}{3}   Some text here...   \section{Second section} Some more text here..   \section{Heading on Level 1 (section)}\pagenumbering{arabic}   More text here... \end{document}

In the example above the numbering styles are explicitly established and the counter set to a specific number. Below a description of each command is provided:

This command sets the page numbers to lowercase Roman numerals.
This will manually set the page counter to 3 in this page, subsequent pages are numbered starting the count from this one.
The page numbering is switched to Arabic, this will also restart the page counter.

Open an example in ShareLaTeX

## Customizing numbering styles

With the aid of the package fancyhdr we can customize how the page numbers are displayed. For example, if you want to put the current page number in the context of the page numbers in the whole document (1 of 120, for instance) you can do that as shown below:

\documentclass{article}\usepackage[utf8]{inputenc}\usepackage[english]{babel}\usepackage{fancyhdr}\usepackage{lastpage}   \pagestyle{fancy}\fancyhf{}   \rfoot{Page \thepage\hspace{1pt} of \pageref{LastPage}}   \begin{document}   \tableofcontents   \section{First section} Some text...   \section{Second section} More text...   \end{document}

Here, the package lastpage is imported by

so we can refer the last page of the document. Then we set fancyhdr to display on the downer right corner the text "Page n of All" where n is the current page and All is the last page. See the article about headers and footers for more concise information and examples about fancyhdr.

Open an example in ShareLaTeX