3

Edit: it was suggested that there is a case of duplication. There is no case of a duplicate, because this question specifically concerns only removing page numbers on supposedly empty pages, while the suggested earlier question concerns removing every element on a supposedly empty page. Obviously, as reason dictates, these are not the same nor can they ever be. Furthermore, to then explain why the suggested possible solution did not work is irrelevant. End Edit.

Arrgh!

That was an expression of my real physical groan.

After having looked around the internet for a long time, my LaTeX manual, and after having wrestled with the markup code, using LuaLaTeX, I still haven't come to a solution for such a simple matter.

I have a book document, where there is for example a titlepage starting on the right odd-numbered page, after which there is immediately a copyright page on the left, a blank page or two or so, and then an introductory text, and then the start of a chapter after some blank pages starting on the right, and at the end of it all a bibliography.

The problem is that it seems so tedious or cumbersome to easily remove the page numbers off pages supposed to be blank.

I had managed to do it to some extent (after looking around), for example, between the copyright page and the introductory page, using things like \break and \pagenumbering{gobble} and \setcounter (EDIT: and \pagestyle{empty}) (and so on) but sometimes, for example between the introductory text and the first chapter, the text of the ending page of the introductory text gets torn apart over the whole of its ending page. (The same kind of problem I had at the end of the document, where I inserted some new pages (with a custom command I will show in this post) to have a total page amount directly divisible by two: in this case the text on the ending page of the bibliography gets torn apart.)

Sometimes the wrong page number was removed, so I had to play with the code to get the desired effects, but then that may still leave the above problem.

There has to be some person out there who, by reading this post, already has a good idea of what's going on. I have the suspicion that the solution is very simple.

Let me post a few snippets of code:

\documentclass[12pt, a4paper, titlepage]{book}
\usepackage{polyglossia} 
\setmainlanguage{english}
\usepackage{paracol,fontspec}

\usepackage{etoolbox}

\usepackage{fancyhdr}
\pagestyle{plain}

%% make new command for empty page
\newcommand*\NewPage{\newpage\null\newpage}

The fontspec and paracol packages are not used in this document, and never seemed to give me any problem with compiling.

Arrrrgh! (Another expression of my physical groan.) I've become tired of it.

What is the most straightforward, easy, proper way to remove page numbers on (in-between) pages supposed to be blank?

Possible subquestion: is there a simple overall/general command to automatically suppress such page numbers?

7
  • I thought about just getting PDF software, such as Foxit's PhantomPDF, if at all a good choice, to simply manually remove the page numbers. This may be a good option, since I need a certain flavor of PDF/X anyway. I also considered the novel package, and that I might shoehorn it to my use case, though it is maybe too late right now in the process. But I would still want to have an answer, and then do it immediately in LuaLaTeX.
    – Usor
    Oct 18, 2019 at 11:54
  • It is indeed possible, campa. I hope to get back at that as soon as possible.
    – Usor
    Oct 18, 2019 at 13:32
  • I tend to think that there is no case of a duplicate, because this question specifically concerns removing page numbers on supposedly empty pages, while the suggested earlier question concerns removing every element on a supposedly empty page. The suggestion of the package emptypage did not, by the way, solve the problem for this question, if one thought that it would work here.
    – Usor
    Oct 18, 2019 at 16:07
  • I suggest you edit your question and explain directly why this is not a duplicate and why the answers to the suggested duplicate don't help instead of referring to the comments (having to look up things in the comments is always more work and comments are supposed to be temporary in nature).
    – moewe
    Oct 18, 2019 at 18:34
  • 1
    @Usor: Can you be more forthcoming with your setup? That is, provide a (minimal) document that starts with \documentclass and ends with \end{document} that replicates your behaviour? See I've just been asked to write a minimal example, what is that? Once we have something we can work with, we'd be able to provide you solutions far quicker and more accurately. Can you do that?
    – Werner
    Oct 19, 2019 at 1:59

4 Answers 4

4

Upon starting new chapter with \chapter{...}, the book class calls \cleardoublepage in the background leaving an empty page (if needed) with plain page style active.

You should change the behavior of \cleardoublepage, put this into preamble:

\let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{\clearpage{\pagestyle{empty}\origdoublepage}}
\let\cleardoublepage\clearemptydoublepage
12
  • 1
    Thanks for the post. I will try it out and hope to let you know as soon as possible.
    – Usor
    Oct 18, 2019 at 12:26
  • Your solution works (and I will upvote it, though it does not display (yet)), but only works for the parts where the chapter matter is indeed relevant. It was a breath of fresh air, but the tearing apart of the text still occurs on the ending page of the last chapter (after which I use \NewPage) and on the ending page of the bibliography (after which I again use \NewPage two times). Am I missing something maybe?
    – Usor
    Oct 18, 2019 at 13:36
  • 1
    Thanks for your extra posts. I hope to have some time this weekend to follow it. I will let you know as soon as possible.
    – Usor
    Oct 18, 2019 at 14:30
  • 2
    Please edit your original post and provide MWE for the remaining issues.
    – ivankokan
    Oct 18, 2019 at 17:09
  • 1
    Yes, obviously, heh heh.
    – Usor
    Oct 24, 2019 at 13:40
1

Don't mess with this.

LaTeX styles distill centuries (literally) of experience in designing document layouts. You might find it ugly or meaningless, but a lot of work by experts earning their living on such decisions went into making it just like it is today.

1
  • 1
    I know. That is why I like LaTeX. But it is good practice to remove page numbers from pages with no text nor anything else but page numbers, or that is at least what I learnt about the matter.
    – Usor
    Oct 24, 2019 at 11:40
0

The comment by @ivankokan is spot-on. I have also written a package, clrdblpg, which will do this for you (or, alternatively, give blank pages whatever page style you want). Simply do the following:

\usepackage{clrdblpg}

And you're done, as the default is that pages produced by \cleardoublepage are blank. Alternatively, to make this fact explicit, you can do:

\usepackage[style=empty]{clrdblpg}

This will have the same effect. Put whatever page style you want, though it sounds like this is what you're looking for. The package is on CTAN.

1
  • Thanks. I hope to look into that soon.
    – Usor
    Oct 24, 2019 at 11:41
0

I had a similar problem, though I only needed a single empty page, not double. I solved it this way:

% Empty Page
\pagebreak
\phantom{a}
\thispagestyle{empty}
\pagebreak

\thispagestype{empty} removes the page number from this specific page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.
https://tex.stackexchange.com/questions/512723/easily-remove-page-numbers-for-blank-pages-book-class
tex.stackexchange.com
crawl=CC-MAIN-2022-21
268682
application/http; msgtype=response
sha1:L3MB6TJNLYDZEJKPTE3252GW6KSXPGE5
<urn:uuid:cf190563-7634-4db2-be16-3cf80692820e>
2022-05-19T14:46:56Z
151.101.1.69
text/html
sha1:YP66H3JP4KX3HN2NRIFP57OHHEH5KMLG
<urn:uuid:2b5f4177-d005-49eb-a6b3-72224ea8fcdd>
https://tex.stackexchange.com/questions/512723/easily-remove-page-numbers-for-blank-pages-book-class
response
<urn:uuid:c9b0b48e-4f30-4fcb-90b6-e3d6eda376f6>
isPartOf: CC-MAIN-2022-21
publisher: Common Crawl
description: Wide crawl of the web for May 2022
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-26
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/