Debian Codegraph @

texmf-dist/doc/xelatex/businesscard-qrcode/README.md

raw
1 Businesscard with QR-Code
2 =========================
3
4 What happens, if you give your visiting card to someone? Either he manually types the text into his computer or mobilefone, or it will end up in a box and be forgotten. Nowadays data is required electronically, not on paper. Here is the solution: A visiting card with QR-Code that contains a full [vcard], so that it can be scanned with an [app] on the mobilefone and therefore automatically imported into the electronic contacts. This also works well, when you are offline and bluetooth transfer fails. So here is the highly configurable businescard or visitingcards with full [vcard] as QR-Code, ready to send to online printers. You can specify the exact size of the paper and the content within the paper, inluding generation of crop marks.
5
6 Other available visitingcard templates, such as [mschlenker] distribute the cards on an A4 paper. But if you want a professional printer, such as [onlineprinters], then you need to be able to generate a PDF with exactly one card, an exactly defined border and crop marks.
7
8 [![Example: John Doe from Hongkong](screenshots/john-doe-hongkong.jpg)](examples/john-doe-hongkong.tex)
9 [![Example: Businesscard of Peter Muster from Zürich](screenshots/peter-muster-example-company-zuerich.jpg)](examples/peter-muster-example-company-zuerich.tex)
10 [![Example: Nearly Real Examle Of My Card](screenshots/example.jpg)](examples/example.tex)
11
12
13 Features
14 ========
15
16 - all information is in the QR-Code
17 - full privacy control: input is optional, specify only what you need, you decide what information to share, e.g. I print three cards, with phone and address, without address and only with electronical contacts, no phone nor address
18 - optional icons, optional small hint texts
19 - several alignments
20 - freely defined size of paper and content
21 - supports honoric titles, full names, address with post office box and extended information
22 - supports telefone, email, [jabber] and [matrix] chat
23 - supports several urls for your hompages
24 - supports [gitea], [github], [git]
25 - supports [facebook], [twitter], [google+], [youtube], [wikipedia]
26 - supports [pgp] key url and fingerprint
27 - supports [nextcloud federation id]
28
29
30 Usage
31 =====
32
33 Installation
34 ------------
35
36 Copy `businesscard-qrcode/businesscard-qrcode.cls` to your LaTeX class path. Simplest way for installation on Linux:
37
38 ```bash
39 mkdir ~/texmf/tex/latex/businesscard-qrcode
40 cp businesscard-qrcode/businesscard-qrcode.cls ~/texmf/tex/latex/businesscard-qrcode/
41 ```
42
43
44 Compilation
45 ------------
46
47 **Important:** You must use **`xelatex`** for compilation, because `xelatex` properly supports UTF-8 (e.g. needed for german umlauts or chinese characters). The package `inputenc` messes up with package `qrcode`.
48
49
50 Document Structure
51 ------------------
52
53 ```latex
54 \documentclass[<layout-options>]{businesscard-qrcode}
55
56 <data-definitions>
57
58 \begin{document}
59 \drawcard
60 \end{document}
61 ```
62
63 where `<layout-options>` and `<data-definitions>` are explained below.
64
65
66 Layout Options
67 --------------
68
69 Layout options are set as options to the `\documentclass`, e.g.:
70
71 \documentclass[textwidth=0.7,qrwidth=0.25,www,nofill,iconright,rightalign,hint,icon,textfirst]{businesscard-qrcode}
72
73 ### Available Options:
74
75 - `paperwidth=`: width of the physical paper where the card is printed on (incl. border), default: `89mm`
76 - `paperheight=`: height of the physical paper where the card is printed on (incl. border), default: `59mm`
77 - `contentwidth=`: width of the card's content without the border that is cut, default: `85mm`
78 - `contentheight=`: height of the card's content without the border that is cut, default: `55mm`
79 - `fontsize=`: any fontsize allowed in `extarticle`, that are `8pt`, `9pt`, `10pt`, `11pt`, `12pt`, `14pt`, `17pt` and `20pt`, default: `8pt`
80 - `padding=`: padding within the card's content, default: `2mm`
81 - `cutdist=`: distance in `mm` where the cut marks are set, default: `2`
82 - `cutlen=`: length of the cut marks in `mm`, default: `1`
83 - `textwidth=`: relative width of the text block `1` means full width, so `qrwidth` plus `textwidth` should be smaller than `1` the remainig space is left empty between the text and QR-Code, default: `0.55` (that's 55% of the available space)
84 - `qrwidth=`: relative width of the QR-Code `1` means full width, so `qrwidth` plus `textwidth` should be smaller than `1` the remainig space is left empty between the text and QR-Code, default: `0.40` (that's 40% of the available space)
85 - `lang=`: language of the wikipedia page, will be prepended before `wikipedia.org`, e.g. `de.wikipedia.org`, default: `de`
86 - `address`or `noaddress`: disable rendering of the address in text and QR-Code, default: address
87 - `hint` or `nohint`: show the little text hints, default: `hint`
88 - `icon` or `noicon`: show the icons, default: `icon`
89 - `rightalign` or `leftalign`: align text left or right, default: `rightalign`
90 - `iconleft` or `iconright`: show icon left or right of the text, default: `iconleft`
91 - `fill` or `nofill`: fill empty space between icon and text, default: `fill`
92 - `qrfirst` or `textfirst`: switch position of QR-Code and text block, default: `qrfirst`
93 - `https` or `www`: should links in the hints be prefixed with `https://` or `www.`, default: `https`
94
95
96 Data Definitions
97 ----------------
98
99 Your data is entered with commands in the document, e.g.:
100
101 \email{[email protected]}
102
103 **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.
104
105 See this example_
106
107 \givennames{Juan\ Pablo}
108 \familynames{Martínez\ Escudero}
109 \additionalnames{Example\ Company\ Ltd.}
110 \street{Im\ Stutz\ 123}
111 \pobox{Postfach\ 4567}
112 \phone{+41 52 123 45 67}
113 \pgpurl{https://pgp.mit.edu/pks/lookup?op=get\&search=0xF62315D04D4C0C62}
114
115 ### Recognized Commands:
116
117 - `\type`: either `home` or `work` for personal or business cards
118 - `\givennames`: your first name and eventual middle names
119 - `\familynames`: your family names
120 - `\honoricprefix`: honorix name prefixes, e.g. academic titles
121 - `\honoricsuffix`: honoric name suffixes
122 - `\additionalnames`: additionl names — I use it for the company name in business cards
123 - `\pobox`: post office box
124 - `\extaddr`: address extension, e.g. name of a building or floor number
125 - `\street`: street and number of the address
126 - `\city`: name of the address location
127 - `\region`: region of the address
128 - `\zip`: zip code of the address
129 - `\country`: full name of country of the address in the language of the card
130 - `\phone`: your phone number, the phone is marked as mobile, so to be used for voice and text (SMS)
131 - `\email`: your email address
132 - `\jabber`: your [jabber] or xmpp chat address
133 - `\matrixorg`: your [matrix] chat addres, hint: use [riot] messenger for [matrix]
134 - `\cloud`: your [nextcloud federation id] — the url is prepended automatically
135 - `\homepage`: url to a web site with «home» icon — without `https://` not `www` (unless it is required), this is prepended automatically
136 - `\world`: url to a web site with «world» icon — without `https://` not `www` (unless it is required), this is prepended automatically
137 - `\link`: url to a web site with «link» icon — without `https://` not `www` (unless it is required), this is prepended automatically
138 - `\wordpress`: url to a web site with «wordpress» icon — without `https://` not `www` (unless it is required), this is prepended automatically
139 - `\drupal`: url to a web site with «» icon — without `https://` not `www` (unless it is required), this is prepended automatically
140 - `\joomla`: url to a web site with «joomla» icon — without `https://` not `www` (unless it is required), this is prepended automatically
141 - `\wikipedia`: if you or your company have a [wikipedia] entry, specify documentclass option `lang` for the language of you entry and use this definition for the name of your page — the url is prepended automatically
142 - `\git`: the url of your [git] repository — without `https://` not `www` (unless it is required), this is prepended automatically
143 - `\gitea`: the url of your [gitea] project page, you can use this tag also for other project management sites, such as [gogs] — without `https://` not `www` (unless it is required), this is prepended automatically
144 - `\github`: your account name on [github] — only the name of the account, the url is prepended automatically
145 - `\facebook`: your account name on [facebook] or the name of your page — only the name of the account or page, the url is prepended automatically
146 - `\twitter`: your account name on [twitter] — only the name of the account, the url is prepended automatically
147 - `\youtube`: your account name on [youtube] — only the name of the account, the url is prepended automatically
148 - `\google`: your account name on [google+] — only the name of the account, the url is prepended automatically
149 - `\pgpurl`: the full url to your pgp public key (only added to the QR-Code, not shown in the text)
150 - `\pgpfingerprint`: the fingerprint of your pgp public key
151
152
153 Print the Card
154 ==============
155
156 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):
157
158 \documentclass[paperheight=5.4cm,paperwidth=10.4cm,
159 contentheight=5cm,contentwidth=10cm,
160 cutdist=2]
161 {businesscard-qrcode}
162
163 ![example with special paper size](screenshots/special-papersize.jpg)
164
165
166 Usage Example
167 =============
168
169 Include the documentclass, define your data and add the document environment:
170
171 ```latex
172 \documentclass{businesscard-qrcode}
173
174 \type{home}
175 \givennames{An}
176 \familynames{Example}
177 \street{Einbahnstrasse\ 84}
178 \city{Irgendwo}
179 \zip{1001}
180 \country{Switzerland}
181 \homepage{example.com}
182 \email{[email protected]}
183
184 \begin{document}
185 \drawcard
186 \end{document}
187 ```
188
189 Save it as file [texstudio_d30266.tex] and compile it to get [texstudio_d30266.pdf]:
190
191 xelatex -synctex=1 -interaction=nonstopmode texstudio_d30266.tex
192
193 ![the visiting card resulting from the usage example](screenshots/texstudio_d30266.jpg)
194
195 See [examples] for more examples.
196
197
198 Need More
199 =========
200
201 If you are missing a feature or a configuration option, consult the [project] page. Just open a [ticket] and the [author] will care about it. Or extend it, it's [lgpl].
202
203
204
205 [examples]: examples "more examples"
206 [vcard]: https://tools.ietf.org/html/rfc6350 "RFC 6350, vCard Format Specification Version 4.0"
207 [app]: https://f-droid.org/de/packages/com.google.zxing.client.android/ "Barcode Scanner"
208 [onlineprinters]: https://de.onlineprinters.ch/k/standardvisitenkarten "onlineprinters.ch"
209 [mschlenker]: https://gist.github.com/mschlenker/f60e0f15ff1edfc4881c "visitenkarten-qr.tex"
210 [texstudio_d30266.tex]: examples/texstudio_d30266.tex "simple example source file"
211 [texstudio_d30266.pdf]: examples/texstudio_d30266.pdf "simple example resulting pdf"
212 [example.tex]: examples/example.tex "larger example source file"
213 [example.pdf]: examples/example.pdf "larger example resulting pdf"
214 [jabber]: https://en.wikipedia.org/wiki/Jabber.org "the Jabber / XMPP instant messaging standard"
215 [matrix]: https://matrix.org "the matrix instant messaging standard"
216 [riot]: https://riot.im "matrix compatible instant messaging tool for all platforms"
217 [gitea]: https://gitea.io "github-like project repository, a gogs clone"
218 [gogs]: https://gitea.io "github-like project repository"
219 [github]: https://github.com "a project repository"
220 [git]: https://git-scm.com "a distributed version control system"
221 [facebook]: https://facebook.com "a social website"
222 [twitter]: https://twitter.com "a social website"
223 [google+]: https://plus.google.com "a social website"
224 [youtube]: https://youtube.com "a video website"
225 [wikipedia]: https://wikipedia.org "the online encyclopedia"
226 [pgp]: https://en.wikipedia.org/wiki/Pretty_Good_Privacy "pretty good privacy — encryption standard"
227 [nextcloud federation id]: https://nextcloud.com/federation "share your cloud across others"
228 [I]: https://marc.wäckerlin.ch "Marc Wäckerlin"
229 [ticket]: https://mrw.sh/templates/businesscard-qrcode/issues "open issues and tickets for my LaTeX-templates project"
230 [author]: https://marc.wäckerlin.ch "Marc Wäckerlin"
231 [project]: https://mrw.sh/templates/businesscard-qrcode "the main project page"
232 [lgpl]: https://www.gnu.org/licenses/lgpl-3.0 "Library GNU Public License"