Is there a way to suppress the first page of my output pdf in latex and start on the second page?
Thank you
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-:
.
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).
texdoc lthooks-doc
and texdoc ltshipout-doc
Commented
Apr 13, 2021 at 18:58
includepdf
,includegraphics
, ...)?