Page Layoutsavetrees | Keep Page Numbers

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
TheNinjaWizard
Posts: 7
Joined: Sun May 15, 2011 11:33 pm

savetrees | Keep Page Numbers

Post by TheNinjaWizard »

Hi.

I'm using the savetrees package, which works excellent, except I want to keep the page numbers. Does anyone know how I can keep them in the document?

I tried reading through the savetrees manual, but I couldn't see where they remove the page numbers, and adding "\setcounter{page}{3}" didn't work either.

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

savetrees | Keep Page Numbers

Post by localghost »

No problem here.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{savetrees}
\usepackage[math]{blindtext}

\title{A Title}
\author{An Other}

\begin{document}
  \maketitle

  \blinddocument
\end{document}
Well then?


Thorsten
TheNinjaWizard
Posts: 7
Joined: Sun May 15, 2011 11:33 pm

savetrees | Keep Page Numbers

Post by TheNinjaWizard »

Thank you for answering!

I compiled your minimum file, and the page numbers appeared just like they are supposed to.

After some testing I discovered that the problem wasn't caused by savetrees, but by combining savetrees and fancyhdr. In the following example I get the page number 1 on the first page, but on the second page the page number has simply disappeared.

(Also, the page numbers are supposed to appear on the right hand side, but that works fine in my document so it's no big deal).

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{savetrees}
\usepackage{blindtext}
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhead[RO,RE]{\textbf{TITLE}\\Subtitle}
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,RO]{\thepage}

\title{A Title}
\author{An Other}

\begin{document}
  \maketitle

  \blinddocument
\end{document}
TheNinjaWizard
Posts: 7
Joined: Sun May 15, 2011 11:33 pm

savetrees | Keep Page Numbers

Post by TheNinjaWizard »

Actually, the number didn't disappear, it just appeared on the top left for some mysterious reason. When I tried to place it there intentionally with

Code: Select all

\fancyhead[LE,LO]{\thepage}
the page number really vanished. :)

If you know some nice way to fix this, that would be great, but if not I'll just leave the page numbers out. It's just a 10 page document anyway.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

savetrees | Keep Page Numbers

Post by localghost »

Still no problem here (except for a warning about 'twoside' option and two more concerning too small \footskip and \headheight). Next try.
TheNinjaWizard
Posts: 7
Joined: Sun May 15, 2011 11:33 pm

Re: savetrees | Keep Page Numbers

Post by TheNinjaWizard »

I appreciate the help, but I don't think I'm going to spend any more time with this right now. I have to work on the document itself, not the LaTeX-details. 8-)

Thanks!
Post Reply