zwischenstand

This commit is contained in:
Marc Wäckerlin
2025-11-11 17:09:12 +01:00
parent 06e57b546f
commit 5a8b2d8677
3 changed files with 8 additions and 2 deletions
+1
View File
@@ -116,6 +116,7 @@ Layout options are set as options to the `\documentclass`, e.g.:
- `bgopacity=`: background image opacity/transparency (1.0 = 100% visible, 0.0 = invisible), default: `1.0`. Use lower values like `0.2` or `0.3` to fade the background so text remains readable. Only affects images, not colors. Can be overridden locally with `\background[opacity=...]{file}`. - `bgopacity=`: background image opacity/transparency (1.0 = 100% visible, 0.0 = invisible), default: `1.0`. Use lower values like `0.2` or `0.3` to fade the background so text remains readable. Only affects images, not colors. Can be overridden locally with `\background[opacity=...]{file}`.
- `qrbgopacity=`: QR code background opacity (1.0 = solid white, 0.0 = transparent), default: `1.0`. White background behind QR code ensures scannability over background images. Use `0.0` for no background or lower values like `0.8` for semi-transparent. Can be overridden locally with `\qrlogo[opacity=...]{file}`. - `qrbgopacity=`: QR code background opacity (1.0 = solid white, 0.0 = transparent), default: `1.0`. White background behind QR code ensures scannability over background images. Use `0.0` for no background or lower values like `0.8` for semi-transparent. Can be overridden locally with `\qrlogo[opacity=...]{file}`.
- `color=`: global text color for the entire document, default: `black`. Accepts any color name understood by `xcolor` (including mixes such as `blue!60!black`). Useful when printing on darker backgrounds to ensure legibility without redefining every style manually. - `color=`: global text color for the entire document, default: `black`. Accepts any color name understood by `xcolor` (including mixes such as `blue!60!black`). Useful when printing on darker backgrounds to ensure legibility without redefining every style manually.
- `qrcolor=`: QR module color, default: `black`. Set this (e.g., `qrcolor=darkred`) to recolor the QR code independently from the main text color while keeping sufficient contrast with the background.
Data Definitions Data Definitions
+7 -2
View File
@@ -29,6 +29,7 @@
\DeclareStringOption[1.0]{qrbgopacity} % QR code background opacity (1.0 = white solid, 0.0 = transparent), default 1.0 \DeclareStringOption[1.0]{qrbgopacity} % QR code background opacity (1.0 = white solid, 0.0 = transparent), default 1.0
\DeclareStringOption[de]{lang} \DeclareStringOption[de]{lang}
\DeclareStringOption[black]{color} \DeclareStringOption[black]{color}
\DeclareStringOption[black]{qrcolor}
\DeclareBoolOption[true]{crlf} % use CRLF line endings in vCard (iOS compatibility) \DeclareBoolOption[true]{crlf} % use CRLF line endings in vCard (iOS compatibility)
\DeclareComplementaryOption{nocrlf}{crlf}\DeclareBoolOption[true]{address} \DeclareComplementaryOption{nocrlf}{crlf}\DeclareBoolOption[true]{address}
\DeclareComplementaryOption{noaddress}{address} \DeclareComplementaryOption{noaddress}{address}
@@ -623,7 +624,7 @@ END:VCARD\BCQ@nl}
% QR code with optional qrlogo overlay in center % QR code with optional qrlogo overlay in center
\ifcsdef{Xqrlogo}{% \ifcsdef{Xqrlogo}{%
\begin{tikzpicture} \begin{tikzpicture}
\node[inner sep=0pt] (qr2) {\qrcode[level=\BCQ@qreclevel,version=0,height=\textwidth]{\vcard}}; \node[inner sep=0pt] (qr2) {{\color{\BCQ@qrcolor}\qrcode[level=\BCQ@qreclevel,version=0,height=\textwidth]{\vcard}}};
% Logo with transparent background preserved (no fill), padding still applied % Logo with transparent background preserved (no fill), padding still applied
% qrlogoscale/scale is unitless fraction (0.25 = 25% of QR width) % qrlogoscale/scale is unitless fraction (0.25 = 25% of QR width)
\node[inner sep=\BCQ@qrlogoborder\textwidth] at (qr2.center) {% \node[inner sep=\BCQ@qrlogoborder\textwidth] at (qr2.center) {%
@@ -632,7 +633,7 @@ END:VCARD\BCQ@nl}
\end{tikzpicture}% \end{tikzpicture}%
}{% }{%
% No qrlogo defined, just show QR code % No qrlogo defined, just show QR code
\qrcode[level=\BCQ@qreclevel,version=0,height=\textwidth]{\vcard}% {\color{\BCQ@qrcolor}\qrcode[level=\BCQ@qreclevel,version=0,height=\textwidth]{\vcard}}%
}% }%
}; };
\end{tikzpicture} \end{tikzpicture}
@@ -769,6 +770,7 @@ END:VCARD\BCQ@nl}
\RequirePackage[\papersize,noinfo,center,pdftex]{crop} \RequirePackage[\papersize,noinfo,center,pdftex]{crop}
\newcommand\tl{ \newcommand\tl{
\begin{picture}(0,0) \begin{picture}(0,0)
\color{\BCQ@color}
\thinlines\unitlength1mm \thinlines\unitlength1mm
\put(-\border,0){\line(1,0){\cutlen}} \put(-\border,0){\line(1,0){\cutlen}}
\put(0,\border){\line(0,-1){\cutlen}} \put(0,\border){\line(0,-1){\cutlen}}
@@ -776,6 +778,7 @@ END:VCARD\BCQ@nl}
} }
\newcommand\tr{ \newcommand\tr{
\begin{picture}(0,0) \begin{picture}(0,0)
\color{\BCQ@color}
\thinlines\unitlength1mm \thinlines\unitlength1mm
\put(\border,0){\line(-1,0){\cutlen}} \put(\border,0){\line(-1,0){\cutlen}}
\put(0,\border){\line(0,-1){\cutlen}} \put(0,\border){\line(0,-1){\cutlen}}
@@ -783,6 +786,7 @@ END:VCARD\BCQ@nl}
} }
\newcommand\bl{ \newcommand\bl{
\begin{picture}(0,0) \begin{picture}(0,0)
\color{\BCQ@color}
\thinlines\unitlength1mm \thinlines\unitlength1mm
\put(-\border,0){\line(1,0){\cutlen}} \put(-\border,0){\line(1,0){\cutlen}}
\put(0,-\border){\line(0,1){\cutlen}} \put(0,-\border){\line(0,1){\cutlen}}
@@ -790,6 +794,7 @@ END:VCARD\BCQ@nl}
} }
\newcommand\br{ \newcommand\br{
\begin{picture}(0,0) \begin{picture}(0,0)
\color{\BCQ@color}
\thinlines\unitlength1mm \thinlines\unitlength1mm
\put(\border,0){\line(-1,0){\cutlen}} \put(\border,0){\line(-1,0){\cutlen}}
\put(0,-\border){\line(0,1){\cutlen}} \put(0,-\border){\line(0,1){\cutlen}}
Binary file not shown.