-
Notifications
You must be signed in to change notification settings - Fork 4
/
card.tex
101 lines (79 loc) · 2.5 KB
/
card.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
%!TEX TS-program = xelatex
% BUSINESS CARD template
% created by Karol Kozioł (www.karol-koziol.net)
% for ShareLaTeX - online LaTeX editor (www.sharelatex.com)
% May 2013
% Edited by Amet Umerov <[email protected]>
% https://github.com/Amet13/business-card
% NOTE:
% before printing, choose "Page scaling = none" in printer settings
\documentclass[10pt]{article}
\usepackage[dvips]{graphicx}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{pst-barcode}
\usepackage[english,russian]{babel}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX},Renderer=Basic}
\setsansfont{Arial}
\usepackage{hyperref}
\hypersetup{
pdfauthor={John Doe},
pdftitle={Business Card},
}
\usepackage{geometry}
\geometry{total={210mm,297mm},hmargin=10mm,vmargin=10mm}
\pagestyle{empty}
\renewcommand\familydefault{\sfdefault}
%%% BUSINESS CARD SIZE
\newlength{\cardw}
\newlength{\cardh}
%% My size
\setlength{\cardw}{90mm}
\setlength{\cardh}{50mm}
%% ISO 7810 size: 85.60mm × 53.98mm
% \setlength{\cardw}{85.60mm}
% \setlength{\cardh}{53.98mm}
%% European size: 85mm × 55mm
% \setlength{\cardw}{85mm}
% \setlength{\cardh}{55mm}
%% US size: 3.5 in × 2 in
% \setlength{\cardw}{3.5in}
% \setlength{\cardh}{2in}
%%% DEFINE USER DATA
\newcommand{\Name}{
{\huge \textbf{John Doe} }
}%
\newcommand{\Description}{
{\large Linux System Administrator }
}%
\newcommand{\Email}{
{\large [email protected] }
}%
\newcommand{\Phone}{
{\large +1 234 56 78 910 }
}%
\newcommand{\Site}{
{\large johndoe.com }
}%
\begin{document}
\definecolor{mycolor}{rgb}{0.427,0.592,0.749} % RGB(109,151,191)
\begin{tikzpicture}
% grid
\foreach \i in {0,1,2,3,4,5} \draw[very thin, gray,dashed] (0,\i*\cardh) -- (2*\cardw,\i*\cardh);
\foreach \j in {0,1,2} \draw[very thin, gray,dashed] (\j*\cardw,0) -- (\j*\cardw,5*\cardh);
% card content
\foreach \i in {0,1} \foreach \j in {0,1,2,3,4} {
\node at (\i*\cardw+0.2\cardw,\j*\cardh+0.5\cardh) {
\begin{pspicture} (20mm,40mm)
\psbarcode{MECARD:N:Doe,John;EMAIL:[email protected];URL:https://johndoe.com;TEL:+12345678910;}{eclevel=L width=1 height=1}{qrcode}
\end{pspicture}
};
\node[black!25!mycolor][right] at (\i*\cardw+0.05\cardw,\j*\cardh+0.85\cardh) {\Name};
\node [right] at (\i*\cardw+0.05\cardw,\j*\cardh+0.7\cardh) {\Description};
\node [left] at (\i*\cardw+0.95\cardw,\j*\cardh+0.35\cardh) {\Phone};
\node [left] at (\i*\cardw+0.95\cardw,\j*\cardh+0.25\cardh) {\Site};
\node [left] at (\i*\cardw+0.95\cardw,\j*\cardh+0.15\cardh) {\Email};
i};
\end{tikzpicture}
\end{document}