# Tag Info

84

graphicx knows the page option: \includegraphics[page=3]{foo} should work, or \includegraphics[page=..,trim=...,clip]{foo} for only parts of the page.

40

Here is a possible start: (code streamlined in edit) The idea is to use the box model of TeX. In a \vbox we construct the page. Then the \vbox self-includes itself with a scale of .7 thanks to \scalebox of package \graphicx. The box includes an hyperref link, and all reduced copies up to the tiniest work. \documentclass[a4paper]{article} ...

30

pdfpages provides the pagecommand option for \includepdf, which can be used to apply a page style for each page, to print headings and more. For example, add plain page style or your own page style to get page numbers on all included pages: \includepdf[pages=-,pagecommand=\thispagestyle{plain}]{filename}

28

Loading the graphicx package in the preamble it is possible to import PDF images in the document: \documentclass{article} \usepackage{graphicx} \begin{document} \includegraphics[<options>]{filename.pdf} \end{document} Here <options> can be e.g. width=<width>, height=<height or page=<page number>. See the Graphics Guide for ...

28

run pdfcrop on the whole document, then every page is cropped and you can input it as usual with pdfpages. I always use the pdfcrop from Heiko Oberdiek which is already part of every TeX distribution. And, of course, Windows user need an installed Perl, eg http://www.activestate.com/perl

28

for a single page of a multipage .pdf: \documentclass{article} \usepackage{graphicx} \begin{document} \includegraphics[page=2,scale=0.75]{bplot.pdf} \end{document} or if you want all pages: \documentclass{article} \usepackage{pdfpages} \begin{document} \includepdf[pages={1-},scale=0.75]{bplot.pdf} \end{document}

26

EDIT ... include a more sinister version... I'm not sure if this is what you want. Strictly speaking, this file does not include itself. It includes its own output. This is what your images suggest you want but your description is ambiguous. Anyway, since you mention using this with bashful, I thought I might as well use bashful. This needs to be ...

24

You can crop/trim a pdf when including it using the trim=left botm right top. Full example: \begin{figure}[htbp] \centering \includegraphics[trim=0.5cm 11cm 0.5cm 11cm, width=1.00\textwidth]{gfx/BI-yourfile.pdf} \caption{Title} \label{fig:somthing} \end{figure} Note: Figuring out how far to trim can take time. To speed things up a ...

22

You can use the pagecommand key: \includepdf[scale=0.8,pages=1,pagecommand=\subsection{blub}]{testpdf} You get the empty page when you use \includegraphics because the graphics is too large for the textbody, so latex tries if it fits on the next page (and then complain). pdfpages hides the size of the graphics so it is possible to insert complete pages ...

22

Using your current settings, the pdfpages inserts the pages of an external PDF file as full page additions to your existing document. That is, the external file page setup is copied to the "main" output PDF on a page-by-page basis. The "main" file's page setup (including header/footer) is ignored. If you wish to include the same header/footer style of your ...

20

\documentclass[a4paper]{article} \usepackage[1-10]{pagesel} \begin{document} % text \end{document} Thanks to Heiko Oberdiek. Remember, though, that references and table of contents will be incomplete. An alternative way is to compile the whole document and load its first ten pages in another one via pdfpages.

20

Apologies to David Gilmour \documentclass[tikz,border=4mm]{standalone} \begin{document} \def\dsotm{\node[scale around={\x:(0,-1)}, draw=white,ultra thin] at(0,0){\includegraphics[height=4cm]{dsotm}};} \tikz{\foreach\x in{2,1.75,...,0.25}{\dsotm}} \end{document}

19

You can use the pagecommand key to declare the desired page style for the included pages: \documentclass{book} \usepackage[a6paper]{geometry}% just for the example \usepackage{fancyhdr} \usepackage{pdfpages} \pagestyle{fancy} \fancyhf{} \fancyhead[C]{Some centered header} \fancyfoot[C]{\thepage} \begin{document} ...

18

Use in the document with pdfpages \pdfinclusioncopyfonts=1. (The source of the problem is that two fonts of libertine now have the same internal fontname, and this leads to problems).

18

