fix build

This commit is contained in:
Marc Wäckerlin
2025-11-09 11:03:42 +01:00
parent af2a53a9d9
commit 07898c33a1
31 changed files with 35 additions and 22 deletions
+9 -7
View File
@@ -80,6 +80,8 @@
\RequirePackage{graphicx} % needed for optional photo
\RequirePackage{tikz} % needed for logo overlay in QR code
\RequirePackage{eso-pic} % needed for background images without layout impact
% Fix XeLaTeX opacity issue: ensure TikZ/PGF is loaded before eso-pic uses opacity
\DeclareHookRule{shipout/background}{pgfrcs}{>}{eso-pic}
\RequirePackage[\content,top=\padding,left=\padding,right=\padding,bottom=\padding]{geometry}
%\RequirePackage{pbox}
\RequirePackage{varwidth}
@@ -383,15 +385,15 @@ END:VCARD\BCQ@nl}
\ifcsdef{Xbackground}{%
\IfFileExists{\Xbackground}{%
% It's an image file: add to background using eso-pic (no layout impact)
% Fix XeLaTeX opacity issue: ensure TikZ/PGF is loaded before opacity is used
\AddToHook{shipout/background}[businesscard]{%
\put (\LenToUnit{.5\paperwidth},\LenToUnit{-.5\paperheight}) {%
\tikz[overlay]{\node[opacity=\fpeval{\BCQ@bgopacity}, inner sep=0pt] at (0,0) {%
\includegraphics[height=\fpeval{\BCQ@bgscale}\paperheight]{\Xbackground}%
};}%
\AddToShipoutPictureBG*{%
\AtPageCenter{%
\begin{tikzpicture}[overlay]
\node[inner sep=0pt, opacity=\fpeval{\BCQ@bgopacity}] at (0,0) {%
\includegraphics[height=\fpeval{\BCQ@bgscale}\paperheight]{\Xbackground}%
};
\end{tikzpicture}%
}%
}%
\DeclareHookRule{shipout/background}{pgfrcs}{>}{businesscard}%
}{%
% Not a file: treat as color
\pagecolor{\Xbackground}%