diff --git a/README.md b/README.md index d2ab1c2..dbdc73c 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,30 @@ Note: direct commands like `\paperwidth{...}` or `\color{...}` would clash with - `bgscale=`: background image scale, default `1.0` - `bgopacity=`: background image opacity, default `1.0` +Standard Layout Blueprint (Normalfall) +====================================== + +The diagram below shows the default `layout=standard` with `header=true` and `qr=true` +(`qrfirst` variant: QR on the left, text on the right): + +![Standard layout blueprint](screenshots/layout-standard.svg) + +What Influences What (Standard Layout) +-------------------------------------- + +- `paperwidth/paperheight/contentwidth/contentheight/padding`: define the outer geometry of the whole card. +- `header/noheader`: enables/disables the complete top block (name/logo/company line + separator line). +- `logo` + `logoheight`: affects header composition and reserved vertical space. +- `company[height=...]` / `companylogo[height=...]`: affects second header line and reserved space. +- `textwidth` and `qrwidth`: define horizontal split of body columns. +- `qr/noqr`: removes the QR column; text then uses full body width. +- `qrfirst/textfirst`: swaps left/right order of QR and text columns. +- `icon/noicon`, `hint/nohint`, `iconleft/iconright`, `fill/nofill`: only affect formatting inside text lines. +- address field presence/visibility: controls whether address block (and map-pin icon) is rendered. +- `pgpfingerprint`: adds an extra footer line and reserves additional vertical space. +- `background`/`bgscale`/`bgopacity`: visual background only, no content reflow. +- `qrlogo`/`qreclevel`/`qrlogoscale`/`qrlogoborder`: QR internals only, no column reflow. + Data Definitions ================ @@ -323,6 +347,8 @@ Alternative: centered back side without QR and without header: \drawcard[layout=centered,noqr,noheader] ``` +Complete working example: [centered-backside-example.tex](examples/centered-backside-example.tex) + Equivalent using setter commands: ```latex diff --git a/businesscard-qrcode.cls b/businesscard-qrcode.cls index a3fb25d..98df10e 100644 --- a/businesscard-qrcode.cls +++ b/businesscard-qrcode.cls @@ -564,7 +564,13 @@ % Uses actual logo height if logo is taller than default reserved space % This is computed as a length and stored, not a macro \newcommand\computeheightscale{% - \setlength{\BCQ@reservedheight}{\dimexpr2em+\ifhaspersonalname{\ifhaspositionblock{\BCQ@companybrandingheight}{0pt}}{0pt}\relax}% + \ifBCQ@header + \setlength{\BCQ@reservedheight}{\dimexpr + \ifhaspersonalname{2em}{\ifhaspositionblock{0pt}{2em}}% + +\ifhaspositionblock{\BCQ@companybrandingheight}{0pt}\relax}% + \else + \setlength{\BCQ@reservedheight}{0pt}% + \fi \ifdim\BCQ@logoheightdimen>\BCQ@reservedheight \setlength{\BCQ@heightscale}{\dimexpr\textheight-\BCQ@logoheightdimen-\ifcsdef{Xpgpfingerprint}{2em}{0em}\relax}% \else @@ -786,11 +792,11 @@ END:VCARD\BCQ@nl} \ifhasaddressvisible{% \ifBCQ@iconleft \ifBCQ@icon\parbox[c]{1em}{\faMapMarker}\ \ifBCQ@fill\hfill\fi\fi - \begin{varwidth}{\dimexpr#1-2em\relax} + \begin{varwidth}{\dimexpr\textwidth-2em\relax} \ifBCQ@rightalign\enforceright\fi\address \end{varwidth} \else - \begin{varwidth}{\dimexpr#1-2em\relax} + \begin{varwidth}{\dimexpr\textwidth-2em\relax} \ifBCQ@rightalign\enforceright\fi\address \end{varwidth} \ifBCQ@icon\ifBCQ@fill\hfill\fi\ \parbox[c]{1em}{\faMapMarker}\fi diff --git a/configure.ac b/configure.ac index 71b6585..5f3ee90 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ AC_CHECK_PROG([pandoc]) AC_CHECK_PROG([convert]) AC_CHECK_PROG([xelatex]) -EXAMPLES="example john-doe-hongkong \ +EXAMPLES="centered-backside-example example john-doe-hongkong \ peter-muster-example-company-zuerich special-papersize \ texstudio_d30266 photo-example photo-in-qr-example" diff --git a/examples/example.pdf b/examples/example.pdf index d80669b..c4e55e4 100644 Binary files a/examples/example.pdf and b/examples/example.pdf differ diff --git a/examples/john-doe-hongkong.pdf b/examples/john-doe-hongkong.pdf index 66f3eea..c7e5156 100644 Binary files a/examples/john-doe-hongkong.pdf and b/examples/john-doe-hongkong.pdf differ diff --git a/examples/mrw-test.pdf b/examples/mrw-test.pdf index 3261612..51eadfa 100644 Binary files a/examples/mrw-test.pdf and b/examples/mrw-test.pdf differ diff --git a/examples/peter-muster-example-company-zuerich.pdf b/examples/peter-muster-example-company-zuerich.pdf index 97ffa90..d9d18fb 100644 Binary files a/examples/peter-muster-example-company-zuerich.pdf and b/examples/peter-muster-example-company-zuerich.pdf differ diff --git a/examples/photo-example.pdf b/examples/photo-example.pdf index 1430b8f..806e686 100644 Binary files a/examples/photo-example.pdf and b/examples/photo-example.pdf differ diff --git a/examples/photo-in-qr-example.pdf b/examples/photo-in-qr-example.pdf index b56b379..46686d6 100644 Binary files a/examples/photo-in-qr-example.pdf and b/examples/photo-in-qr-example.pdf differ diff --git a/examples/special-papersize.pdf b/examples/special-papersize.pdf index 312b7be..70946b8 100644 Binary files a/examples/special-papersize.pdf and b/examples/special-papersize.pdf differ diff --git a/examples/texstudio_d30266.pdf b/examples/texstudio_d30266.pdf index 785fc20..5a5ca33 100644 Binary files a/examples/texstudio_d30266.pdf and b/examples/texstudio_d30266.pdf differ diff --git a/makefile.am b/makefile.am index d245cd3..13f9a32 100644 --- a/makefile.am +++ b/makefile.am @@ -1,6 +1,6 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = examples screenshots -EXAMPLES = background-color-example background-image-example example john-doe-hongkong peter-muster-example-company-zuerich photo-example photo-in-qr-example photo-large-example special-papersize test-country-short texstudio_d30266 +EXAMPLES = background-color-example background-image-example centered-backside-example example john-doe-hongkong peter-muster-example-company-zuerich photo-example photo-in-qr-example photo-large-example special-papersize test-country-short texstudio_d30266 dist_latex_DATA = @PACKAGE_NAME@.cls dist_doc_DATA = README.md #@PACKAGE_NAME@.pdf diff --git a/screenshots/example.png b/screenshots/example.png index aee0d8b..107b6ee 100644 Binary files a/screenshots/example.png and b/screenshots/example.png differ diff --git a/screenshots/john-doe-hongkong-0.png b/screenshots/john-doe-hongkong-0.png index cebad4f..110e392 100644 Binary files a/screenshots/john-doe-hongkong-0.png and b/screenshots/john-doe-hongkong-0.png differ diff --git a/screenshots/john-doe-hongkong-1.png b/screenshots/john-doe-hongkong-1.png index 026ff57..42fb22e 100644 Binary files a/screenshots/john-doe-hongkong-1.png and b/screenshots/john-doe-hongkong-1.png differ diff --git a/screenshots/peter-muster-example-company-zuerich.png b/screenshots/peter-muster-example-company-zuerich.png index c435b8c..4255ab1 100644 Binary files a/screenshots/peter-muster-example-company-zuerich.png and b/screenshots/peter-muster-example-company-zuerich.png differ diff --git a/screenshots/photo-example.png b/screenshots/photo-example.png deleted file mode 100644 index e6c9395..0000000 Binary files a/screenshots/photo-example.png and /dev/null differ diff --git a/screenshots/photo-in-qr-example.png b/screenshots/photo-in-qr-example.png deleted file mode 100644 index 0a44ffa..0000000 Binary files a/screenshots/photo-in-qr-example.png and /dev/null differ diff --git a/screenshots/special-papersize.png b/screenshots/special-papersize.png deleted file mode 100644 index f1ec444..0000000 Binary files a/screenshots/special-papersize.png and /dev/null differ diff --git a/screenshots/texstudio_d30266.png b/screenshots/texstudio_d30266.png deleted file mode 100644 index 20773cd..0000000 Binary files a/screenshots/texstudio_d30266.png and /dev/null differ