Debian Codegraph @

texmf-dist/doc/latex/euromoney/euromoney-doc.tex

raw
1 % !TeX TXS-program:compile = txs:///arara
2 % arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode}
3 % arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
4
5 \documentclass[11pt,a4paper]{ltxdoc}
6 %\usepackage{crimson}
7 \usepackage{bera}
8 \usepackage{inconsolata}
9 %\renewcommand*\ttdefault{cmvtt}
10 \usepackage[T1]{fontenc}
11 \usepackage[scale=0.875]{cabin}
12 \usepackage{euromoney}
13 \usepackage{fancyvrb}
14 \usepackage{fancyhdr}
15 \usepackage{tabularray}
16 \usepackage{fontawesome5}
17 \fancyhf{}
18 \renewcommand{\headrulewidth}{0pt}
19 \lfoot{\sffamily\small [euromoney]}
20 \cfoot{\sffamily\small - \thepage{} -}
21 \rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
22 \usepackage{hologo}
23 \providecommand\tikzlogo{Ti\textit{k}Z}
24 \providecommand\TeXLive{\TeX{}Live\xspace}
25 \let\TikZ\tikzlogo
26
27 \usepackage{hyperref}
28 \urlstyle{same}
29 \hypersetup{pdfborder=0 0 0}
30 \usepackage[margin=2cm]{geometry}
31 \setlength{\parindent}{0pt}
32 \def\TPversion{0.1.1}
33 \def\TPdate{07/09/2024}
34 \usepackage{tcolorbox}
35 \tcbuselibrary{skins,hooks,listingsutf8}
36 %\usepackage{soul}
37 %\sethlcolor{lightgray!25}
38
39 \lstset{
40 language=[LaTeX]TeX,%
41 basicstyle=\ttfamily,%
42 keywordstyle={\color{blue}},%
43 classoffset=0,%
44 keywords={usepackage,\includegraphics,xstring,listofitems,tikz,calc,simplekv,graphicx},%
45 alsoletter={-},%
46 keywordstyle={\color{blue}},%
47 classoffset=1,%
48 alsoletter={-},%
49 morekeywords={euromoney},%
50 keywordstyle={\color{violet}},%
51 classoffset=2,%
52 alsoletter={-},%
53 morekeywords={\BilletsEuro,\PiecesEuro,\EuroBanknotes,\EuroCoins},%
54 keywordstyle={\color{green!50!black}},%
55 classoffset=3,%
56 morekeywords={RefHeight,Style,AutoHeight,OffsetH,OffsetV,Stack,Angle,HauteurRef,HauteurAuto,DecalH,DecalV,Empilage},%
57 keywordstyle={\color{orange}}
58 }
59
60 \newtcblisting{DemoCode}[1]{%
61 enhanced,width=\linewidth,%
62 bicolor,size=title,%
63 colback=cyan!10!white,%
64 colbacklower=cyan!5!white,%
65 colframe=cyan!75!black,%
66 listing options={%
67 breaklines=true,%
68 breakatwhitespace=true,%
69 style=tcblatex,basicstyle=\small\ttfamily,%
70 tabsize=4,%
71 commentstyle={\itshape\color{gray}},
72 keywordstyle={\color{blue}},%
73 classoffset=0,%
74 keywords={usepackage,\includegraphics,xstring,listofitems,tikz,calc,simplekv,graphicx},%
75 alsoletter={-},%
76 keywordstyle={\color{blue}},%
77 classoffset=1,%
78 alsoletter={-},%
79 morekeywords={euromoney},%
80 keywordstyle={\color{violet}},%
81 classoffset=2,%
82 alsoletter={-},%
83 morekeywords={\BilletsEuro,\PiecesEuro,\EuroBanknotes,\EuroCoins},%
84 keywordstyle={\color{green!50!black}},%
85 classoffset=3,%
86 morekeywords={RefHeight,Style,AutoHeight,OffsetH,OffsetV,Stack,Angle,HauteurRef,HauteurAuto,DecalH,DecalV,Empilage,height},%
87 keywordstyle={\color{orange}}
88 },%
89 #1
90 }
91 \NewDocumentCommand\MontreCode{ m }{%
92 \lstinline{#1}%
93 }
94
95 \begin{document}
96
97 \thispagestyle{empty}
98
99 \begin{center}
100 \begin{minipage}{0.88\linewidth}
101 \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
102 \begin{center}
103 \begin{tabular}{c}
104 {\Huge \texttt{euromoney}}\\
105 \\
106 {\LARGE Insert 'vectorial' coins or} \\
107 {\LARGE banknotes in euro.} \\
108 \\
109 {\small \texttt{Version \TPversion{} -- \TPdate}}
110 \end{tabular}
111 \end{center}
112 \end{tcolorbox}
113 \end{minipage}
114 \end{center}
115
116 \begin{center}
117 \begin{tabular}{c}
118 \texttt{Cédric Pierquet}\\
119 {\ttfamily c pierquet -- at -- outlook . fr}\\
120 \texttt{\url{https://github.com/cpierquet/euromoney}} \\
121 \end{tabular}
122 \end{center}
123
124 \hrule
125
126 \vfill
127
128 \begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
129 \begin{center}
130 \PiecesEuro[HauteurRef=1cm,Style=full,HauteurAuto]{4*2+3*1+4*0.2+1*0.1+2*0.01}
131
132 \vspace*{2.5mm}
133
134 \PiecesEuro[Empilage=V,HauteurRef=3cm,HauteurAuto]{4*2+3*1+4*0.2+1*0.1+2*0.01}
135
136 \vspace*{2.5mm}
137
138 \BilletsEuro[Style=nb,HauteurRef=1.75cm,DecalV=0.5cm,HauteurAuto]{4*100+2*50+20+4*10+3*5}
139
140 \vspace*{2.5mm}
141
142 \BilletsEuro[Style=full,HauteurAuto]{100+50+20+5}
143 \end{center}
144 \end{tcolorbox}
145
146 \vfill~
147
148 \hrule
149
150 \medskip
151
152 \emph{%
153 The pdf files were obtained by converting vector \texttt{svg} (public domain) files from the \href{https://openclipart.org/artist/frankes?p=3}{\texttt{openclipart}} database, and in particular from files supplied by \href{https://openclipart.org/artist/frankes?p=3}{\texttt{frankes}}.
154 }
155
156 \medskip
157
158 \hrule
159
160 \vspace*{5mm}
161
162 \pagebreak
163
164 \phantomsection
165
166 \hypertarget{matoc}{}
167
168 \tableofcontents
169
170 \vspace*{5mm}
171
172 %\hrule
173
174 \pagebreak
175
176 \section{Introduction}
177
178 \subsection{Description, loading}
179
180 The idea is to propose macros to insert coins and banknotes in euro.
181
182 \begin{DemoCode}{listing only}
183 \usepackage{euromoney}
184 \end{DemoCode}
185
186 The \MontreCode{euromoney} package loads :
187
188 \begin{itemize}
189 \item \lstinline{xstring} ;
190 \item \lstinline{simplekv} ;
191 \item \lstinline{graphicx} ;
192 \item \lstinline{tikz} with \MontreCode{calc} library ;
193 \item \lstinline{listofitems}.
194 \end{itemize}
195
196 \subsection{Features}
197
198 It's possible to present multiple coins or multiples banknotes :
199
200 \begin{itemize}
201 \item with global height ;
202 \item with height automatically adjusted (compared to 2€ coin and 500€ banknote) ;
203 \item with stacking.
204 \end{itemize}
205
206 \section{Global names, samples}
207
208 \subsection{Global names}
209
210 Each coin or bill is a vectorial pdf, name \texttt{euromoney-<amount><suffix>} and there's three styles :
211
212 \begin{itemize}
213 \item \MontreCode{full} colored version ;
214 \item \MontreCode{simple} colored version with \MontreCode{simple} suffix ;
215 \item \MontreCode{bw} version with \MontreCode{simplebw} suffix .
216 \end{itemize}
217
218 Available basenames are :
219
220 \begin{itemize}
221 \item \texttt{500euro} ; \texttt{200euro} ; \texttt{100euro} ; \texttt{50euro} ; \texttt{20euro} ; \texttt{10euro} and \texttt{5euro} ;
222 \item \texttt{2euro} ; \texttt{1euro} ; \texttt{50cent} ; \texttt{20cent} ; \texttt{10cent} ; \texttt{5cent} ; \texttt{2cent} and \texttt{1cent}.
223 \end{itemize}
224
225 \begin{DemoCode}{}
226 %manual insertion
227 \includegraphics[height=25.75mm]{euromoney-2euro}% w/o suffix
228 \includegraphics[height=25.75mm]{euromoney-2eurosimple}% with simple suffix
229 \includegraphics[height=25.75mm]{euromoney-2eurosimplebw}% with simplebw suffix
230 \end{DemoCode}
231
232 \subsection{Size of graphics}
233
234 Banknotes of \MontreCode{Style=full} are bigger than other styles, so the output doc can be bigger size.
235
236 For example, 100€ banknote's size is 933~Ko.
237
238 \section{Macro for coins}
239
240 \subsection{Usage}
241
242 The coins macro is :
243
244 \begin{DemoCode}{listing only}
245 \EuroCoins[keys]{list of coins}
246 \end{DemoCode}
247
248 Available keys are :
249
250 \begin{itemize}
251 \item \MontreCode{RefHeight} := height (default \MontreCode{2cm}) for the coins (relative to 2€ if \MontreCode{AutoHeight=true}) ;
252 \item \MontreCode{Style} := style for coins (default \MontreCode{simple}), within \MontreCode{full/simple/bw} ;
253 \item \MontreCode{AutoHeight} := boolean (default \MontreCode{false}) for adjusting heights of coins ;
254 \item \MontreCode{OffsetH} := horizontal offset (default \MontreCode{0pt}) for multiple coins (side by side if \MontreCode{0pt}) ;
255 \item \MontreCode{OffsetV} := vertical offset (default \MontreCode{5mm}) for multiple coins vertically stacked ;
256 \item \MontreCode{Stack} := sens of stacking (default \MontreCode{H}) for mutiple coins.
257 \end{itemize}
258
259 List of coins can be given within \MontreCode{3*2+4*1+2*0.2+4*0.1} for example.
260
261 \subsection{Examples}
262
263 \begin{DemoCode}{}
264 %sample with one coin
265 \EuroCoins{2}\EuroCoins{1}\EuroCoins{0.5}\EuroCoins{0.2}%
266 \EuroCoins{0.1}\EuroCoins{0.05}\EuroCoins{0.02}\EuroCoins{0.01}
267 \end{DemoCode}
268
269 \begin{DemoCode}{}
270 %multiple coins, side by side, global height, simple style
271 \EuroCoins{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
272 \end{DemoCode}
273
274 \begin{DemoCode}{}
275 %multiple coins, side by side, global height, full style
276 \EuroCoins[Style=full]{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
277 \end{DemoCode}
278
279 \begin{DemoCode}{}
280 %multiple coins, side by side, global height, simplebw style
281 \EuroCoins[Style=bw]{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
282 \end{DemoCode}
283
284 \begin{DemoCode}{}
285 %stacked coins (b&w), horizontally with correct scaling
286 \EuroCoins[RefHeight=3cm,AutoHeight,OffsetH=7.5mm,Style=bw]{4*2+3*1+4*0.2+1*0.1+2*0.01}
287 \end{DemoCode}
288
289 \begin{DemoCode}{}
290 %stacked coins (full resolution), vertically with correct scaling
291 \EuroCoins[Stack=V,RefHeight=3cm,AutoHeight,Style=full]{4*2+3*1+4*0.2+1*0.1+2*0.01}
292 \end{DemoCode}
293
294 \section{Macro for banknotes}
295
296 \subsection{Usage}
297
298 The banknotes macro is :
299
300 \begin{DemoCode}{listing only}
301 \EuroBanknotes[keys]{list of banknotes}
302 \end{DemoCode}
303
304 Stacking is globally set, and available keys are :
305
306 \begin{itemize}
307 \item \MontreCode{RefHeight} := height (default \MontreCode{2cm}) for the banknotes (relative to 500€ if \MontreCode{AutoHeight=true}) ;
308 \item \MontreCode{Style} := style for banknotes (default \MontreCode{simple}), within \MontreCode{full/simple/bw} ;
309 \item \MontreCode{AutoHeight} := boolean (default \MontreCode{false}) for adjusting heights of banknotes ;
310 \item \MontreCode{OffsetH} := horizontal offset (default \MontreCode{0pt}) for multiple banknotes (side by side if \MontreCode{0pt}) ;
311 \item \MontreCode{OffsetV} := vertical offset (default \MontreCode{5mm}) for multiple banknotes vertically stacked ;
312 \item \MontreCode{Stack} := type of stacking (default \MontreCode{H}) within \MontreCode{H/fan} ;
313 \item \MontreCode{Angle} := rotation (default \MontreCode{10}) for \texttt{fan} stacking.
314 \end{itemize}
315
316 List of banknotes, for \texttt{H} stacking, can be given within \MontreCode{2*100+3*50+10+5} for example.
317
318 List of banknotes, for \texttt{fan} stacking, can be given within \MontreCode{5+5+10+10+20+50+100+200+200} for example.
319
320 \subsection{Examples}
321
322 \begin{DemoCode}{}
323 %sample with one banknote
324 \EuroBanknotes{500}\EuroBanknotes{200}\EuroBanknotes{100}\EuroBanknotes{50}\\
325 \EuroBanknotes{20}\EuroBanknotes{10}\EuroBanknotes{5}
326 \end{DemoCode}
327
328 \begin{DemoCode}{}
329 %multiple banknotes, side by side, global height
330 \EuroBanknotes{50+20+5}
331 \end{DemoCode}
332
333 \begin{DemoCode}{}
334 %multiple banknotes, side by side, with correct scaling
335 \EuroBanknotes[RefHeight=3cm,Style=full,AutoHeight]{100+10+5}
336 \end{DemoCode}
337
338 \begin{DemoCode}{}
339 %stacked banknotes (b&w), with correct scaling
340 \EuroBanknotes[OffsetH=7.5mm,Style=bw,AutoHeight]{4*100+2*50+20+4*10+3*5}
341 \end{DemoCode}
342
343 \begin{DemoCode}{}
344 %syde by side banknotes, with correct scaling
345 \EuroBanknotes[RefHeight=1.75cm,AutoHeight]{4*100+2*50+20+4*10+3*5}
346 \end{DemoCode}
347
348 \begin{DemoCode}{}
349 %fan stacking, with adjusted offsets
350 \EuroBanknotes%
351 [Stack=fan,RefHeight=2.05cm,AutoHeight,Angle=17.5,%
352 OffsetH=0.1mm,OffsetV=0mm]%
353 {5+5+10+10+20+50+100+200+200}
354 \end{DemoCode}
355
356 \pagebreak
357
358 \section{French version}
359
360 Il est possible d'utiliser les commandes en version francisée :
361
362 \begin{DemoCode}{listing only}
363 \PiecesEuro[clés]{liste de pièces}
364 \BilletsEuro[clés]{liste de billets}
365 \end{DemoCode}
366
367 Les clés disponibles sont :
368
369 \begin{itemize}
370 \item \MontreCode{HauteurRef} := hauteur (défaut \MontreCode{2cm}) pour les pièces/billets (relativement à celle de 2€ et celui de 500€ si \MontreCode{HauteurAuto=true}) ;
371 \item \MontreCode{Style} := style pour les pièces/billets (défaut \MontreCode{simple}), parmi \MontreCode{full/simple/nb} ;
372 \item \MontreCode{HauteurAuto} := booléen (défaut \MontreCode{false}) pour adapter les hauteurs ;
373 \item \MontreCode{DecalH} := décalage horizontal (défaut \MontreCode{0pt}) pour des empilages (côte à côte si \MontreCode{0pt}) ;
374 \item \MontreCode{DecalV} := décalage vertical (défaut \MontreCode{5mm}) pour les empilages verticaux ;
375 \item \MontreCode{Empilage} := sens de l'empilage (défaut \MontreCode{H}) éventuel, parmi \MontreCode{H/eventail} suivant le type d'objets.
376 \end{itemize}
377
378 La liste peut être donnée sous la forme \MontreCode{3*2+4*1+2*0.2+4*0.1} pour des affichages \textit{classiques} par exemple.
379
380 Pour le cas de billets en éventail, la liste pourra être donnée sous la forme \MontreCode{5+5+10+10+20+50+100+200+200} par exemple.
381
382 \begin{DemoCode}{}
383 %exemple avec une pièce
384 \PiecesEuro{2}\PiecesEuro{1}\PiecesEuro{0.5}\PiecesEuro{0.2}%
385 \PiecesEuro{0.1}\PiecesEuro{0.05}\PiecesEuro{0.02}\PiecesEuro{0.01}
386 \end{DemoCode}
387
388 \begin{DemoCode}{}
389 %pièces multiples, côte à côte, taille uniforme, style simple
390 \PiecesEuro{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
391 \end{DemoCode}
392
393 \begin{DemoCode}{}
394 %pièces multiples, côte à côte, taille uniforme, style full
395 \PiecesEuro[Style=full]{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
396 \end{DemoCode}
397
398 \begin{DemoCode}{}
399 %pièces multiples, côte à côte, taille uniforme, style simplenb
400 \PiecesEuro[Style=nb]{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
401 \end{DemoCode}
402
403 \begin{DemoCode}{}
404 %pièces empilées (n&b) horizontalement et tailles ajustées
405 \PiecesEuro%
406 [HauteurRef=3cm,HauteurAuto,DecalH=7.5mm,Style=nb]{4*2+3*1+4*0.2+1*0.1+2*0.01}
407 \end{DemoCode}
408
409 \begin{DemoCode}{}
410 %pièces empilées (full résolution) verticalement et tailles ajustées
411 \PiecesEuro%
412 [Empilage=V,HauteurRef=3cm,HauteurAuto,Style=full]{4*2+3*1+4*0.2+1*0.1+2*0.01}
413 \end{DemoCode}
414
415 \begin{DemoCode}{}
416 %exemple avec un billet
417 \BilletsEuro{500}\BilletsEuro{200}\BilletsEuro{100}\BilletsEuro{50}\\
418 \BilletsEuro{20}\BilletsEuro{10}\BilletsEuro{5}
419 \end{DemoCode}
420
421 \begin{DemoCode}{}
422 %plusieurs billets, côte à côte, taille uniforme
423 \BilletsEuro{50+20+5}
424 \end{DemoCode}
425
426 \begin{DemoCode}{}
427 %plusieurs billets (full résolution), côte à côte, tailles adaptées
428 \BilletsEuro[HauteurRef=3cm,Style=full,HauteurAuto]{100+10+5}
429 \end{DemoCode}
430
431 \begin{DemoCode}{}
432 %billets empilés (n&b), tailles adaptées
433 \BilletsEuro[DecalH=7.5mm,Style=nb]{4*100+2*50+20+4*10+3*5}
434 \end{DemoCode}
435
436 \begin{DemoCode}{}
437 %billets côte à côte, tailles adaptées
438 \BilletsEuro[HauteurRef=1.75cm,HauteurAuto]{4*100+2*50+20+4*10+3*5}
439 \end{DemoCode}
440
441 \begin{DemoCode}{}
442 %billets en éventail, hauteur et décalages ajustés
443 \BilletsEuro%
444 [Empilage=eventail,HauteurRef=2.05cm,HauteurAuto,Angle=17.5,%
445 DecalH=0.1mm,DecalV=0mm]%
446 {5+5+10+10+20+50+100+200+200}
447 \end{DemoCode}
448
449 \pagebreak
450
451
452 \section{History}
453
454 \begin{quote}
455 \begin{verbatim}
456 0.1.1 : New filenames, according to TL rules
457 0.1.0 : Initial version
458 \end{verbatim}
459 \end{quote}
460
461 \end{document}