Tag Info

Hot answers tagged

24

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}


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.


19

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


15

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 ...


15

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 ...


14

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 ...


13

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}


12

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} ...


12

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} ...


12

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 ...


11

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} % ... ...


11

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 ...


10

By default pdfpages uses the options pagecommand={\thispagestyle{empty}}. if you want the pagestyle on the included pages you need to call includepdf like : \includepdf[scale=0.9,pages={-},pagecommand={\thispagestyle{fancy}}]{results.pdf}


10

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> ...


10

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 ...


10

It is very easy. Please use pdfpages.sty and click here for its manual. Sample Output Code Snippet Sample I used a pdf file downloaded from here and then renamed it as movies.pdf. \documentclass{article} \usepackage[a4paper,margin=1cm]{geometry} \usepackage{pdfpages} \begin{document} \includepdf[% landscape=true,% pages={1-16},%Include pages from 1 ...


10

I'd say take a look at memoir again. It's like an extended book class that includes functionality of many packages by default (fancyhdr & titlesec to name a few). If you are writing all the articles yourself (so they will all be in latex; it wasn't clear to me if you're authoring the whole document or compiling research...) then there is no reason to ...


9

create a new document \documentclass[...]{article}% should have the same header as the original \usepackage{geometry} \geometry{...}% the same as in your text document \usepackage{pdfpages} \begin{document} \includepdf[pages=1-]{thetitle}% pdf document of the title \includepdf[pages=1-]{thetext}% the main text doc \end{document} and you'll get a new one ...


8

The included pages have a different aspect ratio (more width, less height). Therefore it is not possible to have the same margins unless the pages are distorted. You can run the external PDF file through pdfcrop to get a PDF file without white margins. That makes the next steps/calculations easier. Since the included page should fit into the text body and ...


8

As mentioned by JLDiaz, you should use the nup option. According to the pdfpages documentation, the syntax of the option is: nup=⟨xnup⟩x⟨ynup⟩, where ⟨xnup⟩ and ⟨ynup⟩ specify the number of logical pages in horizontal and vertical direction. You may also want to use the landscape option in order to switch to landscape orientation and avoid twisting the neck ...


8

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} ...


8

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 ...


8

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} % … ...


8

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 ...


8

\documentclass[a4paper]{article} \usepackage[scale=.95,landscape]{geometry} \usepackage{ncccropbox,graphicx,multido} \begin{document} \noindent \multido{}{3}{% \multido{}{3}{% \cropbox{\includegraphics[angle=90]{54x85}}}\\} \end{document} will produce Note: The text is only the wrong way around because I used a 85x54 image rather than a ...


7

UPDATE: Added code to duplicate the page. But you should use @Daniels solution as it is much more versatile. You could use pgfpages: \documentclass[a5paper,12pt,norsk]{article} \usepackage[utf8]{inputenc} \usepackage{babel,fouriernc,parskip,booktabs,array} \usepackage[margin=1cm,landscape]{geometry} \usepackage{forloop} % ...


7

The following example centers an image in the text area of a new page. The image is maximized without distortion: \documentclass{article} \usepackage{graphicx} \newcommand*{\IncludePageImage}[2][]{% \newpage \begingroup \centering \setlength{\parskip}{0pt}% \setlength{\topskip}{0pt}% \nointerlineskip \vspace*{\fill}% ...


7

% Put this in the preamble \newcommand{\eincludepdf}[1][]{% \begingroup\edef\x{\endgroup\noexpand\includepdf[#1]}\x} % this can go everywhere (notice the `\unexpanded` to avoid possible problems) \newcommand{\mylist}{\unexpanded{1,section,1,{A Title},s.1,3,% subsection,2,{A subsection},{s.1.1}}} % With this you include the PDF file ...


7

I helped once to publish the proceedings of a smaller conference using LaTeX. This was done by creating PDFs from each article, without headers and footers, especially no page numbers. The PDFs where then included in a main document using the pdfpages package. You can add a header and footer over these pages to superimpose a running page number with the ...


7

There are some errors in the MWE: pagecommand={\label{tab:UserRoles}}: This is executed on each builded page. In case of more than one page the result are warnings because of multiply defined labels. Also the label setting is already done by your option setting for addtolist. (Edit: Fix of PolGab applied, thanks) The argument list for addtolist expects ...



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