1
votes

Another day, another question! I have created a documentation of an R package using R CMD Rd2pdf workdir/. The documentation is done in roxygen2 comments.

I now wanted to include this pdf into my LaTeX script, which I have managed as follows:

\usepackage{pdfpages}

\includepdf[pages=-,pagecommand={\thispagestyle{plain}}]{docu.pdf}

which means that I included all pdf pages and used the pagecommand option to make the LaTeX page numbering visible again.

Which worked quiet well so far. Scrolling through the pages I liked the outcome very much - this was until I reached the last page of the included pdf, which is the Index page.

Sadly, the page numbering of both, LaTeX and included pdf, are both at the bottom - only for this very last page. I don't like this and maybe you can relate (see image).

I can think of three possibilities: 1) somehow remove the Index page 2) remove the pdf numbering for the Index page or at least move it. 3) remove the LaTeX page number for this page.

Which would you do? I think option 3) is the easiest, but maybe I am missing something.

This is how it looks like...

Thank you!

1
Instead of \thispagestyle{plain}, use \thispagestyle{empty} to remove any kind of header/footer.Werner
\thispagestyle{empty} did not remove the number on my included pdf, but just got rid of the main page no for parent document.Miranda

1 Answers

1
votes

Without a working example I can't confirm it but is this the answer? tex.stackexchange-includepdf-pages-with-page-numbering-of-new-document-and-remove-blank-page-after

Does the following work?

\usepackage{pdfpages}

\includepdf[pages=-,pagecommand={}]{docu.pdf}