|
1 | | -% !TeX program = pdflatex |
2 | | -\documentclass[varwidth=210mm, border=0pt]{standalone} |
3 | | -\usepackage[utf8]{inputenc} |
4 | | -\usepackage[T2A]{fontenc} |
5 | | -\usepackage[russian]{babel} |
6 | | -\usepackage{tikz} |
7 | | -\usepackage{xcolor} |
8 | | -\usepackage{pagecolor} |
9 | | -\usetikzlibrary{decorations.text, shapes.geometric, backgrounds} |
10 | | - |
11 | | -% Цвета |
12 | | -\definecolor{bgred}{HTML}{B71C1C} |
13 | | -\definecolor{badge}{HTML}{7A0F0F} |
14 | | -\definecolor{wood}{HTML}{8B5A2B} |
15 | | -\definecolor{wood2}{HTML}{D0A06A} |
16 | | -\definecolor{metal}{HTML}{2B2B2B} |
17 | | -\definecolor{fire1}{HTML}{FF6F00} |
18 | | -\definecolor{fire2}{HTML}{FFD54F} |
19 | | -\definecolor{spike}{HTML}{111111} |
20 | | - |
21 | | -\pagecolor{bgred} |
| 1 | +%!TEX TS-program = xelatex |
| 2 | +%!TEX encoding = UTF-8 Unicode |
| 3 | + |
| 4 | +\documentclass[10pt, a4paper]{article} |
| 5 | + |
| 6 | +% LAYOUT |
| 7 | +%-------------------------------- |
| 8 | +\usepackage{geometry} |
| 9 | +\geometry{a4paper, left=43mm, right=43mm, top=51mm, bottom=17mm} |
| 10 | + |
| 11 | +% No page numbers |
| 12 | +\pagenumbering{gobble} |
| 13 | + |
| 14 | +% Left align |
| 15 | +\usepackage[document]{ragged2e} |
| 16 | + |
| 17 | + |
| 18 | +% TYPOGRAPHY |
| 19 | +%-------------------------------- |
| 20 | +\usepackage{fontspec} |
| 21 | +\usepackage{xunicode} |
| 22 | +\usepackage{xltxtra} |
| 23 | + |
| 24 | +% converts LaTeX specials (quotes, dashes etc.) to Unicode |
| 25 | +\defaultfontfeatures{Mapping=tex-text} |
| 26 | +\setromanfont [Ligatures={Common}, Numbers={OldStyle}]{Linux Libertine O} |
| 27 | +\setsansfont[Scale=0.9]{Liberation Sans} |
| 28 | + |
| 29 | +% Set paragraph break |
| 30 | +\setlength{\parskip}{1em} |
| 31 | + |
| 32 | +% Custom ampersand |
| 33 | +\newcommand{\amper}{{\fontspec[Scale=.95]{Linux Libertine O}\selectfont\itshape\&}} |
| 34 | + |
| 35 | +\setmainfont[SmallCapsFeatures={LetterSpace=5,Letters=SmallCaps}]{Linux Libertine O} |
| 36 | + \setsansfont{Liberation Sans} |
| 37 | + |
| 38 | +% Command required by how Pandoc handles the list conversion |
| 39 | +\providecommand{\tightlist}{% |
| 40 | + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} |
| 41 | + |
| 42 | +% TABLE CUSTOMIZATION |
| 43 | +%-------------------------------- |
| 44 | +\usepackage{spreadtab} |
| 45 | +\usepackage[compact]{titlesec} % For customizing title sections |
| 46 | +\titlespacing*{\section}{0pt}{3pt}{-7pt} % Remove margin bottom from the title |
| 47 | +\usepackage{arydshln} % For the dotted line on the table |
| 48 | +\renewcommand{\arraystretch}{1.5} % Apply vertical padding to table cells |
| 49 | +\usepackage{hhline} % For single-cell borders |
| 50 | +\usepackage{enumitem} % For customizing lists |
| 51 | +\setlist{nolistsep} % No whitespace around list items |
| 52 | +\setlist[itemize]{leftmargin=0.5cm} % Reduce list left indent |
| 53 | +\setlength{\tabcolsep}{9pt} % Larger gutter between columns |
| 54 | + |
| 55 | + |
| 56 | +% LANGUAGE |
| 57 | +%-------------------------------- |
| 58 | +\usepackage{polyglossia} |
| 59 | +\setmainlanguage{english} |
| 60 | + |
| 61 | +% PDF SETUP |
| 62 | +%-------------------------------- |
| 63 | +\usepackage[xetex, bookmarks, colorlinks, breaklinks]{hyperref} |
| 64 | +\hypersetup |
| 65 | +{ |
| 66 | + pdfauthor=Max Mustermann, |
| 67 | + pdfsubject=Invoice Nr. 2015-11-04, |
| 68 | + pdftitle=Invoice Nr. 2015-11-04, |
| 69 | + linkcolor=blue, |
| 70 | + citecolor=blue, |
| 71 | + filecolor=black, |
| 72 | + urlcolor=blue |
| 73 | +} |
| 74 | + |
| 75 | +% To display custom date |
| 76 | +% \usepackage[nodayofweek]{datetime} |
| 77 | +% \newdate{date}{01}{12}{1867} |
| 78 | +% \date{\displaydate{date}} |
| 79 | +% Use this instead of \today: % \displaydate{date} |
| 80 | + |
| 81 | +% DOCUMENT |
| 82 | +%-------------------------------- |
22 | 83 | \begin{document} |
23 | | -\begin{tikzpicture}[scale=2, every node/.style={transform shape}] |
24 | | - % Центр и размеры |
25 | | - \coordinate (C) at (0,0); |
26 | | - \def\R{2} % радиус круглого бэйджа |
27 | | - |
28 | | - % Круглый бэйдж (слегка тон-у тон) |
29 | | - \shade[ball color=badge!90!black] (C) circle (\R); |
30 | | - \fill[white, opacity=0.02] (C) circle (\R-0.02); |
31 | | - |
32 | | - % Внутренний круг для контраста |
33 | | - \fill[black!8, draw=black!30, line width=0.6pt] (C) circle (\R-0.3); |
34 | | - |
35 | | - % Крест-накрест: два деревянных молотка |
36 | | - % Параметры молотка |
37 | | - \def\handlelen{2.2} |
38 | | - \def\handlewid{0.12} |
39 | | - \def\headlen{0.7} |
40 | | - \def\headwid{0.45} |
41 | | - \def\spikecount{5} |
42 | | - |
43 | | - % Функция: рисуем один молоток, ориентированный по углу #1 градусов, сдвиг по центру |
44 | | - \newcommand{\drawmallet}[2]{% #1 = angle, #2 = scale sign (1 or -1) for minor offset |
45 | | - \begin{scope}[rotate=#1] |
46 | | - % Ручка |
47 | | - \shade[bottom color=wood!60, top color=wood2] ( -\handlelen, -\handlewid) rectangle (0, \handlewid); |
48 | | - \draw[line width=0.6pt, brown!60] ( -\handlelen, -\handlewid) rectangle (0, \handlewid); |
49 | | - % Скругление хвоста ручки |
50 | | - \fill[wood] (-\handlelen-0.08,-\handlewid) ++(0,0) circle (0.08); |
51 | | - % Головка молотка |
52 | | - \begin{scope}[shift={( -0.1,0)}, xshift=0pt] |
53 | | - \fill[metal!15!black] (0.05, -\headwid) rectangle (\headlen, \headwid); |
54 | | - \draw[line width=0.8pt] (0.05, -\headwid) rectangle (\headlen, \headwid); |
55 | | - % Шипы сверху |
56 | | - \foreach \i in {0,...,4} { |
57 | | - \pgfmathsetmacro{\x}{0.05 + (\i+0.3)*(\headlen-0.05)/\spikecount} |
58 | | - \path[fill=spike] (\x, \headwid) -- (\x+0.06, \headwid+0.18) -- (\x+0.12, \headwid) -- cycle; |
59 | | - } |
60 | | - % Шипы снизу |
61 | | - \foreach \i in {0,...,4} { |
62 | | - \pgfmathsetmacro{\x}{0.05 + (\i+0.3)*(\headlen-0.05)/\spikecount} |
63 | | - \path[fill=spike] (\x, -\headwid) -- (\x+0.06, -\headwid-0.18) -- (\x+0.12, -\headwid) -- cycle; |
64 | | - } |
65 | | - \end{scope} |
66 | | - |
67 | | - % Небольшие трещины и текстура на ручке |
68 | | - \draw[line width=0.4pt, brown!40] (-0.4,0.05) to[out=10,in=190] (-1.0,0.06); |
69 | | - \draw[line width=0.4pt, brown!40] (-0.9,-0.03) to[out=-10,in=210] (-1.6,-0.04); |
70 | | - \end{scope} |
71 | | - } |
72 | | - |
73 | | - % Рисуем два молотка крест-накрест |
74 | | - \begin{scope} |
75 | | - \drawmallet{30}{1} |
76 | | - \drawmallet{-35}{-1} |
77 | | - \end{scope} |
78 | | - |
79 | | - % Огонь, исходящий из-за молотков |
80 | | - \begin{scope} |
81 | | - \clip (C) circle (\R-0.35); |
82 | | - % Слой огня — несколько форм |
83 | | - \fill[fire2] (-1.1,-0.15) .. controls (-0.9,0.8) and (-0.4,1.2) .. (0,1.05) .. controls (0.35,0.95) and (0.7,0.6) .. (0.9,0.15) -- (0.9,-0.6) .. controls (0.55,-0.2) and (0.2,-0.4) .. (-0.1,-0.25) -- cycle; |
84 | | - \fill[fire1] (-0.95,-0.05) .. controls (-0.75,0.6) and (-0.35,0.9) .. (0,0.85) .. controls (0.3,0.78) and (0.6,0.5) .. (0.75,0.18) -- (0.75,-0.4) .. controls (0.45,-0.05) and (0.15,-0.25) .. (-0.05,-0.15) -- cycle; |
85 | | - % Внутренние языки |
86 | | - \fill[yellow!80!orange] (-0.5,0.03) .. controls (-0.3,0.45) and (-0.12,0.6) .. (0,0.55) .. controls (0.09,0.52) and (0.22,0.4) .. (0.28,0.3) -- (0.28,-0.05) .. controls (0.05,0.1) and (-0.15,0.0) .. (-0.3,0.01) -- cycle; |
87 | | - \end{scope} |
88 | | - |
89 | | - % Текст по дуге внизу (название) |
90 | | - \begin{scope} |
91 | | - \def\textstr{КОЛОТУШКИ} |
92 | | - \draw[white] (0,-1.2) arc (200:340:1.4) node[midway, sloped, below, text=white, font=\bfseries\Large]{\textstr}; |
93 | | - % Более аккуратно — с использованием decorations.text |
94 | | - \path[decorate, decoration={text along path, text={\bfseries\Large \textstr}, raise=3pt}] (180:-1.45) arc (180:0:1.45); |
95 | | - \end{scope} |
96 | | - |
97 | | - % Маленькая центральная эмблема (опционально) |
98 | | - \fill[black!10] (0,0.9) circle (0.18); |
99 | | - \draw[line width=0.6pt, white] (0,0.9) circle (0.18); |
100 | | - \node[text=white, font=\bfseries\small] at (0,0.9) {KS}; |
101 | | - |
102 | | - % Контур внешнего круга |
103 | | - \draw[line width=1.2pt, color=black!50] (C) circle (\R); |
104 | | - |
105 | | -\end{tikzpicture} |
106 | | -\end{document} |
| 84 | +\small |
| 85 | +\textsc{\textbf{Max Mustermann}} |
| 86 | +\textbullet{} \textsc{Musterstraße 37} |
| 87 | +\textbullet{} \textsc{12345 Musterstadt} |
| 88 | + |
| 89 | +\vspace{1em} |
| 90 | + |
| 91 | +\normalsize \sffamily |
| 92 | +Erika Mustermann\\ |
| 93 | +Musterallee 1\\ |
| 94 | +12345 Musterstadt\\ |
| 95 | +Germany\\ |
| 96 | + |
| 97 | +\vspace{6em} |
| 98 | + |
| 99 | +\begin{flushright} |
| 100 | + \small |
| 101 | + Musterstadt, \today |
| 102 | +\end{flushright} |
| 103 | + |
| 104 | +\vspace{1em} |
| 105 | + |
| 106 | + |
| 107 | +\section*{\textsc{Invoice} \textsc{\#2015-11-04}} |
| 108 | +\footnotesize |
| 109 | +\newcounter{pos} |
| 110 | +\setcounter{pos}{0} |
| 111 | +\STautoround*{2} % Get spreadtab to always display the decimal part |
| 112 | + % Use comma as decimal separator |
| 113 | + |
| 114 | +\begin{spreadtab}{{tabular}[t t t]{lp{8.2cm}r}} |
| 115 | + \hdashline[1pt/1pt] |
| 116 | + @ \noalign{\vskip 2mm} \textbf{Pos.} & @ \textbf{Description} & @ \textbf{Prices in EUR} \\ \hline |
| 117 | + @ \noalign{\vskip 2mm} \refstepcounter{pos} \thepos |
| 118 | + & @ The first service provided |
| 119 | + & 320\\ @ \noalign{\vskip 2mm} \refstepcounter{pos} \thepos |
| 120 | + & @ And another one, with a list of details |
| 121 | + \newline \begin{itemize} |
| 122 | + \scriptsize \item Some more detailed explanation |
| 123 | + \scriptsize \item of the service provided |
| 124 | + \scriptsize \item Looking good |
| 125 | + \end{itemize} |
| 126 | + & 245\\ @ \noalign{\vskip 2mm} \refstepcounter{pos} \thepos |
| 127 | + & @ The last service provided |
| 128 | + & 65\\ \noalign{\vskip 2mm} \hline |
| 129 | + @ & @ \multicolumn{1}{r}{Subtotal:} & :={sum(c1:[0,-1])} \\ \hhline{~~-} |
| 130 | + @ & @ \multicolumn{1}{r}{VAT 20\%:} & 20/100*[0,-1] \\ \hhline{~~-} |
| 131 | + @ & @ \multicolumn{1}{r}{\textbf{Total:}} & \textbf{:={[0,-1]+[0,-2]}} \\ \hhline{~~-} |
| 132 | +\end{spreadtab} |
107 | 133 |
|
| 134 | +\vspace{15mm} |
| 135 | + |
| 136 | +\sffamily |
| 137 | +\small |
| 138 | +Please transfer the due amount to the following bank account within the |
| 139 | +next 14 days: |
| 140 | + |
| 141 | +Mustermann GmbH Kreditinstitut: Deutsche Postbank AG IBAN: DE18 3601 |
| 142 | +0043 9999 9999 99 BIC: PBNKDEFF |
| 143 | + |
| 144 | +We really appreciate your business and look forward to future projects |
| 145 | +together. |
| 146 | + |
| 147 | +Best regards, |
| 148 | + |
| 149 | +\medskip |
| 150 | + |
| 151 | +Max Mustermann |
| 152 | + |
| 153 | +\end{document} |
0 commit comments