summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/newpax/doc-use-pax.tex
blob: f5b6e695a6e304d99a9c877ffec28caf21de709c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
% !Mode:: "TeX:UTF-8:Main"
\documentclass{article}
\usepackage{ifluatex,etoolbox}
\usepackage{pdfpages}
%pax needs this to run with lualatex
\ifluatex
\usepackage{pdftexcmds}
\makeatletter
\let\pdfstrcmp\pdf@strcmp
\let\pdfescapename\pdf@escapename
\makeatother
\usepackage{luatex85}
\fi
%load pax
\usepackage{pax}
%correct a bug in pax affecting clipping
\makeatletter
\patchcmd\PAX@pdf@annot{\PAX@pagellx}{\PAX@page@llx}{}{\fail}
\makeatother
\begin{document}
\includegraphics[scale=0.5,trim=5cm 15cm 8cm 3cm,clip,page=2]{doc-input1}
\includegraphics[scale=0.5,trim=5cm 15cm 8cm 3cm,clip,page=1]{doc-input1}

\includepdf[pages=-]{doc-input2}
\end{document}