-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpolycv.dtx
2231 lines (2219 loc) · 78.6 KB
/
polycv.dtx
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% \iffalse meta-comment
%
% Copyright (C) 2020 by Martin C Schwarzer <[email protected]>
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Martin C Schwarzer.
%
% This work consists of the files polycv.dtx and polycv.ins
% and the derived filebase polycv.cls.
%
% The code is available at <https://github.com/polyluxus/polycv>.
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{polycv.dtx}
%</driver>
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{polycv}
%<*class>
[2020/07/09 v1.0 Curriculum Vitae Class]
%</class>
%
%<*driver>
\documentclass{ltxdoc}
\PassOptionsToPackage{dvipsnames}{xcolor}
\usepackage{dtxdescribe}
\definecolor{lightgray}{gray}{0.95}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{libertine}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{setspace}
\usepackage{listings}
\lstdefinestyle{mytex}{
language=[LaTeX]TeX,%
backgroundcolor=\color{lightgray},%
basicstyle=\footnotesize\ttfamily,%
keywordstyle=\bfseries,%
keywordsprefix=polycv,%
breaklines=true,%
morekeywords={%
author, title, position, email, phone, mobile, github, orcid, address, location, street,
insertauthor, inserttitle, insertposition, insertemail, insertphone, insertmobile,
insertgithub, insertorcid, insertaddress, insertlocation, insertstreet,
signaturefile, insertsigfilename, orcidiconfilename,
cvline, cvitemline, cventry, cvskill, cvlanguage, cvlineaddress, cvlineemail,
cvlinemobile, cvlinephone, cvlineorcid, cvlinegithub,
progressbar, levelbarsquares, levelbarcircles,
setmargins, setheaderheight, setfooterheight, seticonspace, sethintcolwidth,
sethintcolsep, setcolprimary, setcolsecondary, setcolhighlight, setcolshade,
setprogbarheight, setprogbarunits, setheaderfont, setentryragged, setentryjustified,
setsigleft, setsigright,
opening, closing, ps,
pdfappendix,
section, subsection,
includegraphics, faTerminal, faStar
},%
escapeinside={(*@}{@*)}%
}
\lstset{style=mytex}
\usepackage{fontawesome}
\usepackage[%
pdftex, bookmarks=true, hidelinks,%
colorlinks, linkcolor=MidnightBlue, urlcolor=MidnightBlue,%
pageanchor=true, hyperindex=true,
]{hyperref}
\hypersetup{%
pdfinfo={%
Title={The LaTeX document class PolyCV},%
Author={Martin C Schwarzer},%
Subject={A Curriculum Vitae Document Class},%
keywords={LaTeX, CV, Letter, Curriculum Vitae, Document Class, Documentation}}}
\newcommand\mybackslash{\char`\\}
\newcommand\myarg[1]{\(\langle\)\textit{#1}\(\rangle\)}
\setcounter{IndexColumns}{2}
\EnableCrossrefs % \DisableCrossrefs %
\CodelineIndex
\RecordChanges
\begin{document}
\DocInput{polycv.dtx}
\PrintChanges
\PrintIndex
\end{document}
%</driver>
% \fi
%
% \CheckSum{992}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
% Digits \0\1\2\3\4\5\6\7\8\9
% Exclamation \! Double quote \" Hash (number) \#
% Dollar \$ Percent \% Ampersand \&
% Acute accent \' Left paren \( Right paren \)
% Asterisk \* Plus \+ Comma \,
% Minus \- Point \. Solidus \/
% Colon \: Semicolon \; Less than \<
% Equals \= Greater than \> Question mark \?
% Commercial at \@ Left bracket \[ Backslash \\
% Right bracket \] Circumflex \^ Underscore \_
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
%
% \changes{v1.0}{2020/07/09}{Initial version}
%
% \GetFileInfo{polycv.dtx}
%
% \DoNotIndex{\providecommand,\newcommand,\renewcommand,\newenvironment,\def,\edef,\let,\par}
% \DoNotIndex{\AfterPreamble, \AtEndPreamble, \ProcessKeyvalOptions, \SetupKeyvalOptions}
% \DoNotIndex{\IfFileExists,}
% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ ,\newline,\noindent,\strut}
% \DoNotIndex{\@ne, \@author, \@title, \today}
% \DoNotIndex{\begin,\end,\bgroup,\egroup,\begingroup,\endgroup,\newcount,\advance}
% \DoNotIndex{\catcode,\closein,\closeout,\if,\ifnum,\else,\fi,\empty,\detokenize}
% \DoNotIndex{\baselineskip,\linewidth,\color,\colorlet,\hfill,\href,\hspace,\vspace,%
% \loop,\repeat,\relax,\rule}
% \DoNotIndex{\ignorespaces,\makebox,\newlength,\setlength,\parbox,\parindent,%
% \raisebox,\resizebox}
% \DoNotIndex{\number,\numexpr}
% \DoNotIndex{\includegraphics,\includepdf,\pagecolor,\nopagecolor,\pagestyle,\overfullrule}
% \DoNotIndex{\geometry,\newgeometry,\restoregeometry,\paperwidth}
% \DoNotIndex{\bfseries,\sffamily,\raggedright,\raggedleft,\flushright,\centering,%
% \small,\footnotesize,\Huge,\Large,\large,\normalsize,\textbf,\textit}
% \DoNotIndex{\ClassError,\ClassWarning,\ClassInfo,\LoadClass,\PassOptionsToClass,%
% \PassOptionsToPackage,\requirePackage}
% \DoNotIndex{\CurrentOptionKey,\DeclareBoolOption,\DeclareComplementaryOption,%
% \DeclareDefaultOption,\DeclareFieldFormat,\DeclareStringOption,\DeclareVoidOption}
% \DoNotIndex{\draw,\filldraw,\node}
% \DoNotIndex{\biblabelsep}
%
% \title{The \pkg{polycv} class}
% \author{Martin C Schwarzer\\\href{mailto:[email protected]}{[email protected]}}
% \date{\fileversion~from \filedate}
%
% \maketitle
%
% \begin{abstract}
% \pkg{Polycv} is a document class to typeset curriculum vitae with \LaTeX.
% It also provides a template for a cover letter consistent with the layout
% of the resume.
% \end{abstract}
%
% \tableofcontents
% \clearpage
%
% \section{Introduction}
%
% I previously used the package
% \href{https://ctan.org/pkg/koma-moderncvclassic}{koma-moderncvclassic}
% to prepare my CV, and I was actually quite satisfied with the look of
% it. In a way this class borrows some design elements from it. However, I
% noticed it was not using a lot of space, which got especially
% problematic when inserting a picture.
%
% I looked through various templates and classes online (%
% \href{https://github.com/opieters/limecv}{limecv},
% \href{https://github.com/latex-ninja/simple-academic-resume}{simple academic resume},
% \href{https://github.com/deedy/Deedy-Resume}{DeedyResume},
% \href{https://www.sharelatex.com/templates/cv-or-resume/fancy-cv}{FancyCV by Adrien Friggeri},
% \href{https://www.overleaf.com/gallery/tagged/cv}{the Overleaf CVGallery},
% TeX Stack Exchange \href{https://tex.stackexchange.com/q/80/33413}{%
% LaTeX template for resume/curriculum vitae}, \ldots{} , there are possibly some I forgot),
% but couldn't find anything that was exactly to my linking. So I decided
% to write a class for myself, not just only for my CV, but also for the
% training in writing such classes (or packages).
%
% The main goal was to structure the information in a way that, if
% condensed enough, it would fit on one page; but additional pages could
% be added when the need arose, e.g.~a long publication list, or many
% stations along the way.
%
% Additionally I liked the idea of having a cover letter template, which
% resembles most of the elements of the CV.
%
% The source code is available at \href{https://github.com/polyluxus/polycv}{\faGithub~GitHub},
% where there are also a few example uses of this class.
% If anything is unclear, needs improvement, is missing please submit an issue there
% (\href{https://github.com/polyluxus/polycv/issues}{GitHub issues}). Thank you.
%
% \subsection{Contributing}
%
% If you find this class useful, you are very welcome to contribute to it.
% The repository is hosted at
% \href{https://github.com/polyluxus/polycv}{\faGithub~GitHub repository}.
% It will consist of one main branch, the release branch, possibly a release candidate
% branch and a development branch.
% If you would like to contribute changes, please submit a pull request to
% the development branch. Once all changes have been pulled in, the commits will be squashed
% and pulled into the release candidate branch for final testing and adjustment.
% As such, there will always be only one commit for one release.
%
% \section{Installation}
%
% This work consists of the files \lstinline`polycv.dtx` and \lstinline`polycv.ins`
% and the derived filebase \lstinline`polycv.cls`, which should be copied to a location
% where latex will look for it.
% How to build the package and documentation from its source files is explained in
% section~\ref{sec:building}.
% The source code is hosted at \href{https://github.com/polyluxus/polycv}{\faGithub~GitHub},
% where the derived class and documentation files are also available.
%
% \subsection{Prerequisites}
% In order for this class to function properly, the following packages must be installed:
% \begin{itemize}
% \item The package \lstinline`etoolbox` provides additional hooks necessary for
% the setup within the source class.
% \item The \lstinline`calc` package allows to derive some lengths from others.
% \item The \lstinline`hyperref` package provides clickable cross-references,
% e.g. to references to the bibliography, or websites.
% \item Color support comes from \lstinline`xcolor`.
% \item Most of the graphical elements within this class are produced with
% \lstinline`tikz`, such as the header and footer boxes, and the progress bar.
% \item To include a signature and profile pictures, \lstinline`graphicx` is loaded.
% \item For most of the document the indentation is disabled with the
% \lstinline`parskip` package.
% \item The page layout is produced with the \lstinline`geometry` package.
% \item The \lstinline`fontawesome` is needed for icons, e.g. \faGithub, in the side bar.
% \item To include other reference letters as pdfs, \lstinline`pdfpages` is also loaded.
% \end{itemize}
%
% \clearpage
% \section{Usage}
%
% You can load the class in the same way you would load any other class.
% The following listing defines a skeleton document containing a elements of the class.
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\documentclass[(*@\myarg{options}@*)]{polycv}
%
% packages,
% define personal information,
% define colours, page layout, etc.
%
\begin{document}
\begin{polycvfirstpage}
\begin{polycvsidebar}
%
% Contents of the side bar box
% (personal information image, etc.)
%
\end{polycvsidebar}
%
% Body of the first page
%
\end{polycvfirstpage}
\begin{polycvpage}
%
% Body of additional pages
%
\end{polycvpage}
\begin{polycvletter}%
[(*@\myarg{Author Address}@*)]%
{(*@\myarg{Subject}@*)}%
{(*@\myarg{Recipient Address}@*)}
\opening{Dear Example,}
%
% Letter content
%
\closing{Sincerely,}
\ps{more text}
\end{polycvletter}
\pdfappendix{(*@\myarg{filename}@*)}
\end{document}
\end{lstlisting}
% \iffalse
%</example>
% \fi
% \subsection{Class Options}
% This class is build on top of the standard article class.
% It therefore inherits most options from that class.
% Some are incompatible with the design of this class and have been disabled.
% Other options allow for customisation of the used templates.
% In this section they will be briefly described, along with commands that can be
% used to set the values in the preamble.
%
% \subsubsection{Page Layout}\label{sec:page-layout}
%
% The general page layout will be accomplished by the \lstinline`geometry` package.
% Depending on the environment currently in use, a few internal lengths are defined and used.
% Most of these can only be set via the class options, or within the preamble.
%
% \DescribeOption{margins}
% \DescribeDefault{1.0 cm}
% The length of \lstinline`margins` is the base length of most surrounding space,
% it defines and sets the length \lstinline`\polycvmargins`.
% It is used additionally to the header and footer lengths.
% This setting also controls the space between the side bar and the main body on the
% first page of the CV environment.
% \DescribeMacro{\setmargins}
% The command \lstinline`setmargins`\marg{length} is only available in the premable
% and can be used to set the margin length after loading the class.
%
% \DescribeOption{headerheight}
% \DescribeDefault{3.0cm}
% \DescribeOption{footerheight}
% \DescribeDefault{0.5cm}
% The options \lstinline`headerheight` and \lstinline`footerheight` control the height
% of the boxes for the header and the footer, respectively.
% These lengths affect the whole document and can therefore only be set when loading the
% class or within the preamble.
% The will be the same for each of the environments used.
% \DescribeMacro{\setheaderheight}
% \DescribeMacro{\setfooterheight}
% Instead of choosing the key/value option at load time, the commands
% \lstinline`\setheaderheight`\marg{length} and
% \lstinline`\setfooterheight`\marg{length} can be issued to manipulate these values.
%
% \DescribeOption{sidebarwidth}
% \DescribeDefault{5.0cm}
% On the left side of first page of the CV a box is created, the side bar, which may hold
% personal information, a picture, skills, languages, hobbies, etc..
% The width of this box is controlled with the option \lstinline`sidebarwidth`.
% This must be defined before the sidebar is attempted to be set.
% \watchout
% \DescribeMacro{\setsidebarwidth}
% There is currently no command analogous to the other lengths to set this in the preamble,
% it must be defined via the options.
%
% \DescribeOption{iconspace}
% \DescribeDefault{0.8cm}
% Closely related is the option \lstinline`iconspace`, which defines the width that is
% reserved for the icon in a line in the side bar environment.
% \DescribeMacro{\seticonspace}
% It can also be set via \lstinline`\seticonspace`\marg{length} in the preamble.
%
% \DescribeOption{hintcol}
% \DescribeDefault{2.7cm}
% \DescribeOption{hintcolsep}
% \DescribeDefault{0.2cm}
% In the main body, each entry will consist of two parts:
% First, a small column for a keyword, date, bar, which is called hint in this documentation.
% The width of this column can be adjusted with the option \lstinline`hintcol`.
% Second, a column for the description of this hint. This is just a parbox, and depends on
% the command used. The width will be automatically calculated from the available space.
% These two columns are separated by a space.
% The width of which can be set via the option \lstinline`hintcolsep`.
% \DescribeMacro{\sethintcolwidth}
% \DescribeMacro{\sethintcolsep}
% Alternatively they can be set in the preamble via
% \lstinline`\sethintcolwidth`\marg{length} and
% via \lstinline`\sethintcolsep`\marg{length}, respectively.
%
% \DescribeOption{letterindent}
% \DescribeDefault{1em}
% In the letter environment the indentation of the first line of a paragraph can be adjusted
% with the \lstinline`letterindent` option.
% This is another length that can (currently) only be controlled with passing the option
% to the class.
%
% \subsubsection{Colors}
% \DescribeOption{xcolor}\DescribeDefault{dvipsnames}
% The class loads the \lstinline`xcolor` package and passes by default the
% option \lstinline`dvipsnames` to it.
% This can be changed by using the \lstinline`xcolor` option to pass other parameters
% to this package.
% It is loaded internally before the \lstinline`tikz` package to avoid option conflicts.
%
% \DescribeOption{primary}\DescribeDefault{blue}
% The main colour of the CV is called \lstinline`primary` and can be set via this option.
% It is used for all parts that will be highlighted, such as the header bar and the
% section headings.
% \DescribeOption{shade} \DescribeDefault{black}
% \DescribeOption{mixing} \DescribeDefault{10}
% The text color is a composite color from the primary color and the \lstinline`shade` color.
% By default this is defined as black, so the text will appear darker.
% The amount of primary color mixed in depends on the factor which can be set via
% the \lstinline`mixing` option.
%
% \DescribeOption{secondary} \DescribeDefault{white}
% The \lstinline`secondary` color specifies the background color and is white by default.
%
% \margintag{unused}
% \DescribeOption{highlight} \DescribeDefault{orange}
% One last color is defined to highlight items.
% It can be set via the \lstinline`highlight` option.
% This option currently has little effect as the color itself is not used within the template.
%
% \DescribeMacro{\setcolprimary}
% \DescribeMacro{\setcolsecondary}
% \DescribeMacro{\setcolhighlight}
% \DescribeMacro{\setcolshade}
% To allow for custom colors to be used, all colors ca also be set with the
% \lstinline`\setcol<...>`\marg{color} commands.
% Note that the mixing parameter must be set via the options and has no special macro.
%
% \subsubsection{Progress and Level Bar Options}
%
% \DescribeOption{progbarheight}
% \DescribeDefault{1.5 ex}
% Skills can be displayed as an CV entry and accompanied with a progress bar or a
% level (bar) indicator. The width of this bar is by default either determined by the
% environment in which it is used, or the width of the hint column.
% The height of the bar can be controlled with the \lstinline`progbarheight` option.
% \DescribeMacro{\setprogbarheight}
% It can also be set via \lstinline`\setprogbarheight`\marg{length}.
% \DescribeOption{progbarunits}
% \DescribeDefault{5}
% The level bar is divided into boxes or circles. The number of these items can be set
% via \lstinline`progbarunits` and defaults to five.
% \DescribeMacro{\setprogbarunits}
% It can also be set via \lstinline`\setprogbarunits`\marg{number}.
%
% \subsubsection{Miscellaneous Options}
% \DescribeOption{draft, final}
% The class also extends the \lstinline`draft` option of the standard article class.
% The otherwise invisible boxes, e.g. for the side bar, will be lightly shaded,
% so that they are visible.
% The complementary option is \lstinline`final`.
% Note that if the final option is found, the draft option will have no effect and
% will be ignored.
%
% \DescribeOption{biblatex}
% The \lstinline`biblatex` option will inject some code into a bibliography environment,
% so that the alignment of the hint column will be better. It is turned off by default.
% If the biblatex package is not loaded (this class will not take care of this),
% it might lead to problems.
%
% \DescribeOption{signcv}
% In some countries it is customary to sign the CV.
% The option \lstinline`signcv` can be used to enable this behavior.
% If it is enabled, a box with a signature will be placed in the lower left corner of the
% first page, below the sidebar contents.
% The box width is also controlled with the sidebar width option.
% An image with the signature is necessary (see below).
%
% \subsubsection{Void Article Options}
% \DescribeOption{twocolumn}
% \watchout
% Since every page has a specific layout passing the \lstinline`twocolumn` option to the
% inherited article class will lead to problems. Therefore it has been disabled.
%
% \DescribeOption{titlepage}
%\watchout
% For the same reason as above, creating a title page doesn't make sense and will clash
% with other settings of this class.
% Therefore the \lstinline`titlepage` option has also been disabled.
%
% \section{Changing Fonts and Text Alignment}
% \DescribeMacro{\setheaderfont}
% \DescribeDefault{\mybackslash{}sffamily\mybackslash{}bfseries}
% By default the font used for the header is made bold and serifs are turned off.
% In order to change that layout, the command
% \lstinline`\setheaderfont`\marg{font specification}
% can be used. This command should be used in the preamble.
%
% \DescribeMacro{\setentryragged}
% \DescribeMacro{\setentryjustified}
% The default layout of an entry in the CV is justified.
% This can be changed with \lstinline`\setentryragged` to flush the contents to the left
% and leave the right side ragged (\lstinline`\raggedright`).
% For symmetry the command \lstinline`\setentryjustified` can be used to unset the above.
% Both commands will set the internal variable used in the templates at the end of the
% preamble, so they can only be used there.
%
% \DescribeMacro{\setsigright}
% \DescribeMacro{\setsigleft}
% The commands \lstinline`\setsigright` and \lstinline`\setsigleft` determine
% whether the name below a signature field is right or left aligned.
% This does not affect where the field itself is placed.
% These commands can also only be used in the preamble.
%
% \subsection{Commands to Store and Access Information}
% Personal information can be stored in variables so that they become accessible to the defined templates.
%
% \DescribeMacro{\author}
% \DescribeMacro{\insertauthor}
% The \lstinline`\author`\marg{author name} command remains unchanged and cannot be used outside of the preamble.
% The contents of that field is copied to the \lstinline`\insertauthor` variable and is accessible
% throughout the document that way.
%
% \DescribeMacro{\title}
% \DescribeMacro{\inserttitle}
% Similarly to the above, the \lstinline`\title`\marg{title} remains unchanged, with the same limitations applied.
% The contents can be accessed with the \lstinline`\inserttitle` command.
% There is currently no template using this command, but it is recommended to set it to something like
% \emph{Curriculum Vitae} for the \PDF{} fields that might use it.
%
% \DescribeMacro{\position}
% \DescribeMacro{\insertposition}
% The \lstinline`\position`\marg{position} macro is defined in a similar way to the above commands.
% The \lstinline`\insertposition` macro can be used to access the content.
% It is used in the header box and can be set to contain, as the name suggest, the title of the current position.
% A common usage might also be a one line description of one's profession.
%
% \DescribeMacro{\address}
% \DescribeMacro{\insertaddress}
% The address can either be specified by the direct invocation of \lstinline`\address`\marg{address} and
% is accessible via the \lstinline`\insertaddress` macro.
% It is used in the address template (see section~\ref{sec:templates-special}),
% as well as the header of the letter (see section~\ref{sec:letter-env}).
% \DescribeMacro{\street}
% \DescribeMacro{\location}
% Alternatively it the macros \lstinline`\street`\marg{street} and \lstinline`\location`\marg{location} can be used
% to set the values separately. The \lstinline`\insertaddress` will then be constructed from these two values.
% \DescribeMacro{\insertstreet}
% \DescribeMacro{\insertlocation}
% If set, they can be printed with the corresponding \lstinline`\insertstreet` and \lstinline`\insertlocation` macros.
% \watchout
% If the address is set directly the other values remain unchanged.
% It is therefore also possible to extend the functionality in the following way:
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\street{123, Example Road}
\location{New Town}
\address{The Old Shack\\\insertstreet\\\insertlocation}
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% \DescribeMacro{\email}
% \DescribeMacro{\insertemail}
% The command \lstinline`\email`\marg{email} will wrap the input in a hyperlink, which can
% be accessed through the \lstinline`\insertemail` command.
%
% \DescribeMacro{\phone}
% \DescribeMacro{\mobile}
% \DescribeMacro{\insertphone}
% \DescribeMacro{\insertmobile}
% Telephone numbers can be stored with \lstinline`\phone`\marg{number} and \lstinline`\mobile`\marg{number}
% and accessed with the adjacent commands \lstinline`\insertphone` and \lstinline`\insertmobile`.
% Currently the template only provides templates for these two telephone numbers.
%
% \DescribeMacro{\github}
% \DescribeMacro{\insertgithub}
% The macro \lstinline`\github`\marg{username} provides a convenient way to display the GitHub username,
% while also wrapping it into a hyperlink to the associated profile.
%
% \DescribeMacro{\orcid}
% \DescribeMacro{\insertorcid}
% Likewise for an ORCID account, the \lstinline`\orcid`\marg{ID number} will wrap the displayed ID
% into a hyperlink to the respective profile.
%
% \DescribeMacro{\signaturefile}
% \DescribeMacro{\insertsigfilename}
% In order to sign the CV and the cover letter, a file name must be provided with the macro
% \lstinline`\signaturefile`\marg{filename}.
% This file name is stored in \lstinline`\insertsigfilename` and is passed to the command
% \lstinline`includegraphics` in the corresponding templates.
% \watchout
% For the cover letter it is necessary to set this filename, otherwise it will (currently) lead to an error.
%
% \subsection{Templates}
% \label{sec:templates}
% The templates that are provided with this class should make typesetting the contents of the resume
% easier as they provide predefined spacing and markup.
%
% \subsubsection{General Templates for the CV}
% \label{sec:templates-general}
%
% \DescribeMacro{\section}
% \DescribeMacro{\subsection}
% The \lstinline`\section`\marg{text} and \lstinline`\subsection`\marg{text} commands are
% redefined to have no numbers.
% For the former there will be a bar the length of the hint column, while for the latter
% there is just the same amount of space.
% Both commands will use the primary color and the predefined header fonts.
%
% \DescribeMacro{\cvline}
% The \lstinline`\cvline`\oarg{width}\marg{hint}\marg{description} macro divides an entry
% line in the CV into two parts: a hint column with the reset hint, which can also be set
% with the optional argument, and a description box spanning the remaining width of the line.
% It can be used to set any type of content as a line in the CV.
%
% \DescribeMacro{\cvitemline}
% The \lstinline`\cvitemline`\oarg{width}\marg{icon}\marg{description} is similarly
% constructed as the above command.
% The general difference is that the hint column is replaced with an icon column.
% If the optional \myarg{length} parameter is not given, it falls back to the definition
% from the preamble.
% The line itself is defined consisting of two parboxes, spanning the whole width that
% is available.
% This command is primarily intended for the sidebar, but it could be used somewhere else.
% It is also used for the specialised templates (see section~\ref{sec:templates-special}).
%
% \DescribeMacro{\progressbar}
% The \lstinline`\progressbar`\oarg{width}\marg{level} typesets a progress bar.
% The height of this bar is defined via the class options or in the preamble.
% The width of the bar can be set via the optional parameter \myarg{width}, however,
% in most use cases it will be automatically calculated depending on where it is used.
% The mandatory argument \myarg{level} can be defined as a number between 0 and smaller
% than 1 and is then used directly as a fraction.
% Alternatively, if it is a number, it is taken as the numerator for the
% fraction, where the number of progress bar units is the denominator.
% If the input is not numeric, or larger than the number of progress bar units,
% the bar will be filled completely.
% If the input is smaller than zero, the bar will be completely empty.
% There are some special templates, which use this command
% (see section~\ref{sec:templates-special}).
%
% For the default setup, the number of units in the level bar is 5, the following two
% commands will produce the same result:
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\progressbar{0.6}
\progressbar{3}
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% On the other hand, (for the default setup) the first command will fill the bar to 20\%,
% but the second and third command will fill it completely.
% \watchout[1 vs. full]
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\progressbar{1} % filled 20% (1/5) for default
\progressbar{6} % filled 100% for default
\progressbar{full} % filled 100% (always)
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% \DescribeMacro{\levelbarsquares}
% \DescribeMacro{\levelbarcircles}
% The macros \lstinline`\levelbarsquares`\oarg{width}\marg{level} and
% \lstinline`\levelbarcircles`\oarg{width} \marg{level} are also progress indicators,
% which use squares or circles, respectively.
% The total number of items is set via the class options or in the preamble.
% The mandatory argument \myarg{level} should be an integer within 0 and the set limit.
% If the \myarg{level} has a fractional value smaller than 1, it will be scaled by
% the limit of items in the bar, and then rounded down.
% If the level is specified as a fractional number larger than one, only the integer part
% will be considered.
% If level exceeds the the upper bound of the predefined range, or is non-numeric,
% all items will be filled.
% If the input is smaller than zero, all items will be empty.
% The width can be given as the optional argument \myarg{width} and defaults to the
% width of the hint column.
% There are currently no templates that use these commands, but they can be used to
% redefine existing templates.
%
% For the default setup, the number of units in the level bar is 5, the following two
% commands will produce the same result:
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\levelbarsquared{0.8}
\levelbarsquared{4}
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% \subsubsection{Special Templates for the CV}
% \label{sec:templates-special}
%
%
% \DescribeMacro{\cventry}
% The \lstinline`\cventry` macro is a more specialised template of the \lstinline`\cvline` macro.
% It requires six mandatory arguments, which of course can be empty.
% It is intended to be used in the following form:\\
% \lstinline`\cventry`\oarg{width}\marg{when}\marg{what}\marg{who}\marg{where}\marg{opt.}\marg{descr.}.\\
% The entry spans the whole available width, the optional \myarg{width} controls the hint column.
% The first argument \myarg{when} contains the hint, which can be a date for example.
% The second argument \myarg{what} will be set in bold font and usually contains the title of the position,
% or a short job description. This is followed by a comma.
% The third argument \myarg{who} is set in italic font and usually contains the name of the employer,
% which is again followed by a comma.
% The fourth argument \myarg{where} may contain the location of this job and it is set in normal font style.
% If the fifth argument \myarg{opt.} contains something, it is set in the same style as the preceding element,
% separated by a comma from it. This could be used to specify a grade in the education section for example.
% If this argument is empty, the comma is skipped. The line will then be terminated by a full stop.
% The sixth argument \myarg{descr.} can also be empty.
% If it contains text, it will be set on a new line and can be used as a more detailed description of the entry.
% The font size is reduced to small for this paragraph.
%
% \DescribeMacro{\cvskill}
% The \lstinline`\cvskill`\marg{description}\marg{level} is a template using \lstinline`\cvline`,
% defining a progress bar to \myarg{level} and a \myarg{description}.
% If it is used in the main document part, the progress bar will be set into the hint column, and will
% take half of its width and is flushed to the right.
% The description is flushed to the left in the main column.
% If it is used in the side bar, the description will start the line, followed by the progress bar.
% The progress bar will then use a third of the whole line, and the description the rest excluding son separator space.
%
% \DescribeMacro{\cvlanguage}
% The \lstinline`\cvlanguage`\marg{language}\marg{level} is a wrapper to the above command.
% This was introduced, to allow for the possibility of customisation.
% For example, it could be redefined to use a different indicator.
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\renewcommand\cvlanguage[2]{%
\cvline{\levelbarsquares{#2}}{#1}}
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% \DescribeMacro{\cvlineaddress}
% \DescribeMacro{\cvlineemail}
% \DescribeMacro{\cvlinephone}
% \DescribeMacro{\cvlinemobile}
% The special versions of the \lstinline`\cvitemline` macro have a preset icon to it.
% The address (\faMapMarker), email (\faEnvelope), phone (\faPhone), and mobile (\faMobile) templates
% are predefined.
% These macros are primarily intended for the side bar environment.
% They may be used in the main part, too, but they could look somewhat odd.
% Other lines can be added with the generic command.
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\cvitemline{\faTerminal}{bash, zsh, fish}
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% \DescribeMacro{\orcidiconfilename}
% Since there is no \LaTeX{} package available that includes an Orcid icon,
% it must be provided with an external file.
% The command \lstinline`\orcidiconfilename` will look for a file with the name \lstinline`orcidicon.pdf`
% and include this as a graphic.
% If such a file is not found, it will use a placeholder icon made of the letters.
%
% \DescribeMacro{\cvlineorcid}
% \DescribeMacro{\cvlinegithub}
% The Orcid and GitHub macros will use their respective icons, similar to the above.
% The contents of the variables defined in the preamble will go into the description column.
%
% \subsection{The CV Environments}
% \label{sec:cv-env}
% \DescribeEnv{polycvfirstpage}
% The class comes with two environments to set the CV contents.
% The first page is special since it also contains a side bar with additional information.
% The environment itself sets up the geometry of the page, and the header box including the
% name and position.
% It will also set up the footer box to close the page.
% It should be used to set a single page only.
%
% \DescribeEnv{polycvsidebar}
% The side bar is part of the first page environment and should be issued inside it.
% It will produce a box with the specified content on the left side of the page.
% The main templates of this class will have different definitions inside this environment.
%
% The following code block contains an exemplary usage of the two environments.
%
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\begin{polycvfirstpage}
\begin{polycvsidebar}
\includegraphics[width=1.0\linewidth]{example-image-1x1}\\[2ex]
\section{Personal Details}
\cvitemline{\faStar}{01. 01. 1984,\newline Birthplace, Country}
\cvlineaddress
\cvlineemail
\section{Languages}
\cvlanguage{English (native)}{1}
% etc.
\end{polycvsidebar}%
\section{Experience}
\cventry{years}
{job title}{employer}{place}
{optional: ...}
{optional: job description}
\section{Skills}
\cvskill{\LaTeX}{0.8}
% etc.
\end{polycvfirstpage}
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% \DescribeEnv{polycvpage}
% The generic CV page environment is similar to the firstpage environment,
% but it doesn't include space for the side bar.
% The margins are adjusted to fill the whole available width.
% It is useful to typeset a second (or backside) page of the CV.
% The header box of this page will be of the same size as for the first page, but remain empty.
%
% The following code block briefly summarises an example usage:
%
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\begin{polycvpage}
\section{Education}
\cventry{years}
{degree}{institution}{place}
{optional: grade/...}
{optional: comment/ description}
% etc.
\end{polycvpage}
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% \subsection{The Cover Letter Environment}
% \label{sec:letter-env}
% \DescribeEnv{polycvletter}
% The letter environment takes one optional and two mandatory arguments:
% The optional argument is the author's address, which, if unspecified, will
% be constructed from variables set in the preamble.
% The first mandatory argument is the subject line, while the second is
% the recipient's address.
%
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\begin{polycvletter}
[(*@\myarg{Author Address}@*)]{(*@\myarg{Subject line}@*)}{(*@\myarg{Recipient Address}@*)}
%
% Letter content
%
\end{polycvletter}
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% At the end of the environment the signature, a file name provided in the preamble
% with \lstinline`\signaturefile{<image file>}`, along with the author name will be set.
%
% \DescribeMacro{\opening}
% \DescribeMacro{\closing}
% The letter environment uses indentation specified with the \lstinline`letterindent`
% option (see section \ref{sec:page-layout}). This looks odd for the opening and closing statement,
% therefore a wrapper is provided that turns of the indentation. They each take one
% argument, like \lstinline`\opening`\marg{statement}.
% These commands will be set in place, i.e. you could include text before and after them.
%
% \DescribeMacro{\ps}
% Occasionally you would like to include a postscript note.
% The contents of such a note can be stored with \lstinline`\ps`\marg{note} and will be
% produced below the signature of the letter.
% The font size is also smaller than the one of the text.
% This command can only be used once; a later occurrence will overwrite a previous one.
%
% \DescribeMacro{\setpsmark} \DescribeDefault{P.S.\~}
% How the postscript is introduced can be changed with \lstinline`\setpsmark`\marg{psmark}.
%
% The following is a minimal working example for a letter created with the polycv class.
%
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\documentclass[primary=black,14pt,a4paper]{polycv}
\usepackage{mwe} % for this example
\title{Curriculum Vitae}
\author{Example Author}
\signaturefile{example-image-16x9}
\begin{document}
\begin{polycvletter}
[Address line 1\\ Address line 2]
{Subject line}
{Company\\ Address line 1\\ Address line 2}
\opening{Dear Example,}
\blindtext[1-3]
\closing{Sincerely,}
\ps{\blindtext[1]}
\end{polycvletter}
\end{document}
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% \subsection{Including external \PDF{} as Appendix}
%
% \DescribeMacro{\pdfappendix} \DescribeDefault{pages=\{1-\}}
% It is occasionally necessary to include certificates, letters of recommendation,
% or other external sources into an application.
% This class provides a wrapper to the \lstinline`\includepdf` command from
% \lstinline`pdfpages`.
% The difference to the original command (which still could be used) is that before
% including the document, the wrapper will unset the page color.
% This is necessary, even if it is defined as white, due to the way the page color
% is implemented.
% You can include pages from a \PDF{} document to use it as appendix with the command
% \lstinline`\pdfappendix`\oarg{kwargs}\marg{filename}, where the optional argument accepts
% arguments like \lstinline`pages=1-3` or \lstinline`angle=90`.
% See the \href{https://ctan.org/pkg/pdfpages}{%
% Documentation of the \lstinline`pdfpages` package}.
%
% \StopEventually{}
%
% \clearpage
% \interfootnotelinepenalty=10000
%
% \section{Implementation}
%
% \subsection{Option definitions}
%
% These simple definitions for key-value pairs as class options are done with kvoptions as
% described in TUGBoat.\footnote{J. Wright, C. Feuersänger, TUGBoat, Vol. 30 (2009), No. 1, p. 110-122.}
% Using the prefix \lstinline`polycv@` as an in-between to distinguish values set from class options
% in the document.
%
% \begin{macrocode}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=polycv,
prefix=polycv@
}
% \end{macrocode}
%
% Define options and preset margins for the page setup via the geometry package.
%
% \begin{macrocode}
\DeclareStringOption[1.0cm]{margins}
\DeclareStringOption[3.0cm]{headerheight}
\DeclareStringOption[0.5cm]{footerheight}
\DeclareStringOption[5.0cm]{sidebarwidth}
\DeclareStringOption[2.7cm]{hintcol}
\DeclareStringOption[0.2cm]{hintcolsep}
\DeclareStringOption[0.8cm]{iconspace}
\DeclareStringOption[1.5ex]{progbarheight}
% \end{macrocode}
%
% The progress bar, which contains of individual items, can be customised to include a certain
% number of elements. Define the option for this number and set it to five as default.
%
% \begin{macrocode}
\DeclareStringOption[5]{progbarunits}
% \end{macrocode}
%
% Define the options for the colors which should be used throughout the document.
% The mixing option is used together with the shading color, to modify the primary color.
%
% \begin{macrocode}
\DeclareStringOption[blue]{primary}
\DeclareStringOption[white]{secondary}
\DeclareStringOption[orange]{highlight}
\DeclareStringOption[black]{shade}
\DeclareStringOption[10]{mixing}
% \end{macrocode}
%
% Define an option for a draft mode, analogous to the standard classes. This will be extended, see below.
%
% \begin{macrocode}
\DeclareBoolOption{draft}
\DeclareComplementaryOption{final}{draft}
% \end{macrocode}
%
% Define a biblatex mode, which will adjust some space settings in the bibliography, if desired.
%
% \begin{macrocode}
\DeclareBoolOption{biblatex}
% \end{macrocode}
%
% Define an option that lets the user pass settings to xcolor, i.e. (the default) \lstinline`dvipsnames`.
%
% \begin{macrocode}
\DeclareStringOption[dvipsnames]{xcolor}
% \end{macrocode}
%
% Define the option whether the CV (front page) is signed or not.
%
% \begin{macrocode}
\DeclareBoolOption{signcv}
% \end{macrocode}
%
% Define an option to set the indentation in the letter and let it default to the width or one m.
%