summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mycv/Doc/Chapters/Fundamentals.tex
blob: 13e080268ea8b2ef483d1b200c619dcba40047cc (plain)
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
%*********************************************************
\chapter{Fundamentals}
\quotes[1973]{
   ``Computer programming is an art, because it applies
     accumulated knowledge to the world, because it
     requires skill and ingenuity, and especially because
     it produces objects of beauty''
}{Knuth}
%*********************************************************
\ifparchment\begin{parchment}\fi
\section{Introduction}

The main goal of this class (\classname) is to give support for creating \textit{curriculum
vit\ae{}} (\CV) with different layouts, allowing easy switching among them.
%That is primarily the goal this class focus on.
The class also provides basic support for using the \textit{TikZ} decorations and defines a bunch
of commands for managing the contents of a \CV, though that is not its primary goal.
%\classname, in fact, mainly focus on switching from different curriculum layouts,
%rather than handling the curriculum contents.
On \keyword{CTAN} archives, there are available various \CV packages more
\textit{contents-oriented}, as it were, and they may be used together with this class.
%providing missing contents functionality.
Before starting to describe the class more in details, it goes without saying that any advice or
constructive criticism is greatly appreciated.

\section{Class files}
The class \classname is composed by six files. A short brief of each one is given here:
\squishlist
   \item \ctext{mycv.cls}
      \begin{myindent}
      it is the main file and, basically, handles the class options~\myref{sec:class-options} as
      well as the inclusion of all other files, except for \textit{mycv\_version.def};
      \end{myindent}
   \item \ctext{mycv\_base.def}
      \begin{myindent}
      it contains all the commands and definitions dealing with the layout components of a
      \CV~\myref{sec:layout-components}: it is the core file;
      \end{myindent}
   \item \ctext{mycv\_style.sty}
      \begin{myindent}
      it contains the default style commands~\myref{sub:style-commands} provided by the class: if
      the default style is not used, %~\myref{sec:class-options}
      this file will not be included by \textit{mycv.cls};
      \end{myindent}
   \item \ctext{mycv\_dec.sty}
      \begin{myindent}
      it contains the decoration commands~\myref{sub:decoration-commands} provided by the class: if
      decorations are not enabled%
      %~\myref{sec:class-options}
      , this file will not be included by \textit{mycv.cls};
      \end{myindent}
   \item \ctext{mycv\_misc.def}\hspace{5pt}and\hspace{5pt}\ctext{mycv\_version.def}
      \begin{myindent}
      they respectively contain some miscellaneous commands and the version string.
      \end{myindent}
\squishend

\section {Layout components}
\label{sec:layout-components}

This class considers a \textit{curriculum vit\ae{}} as logically divided into three main components:
\textit{header}, \textit{body} and \textit{footer}.
To each of these ones, a list, that basically contains some sub-components, is associated; files
with the \CV contents are also considered sub-components.
For these reasons, we can actually say that \classname uses a sort of \textit{list-driven} approach.

\subsection{Main components}

\classname recognizes the following three lists that, for all intends and purposes, are a concrete
representation of the main logical components:

\bigskip
\begin{myindent}
\textbf{headerlayoutlist},\hspace{5pt}\textbf{bodylayoutlist},\hspace{5pt}\textbf{footerlayoutlist}.
\end{myindent}

\bigskip
It is mandatory, for the correct behavior of the class, to not change the above list's names. In
the case a component is not required, the relative list may be omitted: for example, if a \CV does
not have a footer component, the list \textit{footerlayoutlist} is not strictly necessary.\\
What follows is an example of a list definition:\codeskip
\begin{latexcode}[numbers=none]
\def\headerlayoutlist{sub-component1,sub-component2,[...]}
\end{latexcode}

\subsection{Sub-components}

We previously said that \classname is based on three main components (\textit{header},
\textit{body} and \textit{footer}) and that each of these ones are represented by a list. A list
(therefore a main component), in turn, may have one or more sub-component, separated by
a comma, which are identified as follows:

\squishlist[0pt]
   \item \texttt{\ctext{Main}[Header|Body|Footer]\ctext{PageBegin}};
   \item \texttt{\ctext{Main}[Header|Body|Footer]\ctext{PageEnd}};
   \item \texttt{\ctext[blue]{Sub}[Header|Body|Footer]\ctext[blue]{PageBegin}};
   \item \texttt{\ctext[blue]{Sub}[Header|Body|Footer]\ctext[blue]{PageEnd}};
   \item \texttt{\ctext[orange]{filename}} with the (partial) \CV contents.
