I insert several PDFs thought my document using \includepdf. I'd like to define the <key=val> options in one variable and pass that to each \includepdf.
Right now I do something like this:
\includepdf[pages=-, frame, scale=0.8, offset=0mm -10mm, pagecommand={}]
{./parts/letter_1.pdf}
\includepdf[pages=-, frame, scale=0.8, offset=0mm -10mm, pagecommand={}]
{./parts/letter_2.pdf}
This is what I'd like to do, but this gives Package keyval Error...undefinded:
\newcommand{\PDFOptions}{pages=-, frame, scale=0.8, offset=0mm -10mm, pagecommand={}}
\includepdf[\PDFOptions]{./parts/letter_1.pdf}
\includepdf[\PDFOptions]{./parts/letter_2.pdf}
\newcommandby\def? I believe that\newcommandcomes with magic to allow optional arguments which does not work will with your use-cases.In addition, you may need to write
– Christian Feuersänger Nov 03 '17 at 14:16\expandafter\includepdf\expandafter[\PDFOptions].\newcommandor\def. LaTeX won't expand the optional argument to\includepdfuntil it's too late for parsing the options. – egreg Nov 03 '17 at 14:19