As already said by others in the comments you need to use \includegraphics directly because \includepdf uses a page of its own. You can use a tabular to get the 2x2 layout and use the page=<number> key to select the page: \documentclass{article} \usepackage{graphicx} \usepackage{blindtext} \begin{document} \blindtext \begin{figure}[h] \centering ...

18

A bit out of topic, since it is a MetaPost example and it is not strictly speaking a picture including itself recursively but I could not resist to have a go at it, however clumsy, the visual effects being addictive! I've borrowed the original heart-shaped picture's coding from the documentation of Stephan Hennig's wonderful texpath package, and slightly ...

17

The beamer user guide (p.19) provides a solution: Commands like \includepdf only work outside frames as they produce pages “by themselves.” You may also wish to say \setbeamercolor{background canvas}{bg=} when you use such a command since the background (even a white background) will otherwise be printed over the image you try to ...

16

About the tilde: Apparently the ~ is taken in its usually meaning, not as literal ~. I get a Package pdfpages Error: Cannot find file `test\nobreakspace {}it' error for a test~it file. Taking the filename verbatim should help. This can be done by \Verbdef from the newverbs package: \usepackage{newverbs} % ... ...

16

Have a look at the pdfpages package \documentclass{article} \usepackage{pdfpages} \begin{document} \includepdf[<options>]{<file>} Your Text \end{document} Edit Miguel suggested graphicx to include a graphic which is correct, the difference between graphicx and pdfpages is that graphicx puts the PDF as a graphic on a text page (maybe ...

15

You could use the pagecommand option, such as \includepdf[pagecommand={\begin{tikzpicture}...\end{tikzpicture}}]{filename}

14

The inserted link is a hyper-link, not a LaTeX \label. Therefore the \hyperlink macro works but not the \pageref. I don't think you can get the page information from a hyper-link, so I think you need to add \labels manually. This can be done best using the pagecommand key and a custom counter: \documentclass{article} \usepackage{hyperref} ...

14

The default pagecommand uses \thispagestyle{empty} which disables page numbers, headers and footers etc. You can use pagecommand={} to overwrite this and get normal layout for these pages.

13

If the coordinates of the valuable parts in your PDF images is fixed, then the following method can be automated. Use the following template to trim or crop images and compile it with xelatex. You will get 2 pages, one for navigation and the other one is the cropped image. % cropping.tex \documentclass{article} \usepackage{pstricks} ...

13

For me the following worked just fine: \includepdf[pages=1,pagecommand=\section{Section Heading}]{testpdf} \includepdf[pages=2-,pagecommand={}]{testpdf}

13

It occurred to me that all of the answers given so far – while in themselves valiant and skillful efforts – fail to fulfill a requirement clearly specified in the question's title: The document should include itself recursively ad infinitum. There's an obvious problem with this: as soon as the document contains a single element, say the letter “x”, it has ...

12

Spaces at file names of PDF files at \includegraphics or \includepdf are allowed, if you are using package grffile: \usepackage{grffile} \usepakcage{pdfpages} % … \includepdf[pages=-]{test this.pdf} And for more verbatim interpretation of the file name you may use \detokenize: \usepackage{grffile} \usepakcage{pdfpages} % … ...

12

You can also include the next command, for all pdfs that will be put into the document, \includepdfset{pagecommand=\thispagestyle{plain}} This command goes after \usepackage{pdfpages}.

11

Simply use \includepdfmerge instead of \includepdf. It inserts pages of several external PDF documents. It should allow nup=2x2 as part of its options. From the pdfpages manual, page 8: \includepdfmerge[<key=val>]{<file-page-list>} <key=val> -- A comma separated list of options using the <key>=<value> ...

11

Using fancyhdr you can define your own page style and move the page number/counter into the appropriate position. \usepackage{pdfpages}% http://ctan.org/pkg/pdfpages \usepackage{fancyhdr}% http://ctan.org/pkg/fancyhdr \fancypagestyle{mylandscape}{% \fancyhf{}% Clear header/footer \fancyfoot{% Footer \makebox[\textwidth][r]{% Right ...

11

pdfpages typically inserts page breaks before inserting content, causing problems if you want to have an arrangement if pages inside a figure environment. Instead, use the page key-value of \includegraphics itself to insert the contents on a page-by-page basis. Something like this: \begin{figure}[ht] \centering ...

Only top voted, non community-wiki answers of a minimum length are eligible