27

I'm using MiKTeX 2.9 and TeXniCenter for writing my thesis. I have a lot of packages and everything was going well, until last night that a blank page with ".0" written in the top left corner kept generating before my title page and still I cannot figure out how to remove it. Is there any kind of command that I can use except \let\cleardoublepage\clearpage?

I have been searching heavily but could not find a useful way. I'd appreciate any help.

16
  • 1
    What did you change, before this appeared? Can you post a MWE which shows this behaviour?
    – Chris
    Oct 22, 2013 at 22:01
  • 1
    @Michael I only added the appendix section which I don't think have anything to do with the blank page. Actually, I'm using a template for it and have not seen anyone facing such an issue. Regarding MWE, I don't think I'm able to do that! Oct 22, 2013 at 22:06
  • 1
    Btw, one more thing is that I'm not using \thanks in \author (there's only one author), so it's not about it if someone is thinking so. Oct 22, 2013 at 22:08
  • 2
    Something changed. But without more information, this seems like a very open-ended question. You should start by stripping away things you may have changed in the last couple of days to try and narrow down the problem. For example, remove any reference to the appendix (file) and recompile. If that still shows a problem, remove all the chapters except for the title content, and so forth...
    – Werner
    Oct 22, 2013 at 22:22
  • 4
    @ehsanmo: Yes, you can discard it using atbegshi's \AtBeginShipoutDiscard. I've done something similar in Compiling only a page range or page selection. The pagesel package can also help in that regard.
    – Werner
    Oct 22, 2013 at 22:31

9 Answers 9

45

For what it's worth or if all else fails, you can always remove the first page by adding the following to your document preamble:

\usepackage{atbegshi}% http://ctan.org/pkg/atbegshi
\AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}}

This should affect only the next shipout at the document start, which defaults to the first page.

7
  • 3
    Actually this solution in my experience works, but as a side effect it removes the index in PDF documents. I'm using LyX on Windows and the output is generated using XeTeX.
    – chirale
    Sep 21, 2017 at 9:31
  • Using this atbegshi package also removes \pagecolor setting Aug 27, 2020 at 11:09
  • wow this was really helpful! Dec 3, 2020 at 1:51
  • That makes the first page numbered page 2.
    – Geremia
    Jul 23, 2021 at 23:33
  • @Geremia: You can add \addtocounter{page}{-1} to the \AtBeginDocument content.
    – Werner
    Jul 24, 2021 at 16:31
30

Instead of chucking out the problem page, you should avoid generating it in the first place.

You're getting an extra page because something is producing output before \maketitle. You can even see the output: .0, as you report. So, my guess is that somewhere in your header you're assigning a decimal number to a counter that only accepts integers: E.g., 10.0 instead of just 10. The leftovers are treated as text, and printed on the first page. Examine your compilation messages (or .log file if necessary), and you should be able to spot the error. (If the error is ahead of \begin{document}, you'll get a very obvious complaint about that.)

If you have no such assignment in your preamble, then it's hidden in one of the packages you include. How could this happen? Most likely, one package redefines a command that another package then (mis)uses. A bit of experimenting should discover the two culprits. You can often avoid such problems by simply reversing their order of inclusion.

1
  • 2
    Moving \begin{flushleft} from before to after \maketitle fixed the problem for me. I only found out by trial and error. There was no warning or error stating that \begin{flushleft} was the problem.
    – keithphw
    May 25, 2020 at 2:50
4

I just discovered the following. Two blank pages before the title were generated when I tried to put blank lines (\ \\) between \author{} and \date{} commands. Namely, the following code generated the extra blank pages:

\title{title}

\author{name}
\ \\
\ \\
\date{year}

\maketitle

and this one did not:

\title{title}

\author{name}
\date{year}

\maketitle
1
  • 1
    Those lines are indeed useless. You should never have those in a document.
    – Johannes_B
    Nov 17, 2017 at 6:39
2

I keep on generating the numbered blank front page upon adding a one-page pdf as external material that served as the document's cover page. I was able to remove the blank front page when I added an even number of pdf pages, indicating the addition of two pages in the options tab with the command:

pages={1-2}

I am using the Tufte template, with two-sided document setting. Adding an odd-numbered appendix would have caused the blank front page.

1

Try clear all temporary files, then recompile your .Tex file.

3
1

Also consider .tex file encoding and line endings. Especially if developing goes under different platforms. For example, I solved similar problem just re-saving .tex file with UTF-8 encoding.

0

I solved the problem by writing

\begin{titlepage}

\title {My title plus the footnotes}

i.e. I put inside the brackets title plus footnotes and it worked!

1
  • 1
    If there is a titlepage enviroment, \title should not be used.
    – Johannes_B
    Nov 17, 2017 at 6:38
-2

Use either titlepage or \maketitle but not both.

1
  • 1
    This is more a kind of comment. Can you at least explain, whats the problem with using both and show how removing either titlepage or \maketitle can help. And please have a look into our Help Center, e.g., to learn how to use markdown and how to write good answers. Dec 1, 2017 at 10:31
-2

If you found symbol ~ in LaTeX file before or after \title, please remove it because it generate blank page before title page

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .