'Latex includepdf how to pass offset from command
my goal is not to hardcode the offset in the includepdf command
so instead of
\newcommand{\myscale}{0.90}
\includepdf[scale=\myscale,offset=0mm -5mm,angle=90,pagecommand=\subsection{my title}]{file.pdf}
it would be great to write something like this
\newcommand{\myscale}{0.90}
\newcommand{\offset}{0mm -5mm}
\includepdf[scale=\myscale,offset=\offset,angle=90,pagecommand=\subsection{my title}]{file.pdf}
in fact, it is working for the numerical scale value but not for the offset string.
Solution 1:[1]
As a workaround, you use two separate macros:
\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\newcommand{\myscale}{0.90}
\newcommand{\xoffset}{0mm}
\newcommand{\yoffset}{-5mm}
\includepdf[scale=\myscale,offset=\xoffset{} \yoffset,angle=90,pagecommand=\subsection{my title}]{example-image-duck}
\end{document}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | samcarter_is_at_topanswers.xyz |
