logo can be an image or a LaTeX element
This commit is contained in:
+17
-2
@@ -268,6 +268,21 @@
|
||||
\newcommand\ifboth[3]{\ifcsdef{#1}{\ifcsdef{#2}{#3}{}}{}}
|
||||
\newcommand\ifany[3]{\ifcsdef{#1}{#3}{\ifcsdef{#2}{#3}{}}}
|
||||
\newcommand\cond[1]{\ifcsdef{#1}{\exec{#1}}{}}
|
||||
\newcommand\BCQ@graphiccontent[2]{%
|
||||
\begingroup
|
||||
\edef\BCQ@graphicscan{\expandafter\detokenize\expandafter{#1}}%
|
||||
\IfSubStr{\BCQ@graphicscan}{\string\\}{%
|
||||
\endgroup #1%
|
||||
}{%
|
||||
\xdef\BCQ@graphicspath{\BCQ@graphicscan}%
|
||||
\endgroup
|
||||
\IfFileExists{\BCQ@graphicspath}{%
|
||||
\includegraphics[#2]{\BCQ@graphicspath}%
|
||||
}{%
|
||||
#1%
|
||||
}%
|
||||
}%
|
||||
}
|
||||
|
||||
% internal boxes and lengths for measuring
|
||||
\newsavebox{\BCQ@namebox}
|
||||
@@ -628,7 +643,7 @@ END:VCARD\BCQ@nl}
|
||||
% Logo with transparent background preserved (no fill), padding still applied
|
||||
% qrlogoscale/scale is unitless fraction (0.25 = 25% of QR width)
|
||||
\node[inner sep=\BCQ@qrlogoborder\textwidth] at (qr2.center) {%
|
||||
\includegraphics[width=\BCQ@qrlogoscale@used\textwidth]{\Xqrlogo}%
|
||||
\BCQ@graphiccontent{\Xqrlogo}{width=\BCQ@qrlogoscale@used\textwidth}%
|
||||
};
|
||||
\end{tikzpicture}%
|
||||
}{%
|
||||
@@ -659,7 +674,7 @@ END:VCARD\BCQ@nl}
|
||||
}%
|
||||
% Store logo height as dimension for heightscale calculation
|
||||
\ifcsdef{Xlogo}{%
|
||||
\sbox{\BCQ@logobox}{\includegraphics[height=\BCQ@logoheight@used]{\Xlogo}}%
|
||||
\sbox{\BCQ@logobox}{\BCQ@graphiccontent{\Xlogo}{height=\BCQ@logoheight@used}}%
|
||||
\setlength{\BCQ@logoheightdimen}{\BCQ@logoheight@used}%
|
||||
\setlength{\BCQ@namecolumnwidth}{\dimexpr\textwidth-\wd\BCQ@logobox-\BCQ@logosep\relax}%
|
||||
}{%
|
||||
|
||||
Reference in New Issue
Block a user