diff --git a/.latexmkrc b/.latexmkrc new file mode 100644 index 0000000..81a2bba --- /dev/null +++ b/.latexmkrc @@ -0,0 +1,21 @@ +use strict; +use warnings; +use Cwd qw(abs_path); +use File::Basename qw(dirname); +use File::Spec; + +BEGIN { + return if $ENV{'BCQ_TEXINPUTS_SET'}; + + my $repo_root = dirname(abs_path(__FILE__)); + my $examples_dir = File::Spec->catdir($repo_root, 'examples'); + my $existing = $ENV{'TEXINPUTS'}; + + if (defined $existing && length $existing) { + $ENV{'TEXINPUTS'} = join(':', $repo_root, $examples_dir, $existing); + } else { + $ENV{'TEXINPUTS'} = join(':', $repo_root, $examples_dir, ''); + } + + $ENV{'BCQ_TEXINPUTS_SET'} = 1; +} diff --git a/README.md b/README.md index 288608d..24212ca 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,19 @@ Document Structure where `` and `` are explained below. +Escaping Spaces in Data +----------------------- + +Whitespace inside `\tag{...}` parameters is ignored by TeX when the data is later passed to the QR encoder. To keep literal spaces in the resulting vCard you *must* escape every space with `\ ` inside each data macro: + +```latex +\company{Example\ Company\ Ltd.} +\city{New\ York} +\phone{+41\ 44\ 123\ 45\ 67} +``` + +All examples in this repository follow that convention—when you add your own data, please do the same. + Layout Options -------------- @@ -111,16 +124,18 @@ Your data is entered with commands in the document, e.g.: \email{name@example.com} -**Important:**: Spaces *must* be escaped by a backslash `\` in all data definitions, if they should be kept in the QR-Code. This is a limitation of the `qrcode`-package- Without escaping `\`, spaces are show in the text block, but not in the QR-Code. You may make use of this feature, if you do not escape the spaces in `\phone` and `\pgpfingerprint`, but everywhere else. This way, phone number and pgp fingerprint are condensed in the QR-Code. +**Important:** Spaces *must* be escaped by a backslash `\` in all data definitions, otherwise the QR payload will silently drop them. Always write `\company{Example\ Company\ Ltd.}` or `\phone{+41\ 52\ 123\ 45\ 67}`. -See this example_ +All data commands accept an optional `[hide]` (or `[hide=true]`) argument. When `hide` is set the value is stored in the QR/vCard only and omitted from the human readable text. Example: `\email[hide]{secret@example.com}` keeps the address available for scanners but off the printed card. + +See this example: \givennames{Juan\ Pablo} \familynames{Martínez\ Escudero} \company{Example\ Company\ Ltd.} \street{Im\ Stutz\ 123} \pobox{Postfach\ 4567} - \phone{+41 52 123 45 67} + \phone{+41\ 52\ 123\ 45\ 67} \pgpurl{https://pgp.mit.edu/pks/lookup?op=get\&search=0xF62315D04D4C0C62} ### Recognized Commands: @@ -130,7 +145,7 @@ See this example_ - `\familynames`: your family names - `\honoricprefix`: honorix name prefixes, e.g. academic titles - `\honoricsuffix`: honoric name suffixes -- `\company`: company name — displayed on a second line below the name +- `\company[logo=...,height=...,hide]`: company name — always rendered on a second line underneath the personal name. `logo=` may contain either a filename or arbitrary TeX content (e.g. a custom macro); when present, it is shown first, followed by the textual company/title/role string (if visible). `height` (default `1.5em`) controls the logo's size **and** the reserved vertical space for that second line, so adapting the height keeps the layout balanced. Even when `hide` is set, the company still appears in the QR/vCard, and the logo remains visible. - `\pobox`: post office box - `\extaddr`: address extension, e.g. name of a building or floor number - `\street`: street and number of the address @@ -160,15 +175,17 @@ See this example_ - `\pgpurl`: the full url to your pgp public key (only added to the QR-Code, not shown in the text) - `\pgpfingerprint`: the fingerprint of your pgp public key - `\logo[height=...]{file}`: path to logo file (PNG, JPG, etc.) for display next to name. Optional `height` parameter (e.g., `height=6em`) overrides global `logoheight` option. -- `\qrlogo[scale=...,opacity=...]{file}`: path to logo file for display in QR code center. Optional parameters: `scale` (fraction like `0.3` for 30% of QR width) overrides `qrlogoscale`, `opacity` (0.0-1.0) overrides `qrbgopacity`. -- `\companylogo{content}`: arbitrary content (e.g., `\includegraphics[width=3cm]{logo.png}`) displayed instead of company text below name. Company text still appears in vCard. +- `\qrlogo[scale=...,opacity=...]{file}`: path to logo file for display in QR code center. Optional parameters: `scale` (fraction like `0.3` for 30% of QR width) overrides `qrlogoscale`, `opacity` (0.0-1.0) overrides `qrbgopacity`. Remember that every logo lowers the QR-code's error-correction margin—keep the scale conservative and always test the code with multiple devices (smartphones plus command-line tools such as `zbarimg`). +- `\companylogo[height=...]{content}`: backwards-compatible helper that still allows arbitrary content below the name. Prefer the new `\company[logo=...]{...}` syntax, but this command remains available. - `\background[scale=...,opacity=...]{file/color}`: path to background image file or color name (e.g., `yellow!20`, `blue!10`). If file exists, it's used as image; otherwise treated as color. Optional parameters: `scale` (factor like `1.5`) overrides `bgscale`, `opacity` (0.0-1.0) overrides `bgopacity`. Print the Card ============== -The card is designed for professional printing service, such as [onlineprinters]. Please *check* the card and the *QR-Code* well before you pay money for printing! Choose a format, default is `89mm×59mm` with 2mm boder, so the card content is `85mm×55mm`. But the card can be adapted to any other printing format. To print cards of size `10cm×5cm` with `2mm` cut, you specify, [e.g.](examples/special-papersize.tex): +The card is designed for professional printing service, such as [onlineprinters]. Please *check* the card and the *QR-Code* well before you pay money for printing! Scan the QR with at least one smartphone app **and** a decoder such as `zbarimg businesscard.pdf` on Linux to make sure the payload survives background images, logos in the QR code, etc. + +Choose a format, default is `89mm×59mm` with 2mm boder, so the card content is `85mm×55mm`. But the card can be adapted to any other printing format. To print cards of size `10cm×5cm` with `2mm` cut, you specify, [e.g.](examples/special-papersize.tex): \documentclass[paperheight=5.4cm,paperwidth=10.4cm, contentheight=5cm,contentwidth=10cm, @@ -209,6 +226,17 @@ Save it as file [texstudio_d30266.tex] and compile it to get [texstudio_d30266.p See [examples] for more examples. +### Building with latexmk / IDEs + +Editors such as VS Code’s LaTeX Workshop usually call `latexmk` from the +workspace root. The repository now ships a project-local `.latexmkrc` +(and `examples/.latexmkrc`) that extend `TEXINPUTS` so TeX always prefers +the class file from this checkout over anything installed under +`~/texmf`. Leave those files in place when compiling from your IDE. +If you invoke `xelatex` manually without `latexmk`, set +`TEXINPUTS=/path/to/businesscard-qrcode:` (or run the command from the +repository root) to achieve the same effect. + Logo (optional) =============== diff --git a/businesscard-qrcode.cls b/businesscard-qrcode.cls index ec166d2..5ac8eee 100644 --- a/businesscard-qrcode.cls +++ b/businesscard-qrcode.cls @@ -93,10 +93,53 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % data registration -\newcommand\registerData[1]{ - \expandafter\newcommand\csname #1\endcsname[1]{ - \expandafter\def\csname X#1\endcsname{##1} - } +\newcommand\BCQ@datareset{% + \def\BCQ@data@hide{}% + \def\BCQ@data@logo{}% + \def\BCQ@data@height{}% +} +\define@key{BCQ@data}{hide}[true]{% + \edef\BCQ@data@hide{#1}% +} +\define@key{BCQ@data}{logo}{% + \def\BCQ@data@logo{#1}% +} +\define@key{BCQ@data}{height}{% + \def\BCQ@data@height{#1}% +} +\newlength{\BCQ@companybrandingheight} +\setlength{\BCQ@companybrandingheight}{2em} +\newcommand\BCQ@applycompanyoptions{% + \csundef{Xcompanylogo}% + \csundef{Xcompanylogoheight}% + \setlength{\BCQ@companybrandingheight}{2em}% + \ifx\BCQ@data@logo\@empty\else + \let\Xcompanylogo\BCQ@data@logo + \ifx\BCQ@data@height\@empty + \def\Xcompanylogoheight{1.5em}% + \else + \def\Xcompanylogoheight{\BCQ@data@height}% + \fi + \setlength{\BCQ@companybrandingheight}{\Xcompanylogoheight}% + \fi +} +\newcommand\registerData[1]{% + \expandafter\newcommand\csname #1\endcsname[2][]{% + \BCQ@datareset + \edef\BCQ@data@options{##1}% + \ifx\BCQ@data@options\@empty\else + \setkeys{BCQ@data}{##1}% + \fi + \csundef{X#1@hide}% + \ifx\BCQ@data@hide\@empty\else + \edef\BCQ@data@hidetmp{\BCQ@data@hide}% + \ifdefstring{\BCQ@data@hidetmp}{false}{}{% + \expandafter\def\csname X#1@hide\endcsname{true}% + }% + \fi + \expandafter\def\csname X#1\endcsname{##2}% + \ifstrequal{#1}{company}{\BCQ@applycompanyoptions}{}% + }% } \registerData{type} \registerData{givennames} @@ -178,12 +221,38 @@ \registerData{companylogo} % content (image/object) to display instead of company text (company still in vCard) +\define@key{BCQ@companylogo}{height}{% + \def\BCQ@companylogo@height{#1}% +} +\renewcommand\companylogo[2][]{% + \def\BCQ@companylogo@height{}% + \edef\BCQ@companylogo@options{#1}% + \ifx\BCQ@companylogo@options\@empty\else + \setkeys{BCQ@companylogo}{#1}% + \fi + \def\Xcompanylogo{#2}% + \ifx\BCQ@companylogo@height\@empty + \def\Xcompanylogoheight{1.5em}% + \else + \def\Xcompanylogoheight{\BCQ@companylogo@height}% + \fi + \setlength{\BCQ@companybrandingheight}{\Xcompanylogoheight}% +} + +\newcommand\ifvisible[3]{% + \ifcsdef{#1}{% + \ifcsdef{#1@hide}{#3}{#2}% + }{#3}% +} +\newcommand\conddisplay[1]{% + \ifvisible{#1}{\exec{#1}}{}% +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % auxiliary commands \newcommand\enforceright{\leftskip0pt plus 1fill\rightskip0pt} \newcommand\exec[1]{\csname #1\endcsname} -\newcommand\insa[3][]{\ifcsdef{#2}{ +\newcommand\insa[3][]{\ifvisible{#2}{ \ifBCQ@iconleft \ifBCQ@icon\parbox{1em}{\centering\exec{#3}}\ \fi\ifBCQ@hint{\tiny#1}\fi\ifBCQ@fill\hfill\fi\exec{#2} @@ -210,37 +279,64 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % name - assemble full name from the parts, such as Xgivennames and Xfamilynames -\newcommand\personalname{% +\newcommand\personalnamevcard{% \ifexists{Xhonoricprefix}{\Xhonoricprefix\ }% \ifexists{Xgivennames}{\Xgivennames\ }% \ifexists{Xadditionalnames}{\Xadditionalnames\ }% \ifexists{Xfamilynames}{\Xfamilynames}% \ifexists{Xhonoricsuffix}{\ \Xhonoricsuffix}% } +\newcommand\personalname{% + \ifvisible{Xhonoricprefix}{\Xhonoricprefix\ }{}% + \ifvisible{Xgivennames}{\Xgivennames\ }{}% + \ifvisible{Xadditionalnames}{\Xadditionalnames\ }{}% + \ifvisible{Xfamilynames}{\Xfamilynames}{}% + \ifvisible{Xhonoricsuffix}{\ \Xhonoricsuffix}{}% +} \newcommand\ifhaspersonalname[2]{% - \ifcsdef{Xhonoricprefix}{#1}{% - \ifcsdef{Xgivennames}{#1}{% - \ifcsdef{Xadditionalnames}{#1}{% - \ifcsdef{Xfamilynames}{#1}{% - \ifcsdef{Xhonoricsuffix}{#1}{#2}% + \ifvisible{Xhonoricprefix}{#1}{% + \ifvisible{Xgivennames}{#1}{% + \ifvisible{Xadditionalnames}{#1}{% + \ifvisible{Xfamilynames}{#1}{% + \ifvisible{Xhonoricsuffix}{#1}{#2}% }% }% }% }% } -\newcommand\ifhasposition[2]{% - \ifcsdef{Xcompany}{#1}{% - \ifcsdef{Xtitle}{#1}{% - \ifcsdef{Xrole}{#1}{#2}% +\newcommand\ifhaspositiontext[2]{% + \ifvisible{Xcompany}{#1}{% + \ifvisible{Xtitle}{#1}{% + \ifvisible{Xrole}{#1}{#2}% }% }% } +\newcommand\ifhaspositionblock[2]{% + \ifhaspositiontext{#1}{% + \ifcsdef{Xcompanylogo}{#1}{#2}% + }% +} +\newcommand\ifhaspersonalnamevcard[2]{% + \ifcsname Xhonoricprefix\endcsname + #1% + \else\ifcsname Xgivennames\endcsname + #1% + \else\ifcsname Xadditionalnames\endcsname + #1% + \else\ifcsname Xfamilynames\endcsname + #1% + \else\ifcsname Xhonoricsuffix\endcsname + #1% + \else + #2% + \fi\fi\fi\fi\fi +} % heightscale - calculate available height for text/QR % 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}{\dimexpr\ifhaspersonalname{2em}{0em}+\ifhasposition{2em}{0em}\relax}% + \setlength{\BCQ@reservedheight}{\dimexpr\ifhaspersonalname{2em}{0em}+\ifhaspositionblock{\BCQ@companybrandingheight}{0pt}\relax}% \ifdim\BCQ@logoheightdimen>\BCQ@reservedheight \setlength{\BCQ@heightscale}{\dimexpr\textheight-\BCQ@logoheightdimen-\ifcsdef{Xpgpfingerprint}{2em}{0em}\relax}% \else @@ -249,28 +345,87 @@ } \newcommand\heightscale{\BCQ@heightscale} -\newcommand\companyrolestring{% - \ifcsdef{Xtitle}{\Xtitle}{}% - \ifcsdef{Xrole}{% - \ifcsdef{Xtitle}{, }{}% +\newcommand\companyrolestringdisplay{% + \ifvisible{Xtitle}{\Xtitle}{}% + \ifvisible{Xrole}{% + \ifvisible{Xtitle}{, }{}% \Xrole }{}% - \ifcsdef{Xcompany}{% - \ifcsdef{Xtitle}{\ \Xcompany}{% - \ifcsdef{Xrole}{\ \Xcompany}{\Xcompany}% + \ifvisible{Xcompany}{% + \ifvisible{Xtitle}{\ \Xcompany}{% + \ifvisible{Xrole}{\ \Xcompany}{\Xcompany}% }% }{}% } -\newcommand\name{% - \personalname - \ifhasposition{% - \ifhaspersonalname{% - \ (\companyrolestring)% - }{% - \companyrolestring - }% +\newcommand\companybrandingline{% + \ifcsdef{Xcompanylogo}{\companylogocontent}{}% + \ifhaspositiontext{% + \ifcsdef{Xcompanylogo}{\hspace{0.5em}}{}% + \companyrolestringdisplay }{}% } +\newcommand\companyrolestringvcard{% + \ifcsname Xtitle\endcsname + \Xtitle + \fi + \ifcsname Xrole\endcsname + \ifcsname Xtitle\endcsname , \fi + \Xrole + \fi + \ifcsname Xcompany\endcsname + \ifcsname Xtitle\endcsname + \ \Xcompany + \else + \ifcsname Xrole\endcsname + \ \Xcompany + \else + \Xcompany + \fi + \fi + \fi +} +\newcommand\displayname{% + \ifhaspersonalname{\personalname}{\companybrandingline}% +} +\newcommand\BCQ@appendvcardposition{% + \ifhaspersonalnamevcard{% + \ (\companyrolestringvcard)% + }{% + \companyrolestringvcard + }% +} +\newcommand\BCQ@buildname{% + \ifhaspersonalnamevcard{% + \personalnamevcard + \ifcsname Xtitle\endcsname + \BCQ@appendvcardposition + \else + \ifcsname Xrole\endcsname + \BCQ@appendvcardposition + \else + \ifcsname Xcompany\endcsname + \BCQ@appendvcardposition + \fi + \fi + \fi + }{% + \companyrolestringvcard + }% +} +\let\BCQ@cachedname\@empty +\newcommand\BCQ@setnamecache{% + \begingroup + \edef\BCQ@tmp{\BCQ@buildname}% + \global\let\BCQ@cachedname\BCQ@tmp + \endgroup +} +\newcommand\name{% + \ifx\BCQ@cachedname\@empty + \BCQ@buildname + \else + \BCQ@cachedname + \fi +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -318,35 +473,42 @@ END:VCARD\BCQ@nl} % formatcountry - format country based on length and options \newcommand\formatcountry{% \ifcsdef{Xcountry}{% - \def\BCQ@shouldinline{false}% - % Check countryformat option - \ifdefstring{\BCQ@countryformat}{inline}{% - \def\BCQ@shouldinline{true}% - }{% - \ifdefstring{\BCQ@countryformat}{below}{% - \def\BCQ@shouldinline{false}% + \ifvisible{Xcountry}{% + \def\BCQ@shouldinline{false}% + \def\BCQ@haszipcity{false}% + \ifvisible{Xcity}{\def\BCQ@haszipcity{true}}{}% + \ifvisible{Xzip}{\def\BCQ@haszipcity{true}}{}% + % Check countryformat option + \ifdefstring{\BCQ@countryformat}{inline}{% + \def\BCQ@shouldinline{true}% }{% - % auto mode: check length - \StrLen{\Xcountry}[\BCQ@countrylen]% - \ifnum\BCQ@countrylen<4\relax% - % Short country code AND city/zip exists → inline - \ifboolexpr{test {\ifcsdef{Xcity}} or test {\ifcsdef{Xzip}}}{% - \def\BCQ@shouldinline{true}% - }{}% - \fi% + \ifdefstring{\BCQ@countryformat}{below}{% + \def\BCQ@shouldinline{false}% + }{% + % auto mode: check length + \StrLen{\Xcountry}[\BCQ@countrylen]% + \ifnum\BCQ@countrylen<4\relax% + % Short country code AND city/zip exists → inline + \ifdefstring{\BCQ@haszipcity}{true}{% + \def\BCQ@shouldinline{true}% + }{}% + \fi% + }% }% - }% - % Output country - \ifdefstring{\BCQ@shouldinline}{true}{% - \Xcountry\ \textemdash\ \cond{Xzip} \cond{Xcity}% - }{% - \cond{Xzip} \cond{Xcity} + % Output country + \ifdefstring{\BCQ@shouldinline}{true}{% + \Xcountry\ \textemdash\ \conddisplay{Xzip} \conddisplay{Xcity}% + }{% + \conddisplay{Xzip} \conddisplay{Xcity} - \Xcountry - + \Xcountry + + }% + }{% + \conddisplay{Xzip} \conddisplay{Xcity}% }% }{ - \cond{Xzip} \cond{Xcity} + \conddisplay{Xzip} \conddisplay{Xcity}% }% } @@ -354,15 +516,15 @@ END:VCARD\BCQ@nl} % address - the address as shown in the textbox \newcommand\address{ - \cond{Xpobox} + \conddisplay{Xpobox} - \cond{Xextaddr} + \conddisplay{Xextaddr} - \cond{Xstreet} + \conddisplay{Xstreet} \formatcountry - \cond{Xregion} + \conddisplay{Xregion} } @@ -450,7 +612,7 @@ END:VCARD\BCQ@nl} % insertname - insert the name on the top \newcommand\insertname{ % typeset name into box for measurement - \sbox{\BCQ@namebox}{\bfseries\cond{name}}% + \sbox{\BCQ@namebox}{\bfseries\cond{displayname}}% % Set default logoheight if not specified: 4em with company, 2em without \ifx\BCQ@logoheight\@empty \ifcsdef{Xcompany}{\def\BCQ@logoheight{4em}}{\def\BCQ@logoheight{2em}}% @@ -486,21 +648,24 @@ END:VCARD\BCQ@nl} \hspace{\BCQ@logosepused} \begin{minipage}[c]{\BCQ@namewidth}% name column \ifBCQ@rightalign\raggedleft\fi% apply alignment - {\bfseries\cond{name}}% - % Optional company logo below name - \ifcsdef{Xcompanylogo}{\\\companylogocontent}{}% + {\bfseries\cond{displayname}}% + \ifhaspersonalname{% + \ifhaspositionblock{\\\companybrandingline}{}% + }{}% \end{minipage} \end{minipage} }{% no logo: just name - {\bfseries\cond{name}}% - % Optional company logo below name - \ifcsdef{Xcompanylogo}{\\\companylogocontent}{}% + {\bfseries\cond{displayname}}% + \ifhaspersonalname{% + \ifhaspositionblock{\\\companybrandingline}{}% + }{}% } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % drawcardcontent - assemble all blocks (name, text, qr, pgp) \newcommand\drawcardcontent{ + \BCQ@setnamecache \ifBCQ@rightalign\begin{flushright}\fi \insertname \noindent\makebox[\linewidth]{\rule{\paperwidth}{0.4pt}} % horizontal line @@ -597,14 +762,19 @@ END:VCARD\BCQ@nl} \crop[cut] \newcommand\companylogocontent{% \begingroup - \edef\BCQ@companylogomeaning{\meaning\Xcompanylogo}% - \IfSubStr{\BCQ@companylogomeaning}{\string\\}{% + \edef\BCQ@companylogoscan{\expandafter\detokenize\expandafter{\Xcompanylogo}}% + \IfSubStr{\BCQ@companylogoscan}{\string\\}{% \endgroup \Xcompanylogo }{% + \xdef\BCQ@companylogopath{\BCQ@companylogoscan}% \endgroup - \IfFileExists{\Xcompanylogo}{% - \includegraphics[width=\linewidth]{\Xcompanylogo}% + \IfFileExists{\BCQ@companylogopath}{% + \edef\BCQ@companylogoheightused{1.5em}% + \ifcsdef{Xcompanylogoheight}{% + \edef\BCQ@companylogoheightused{\Xcompanylogoheight}% + }{}% + \includegraphics[height=\BCQ@companylogoheightused]{\BCQ@companylogopath}% }{% \Xcompanylogo }% diff --git a/examples/.latexmkrc b/examples/.latexmkrc new file mode 100644 index 0000000..973aecb --- /dev/null +++ b/examples/.latexmkrc @@ -0,0 +1,10 @@ +use strict; +use warnings; +use Cwd qw(abs_path); +use File::Basename qw(dirname); +use File::Spec; + +my $this_dir = dirname(abs_path(__FILE__)); +my $root_rc = File::Spec->catfile($this_dir, '..', '.latexmkrc'); + +do $root_rc if -e $root_rc; diff --git a/examples/background-color-example.pdf b/examples/background-color-example.pdf deleted file mode 100644 index 65bbb4f..0000000 Binary files a/examples/background-color-example.pdf and /dev/null differ diff --git a/examples/background-color-example.tex b/examples/background-color-example.tex index c1157cb..03a3b47 100644 --- a/examples/background-color-example.tex +++ b/examples/background-color-example.tex @@ -8,7 +8,7 @@ \city{Zürich} \zip{8000} \country{CH} -\phone{+41 44 123 45 67} +\phone{+41\ 44\ 123\ 45\ 67} \email{anna@example.ch} \homepage{example.ch} \background{yellow!20} diff --git a/examples/background-image-example.pdf b/examples/background-image-example.pdf deleted file mode 100644 index 21c262b..0000000 Binary files a/examples/background-image-example.pdf and /dev/null differ diff --git a/examples/background-image-example.tex b/examples/background-image-example.tex index 2355c44..504d193 100644 --- a/examples/background-image-example.tex +++ b/examples/background-image-example.tex @@ -4,12 +4,12 @@ \type{home} \givennames{Petra} \familynames{Test} -\company{Example Company Ltd.} +\company{Example\ Company\ Ltd.} \street{Bildstrasse\ 99} \city{Basel} \zip{4000} \country{CH} -\phone{+41 61 123 45 67} +\phone{+41\ 61\ 123\ 45\ 67} \email{petra@example.ch} \background{background.png} \logo{photo.png} diff --git a/examples/example.pdf b/examples/example.pdf index bae990b..52133d9 100644 Binary files a/examples/example.pdf and b/examples/example.pdf differ diff --git a/examples/example.tex b/examples/example.tex index cab94ff..0afcf7a 100644 --- a/examples/example.tex +++ b/examples/example.tex @@ -1,6 +1,6 @@ \documentclass[noaddress,textwidth=0.58,qrwidth=0.35,https,fill,iconright,leftalign,hint,icon,textfirst]{businesscard-qrcode} -\phone{+12 34 567 89 00} +\phone{+12\ 34\ 567\ 89\ 00} \type{home} \honoricprefix{MSc\ ETH} \givennames{Marc} @@ -26,7 +26,7 @@ \city{Irgendwo} \zip{1001} \country{Switzerland} -\pgpfingerprint{4C8B 41AF FEC4 ED9D 3AF9 8500 F623 15D0 4D4C 0C62} +\pgpfingerprint{4C8B\ 41AF\ FEC4\ ED9D\ 3AF9\ 8500\ F623\ 15D0\ 4D4C\ 0C62} \pgpurl{https://pgp.mit.edu/pks/lookup?op=get\&search=0xF62315D04D4C0C62} %\jabber{\email} diff --git a/examples/john-doe-hongkong.pdf b/examples/john-doe-hongkong.pdf index eb60efb..411cee9 100644 Binary files a/examples/john-doe-hongkong.pdf and b/examples/john-doe-hongkong.pdf differ diff --git a/examples/john-doe-hongkong.tex b/examples/john-doe-hongkong.tex index 0865987..a19a0e0 100644 --- a/examples/john-doe-hongkong.tex +++ b/examples/john-doe-hongkong.tex @@ -4,7 +4,7 @@ \givennames{John} \familynames{Doe} \extaddr{20/F.,\ One\ Kowloon} -\city{Kowloon Bay} +\city{Kowloon\ Bay} \street{1\ Wang\ Yuen\ Street} \country{Hongkong} \phone{(852)\ 1234-5678} diff --git a/examples/makefile.am b/examples/makefile.am index 4dfc9c4..8a7a433 100644 --- a/examples/makefile.am +++ b/examples/makefile.am @@ -8,13 +8,16 @@ EXAMPLES = example \ background-color-example \ background-image-example \ test-country-short \ - texstudio_d30266 + texstudio_d30266 \ + mrw-test examplesdir = ${docdir}/examples dist_examples_DATA = $(EXAMPLES:%=%.tex) $(EXAMPLES:%=%.pdf) %.pdf:%.tex - xelatex -synctex=1 -interaction=nonstopmode $< + TEXINPUTS=..:${srcdir}:$${TEXINPUTS} xelatex -synctex=1 -interaction=nonstopmode $< CLEANFILES = $(EXAMPLES:%=%.aux) $(EXAMPLES:%=%.pdf) $(EXAMPLES:%=%.log) $(EXAMPLES:%=%.synctex.gz) $(EXAMPLES:%=%.fdb_latexmk) $(EXAMPLES:%=%.fls) $(EXAMPLES:%=%.xdv) MAINTAINERCLEANFILES = makefile.in + +EXTRA_DIST = .latexmkrc diff --git a/examples/peter-muster-example-company-zuerich.pdf b/examples/peter-muster-example-company-zuerich.pdf index 94c0d5d..67388b6 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/peter-muster-example-company-zuerich.tex b/examples/peter-muster-example-company-zuerich.tex index 48be708..fbd7d07 100644 --- a/examples/peter-muster-example-company-zuerich.tex +++ b/examples/peter-muster-example-company-zuerich.tex @@ -9,11 +9,11 @@ \zip{8000} \city{Zürich} \country{Switzerland} -\phone{+41 44 123 45 67} +\phone{+41\ 44\ 123\ 45\ 67} \email{peter.muster@example.com} -\pgpfingerprint{4C8B 41AF FEC4 ED9D 3AF9 8500 F623 15D0 4D4C 0C62} +\pgpfingerprint{4C8B\ 41AF\ FEC4\ ED9D\ 3AF9\ 8500\ F623\ 15D0\ 4D4C\ 0C62} \pgpurl{https://pgp.mit.edu/pks/lookup?op=get\&search=0xF62315D04D4C0C62} \begin{document} \drawcard -\end{document} \ No newline at end of file +\end{document} diff --git a/examples/photo-example.pdf b/examples/photo-example.pdf index ea8fc03..e9cfa64 100644 Binary files a/examples/photo-example.pdf and b/examples/photo-example.pdf differ diff --git a/examples/photo-example.tex b/examples/photo-example.tex index 8f59d4e..01c4d94 100644 --- a/examples/photo-example.tex +++ b/examples/photo-example.tex @@ -14,7 +14,7 @@ \familynames{Muster} \company{Example\ Company\ AG} \type{work} -\phone{+41 44 123 45 67} +\phone{+41\ 44\ 123\ 45\ 67} \email{alex.muster@example.com} \homepage{example.com} \github{example} diff --git a/examples/photo-in-qr-example.pdf b/examples/photo-in-qr-example.pdf index f574233..8cebb05 100644 Binary files a/examples/photo-in-qr-example.pdf and b/examples/photo-in-qr-example.pdf differ diff --git a/examples/photo-in-qr-example.tex b/examples/photo-in-qr-example.tex index ab903af..7913dd3 100644 --- a/examples/photo-in-qr-example.tex +++ b/examples/photo-in-qr-example.tex @@ -2,10 +2,10 @@ \documentclass[qrbgopacity=0.5]{businesscard-qrcode} \type{home} -%\givennames{Lisa\ Linda} -%\familynames{Döë} -\company{Example\ Company} -\companylogo{company-logo.png} +\givennames{Lìsà\ Lündö} +\familynames{Döë} +\company[logo=company-logo.png,height=4em,hide]{Lorem\ Ipsum} +%\company{Lorem\ Ipsum} \street{Main\ Street\ 123} \city{New\ York} \zip{10001} diff --git a/examples/photo-large-example.pdf b/examples/photo-large-example.pdf deleted file mode 100644 index 657848d..0000000 Binary files a/examples/photo-large-example.pdf and /dev/null differ diff --git a/examples/photo-large-example.tex b/examples/photo-large-example.tex index ea5b138..9c41b6c 100644 --- a/examples/photo-large-example.tex +++ b/examples/photo-large-example.tex @@ -8,7 +8,7 @@ \city{Winterthur} \zip{8400} \country{CH} -\phone{+41 52 123 45 67} +\phone{+41\ 52\ 123\ 45\ 67} \email{max@example.ch} \logo{photo.png} \background{background.png} diff --git a/examples/special-papersize.pdf b/examples/special-papersize.pdf index 8c2530b..6f426c7 100644 Binary files a/examples/special-papersize.pdf and b/examples/special-papersize.pdf differ diff --git a/examples/special-papersize.tex b/examples/special-papersize.tex index b239db0..691d470 100644 --- a/examples/special-papersize.tex +++ b/examples/special-papersize.tex @@ -10,7 +10,7 @@ \street{Waldstrasse\ 15} \zip{9876} \city{Nirgendwo} -\phone{+41 78 654 32 10} +\phone{+41\ 78\ 654\ 32\ 10} \email{gretchen.huber@example.com} \begin{document} diff --git a/examples/test-country-short.pdf b/examples/test-country-short.pdf deleted file mode 100644 index defcd4f..0000000 Binary files a/examples/test-country-short.pdf and /dev/null differ diff --git a/examples/test-country-short.tex b/examples/test-country-short.tex index f0247ad..7ddf77f 100644 --- a/examples/test-country-short.tex +++ b/examples/test-country-short.tex @@ -8,7 +8,7 @@ \city{Winterthur} \zip{8400} \country{CH} -\phone{+41 52 123 45 67} +\phone{+41\ 52\ 123\ 45\ 67} \email{max@example.ch} \begin{document} diff --git a/examples/texstudio_d30266.pdf b/examples/texstudio_d30266.pdf deleted file mode 100644 index 925c303..0000000 Binary files a/examples/texstudio_d30266.pdf and /dev/null differ diff --git a/makefile.am b/makefile.am index 8b6b084..f802760 100644 --- a/makefile.am +++ b/makefile.am @@ -10,3 +10,5 @@ dist_doc_DATA = README.md #@PACKAGE_NAME@.pdf #CLEANFILES = @PACKAGE_NAME@.pdf MAINTAINERCLEANFILES = makefile.in aclocal.m4 configure install-sh missing + +EXTRA_DIST = .latexmkrc diff --git a/screenshots/example.png b/screenshots/example.png index 916cfbe..aaf7fff 100644 Binary files a/screenshots/example.png and b/screenshots/example.png differ diff --git a/screenshots/john-doe-hongkong.png b/screenshots/john-doe-hongkong.png index c25580c..749cbcb 100644 Binary files a/screenshots/john-doe-hongkong.png and b/screenshots/john-doe-hongkong.png differ diff --git a/screenshots/peter-muster-example-company-zuerich.png b/screenshots/peter-muster-example-company-zuerich.png index faace92..2071d84 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 index fce1677..2b68f24 100644 Binary files a/screenshots/photo-example.png and b/screenshots/photo-example.png differ diff --git a/screenshots/photo-in-qr-example.png b/screenshots/photo-in-qr-example.png index 36ffd4b..0cb21c0 100644 Binary files a/screenshots/photo-in-qr-example.png and b/screenshots/photo-in-qr-example.png differ diff --git a/screenshots/special-papersize.png b/screenshots/special-papersize.png index 74317a2..ed02e7d 100644 Binary files a/screenshots/special-papersize.png and b/screenshots/special-papersize.png differ diff --git a/screenshots/texstudio_d30266.png b/screenshots/texstudio_d30266.png index 23e4e3a..f11d551 100644 Binary files a/screenshots/texstudio_d30266.png and b/screenshots/texstudio_d30266.png differ