Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

latex includepdf after section in appendix

Tags:

latex

pdflatex

I want to add some pdf-pages in my appendix in latex using this command:

\includepdf[pages=-,scale=.8,pagecommand={},linktodoc=true]{myPDF.pdf}

Works fine so far, however it is always placed in a new page... in other words:

I add \section{title 1} and then \includepdf-command and then \section{title 2} and \includepdf-command..... But after each \section I get an empty page and then the pdf-files. But I want them to be placed immediately after a section-title, if applicable.

Hope the problem is clear.

like image 289
malptek Avatar asked Sep 10 '14 18:09

malptek


People also ask

How do you end an appendix in LaTeX?

It seems that the standard command \begin{appendix} and \end{appendix} do work!

How do you add an appendix to a table of contents in LaTeX?

Adding an appendix to your document in LaTeX is as easy as invoking the macro \appendix . From the moment you call this command, the new chapters will be numbered using capital letters, and instead of `Chapter' they will be called `Appendix'.


1 Answers

Another stylish solution in case of adding multi page documents:

\includepdf[pages=1,scale=.8,pagecommand={\section{My header}\label{pdf:myfile}},linktodoc=true]{myfile.pdf}
\includepdf[pages=2-,scale=.8,pagecommand={},linktodoc=true]{myfile.pdf}

Features:

  1. Header placed at the top of the first page without cropping
  2. You can set a label for the section created
  3. Multi page friendly
like image 106
popilla20k Avatar answered Oct 07 '22 00:10

popilla20k