Page Layoutwrong page number / bibliography

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

wrong page number / bibliography

Post by marie2011 »

Dear forum members,

I have encountered another problem and I was wondering if you have the solution. The problem I have is that the last page in my bibliography is page number “1” instead of being the last page in my work. After that page I have my appendixes. Attached you will find the last page of the bibliography.

The code I use in the main document is the following:

Code: Select all


\documentclass[12pt%
%,draft%
,twoside%
,BCOR10mm%
,bibtotocnumbered,
,toc=listof,
numbers=noenddot
]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish,ngerman,catalan,english]{babel}
\usepackage{color}
%\usepackage[round]{natbib}
\usepackage{natbib}
\usepackage{etex}
\usepackage{booktabs}
\usepackage{url}
\usepackage{paralist}
\usepackage{mystyle}
\usepackage{acronym}
\usepackage{graphicx}
\usepackage{appendix}
\usepackage{longtable}
\usepackage{color}
\usepackage{rotating}
\usepackage{tabularx}
\usepackage{enumitem}
\usepackage{caption}
\usepackage{pgfplots}
\usepackage{tabu}
\usepackage{lscape}
\usepackage{textcomp}
\usepackage{pdflscape}
\usepackage{geometry}
\usepackage{soul}
%\usepackage{legend}
\usepackage{tablefootnote}
\usepackage{afterpage}
\usepackage{ltxtable}
\captionsetup[table]{labelsep=quad} 
\captionsetup[figure]{labelsep=quad}


\addto\captionsspanish{%
%\renewcommand{\listfigurename}{Índice de Figuras}
\renewcommand{\listfigurename}{Índice de Figuras}
\renewcommand{\listtablename}{Índice de Tablas}
\renewcommand{\figurename}{Figura}
\renewcommand{\tablename}{Tabla}
\renewcommand{\bibname}{Referencias bibliográficas}
\renewcommand{\appendixname}{Apéndices}
\renewcommand{\appendixtocname}{Apéndices}
\renewcommand{\appendixpagename}{Apéndices}}


\raggedbottom

\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}


\begin{document}
\pagenumbering{roman}

\selectlanguage{spanish}

%%% Verzeichnisse 

 \ifpdf
   \tableofcontents
 \fi
{\listoftables
\let\cleardoublepage\relax
\let\clearpage\relax
\listoffigures
\let\cleardoublepage\relax
\let\clearpage\relax
\listofgraficos
}

%%% Hauptteil
\pagenumbering{arabic}



%\include{table}


\bibliographystyle{miapalike}
\ifpdf
\bibliography{mybibliography}
\else
\fi

\pagenumbering{arabic}
\include{aa-apendice}

\end{document}

%%% emacs stuff %%%
%%% Local Variables:
%%% TeX-PDF-mode: t
%%% mode: auto-fill
%%% ispell-local-dictionary: "castellano8"
%%% eval: (set-input-method "spanish-prefix")
%%% TeX-master: t
%%% End:

Sorry, I left all the packages I use.

And I included the following orders in the appendix part:

Code: Select all

\pagenumbering{arabic}
 \addtocounter{page}{-1}
  \appendix
  \clearpage % o \cleardoublepage
  \noappendicestocpagenum
  \addappheadtotoc
  {
  \makeatletter
  \let\ps@plain\ps@empty
  \appendixpage
  \makeatother
  }
As usual, many thanks in advance.

Best regards,

Marie
Attachments
wrong-page-bibliography.png
wrong-page-bibliography.png (22.19 KiB) Viewed 5663 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

wrong page number / bibliography

Post by Stefan Kottwitz »

Hi Marie,

\pagenumbering{arabic} resets the page number. End the page before you change the numbering:

Code: Select all

\cleardoublepage
\pagenumbering{arabic}
Stefan
LaTeX.org admin
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

wrong page number / bibliography

Post by marie2011 »

Hi Stefan,

Many thanks for your prompt answer. Indeed it works and the last page is no longer page "1". My problem now is that I have an empty page (i. e. without contents) with the right pagination (See attached document). Then I have the page with my appendixes. I was wondering if there is a solution for this problem.

Many thanks in advance.

Best regards,

Marie
Attachments
empty-page.png
empty-page.png (3.12 KiB) Viewed 5660 times
hugovdberg
Posts: 133
Joined: Sat Feb 25, 2012 6:12 pm

wrong page number / bibliography

Post by hugovdberg »

This is because \cleardoublepage makes sure your next section starts at a righthand, so odd-numbered, page. Since your bibliography ends at a righthanded page itself it inserts an extra blank page to make the appendices start on the right as well. If this is not desired you could use \clearpage instead, but make sure that's consistent with the rest of your layout (if each chapter starts on an odd-numbered page, please make your appendices do so as well)
Ubuntu 13.10 + Tex Live 2013 + Texmaker / Windows 7 Pro + MikTex 2.9 + TexnicCenter / Android 4.3 + TexPortal + DroidEdit
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

Re: wrong page number / bibliography

Post by marie2011 »

Hallo Hugovdberg,

Many thanks for your help. I have written down the difference and will make sure about the aspects you mentioned in your message.

Best regards,

Marie
Post Reply