Debian Codegraph @

texmf-dist/source/latex/komacv-rg/komacv-addons.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2017-2018 by Richard Grewe <[email protected]> % -------------------------------------------------------
4 %
5 % This file may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License, either version 1.2
7 % of this license or (at your option) any later version.
8 % The latest version of this license is in:
9 %
10 % http://www.latex-project.org/lppl.txt
11 %
12 % and version 1.2 or later is part of all distributions of LaTeX
13 % version 1999/12/01 or later.
14 %
15 % \fi
16 %
17 % \iffalse
18 %<*driver>
19 \ProvidesFile{komacv-addons.dtx}
20 %</driver>
21 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
22 %<package>\ProvidesPackage{komacv-addons}
23 %<*package>
24 [2018/11/02 v1.1 Various small addons and fixes to komacv]
25 %</package>
26 %
27 %<*driver>
28 \documentclass{ltxdoc}
29 \usepackage[columns=2]{idxlayout}
30 \usepackage{showexpl}
31 \usepackage{xspace}
32 \newcommand\ThisPackage{\textsf{komacv-addons}\xspace}
33 \usepackage{hypdoc}
34 \usepackage[capitalise,noabbrev,nameinlink]{cleveref}
35 \EnableCrossrefs
36 \CodelineIndex
37 \RecordChanges
38 \begin{document}
39 \DocInput{komacv-addons.dtx}
40 \PrintChanges
41 \PrintIndex
42 \end{document}
43 %</driver>
44 % \fi
45 %
46 % \CheckSum{0}
47 %
48 % \CharacterTable
49 % {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
50 % 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
51 % Digits \0\1\2\3\4\5\6\7\8\9
52 % Exclamation \! Double quote \" Hash (number) \#
53 % Dollar \$ Percent \% Ampersand \&
54 % Acute accent \' Left paren \( Right paren \)
55 % Asterisk \* Plus \+ Comma \,
56 % Minus \- Point \. Solidus \/
57 % Colon \: Semicolon \; Less than \<
58 % Equals \= Greater than \> Question mark \?
59 % Commercial at \@ Left bracket \[ Backslash \\
60 % Right bracket \] Circumflex \^ Underscore \_
61 % Grave accent \` Left brace \{ Vertical bar \|
62 % Right brace \} Tilde \~}
63 %
64 % \changes{v1}{2017/08/30}{Initial documented version}
65 % \changes{v1.1}{2018/11/02}{Package author's name change}
66 %
67 % \GetFileInfo{komacv-addons.dtx}
68 %
69 % \DoNotIndex{\newcommand,\newenvironment,\def,\gdef,\edef}
70 %
71 % \title{The \ThisPackage Package\thanks{This document
72 % corresponds to \ThisPackage~\fileversion, dated \filedate.
73 % The package is available online at
74 % \url{http://www.ctan.org/pkg/komacv-rg} and
75 % \url{https://github.com/Ri-Ga/komacv-rg}.}}
76 % \author{Richard Grewe \\ \texttt{[email protected]}}
77 %
78 % \maketitle
79 %
80 % \section{Introduction}
81 % \label{sec:Introduction}
82 %
83 % This package provides a few extensions and fixes to the \textsf{komacv}
84 % class.
85 %
86 % \StopEventually{}
87 %\iffalse
88 %<*package>
89 %\fi
90 %
91 % \section{Extensions}
92 %
93 % \begin{macro}{\Signature}
94 % The |\Signature|\oarg{width} draws a line of width \meta{width} (default:
95 % $38.2\%$ of the text width (where $38.2\%=1-\frac{1}{\varphi}$, with $\varphi$
96 % being the golden ratio).
97 % \begin{macro}{\signaturecity}
98 % Below the line, the macro puts the name of the city, which is expected in the
99 % |\signaturecity| macro, and the current date (via |\today|).
100 % Use |\renewcommand{\signaturecity}{...}| to specify the city.
101 % \begin{macro}{\beforesigvspace}
102 % Before the signature line, a vertical space of |\beforesigvspace| (default:
103 % 3cm) is inserted. Use |\renewcommand{\beforesigvspace}{...}| to specify
104 % another distance.
105 % \begin{macrocode}
106 \newcommand*\signaturecity{}
107 \newcommand*\beforesigvspace{3cm}
108 \newcommand\Signature[1][0.382\textwidth]{%
109 \par
110 \begin{tabular}{@{}p{#1}@{}}
111 \rule{0pt}{\beforesigvspace}\\\hline
112 \signaturecity, \today\hfill
113 \end{tabular}}
114 % \end{macrocode}
115 % \end{macro}
116 % \end{macro}
117 % \end{macro}
118 %
119 % \section{\textsf{komacv} Fixes}
120 %
121 % The construction of |\cvitem| based on a |tabular| environment seems to
122 % sometimes produce undesired vertical space below a sequence of |\cvitem|s.
123 % The following fix redefines |\cvitem|, based on its original definition, to
124 % fix this vertical spacing problem.
125 % \begin{macrocode}
126 \RequirePackage{letltxmacro}
127 \LetLtxMacro{\kcvml@origcvitem}{\cvitem}
128 \renewcommand*{\cvitem}[3][\@afterelementsvspace]{%
129 \kcvml@origcvitem[#1]{#2}{\@minipagetrue #3}}
130 % \end{macrocode}
131 %
132 % We also fix the default setup of |\@listdbitemmaincolwidth|. The only change
133 % is that we also subtract |\@sepcolwidth| from |\@maincolwidth|, because
134 % |\cvlistdoubleitem| does include a horizontal separation of that width.
135 % \begin{macrocode}
136 \AtEndPreamble{
137 \ifdimequal{\listdbitemmaincolwidth}{0pt}{%
138 \setlength{\@listdbitemmaincolwidth}
139 {\@maincolwidth-\@sepcolwidth-\@listitemsymbolwidth}%
140 \setlength{\@listdbitemmaincolwidth}{0.475\@listdbitemmaincolwidth}%
141 }{}%
142 }
143 % \end{macrocode}
144 %
145 %\iffalse
146 %</package>
147 %\fi
148 % \Finale
149 \endinput