8

Is there a way to suppress the first page of my output pdf in latex and start on the second page?

Thank you

Sarah
  • 103
  • 1
    I am not sure I follow: do you want to import an existing PDF file into your document, beginning with page 2? Or suppress the first page of your output? – Ingmar Apr 11 '21 at 09:59
  • 3
    What exactly are you trying to do? Do you want to include an external pdf into your tex document? How do you want to include your file (includepdf, includegraphics, ...)? – Οὖτις Apr 11 '21 at 10:02
  • 1
    I am trying to suppress the first page of my output. – Sarah Apr 11 '21 at 12:32
  • 2
    But why are you trying to do this? The first page is the most useful part of the document. Are you trying to have a different first page? What will it be? How are you intending to create the final document with the different first page? Or is there something else going on? – Teepeemm Apr 11 '21 at 16:44
  • 2
    What exactly is on the first page? Is it a titlepage, for example created through the \make title command? – leandriis Apr 12 '21 at 05:50
  • Yes, there is something wrong. Somehow my latex does not print the title page as my first page, but a blank page only with: 3.3.30Bsp.3.3.3 . I am not sure why latex does this, I cheked whether I put something similar before \begin{document}, but that is not the case. – Sarah Apr 12 '21 at 12:12

2 Answers2

18

The simplest way is to use the pagesel package. In your preamble write:

\usepackage[2-:]{pagesel}

In the optional argument, the 2-: means print pages 2 through the end of the document. Other options include giving a single number to print a single page, a range, e.g., 2-4, or writing -4 will be from the beginning through page 4. Multiple ranges can be specified, separated by commas, e.g., 3, 5-7, 14-:.

Don Hosek
  • 14,078
10

EDIT: As inspired by Frank Mittelbach's comment below (but he has a typo in it), this can be simplified to:

\AddToHookNext{shipout/before}{\DiscardShipoutBox}

If you mean not outputting the first page that LaTeX generates to the PDF file, but only pages 2 and following:

\AddToHook{shipout/before}[nofirstpage]{\SkipFirstPage}
\newcommand\SkipFirstPage{\DiscardShipoutBox\RemoveFromHook{shipout/before}[nofirstpage]}

You put both commands best before \begin{document}. \AddToHook is a command that specifies that something has to be done at a specific point in the future, in this case just before a page is written to the PDF (or DVI) file. And in this case it specifies to throw away the page (\DiscardShipoutBox), and then not to do this on the following pages (by removing the hook code).