\squishend\sep

Both ``\verb|Main[...]PageBegin|'' and ``\verb|Sub[...]PageBegin|'' are \textit{minipages}; the
difference is that the former have a default width of $100\%$ of the \textit{textwidth}
macro, while that value is $44\text{-}45\%$ for the latter (it depends on the components type).
% (for these notes does not really matter which is which).

A \textit{filename} sub-component may either be the name of a file or a macro with it:
depending on the case, the syntax slightly changes.%~\myreftwo{subsub:component-options}.

\subsubsection{Sub-components options}
\label{subsub:component-options}

Each sub-component, \textit{filename} included, may have associated options, with colons
as separators, so that the syntax is something like:\codeskip
\begin{latexcode}[numbers=none]
   $sub-component$:option1:option2:[...]
\end{latexcode}

If truth be told, each option already has its own separator, so colons are not strictly necessary
and, as a separator, any other symbol may be used. If wanted, it is also possible to not have any
separator at all, but this is not recommended if only for a matter of clarity.

\medskip % in modo che si inizi nella pagina successiva
Options for a sub-component are of different types, as listed below:

\def\tmpcolor{gray}
\squishlist
   \item <\optname{[pre\textbar post]cmd}\verb|:command1:command2:[...]|>\optdsep
      a sequence of commands is executed \textit{before}/\textit{after} the
      beginning or ending of a sub-component (\textit{filename} included).
      A command may have a sequence of arguments, separated by ``='',
      each of which can either be \textit{optional} or \textit{mandatory}.
      In total, the class recognizes four types of arguments:
      %, as it is possible to have $3$ different kinds of optional ones:
      \squishlist[0pt]
         \item \ctext[blue]{arg} (mandatory argument equivalent to \{arg\});
         \item \ctext[blue]{@arg} (optional argument equivalent to [arg]);
         \item \ctext[blue]{!arg} (optional argument equivalent to <arg>);
         \item \ctext[blue]{*} (optional argument equivalent to *).
      \squishend
   \item /\optname{m[l\textbar r]}\verb|<value>|/\hfill\opthsep{\small($1$)}\optvsep
      /\optname{endm[l\textbar r]}/\hfill\opthsep{\small($2$)}\optdsep
      changes the \textit{left}/\textit{right} margin of a text portion of a document, between
      option {\small($1$)} and option {\small($2$)}; in a typical usage, these options are
      associated with different sub-components, such as \verb|*PageBegin| and \verb|*PageEnd|.
      Each time the option {\small($1$)} is used, the option {\small($2$)} is also required
      for ending the margin modification, except for the \textit{filename}
      sub-component that automatically does that. Example (it moves the left margin to the
      right of $0.2$in):
      \begin{myindent}
      \texttt{%
         \ctext[\tmpcolor]{%
            % \% moves the left margin to the right of $0.2$in\\
            SubBodyPageBegin:</ml0.2in/>\\
            \omissis\\
            SubBodyPageEnd:</endml>}%
      }.
      \end{myindent}
   \item \verb|<width-value>|\optdsep
      sets the width of a sub-component in terms of \textit{textwidth} percentage.
      This option only exists for ``\verb|*PageBegin|`` sub-components. Example:
      \ctext[\tmpcolor]{\texttt{SubBodyPageBegin:<0.48>}}.
   \item /\optname{pagesize}\verb|<value>|/\optdsep
      sets the width of a sub-component, as the option above, but in terms of absolute reference
      (instead of \textit{textwidth} percentage). Also this option only exists for
      ``\verb|*PageBegin|`` sub-components. Example:
      \ctext[\tmpcolor]{\texttt{SubBodyPageBegin:/pagesize5.5in/}}.
   \item /\optname{pagebreak}/\optdsep
      permits to break two contiguous sub-components, aligning them one above the other, instead
      of side by side (that is the default behavior). This option only exists for
      ``\verb|*PageEnd|'' sub-components.
      Example: \ctext[\tmpcolor]{\texttt{SubBodyPageEnd:/pagebreak/}}.
   \item \optname{*}macroname\optvsep
      filename\optname{@}\optdsep
      \argname{macroname} is a macro expanding to the name of a file (with the \CV contents),
      while \argname{filename} is directly the name itself (the only \textit{non-alphanumeric}
      characters allowed there are ``\_'' and ``-'').
      Example: \ctext[\tmpcolor]{\texttt{*headerfile}}, where the macro \textit{headerfile}
      is somewhere defined.
\squishend
\ifparchment\end{parchment}\fi