5

I'm developing a template for articles and so far I've got the title_page.tex and main_document.tex all sorted out and I'm happy with that.

My problem is I also need to have a back page in the document. I'm finding this quite difficult.

For my title_page, I used the \begin{titlepage} group and then inserted it into the main document with \input{title_page.tex}. I've tried to make a similar .tex file for my back page, utilising the \begin{titlepage} environment.

I want my back page to go after my bibliography. When I insert this, the pagenumbering (I'm using lastpage package) messes up. Is there any way I can seemlessly bolt on a final page to my tex document?

[EDIT]

Thank you for the comments. I have stopped using the titlepage environment. To solve the issue with the page numbering, I just put:

 \addtocounter{page}{-1} 

on the back page file. I think that's all I wanted.

Thank you

6
  • 1
    Welcome! Do you mean a final even page, with a blank odd one if necessary? Commented Feb 28, 2017 at 14:54
  • Welcome to TeX.SE. The titlepage environment resets the page number, that's true, at least for book and article classes. In my opinion, you don't need such titlepage modifications for a back page Commented Feb 28, 2017 at 14:54
  • Hello, thanks for the replies! When I say "final page", I mean, a fancy looking graphical page which marks the end of the document. It's essentially a title page, but is the final page in the document. Does that make sense? Commented Feb 28, 2017 at 14:58
  • Have you tried just using \clearpage? If so, what made that a wrong choice? Commented Feb 28, 2017 at 15:11
  • I have used \clearpage -> \pagestyle{empty} and then specified the page. I think what I basically need to do is make "lastpage" stop incrementing beyond the bibliography. Then everything would work fine. Commented Feb 28, 2017 at 15:19

1 Answer 1

7

Most likely, the last page must be an even-numbered one, even if it is not numbered.

You have to clear the content pages first, and check if the new page is an odd-numbered one. If this is the case, put dummy content on it, i.e. a \null and clear again with `\clearpage.

In order to forbid lastpage to go beyond the last real page (i.e. not the back page, I have chosen to use \SuspendCounters from xassoccnt:

\documentclass{book} \usepackage{graphicx} \usepackage[backend=biber]{biblatex} \usepackage{lastpage} \usepackage{xassoccnt} \usepackage{blindtext} \makeatletter \newcommand{\finalpage}[1]{% \clearpage% Clear first \SuspendCounters{page} \pagestyle{empty} \ifodd\c@page % Now, is it odd? \null% 'fill` and clear again \clearpage \fi #1% Plase the content } \makeatother \addbibresource{biblio.bib} \begin{document} There are \pageref{LastPage} pages in here! \tableofcontents \blinddocument \cite{Lam94} \printbibliography \blindtext[100] \finalpage{% \begin{center} \includegraphics[scale=1]{ente} \end{center} } \end{document} 

Here is the ente.jpg image.

enter image description here

7
  • You can also use \cleardoublepage Commented Feb 28, 2017 at 15:18
  • @Philipp: That would leave the back page at an odd-numbered page Commented Feb 28, 2017 at 15:21
  • I'm not quite sure if the my page numbers being odd or even is the issue. I think I just need "lastpage" to stop increasing beyond the bibliography. Commented Feb 28, 2017 at 15:21
  • @user1147964: Yes, I will attack that as next problem ;-) Commented Feb 28, 2017 at 15:22
  • @user1147964: See the update, please Commented Feb 28, 2017 at 15:30

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.