bugs fixed

This commit is contained in:
Marc Wäckerlin
2025-11-11 15:11:28 +01:00
parent 65335f7981
commit 29ce75ecf1
22 changed files with 476 additions and 447 deletions
+48 -17
View File
@@ -28,8 +28,8 @@
\DeclareStringOption[1.0]{bgopacity} % background image opacity (1.0 = 100% visible, 0.0 = invisible), default 1.0
\DeclareStringOption[1.0]{qrbgopacity} % QR code background opacity (1.0 = white solid, 0.0 = transparent), default 1.0
\DeclareStringOption[de]{lang}
\DeclareBoolOption[false]{ioscrlf} % use CRLF line endings in vCard (iOS compatibility); default off to avoid pdfTeX issues
\DeclareBoolOption[true]{address}
\DeclareBoolOption[true]{crlf} % use CRLF line endings in vCard (iOS compatibility)
\DeclareComplementaryOption{nocrlf}{crlf}\DeclareBoolOption[true]{address}
\DeclareComplementaryOption{noaddress}{address}
\DeclareBoolOption[true]{hint}
\DeclareComplementaryOption{nohint}{hint}
@@ -268,13 +268,23 @@
% internal boxes and lengths for measuring
\newsavebox{\BCQ@namebox}
\newsavebox{\BCQ@logobox}
\newsavebox{\BCQ@companytitlebox}
\newsavebox{\BCQ@companyrightbox}
\newlength{\BCQ@logoheightdimen}
\setlength{\BCQ@logoheightdimen}{0pt}% initialize to prevent errors
\newlength{\BCQ@bgimagedimen}
\setlength{\BCQ@bgimagedimen}{0pt}
\newdimen\BCQ@companytitlewidth
\newdimen\BCQ@companyrightwidth
\newdimen\BCQ@companylineavailable
\newdimen\BCQ@companylinesum
\newif\ifBCQ@companylineneeded
\newif\ifBCQ@companytitleexists
\newif\ifBCQ@companyrightexists
\newlength{\BCQ@reservedheight}
\newlength{\BCQ@heightscale}
\newlength{\BCQ@namewidth}
\newlength{\BCQ@namecolumnwidth}
\newlength{\BCQ@logosep}
\newlength{\BCQ@logosepused}
\setlength{\BCQ@logosep}{1em}
@@ -347,31 +357,47 @@
}
\newcommand\heightscale{\BCQ@heightscale}
\newcommand\companyrolestringdisplay{%
\newcommand\companytitleblock{%
\ifvisible{Xtitle}{\Xtitle}{}%
\ifvisible{Xrole}{%
\ifvisible{Xtitle}{, }{}%
\ifvisible{Xtitle}{,\ }{}%
\Xrole
}{}%
}
\newcommand\companyrightblock{%
\ifcsdef{Xcompanylogo}{\companylogocontent}{}%
\ifvisible{Xcompany}{%
\ifvisible{Xtitle}{\ \Xcompany}{%
\ifvisible{Xrole}{\ \Xcompany}{\Xcompany}%
}%
\Xcompany
\ifcsdef{Xcompanylogo}{\hspace{0.5em}}{}%
}{}%
}
\newcommand\companybrandingline{%
\ifcsdef{Xcompanylogo}{\companylogocontent}{}%
\ifhaspositiontext{%
\ifcsdef{Xcompanylogo}{\hspace{0.5em}}{}%
\companyrolestringdisplay
}{}%
\begingroup
\BCQ@companytitleexistsfalse
\ifvisible{Xtitle}{\BCQ@companytitleexiststrue}{}%
\ifvisible{Xrole}{\BCQ@companytitleexiststrue}{}%
\BCQ@companyrightexistsfalse
\ifvisible{Xcompany}{\BCQ@companyrightexiststrue}{}%
\ifcsdef{Xcompanylogo}{\BCQ@companyrightexiststrue}{}%
\ifBCQ@companytitleexists
\companytitleblock
\fi
\ifBCQ@companytitleexists
\ifBCQ@companyrightexists
\space
\fi
\fi
\ifBCQ@companyrightexists
\companyrightblock
\fi
\endgroup
}
\newcommand\companyrolestringvcard{%
\ifcsname Xtitle\endcsname
\Xtitle
\fi
\ifcsname Xrole\endcsname
\ifcsname Xtitle\endcsname , \fi
\ifcsname Xtitle\endcsname ,\ \fi
\Xrole
\fi
\ifcsname Xcompany\endcsname
@@ -432,11 +458,13 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% vcard - the content of the vcard
% newline selection: default LF (robust for qrcode). Optional CRLF if ioscrlf option set.
\ifBCQ@ioscrlf
\def\BCQ@nl{\char13\char10}% CRLF
% newline selection: default LF (robust for qrcode). Optional CRLF if crlf option set.
{\catcode`\^^M=12\gdef\BCQ@carriagereturn{^^M}}% literal CR (catcode 12)
{\catcode`\^^J=12\gdef\BCQ@linefeed{^^J}}% literal LF (catcode 12)
\ifBCQ@crlf
\def\BCQ@nl{\BCQ@carriagereturn\BCQ@linefeed}% CRLF
\else
\def\BCQ@nl{^^J}% LF only
\def\BCQ@nl{\BCQ@linefeed}% LF only
\fi
% vcard assembly (version 4.0 retained). CRLF improves iOS import robustness.
\newcommand\vcard{BEGIN:VCARD\BCQ@nl
@@ -629,8 +657,10 @@ END:VCARD\BCQ@nl}
\ifcsdef{Xlogo}{%
\sbox{\BCQ@logobox}{\includegraphics[height=\BCQ@logoheight@used]{\Xlogo}}%
\setlength{\BCQ@logoheightdimen}{\BCQ@logoheight@used}%
\setlength{\BCQ@namecolumnwidth}{\dimexpr\textwidth-\wd\BCQ@logobox-\BCQ@logosep\relax}%
}{%
\setlength{\BCQ@logoheightdimen}{0pt}%
\setlength{\BCQ@namecolumnwidth}{\textwidth}%
}%
% Compute heightscale after logo height is known
\computeheightscale
@@ -643,6 +673,7 @@ END:VCARD\BCQ@nl}
\setlength{\BCQ@namewidth}{\dimexpr\textwidth-\wd\BCQ@logobox\relax}%
\ifdim\BCQ@namewidth<0pt\setlength{\BCQ@namewidth}{0pt}\fi
\fi
\setlength{\BCQ@namecolumnwidth}{\BCQ@namewidth}%
\begin{minipage}{\textwidth}
\begin{minipage}[c]{\wd\BCQ@logobox}% logo column
\usebox{\BCQ@logobox}%
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 653 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-2
View File
@@ -1,2 +0,0 @@
%PDF-1.7
%הנםר
Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 KiB

After

Width:  |  Height:  |  Size: 778 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB