summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-09 00:49:07 +0000
committerKarl Berry <karl@freefriends.org>2006-01-09 00:49:07 +0000
commit007f67a693e4d031fd3d792df8e4d5f43e2cb2e7 (patch)
tree90d17e00e572ecb1e24764b6f29c80e098b08d29 /Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex
parent950209b26f70aa87ed07c54f82a95b6f03b7c3a0 (diff)
doc/latex
git-svn-id: svn://tug.org/texlive/trunk@84 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex')
-rw-r--r--Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex41
1 files changed, 41 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex b/Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex
new file mode 100644
index 00000000000..fff4b73adc3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex
@@ -0,0 +1,41 @@
+
+% file `eso-ex3.tex'; an example for import pages of another (pdf) document.
+% Based on an article from Andreas Matthias <amat@kabsi.at> in d.c.t.t
+%
+% A much better solution is Andreas' package `pdfpages'.
+%
+% Rolf Niepraschk, 2001/07/21, niepraschk@ptb.de
+
+\documentclass[a4paper]{article}
+\usepackage[pdftex]{graphicx}%
+% `pdftex.def' >= 2000/05/12 v0.02u and `pdftex' >= v0.14 are needed.
+\usepackage{ifthen,calc,eso-pic}
+
+\newcounter{thispdfpage}\newcounter{afterlastpdfpage}
+\newcommand{\includepdfpages}[3]
+{%
+ \setcounter{thispdfpage}{#2}\setcounter{afterlastpdfpage}{#3+1}%
+ \newpage
+ \whiledo{\value{thispdfpage} < \value{afterlastpdfpage}}
+ {%
+ \AddToShipoutPicture*
+ {%
+ \put(0,0){%
+ \includegraphics[width=\paperwidth,height=\paperheight,%
+ keepaspectratio,page=\arabic{thispdfpage}]{#1}}
+ }
+ \thispagestyle{empty}\mbox{}\newpage%
+ \stepcounter{thispdfpage}%
+ }
+}
+
+\begin{document}
+
+\section{First page of the main document}
+
+% import pages 1 to 3 of an external document.
+\includepdfpages{ltx3info.pdf}{1}{3}
+
+\section{First page after the imported pages of the external document}
+
+\end{document}