diff options
author | Karl Berry <karl@freefriends.org> | 2012-04-13 22:31:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-04-13 22:31:07 +0000 |
commit | 623c812ad9f18e80cd3ca0032ec3ec4187202593 (patch) | |
tree | 9c1c9a6a858f51e197cb1ad03b7a0257e13baa2b /Master/texmf-dist | |
parent | 844a044419a675256a955f28ebf38f85433ba27f (diff) |
new latex package mycv (13apr12)
git-svn-id: svn://tug.org/texlive/trunk@25955 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
30 files changed, 2089 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/mycv/CHANGELOG b/Master/texmf-dist/doc/latex/mycv/CHANGELOG new file mode 100644 index 00000000000..ed5eb38f934 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/CHANGELOG @@ -0,0 +1,6 @@ + +------------------------------------------------ +Fri Apr 13 00:42:35 CEST 2012 -- Version <1.5.2> +------------------------------------------------ + + * First public release
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Doc/Chapters/Fundamentals.tex b/Master/texmf-dist/doc/latex/mycv/Doc/Chapters/Fundamentals.tex new file mode 100644 index 00000000000..d09efbcf895 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Doc/Chapters/Fundamentals.tex @@ -0,0 +1,198 @@ +%********************************************************* +\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} +%********************************************************* + +\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 a basic support for using the \textit{TikZ} decorations and defines a bunch +of commands for handling the contents of a \CV, even though this 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. + +Probably, the choice of the class's name was not so appropriate but, at the beginning, I did not +plan to publish it and chose the simplest and most obvious name. I realized that only when I +wrote these notes, but by then it was a bit too late. +%As far as the class is concerned, it uses a file-based and list-driven approach. Each file +%represents the contents of a user-chosen part of the curriculum (ideally a section, but this is not +%mandatory and may be anything else); besides, the \CV is logically divided into three main +%components: header, body and footer components. For each main component a list is associated: it +%contains sub-components, among which files with the \CV contents. In addiction, each sub-component +%may have associated some generic or specific commands to be executed. + +Before starting to describe \classname more in details, I have to say it was my first class in +\LaTeX{} and, although I tried to do my best, the lack of experience probably brought me to make +some choice not so opportune as I hoped. It goes without saying that any advice or constructive +criticism is greatly appreciated. + +\section{Class files} +The class \classname is composed by five 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 (the remaining four); + \end{myindent} + \item \ctext{mycv\_base.tex} + \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-system file; + \end{myindent} + \item \ctext{mycv\_default\_style.tex} + \begin{myindent} + it contains the default style commands~\myref{sub:style-commands} provided by this 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.tex} + \begin{myindent} + it contains the decoration commands~\myref{sub:decoration-commands}: 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.tex} + \begin{myindent} + it contains some miscellaneous commands and definitions. + \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}. +For each of these ones, a list, that basically contains some sub-components, is being +associated; files with the \CV contents +%, or ideally a part of them (a section for example, but +%this is not mandatory and may be anything else), +are also considered sub-components\footnote{it may be a good practice, to make the best use of this +class, to subdivide the contents of each cv section in different files, although this is not +mandatory and any other choice may be made}. For these reasons, we can actually say that \classname +uses a +%file-based and +sort of \textit{list-driven} approach.%\\ +%Besides, the \CV contents (ideally a section, but may be anything else) is divided in more files. + +\subsection{Main components} + +\classname recognizes the following three lists that, for all intends and purposes, are a concrete +representation of the main logical components: + +\def\tmpcolor{black} +\squishlist[0pt] + \item \textbf{\ctext[\tmpcolor]{headerlayoutlist}}; + \item \textbf{\ctext[\tmpcolor]{bodylayoutlist}}; + \item \textbf{\ctext[\tmpcolor]{footerlayoutlist}}. +\squishend\sep + +It is mandatory, for the correct behavior of the class, to not change the above list 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{lstlisting}[firstnumber=1,numbers=none] +\def\headerlayoutlist{sub-component1,sub-component2,[...]} +\end{lstlisting} + +\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 directly be the name of a file or a macro (variable): +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:\sep +\begin{myindent} +\verb|sub-component:option1:option2:[...]|. +\end{myindent}\sep +If truth be told, each option 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, +but this is not recommended (just for a matter of clarity). +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 + begin or end of a sub-component (\textit{filename} included). + A command may have a sequence of arguments, separated by ``=''; + each of them can either be \textit{optional} or \textit{mandatory}. %\\ + In total, \classname recognizes four types of arguments: + %, as it is possible to have $3$ different kinds of optional ones: + \squishlist + \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):\sep + \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 + 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{*}varname\optvsep + filename\optname{@}\optdsep + \argname{varname} is a macro that expands to the name of a file (with the \CV contents), + while \argname{filename} is directly the name itself. + Example: \ctext[\tmpcolor]{\texttt{*headerfile}}, where the macro \textit{headerfile} + is somewhere defined. +\squishend
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Doc/Chapters/Usage.tex b/Master/texmf-dist/doc/latex/mycv/Doc/Chapters/Usage.tex new file mode 100644 index 00000000000..faccb9d8767 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Doc/Chapters/Usage.tex @@ -0,0 +1,377 @@ +% ***************************************************************************** +\chapter{Usage} +\quotes{% + “There are two ways to write error-free programs; only the third one works”% +}{Alan J. Perlis} +% ***************************************************************************** + +\section{Requirements} + +When \textit{decorations} are not enabled and the \textit{default style} is not used, \classname has +the following requirements:\codeskip +\begin{lstlisting}[firstnumber=1,numbers=none] +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{kvoptions} % for options +\RequirePackage{etextools} % for lists and other useful tools +\RequirePackage{ifthen} % for \ifthenelse command +\RequirePackage{pifont} % for ding style (itemize environment) +\RequirePackage{xstring} % for string utilities +\RequirePackage{xparse} % for commands with multiple default arguments +\end{lstlisting}\codeskip + +In addiction, if the default style is used, by means of the class option +``\textit{style}''~\myref{sec:class-options}, this class requires:\codeskip +\begin{lstlisting}[firstnumber=1,numbers=none] +\RequirePackage{titlesec} % for title format and spacing +\RequirePackage{fancyhdr} % for custom footer +\RequirePackage{xcolor} % for color +\RequirePackage{calligra} % for calligra font +\RequirePackage{times} % times font +\RequirePackage{marvosym} % symbols - phone +\RequirePackage{amssymb} % symbols - email +\end{lstlisting}\codeskip + +Finally, if decorations are enabled, by using the class option +``\textit{withDec}``~\myref{sec:class-options}, this class also requires:\codeskip +\begin{lstlisting}[firstnumber=1,numbers=none] +RequirePackage{tikz} % for graphics +\end{lstlisting}\codeskip + +\section{Class options} +\label{sec:class-options} + +\classname can use any option supported by the \textit{article} class, on which is based. In +addiction, it provides the following options: + +\def\tmpcolor{brown} +\squishlist +\item {\color{red}language=<\argname[\tmpcolor]{string}>} + \begin{myindent} + string language to pass to the \textit{babel} package for the document (\CV) language; + \end{myindent} +\item {\color{red}cntdir=<\argname[\tmpcolor]{dirname}>} + \begin{myindent} + sets the directory name where \classname will search for files with the \CV contents.\\ + The default one is ``Contents''; + \end{myindent} +\item {\color{red}style=<\argname[\tmpcolor]{filemane}>} + \begin{myindent} + specifies the file name (with or without ``.tex'' extension) with the style commands. + By default, the file \textit{mycv\_default\_style}, provided by the class itself, is that used. + It is also possible to not use a style file by specifying the value ``none'' as file name; + \end{myindent} +\item {\color{red}mdlname=<\argname[\tmpcolor]{name}>} + \begin{myindent} + registers a name for the layout (model) intended to be used: in this way is possible, for + example, to select the appropriate layout configuration file or a layout-specific portion of + code; + \end{myindent} +\item {\color{red}withDec} + \begin{myindent} + enables support for decorations (provided by the \textit{TikZ} package); + \end{myindent} +\squishend + +\section{Class commands} + +Here follows the complete list of the commands provided by \classname. The style commands +%~\myref{sub:style-commands} +are only available if the class option ``\textit{style}'' was used~\myref{sec:class-options}. The +same goes for the decoration commands, +%~\myref{sub:decoration-commands} +which need the class option ``\textit{withDec}'' to be used. In the following text of this section, +when present, the form {\color{blue}\omissis} (or {\color{blue}<...>}) indicates the default choice +for an optional argument of a command. + +\subsection{Conditional} + +\squishlist +\item + \cmdname{ifoption}\marg{option}\arghsep\marg{true}\arghsep\marg{false}\argvsep + \cmdname{ifmodel}\marg{mdlname}\arghsep\marg{true}\arghsep\marg{false}\cmddsep + \textit{ifoption} checks whether \argname{option} was used, + while \textit{ifmodel} checks whether \argname{mdlname} was registered in the class; then both + commands use the appropriate \argname{true} or \argname{false} block of code. +\squishend + +\subsection{Default style} +\label{sub:style-commands} + +\squishlist +\item \cmdname{mysectionTitleFormat} + \begin{myindent} + \dargone{titlerule-color-above}{myheadingscolor}\argvsep + \dargone{titlerule-color-below}{myheadingscolor} + \end{myindent}\cmddsep + \argname{titlerule-color-above} is the color for the rule above a section name, while + \argname{titlerule-color-below} is for that below. \textit{myheadingscolor} is the default color. +\item \cmdname{mysectionTitleSpacing} + \begin{myindent} + \dargone{left}{$0\text{pt}$}\arghsep + \dargone{beforesep}{$0\text{pt}$}\arghsep + \dargone{aftersep}{$5\text{pt}$} + \end{myindent}\cmddsep + this command is just an alias for + \textit{\textbackslash{titlespacing}\{\textbackslash{section}\}\{\argname{left}\}% + \{\argname{beforesep}\}\{\argname{aftersep}\}}. See the \textit{titlesec} package for further + information. +\item \cmdname{mycfoot} + \marg{text}\cmddsep + adds \argname{text} to the page footer. It may be useful, for example, to show information + about the last document update.% (\textbackslash{}mycfoot\{Last update \textbackslash{}today\}). +\squishend + +\subsection{Decorations} +\label{sub:decoration-commands} + +\classname provides some commands for using the \textit{TikZ} decorations. The support +provided is not complete at all (on the other hand \textit{TikZ} has a huge amount of +functionality), but is enough for this class purposes. The only \textit{TikZ} path supported is +\textit{rectangle}. +%\\ Here follows the provided commands list: + +\squishlist +\item \cmdname{mydecorationsPathmorphing}[*] + \begin{myindent} + \dargone{show-decoration}{$1$}\argvsep + \marg{decoration-type}\argvsep + \dargone{decoration-color}{gray}\argvsep + \dargtwo{shading-type}{radial}\argvsep + \dargtwo{background-color}{white}% + \end{myindent}\cmddsep + \argname{show-decoration}, if equals $1$, does show the decoration \argname{decoration-type}, + while if $0$ does not. + \textit{Starred} version uses the shading technique, unlike the \textit{not starred} one, and the + last argument is the background shading color.\\ + For \textit{not starred} version, the argument \argname{shading-type} is not considered + (just for a matter of clarity, a ``none'' value may be used), and the last argument is simply the + background color.\\ + \argname{decoration-type} was tested with the following values: ``shape'', ``straight'', + ``zigzag``, ``random steps``, ``saw``, ``bent``, ``bumps``, ``coil``, ``snake'' and + ``Koch snowflake``.\\ + \argname{shading-type} was tested with ``radial'' and ``ball'' shadings. +\item \cmdname{mydecorationsShape} + \begin{myindent} + \dargone{show-decoration}{$1$}\arghsep + \marg{decoration-type}\arghsep + \dargone{decoration-color}{gray} + \end{myindent}\cmddsep + \argname{show-decoration}, if equals $1$, does show the decoration \argname{decoration-type}, + while if $0$ does not. + \argname{decoration-type} was tested with the following ones: ``dart'', ``diamond'', + ``rectangle'' and ``star''. +\item \cmdname{mydecorationsFading} + \begin{myindent} + \dargone{path-fading}{north}\argvsep + \marg{primary-color}\argvsep + \dargone{color-gradient}{$80$}\argvsep + \dargone{secondary-color}{black}\argvsep + \dargtwo{opacity}{$1.0$}% + \end{myindent}\cmddsep + the resulting fill color is given by \argname{primary-color}, \argname{color-gradient} + and \argname{secondary-color}, which are composed as follows: + \argname{primary-color}!\argname{color-gradient}!\argname{secondary-color}. +\item \cmdname{mydecorationsSetPos[XTL|YTL|XBR|YBR]} + \begin{myindent} + \dargone{coordinate-value}{$1\text{cm}\mid-1\text{cm}\mid-1\text{cm}\mid1\text{cm}$} + \end{myindent}\cmddsep + sets the position for the decoration in use. Since the decoration path is \textit{rectangle}, it + is sufficient to have the $(x,y)$ coordinates of two points: the top-left and bottom-right. + \textit{XTL} stands for ``\texttt{X-Top-Left}'', \textit{XBR} for ``\texttt{X-Bottom-Right}'' + and so on. +\item + \cmdname{mydecorationsSetLineWidth}[*] + \dargone{line-width}{tikz value}\cmdvsep + \cmdname{mydecorationsSetSegmentAmplitude}[*] + \dargone{segment-amplitude}{tikz value}\cmdvsep + \cmdname{mydecorationsSetSegmentLength}[*] + \dargone{segment-length}{tikz value}\cmddsep + these commands may respectively be used for modifying the properties \argname{line-width}, + \argname{segment-amplitude} and \argname{segment-length} for the decoration in use. + \textit{Starred} versions do not require any argument and reinitialize the properties to their + default values. +\squishend + +\subsection{Miscellaneous} + +\squishlist +\item + \cmdname{mypdfauthor} + \marg{author}\cmdvsep + \cmdname{mypdftitle} + \marg{title}\cmdvsep + \cmdname{mypdfsubject} + \marg{subject}\cmddsep + these commands do nothing but register \argname{author}, \argname{title} and \argname{subject} + information in the document properties of the pdf is being produced. + +\item \cmdname{mylang} + \marg{text}\arghsep + \dargone{language}{english}\cmddsep + temporarily changes the language in use (\textit{babel} package) to \argname{language} for + \argname{text}. + +\item \cmdname{myitemize} + \cmddsep + a list environment that uses the \textit{ding} style. + +\item \cmdname{mychangemargin} + \marg{left-margin}\arghsep + \marg{right-margin}\cmddsep + \textit{mychangemargin} environment changes the left and right margin of a portion of + text. The environments \textit{mychangemarginLeft} and \textit{mychangemarginRight}, whose + meaning is straight forward, are also available. + +\item \cmdname{myrenderlayout} + \dargone{component}{a}\cmddsep + processes and draws the layout component(s). The option value ``h'' is for the header component, + ``b'' and ``f'', respectively, for the body and footer ones, while ``a'' is for all components. +\squishend + +\section{An example} + +This section gives a \textit{minimal} example and some considerations about the use of \classname +(the class permits to do much better with a little patience). This is done by creating two +\textit{curriculum vit\ae{}} with the same contents, but different layouts: one \CV will use a +double page layout (abbreviated \DPL from here forward), while the other will use a single page +layout (\SPL). + +The sample code presented here can be found in the ``Examples'' directory shipped with the +\textit{mycv} bundle, which this document is part of, and that also contains files with the \CV +contents: these files are not listed in the present document, as they do not contain anything worth +being mentioned for the purpose of these notes. + +First and foremost, to keep things ordered, we need a file containing the layout components +for the \DPL (\textit{model-dpl.tex}) and another one for the +\SPL (\textit{model-spl.tex}). +%For our intents, +We opt for having the header and footer components being shared, so we create a third file named +\textit{model-common.tex} such as this: +\lstinputlisting[firstnumber=1,caption=model-common.tex,label=lst:model-common]{ +../Examples/Models/model-common.tex}\codeskip + +Notice that in listing~\ref{lst:model-common}, for the \DPL, we used some decoration commands. +Obviously, it is also possible to not use decorations (simply by not using the relative class +option), but in that case the showed code would yield some compilation errors, since decoration +commands would be called without being defined.\\ +A possible solution makes the use of the conditional command \textit{\textbackslash{}ifoption}, so +that the first part of the code would become something like in listing~\ref{lst:model-common-hint}. +\begin{lstlisting}[firstnumber=1,label=lst:model-common-hint,caption=model-common-hint] +\ifmodel{verDPL}{% + \ifoption{withDec}{% + [...] + }{\newcommand{\cvdec}{}} +}{\newcommand{\cvdec}{}} +\end{lstlisting}\codeskip + +Now we can deal with the layout components specific for the \DPL (\textit{model-dpl.tex}) +as in listing~\ref{lst:dplmodel}. +\lstinputlisting[firstnumber=1,caption=model-dpl.tex,label=lst:dplmodel]{ +../Examples/Models/model-dpl.tex } +\codeskip + +%The directive colored in red moves the right margin to the left (text and title rules) while the +%directives in orange are just used as a trick to do the same thing for the left margin (that is +%moved to the right):\codeskip +%\begin{lstlisting}[firstnumber=1,numbers=none] +%&MainBodyPageBegin&:<0.96> +%|SubBodyPageBegin|, +%|SubBodyPageEnd|, +%\end{lstlisting} + +As far as the \DPL, we have done; we still have to deal with the layout components specific for +the \SPL (\textit{model-dpl.tex}). In this case, we do not need to use \verb|*PageBegin| components, +but it is sufficient to directly include the files with the contents. The resulting code is showed +in listing~\ref{lst:splmodel}. +\lstinputlisting[firstnumber=1,caption=model-spl.tex,label=lst:splmodel]{ +../Examples/Models/model-spl.tex } +\codeskip + +At this point, we both have the components for the double and single page layouts and we can +proceed writing the main files (\textit{mycv-example-dpl.tex} and \textit{mycv-example-spl.tex}) +that pick and use them.\\ +We start by setting up some options for the \classname class; we have chosen to store the \CV +contents files in the directory ``Contents'' (that is the default one where the class searches +for the contents files), so there is not need to specify the directory path with the option +``\textit{cntdir}''~\myref{sec:class-options}. +\\ +The options we want to pass to the class are those related to the decorations support and language; +in addiction, we pass the name of the layout (model) we mean to use. +% (see the listings~~\ref{lst:dplmodel} or ~\ref{lst:splmodel}). +\\ +Here we take the \DPL as an example (listing~\ref{lst:mycv-example-dpl}), but switching to the +\SPL would just be a matter of changing the ``\textit{mdlname}'' option from \keyword{verDPL} to +\keyword{verSPL}. +\begin{lstlisting}[firstnumber=1,label=lst:mycv-example-dpl,caption=mycv-example-dpl.tex] +\documentclass[10pt,mdlname=verDPL,withDec,language=english]{mycv} +\input{mycv-example-common} +\end{lstlisting}\codeskip + +What remains to do is just to include the appropriate layout components file (\ref{lst:dplmodel} or +\ref{lst:splmodel}) and process them with the \textit{\textbackslash{}myrenderlayout} command, as +showed in listing~\ref{lst:example-common}; since this portion of code is shared between +\textit{mycv-example-dpl.tex} and \textit{mycv-example-spl.tex}, we need to use +\textit{\textbackslash{}ifmodel} for selecting the right file to be included. +\begin{lstlisting}[firstnumber=1,caption=mcv-example-common.tex,label=lst:example-common] +[...] +\ifmodel{verSPL}{\input{Models/model-spl}}{\relax} +\ifmodel{verDPL}{\input{Models/model-dpl}}{\relax} + +\begin{document} +\myrenderlayout % all components +[...] +\end{document} +\end{lstlisting} +%\lstinputlisting[firstnumber=1,caption=mcv-example-common.tex,label=lst:example]{ +%../Examples/mycv-example-common.tex} + +\section{Split the contents} + +When a double layout page is used, it may occur, for example, that a section is too long for a +page: this would not be a problem with a single layout page, since \LaTeX{} would automatically +break the section contents. Unfortunately, with a double page layout the behavior is substantially +different: this is because \classname uses a \textit{minipage-based mechanism} and a minipage is by +itself not breakable. Thus, what happens is that part of the section contents comes out from the +margins, without being displayed. + +When a problem such as this occurs, a possible workaround is to manually break the section contents. +This can be done by using a counter that keeps track of the number of times a same file is included: +when the counter is equal $1$, a part of the section contents is included in the left page, +otherwise is the remaining one to be included in the right page. +Listing~\ref{lst:split-contents-example} shows a practical example of what just discussed. + +\begin{lstlisting}[firstnumber=1,label=lst:split-contents-example,caption=split-contents-example] +% --------------------------------------------------------- +% file with the section contents: i.e. <section_skills.tex> +% --------------------------------------------------------- +% increase the counter 'acounter', that is defined outside this file +\stepcounter{acounter} +\newcommand{\conditionalblock}[2]{\ifthenelse{\value{acounter}<2}{#1}{#2}} +\textconditionalblock% + {skills section contents part A}% + {skills section contents part B (the remaining part)} +% -------------------------------------------------- +% file with the DPL components: i.e. <model-dpl.tex> +% -------------------------------------------------- +\def\bodylayoutlist{% + |SubBodyPageBegin|:<0.48>, % left page + % include part A in the left page + section_skills@, + [...] + |SubBodyPageEnd|, + |SubBodyPageBegin|:<0.48>, % right page + % include part B in the right page + section_skills@, + [...] + |SubBodyPageEnd| +} +\end{lstlisting}\codeskip + +Of course the proposed workaround is not the best we could wish for, since it requires manual +operations. Unfortunately, at the moment, I would not know how to solve the problem with a brighter +idea. Any advice or comment is greatly appreciated, either for the specific problem or for this +work in general. + +\bigskip\bigskip +That's all, {\color{brown}happy \LaTeX{}ing!}\\[5pt] +\Large\calligra{AndreaGhersi}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Doc/FrontBackMatter/Contents.tex b/Master/texmf-dist/doc/latex/mycv/Doc/FrontBackMatter/Contents.tex new file mode 100644 index 00000000000..61c9aa38750 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Doc/FrontBackMatter/Contents.tex @@ -0,0 +1,8 @@ + +%******************************************************* +% Contents +%******************************************************* + +\pdfbookmark{\contentsname}{tableofcontents} +\setcounter{tocdepth}{2} +\tableofcontents
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Doc/FrontBackMatter/Titlepage+Abstract.tex b/Master/texmf-dist/doc/latex/mycv/Doc/FrontBackMatter/Titlepage+Abstract.tex new file mode 100644 index 00000000000..6396ef1ef78 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Doc/FrontBackMatter/Titlepage+Abstract.tex @@ -0,0 +1,64 @@ + +\begin{titlepage} +\begin{center} + +% =========== +% Definitions +% =========== + +\def\version{1.5.2} + +% this sets the counter to symbols (*, dagger, and so on) +\renewcommand{\thefootnote}{\fnsymbol{footnote}} +\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} + +%\def\versionMsg{... last revised \today, documentation dated XXX} +\def\versionMsg{This file has version number \version, documentation dated \today} + +% ======================= +% Upper part of the page +% ======================= + +% Date +\textsc{\large\color{gray}\today}\\[0.5cm] + +% Title +\HRule\\[0.4cm]% +{\huge\medskip\bfseries\myTitle\footnote{\versionMsg}}\\[0.4cm]% +\HRule\\[1.5cm] + +% Author +\large\emph{Author:}\\ +\href{mailto:\myMail}{\textsc{\myName}} + +\vspace{20pt} +\includegraphics[width=0.30\textwidth]{Images/logo-1.png}\\[1cm] + +\vspace{10pt} +\textbf{\textit{Abstract}}\normalsize\par\bigskip +\begin{minipage}{0.75\textwidth} +\noindent +This \LaTeX{} class provides a set of functionality for writing \textit{curriculum vit\ae{}} +with different layouts. To achieve this goal, it adopts a different approach with respect +to the other c.v. classes or packages. + +Basically, the idea is that a user can write some custom configuration directives, by means of which +is possible both to produce different c.v. layouts and quickly switch among them. +\\ +In order to process such directives, this class uses a set of lists, provided by the package +\textit{etextools}.\;A basic support for using the \textit{TikZ} decorations is also provided. + +\end{minipage} + +% ================== +% Bottom of the page +% ================== + +% -------------------------------------------- +% this resets the numbering back to arabic and +% makes sure that the footnote is numbered 1 +% -------------------------------------------- +\renewcommand{\thefootnote}{\arabic{footnote}}\setcounter{footnote}{0} + +\end{center} +\end{titlepage}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Doc/Images/logo-1.png b/Master/texmf-dist/doc/latex/mycv/Doc/Images/logo-1.png Binary files differnew file mode 100644 index 00000000000..b1a2b91b171 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Doc/Images/logo-1.png diff --git a/Master/texmf-dist/doc/latex/mycv/Doc/mycv-macros.sty b/Master/texmf-dist/doc/latex/mycv/Doc/mycv-macros.sty new file mode 100644 index 00000000000..3d0600e7f69 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Doc/mycv-macros.sty @@ -0,0 +1,290 @@ +%@ ------------------------------------------------------- +%@ start of file 'mycv-macros.sty'. +%@ Copyright 2012 Ghersi Andrea (ghanhawk@gmail.com). +%@ +%@ This work may be distributed and/or modified under the +%@ conditions of the LaTeX Project Public License version +%@ 1.3c, available at 'http://www.latex-project.org/lppl'. +%@ ------------------------------------------------------- +\ProvidesPackage{mycv-macros}[2012/04/13% + A package providing some useful commands] + +\ifdraft + % --------------------------------- + % rende visibili (in nero) i badbox + % --------------------------------- + \overfullrule=5pt +\fi + + +%%%%%%%%%%%% +% % +% Hyperref % +% % +%%%%%%%%%%%% + +\hypersetup{citecolor=webgreen} +\hypersetup{pdfstartpage=1} + +\hypersetup{% + pdfstartpage = 1, + pdfauthor = Andrea Ghersi, + pdftitle = MyCV, + pdfsubject = MyCV class documentation, + pdfproducer = \LaTeX{}, + pdfkeywords = {}, + pdfcreator = \LaTeX{} with 'arsclassica' +} + + +%%%%%%%%% +% % +% Alias % +% % +%%%%%%%%% + +%\newcommand{\mySubTitle}{a list driven cv\xspace} +\newcommand{\myTitle}{MyCV\xspace} +\newcommand{\myName}{Andrea Ghersi\xspace} +\newcommand{\myMail}{ghanhawk@gmail.com} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Formato pagina, sezioni, capitoli,... % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% modifica la larghezza della pagine. Formato: +\areaset{412pt}{749pt} + +% --------------------------------------------------- +% modifica formato section e subsection (sovrascrive +% le impostazioni definite dallo stile 'arsclassica') +% --------------------------------------------------- + +% sections +\titleformat{\section}% + {\color{red}\normalfont\Large\bfseries\bf}% + {\color{red}\MakeTextLowercase{\thesection}}{1em}{\spacedlowsmallcaps} + +% subsections +\titleformat{\subsection}% + {\color{orange}\normalfont\bfseries\bf} + {\textsc{\MakeTextLowercase{\thesubsection}}}{1em}{\normalsize} + +% subsubsections +\titleformat{\subsubsection}% + {\color{cyan}\normalfont\bfseries\bf} + {\textsc{\MakeTextLowercase{\thesubsection}}}{1em}{\small} + +% ------------------------------------------------- +% cambia il colore dei capitoli/sezioni nell'indice +% ------------------------------------------------- + +\renewcommand*\cftchapfont{\color{red}\bfseries} +\renewcommand*\cftsecfont{\color{gray}\bfseries} + +% ----------------------------------------------------------- +% words 'chapter', 'section' and 'subsection' not capitalized +% inside a ref +% ----------------------------------------------------------- + +\def\chapterautorefname{chapter} %default: Chapter +\def\sectionautorefname{section} %default: Section +\def\subsectionautorefname{subsection} %default: Subsection + + +%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Liste personalizzate % +% % +%%%%%%%%%%%%%%%%%%%%%%%% + +% ---------------------------------------------- +%\circ — An open circle +%\cdot — A centered dot +%\star — A five-pointed star +%\ast — A centered asterisk +%\rightarrow — A short right-pointing arrow +%\diamondsuit — An open diamond +%\triangleright +% ---------------------------------------------- + +% separazione tra item +\def\myitemsep{5pt} + +\newcommand{\squishlist}[1][\myitemsep]{% + \begin{list}{$\triangleright$}% + { % separazione tra paragrafi: OGNI nuova + % lista equivale ad un NUOVO paragrafo + \setlength{\parskip}{5pt}% + % separazione tra item + \setlength{\itemsep}{#1}% + \setlength{\parsep}{5pt}% + % separazione del primo item - si aggiunge + % all'eventuale separazione tra paragrafi + \setlength{\topsep}{5pt}% + \setlength{\partopsep}{0pt}% + \setlength{\leftmargin}{2.5em}% + \setlength{\labelwidth}{1em}% + \setlength{\labelsep}{0.5em}% + }} + +\newcommand{\squishend}{% + \end{list}} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Citazioni personalizzate % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newcommand{\quotes}[3][0]{% + % ---------------------------------------------------------- + % definisce il colore dell'autore e dell'anno (verde chiaro) + % rosso RGB {255, 0, 0} + % ---------------------------------------------------------- + \definecolor{authorcolor}{RGB}{51, 153, 51} + \definecolor{datecolor} {RGB}{51, 153, 51} + % + \noindent\makebox[0.90\textwidth]{% + \begin{minipage}[t]{0.50\textwidth}% + \hfill% + \end{minipage}% + \begin{minipage}[t]{0.50\textwidth}% + {\small\ignorespaces\slshape #2}\\[0.5em]% + \medskip% + \hfill\texttt{---} {{\color{authorcolor}{#3}}}% + \ifnum#1>0% + \xspace[{\color{datecolor}{#1}}]% + \fi% + \end{minipage}% + }} + + +%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Riferimenti a pagine % +% % +%%%%%%%%%%%%%%%%%%%%%%%% + +% page references +\newcommand{\myref}[1]{{\color{blue}(\autoref{#1})}\xspace} +\newcommand{\myreftwo}[1]{{\color{blue}(see~\autoref{#1})}\xspace} + + +%%%%%%%%%%%%%%%% +% % +% Comandi vari % +% % +%%%%%%%%%%%%%%%% + +% pensato per parole maiuscole (es CV, DPL,...) +\newcommand{\keyword}[1]{{\footnotesize\textbf{#1}}\xspace} + +\newcommand{\argvsep}{\\[5pt]} % vertical sep between args list +\newcommand{\arghsep}{\;\;} % horizontal sep between args list +\newcommand{\cmdvsep}{\\[5pt]} % vertical sep between cmds list +\newcommand{\cmdhsep}{\;\;} % horizontal sep between cmds list +\newcommand{\cmddsep}{\par\medskip} % vertical sep between cmd and its description +\newcommand{\optvsep}{\\[5pt]} % vertical sep between opts list +\newcommand{\opthsep}{\;\;} % horizontal sep between opts list +\newcommand{\optdsep}{\par} % vertical sep between opt and its description +\newcommand{\sep}{\medskip} % generic sep +\newcommand{\argname}[2][black]{{\color{#1}{$\langle$\textit{#2}$\rangle$}}} +\newcommand{\cmdname}[2][brown]{{\color{#1}{\textbf{\textbackslash#2}}}} +\newcommand{\optname}[2][brown]{{\color{#1}{\textbf{#2}}}} +\newcommand{\classname}{{\color{blue}{\textit{MyCV}}}\xspace} +\newcommand{\codeskip}{\medskip} +\newcommand{\DPL}{\keyword{DPL}} % se si usa \color bisogna anche mettere un \xspace +\newcommand{\SPL}{\keyword{SPL}} % idem +\newcommand{\CV}{\keyword{CV}} % idem + +% format '{...}' arguments: #1 is an argument +\newcommand{\marg}[1]{% + \fbox{% + {\color{red}\textbf{\{}}$\langle$% + \textit{#1}% + $\rangle${\color{red}\textbf{\}}}}% + } + +% format '[...]' arguments: #1 is an argument, #2 is the default value +\newcommand{\dargone}[2]{% + \fbox{% + {\color{cyan}\textbf{[}}$\langle$% + \textit{#1}% + $\rangle${\color{cyan}\textbf{]}}% + }\;$\longrightarrow$\;{\color{blue}\textbf{[}\textit{#2}\textbf{]}}} + +% format '<...>' arguments: #1 is an argument, #2 is the default value +\newcommand{\dargtwo}[2]{% + \fbox{% + {\color{cyan}\textbf{<}}$\langle$% + \textit{#1}% + $\rangle${\color{cyan}\textbf{>}}% + }\;$\longrightarrow$\;{\color{blue}\textbf{<}\textit{#2}\textbf{>}}} + +% indentazione +\newenvironment{myindent}[1][0.2in]% + { \begin{list}{}{% + \setlength{\topsep}{0pt}% + \setlength{\leftmargin}{#1}% + \setlength{\partopsep}{0pt}% + \setlength{\parsep}{\parskip}}\item[]% + } + {\end{list}} + +% colored text +\newcommand{\ctext}[2][red]{{\color{#1}{#2}}} + +% omissis, nella forma: [...] +\newcommand{\omissis}{[\dots\negthinspace]} + + +%%%%%%%%%%%% +% % +% Listings % +% % +%%%%%%%%%%%% + +% for backgroundcolor color +\definecolor{lightergray}{gray}{0.99} + +\lstset{language=[LaTeX]Tex, + keywordstyle=\color{RoyalBlue}, + basicstyle=\normalfont\ttfamily, + commentstyle=\color{Emerald}\ttfamily, + stringstyle=\rmfamily, + numbers=none,%left,% where to put the line-numbers ('none' if no numbers are wanted) + % to decomment for having numbers inside the listing box instead outside + %xleftmargin=2em,frame=single,framexleftmargin=1.5em, + numberstyle=\scriptsize\color{gray},% the style that is used for the line-numbers + stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered + numbersep=8pt,% how far the line-numbers are from the code + showstringspaces=false, + breaklines=true, + frameround=ftff, + frame=lines, + moredelim=[is][\color{orange}]{|}{|}, + moredelim=[is][\color{red}]{&}{&}, + backgroundcolor=\color{lightergray} +} + +\lstset{ + morekeywords=% + {% + RequirePackage,newboolean,DeclareOption,setboolean,% + ProcessOptions,PackageError,ifthenelse,boolean,% + MakeTextLowercase,@ifpackageloaded,undefined,% + DeclareRobustCommand,MakeTextUppercase,% + color,titlerule,titlespacing,% + labelitemi,hypersetup,setlength,% + definecolor,includegraphics,ifdefined,% + ProvidesPackage,PackageInfo,PackageWarningNoLine,% + @ifclassloaded,ExecuteOptions,PackageWarning,textcolor% + },% + commentstyle=\color{Emerald}\ttfamily,% + frame=lines% +}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Doc/mycv.tex b/Master/texmf-dist/doc/latex/mycv/Doc/mycv.tex new file mode 100644 index 00000000000..61e9dbb4a51 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Doc/mycv.tex @@ -0,0 +1,84 @@ +\newif\ifdraft +%\drafttrue % se decommentato utilizza formato bozza + +\documentclass[ + 10pt, % corpo del font principale + a4paper,oneside,openany, % carta A4, pagina singola + titlepage, % frontespzio + fleqn, % equazioni allineate a sinistra + headinclude,footinclude, % testatina e pie' di pagina + BCOR5mm, % rilegatura di 5 mm + numbers=noenddot, % niente punto dopo il numero delle sezioni + cleardoublepage=empty, % pagine vuote senza testatina e pie' di pagina + captions=tableheading % didascalie in cima alle tabelle + \ifdraft + ,draft % bozza del documento + \else % nessuna bozza + \fi +]{scrreprt} % classe report di KOMA-Script + +% carica molti pacchetti utili a ClassicThesis +\usepackage[backref]{classicthesis-ldpkg} +\usepackage[ + eulerchapternumbers, % numeri dei capitoli in Euler + subfig, % compatibilita' con subfig + beramono, % Bera Mono come font a spaziatura fissa + eulermath, % AMS Euler come font per la matematica + pdfspacing, % migliora il riempimento di riga con PDFLaTeX + dottedtoc % allinea a destra i riferimenti alle pagine nell'indice +]{classicthesis} % lo stile ClassicThesis + +% modifica alcuni aspetti di ClassicThesis +\usepackage[english]{arsclassica} + +% per codifica caratteri +\usepackage[utf8x]{inputenc} + +% spelling +\usepackage[english]{babel} + +% per usare vari simboli, quali '-->',... +\usepackage{textcomp} + +% provides a visual markup extension to amsmath +\usepackage{empheq} + +% calligra font +\usepackage{calligra} + +% nessuna identazione +\setlength{\parindent}{0pt} + +% codice +\usepackage{listings} + +% macro di supporto +\usepackage{mycv-macros} + + +\begin{document} +% ---------------------------------- +% il numero di pagina viene messo in +% alto a destra invece che in fondo +% ---------------------------------- +\pagestyle{useheadings} +\pagestyle{plain} + +%****************************************************************** +% Frontmatter +%****************************************************************** + +\pagenumbering{roman} +\input{FrontBackMatter/Titlepage+Abstract} +\pagestyle{scrheadings} +\input{FrontBackMatter/Contents} +\cleardoublepage + +%****************************************************************** +% Mainmatter +%****************************************************************** + +\pagenumbering{arabic} +\input{Chapters/Fundamentals} +\input{Chapters/Usage} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/Contents/contents_partA.tex b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/contents_partA.tex new file mode 100644 index 00000000000..a5ba9e0d58c --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/contents_partA.tex @@ -0,0 +1,4 @@ + +\begin{mychangemargin}{0.1in}{0.1in} + \lipsum[73] +\end{mychangemargin}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/Contents/contents_partB.tex b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/contents_partB.tex new file mode 100644 index 00000000000..d67ed1614b6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/contents_partB.tex @@ -0,0 +1,4 @@ + +\begin{mychangemargin}{0.1in}{0.1in} + \lipsum[74] +\end{mychangemargin}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/Contents/contents_partC.tex b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/contents_partC.tex new file mode 100644 index 00000000000..175ff82cbf0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/contents_partC.tex @@ -0,0 +1,9 @@ + +\begin{mychangemargin}{0.1in}{0.1in} + A list: + \begin{myitemize} + \item this is item 1; + \item this is item 2; + \item ..... + \end{myitemize} +\end{mychangemargin}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/Contents/footer_sign.tex b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/footer_sign.tex new file mode 100644 index 00000000000..60307f9f051 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/footer_sign.tex @@ -0,0 +1,4 @@ + +\bigskip\bigskip +\ifmodel{verSPL}{\flushleft}{\relax} +{\Large\calligra{Adam Smith}}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/Contents/header_contacts.tex b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/header_contacts.tex new file mode 100644 index 00000000000..93066603a85 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/header_contacts.tex @@ -0,0 +1,14 @@ +\def\cvcontactsep{\\} +\vspace{0pt} %trick for alignment +\begin{tikzpicture} + \node [fill=myshadecolor,rounded corners=10pt, minimum size= 2.5cm]{% + \begin{tabular*}{6cm}{l|l} + &Unknown address XYZXYZXYZ\cvcontactsep + \raisebox{-3pt}{\Mobilefone} &+39\,0123\,456789\cvcontactsep + \raisebox{-3pt}{\Telefon} &Telephone\cvcontactsep + \raisebox{-3pt}{\Email} &\href{mailto:unknown@gmail.com} + {unknown@gmail.com}\cvcontactsep + \end{tabular*} + }; +\end{tikzpicture} +\bigskip
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/Contents/header_title.tex b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/header_title.tex new file mode 100644 index 00000000000..6fb52bda72e --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/Contents/header_title.tex @@ -0,0 +1,3 @@ +\bigskip +{\sffamily\Huge{}Dr. Adam Smith}\\[3pt]% +{\color{myheadingscolor}\huge\calligra{CurriculumVitae}\\[25pt]}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/Models/NOTES b/Master/texmf-dist/doc/latex/mycv/Examples/Models/NOTES new file mode 100644 index 00000000000..d0d57c8ae85 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/Models/NOTES @@ -0,0 +1,11 @@ + +================================================ +--------------- +IMPORTANT NOTES +--------------- + + In files 'model-dpl.tex' & 'model-spl.tex' the + '|' and '&' symbols are used as delimiters for + the listings package. They are not part of the + syntax (however, they do not create problems). +================================================
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/Models/model-common.tex b/Master/texmf-dist/doc/latex/mycv/Examples/Models/model-common.tex new file mode 100644 index 00000000000..46b130cc2ae --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/Models/model-common.tex @@ -0,0 +1,24 @@ +% file with the common layout components: header and footer +\ifmodel{verDPL}{% + \newcommand{\cvdec}{% + mydecorationsSetLineWidth=@0.3mm:% + mydecorationsPathmorphing=*=coil=!radial=!lightgray% + } +}{\newcommand{\cvdec}{}} +\newcommand{\sectionnumber}[1]{\section{Section #1}} + +\def\headerlayoutlist{% + &MainHeaderPageBegin&:<postcmd:vspace=10pt>, + % ---------------------------------------- left header + |SubHeaderPageBegin|:<precmd:\cvdec:hfill>, + header_title@, % header file one + |SubHeaderPageEnd|:<postcmd:hfill>, + % ---------------------------------------- right header + |SubHeaderPageBegin|, + header_contacts@, % header file two + |SubHeaderPageEnd|, + % ------------------------------------------- + &MainHeaderPageEnd& +} + +\def\footerlayoutlist{footer_sign@} % footer file
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/Models/model-dpl.tex b/Master/texmf-dist/doc/latex/mycv/Examples/Models/model-dpl.tex new file mode 100644 index 00000000000..7a9fa039d8e --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/Models/model-dpl.tex @@ -0,0 +1,30 @@ +\input{Models/model-common} +\def\bodylayoutlist{% + % --------------------------------------------------------- + % moves the right margin to the left (text and title rules) + % --------------------------------------------------------- + &MainBodyPageBegin&:<0.96>, + % --------------------------------------------------------- + % the 2 directives below are just used as a trick to do the + % same thing for the left margin (it is moved to the right) + % --------------------------------------------------------- + |SubBodyPageBegin|, + |SubBodyPageEnd|, + % ----------------------------------------- + % left page (0.48 of textwidth) + % ----------------------------------------- + |SubBodyPageBegin|:<0.48>, + contents_partA@:<precmd:vspace=10pt:sectionnumber=1>, + contents_partB@:<precmd:vspace=10pt:sectionnumber=2>, + contents_partC@:<precmd:vspace=10pt:sectionnumber=3>, + |SubBodyPageEnd|:<postcmd:hfill>, + % ----------------------------------------- + % right page (0.48 of textwidth) + % ----------------------------------------- + |SubBodyPageBegin|:<0.48>, + contents_partA@:<precmd:vspace=10pt:sectionnumber=4>, + contents_partB@:<precmd:vspace=10pt:sectionnumber=5>, + |SubBodyPageEnd|, + % ----------------------------------------- + &MainBodyPageEnd&% +}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/Models/model-spl.tex b/Master/texmf-dist/doc/latex/mycv/Examples/Models/model-spl.tex new file mode 100644 index 00000000000..2123f90d77f --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/Models/model-spl.tex @@ -0,0 +1,10 @@ +\input{Models/model-common} +\def\bodylayoutlist{% + % --------------------------------------------------- + contents_partA@:<precmd:vspace=10pt:sectionnumber=1>, + contents_partB@:<precmd:vspace=10pt:sectionnumber=2>, + contents_partC@:<precmd:vspace=10pt:sectionnumber=3>, + contents_partA@:<precmd:vspace=10pt:sectionnumber=4>, + contents_partB@:<precmd:vspace=10pt:sectionnumber=5> + % --------------------------------------------------- +}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-common.tex b/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-common.tex new file mode 100644 index 00000000000..e31e45838b6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-common.tex @@ -0,0 +1,15 @@ +\mypdfauthor{Andrea} +\mypdftitle{Just a CV example} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{lipsum} +\usepackage{tikz} + +\ifmodel{verSPL}{\input{Models/model-spl}}{\relax} +\ifmodel{verDPL}{\input{Models/model-dpl}}{\relax} + +\begin{document} +\myrenderlayout % all components +\mycfoot{Last update: \today} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-dpl.pdf b/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-dpl.pdf Binary files differnew file mode 100644 index 00000000000..e1e415fcaf0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-dpl.pdf diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-dpl.tex b/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-dpl.tex new file mode 100644 index 00000000000..b8b35ecca89 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-dpl.tex @@ -0,0 +1,2 @@ +\documentclass[10pt,mdlname=verDPL,withDec,language=english]{mycv} +\input{mycv-example-common} diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-spl.pdf b/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-spl.pdf Binary files differnew file mode 100644 index 00000000000..3cdd1fc4037 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-spl.pdf diff --git a/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-spl.tex b/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-spl.tex new file mode 100644 index 00000000000..bb404b8af0d --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/Examples/mycv-example-spl.tex @@ -0,0 +1,2 @@ +\documentclass[10pt,mdlname=verSPL,language=english]{mycv} +\input{mycv-example-common} diff --git a/Master/texmf-dist/doc/latex/mycv/README b/Master/texmf-dist/doc/latex/mycv/README new file mode 100644 index 00000000000..f6b6a5f6a01 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/README @@ -0,0 +1,72 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% MyCV class (v1.5.2) % +% 2012/04/13 % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +=========== +| | +| License | +| | +=========== + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License version +1.3c, available at 'http://www.latex-project.org/lppl'. + +============ +| | +| Abstract | +| | +============ + +This LaTex class provides a set of functionality for +writing "curriculum vitae" with different layouts. +To achieve this goal, it adopts a different approach +with respect to the other c.v. classes or packages. +Basically, the idea is that a user can write some +custom configuration directives, by means of which +is possible both to produce different c.v. layouts +and quickly switch among them. +In order to process such directives, this class uses +a set of lists, provided by the package <etextools>. +A basic support for using the <TikZ> decorations is +also provided. + +========================== +| | +| Files and installation | +| | +========================== + +--------------------------------------------------------- +The base directory of this bundle has the following files +and sub-directories: +--------------------------------------------------------- + +'README' -- this file +'CHANGELOG -- the revision history +'mycv.cls' -- the main class file (**) +'mycv_*.tex' -- files to support the main + class implementation (**) +'mycv.pdf' -- the documentation file +<Examples> -- directory with some examples +<Doc> -- contains the documentation sources + +------------ +Installation +------------ + +In order to install the MyCV class, move all 'mycv_*.tex' +and 'mycv.cls' files, marked with '**' in the list above, +into a folder searched by LaTeX; the refresh of the LaTeX +database might be necessary to complete the installation. + +To produce the files with examples, move to the directory +<Examples> and run 'mycv-example-[dpl or spl].tex through +pdfLaTeX. For 'mycv-example-dpl.tex' might be required to +repeat the operation once again. + +To create the documentation, move to the <Doc> directory +and run 'mycv.tex' twice through pdfLaTeX. diff --git a/Master/texmf-dist/doc/latex/mycv/mycv.pdf b/Master/texmf-dist/doc/latex/mycv/mycv.pdf Binary files differnew file mode 100644 index 00000000000..95581db376b --- /dev/null +++ b/Master/texmf-dist/doc/latex/mycv/mycv.pdf diff --git a/Master/texmf-dist/tex/latex/mycv/mycv.cls b/Master/texmf-dist/tex/latex/mycv/mycv.cls new file mode 100644 index 00000000000..0df161ff8df --- /dev/null +++ b/Master/texmf-dist/tex/latex/mycv/mycv.cls @@ -0,0 +1,101 @@ +% ------------------------------------------------------- +% start of file 'mycv.cls'. +% Copyright 2012 Ghersi Andrea (ghanhawk@gmail.com). +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License version +% 1.3c, available at 'http://www.latex-project.org/lppl'. +% ------------------------------------------------------- + +% =============================================================================== +% ------------------------------------------------------------------------- % +% Why a class file? (from document: LaTeX 2ε for class and package writers) % +% ------------------------------------------------------------------------- % +% % +% The first thing to do when you want to put some new LaTEX commands in a file % +% is to decide whether it should be a document class or a package. The rule of % +% thumb is: % +% % +% If the commands could be used with any document class, then make them a % +% package; if not, then make them a class. % +% =============================================================================== + +\NeedsTeXFormat{LaTeX2e} +\def\myversionstr{v1.5.2} +\ProvidesClass{mycv}[2012/04/13 \myversionstr My Curriculum Vitae Class] + +% ======== +% Packages +% ======== + +\RequirePackage{kvoptions} % see the comment above +\RequirePackage{etextools} % for lists and other useful tools +\RequirePackage{ifthen} % for <\ifthenelse> command +\RequirePackage{pifont} % 'ding' style for item of itemize env +\RequirePackage{xstring} % string utilities + +% ============= +% Class Options +% ============= + +\DeclareBoolOption{withDec} + +\DeclareDefaultOption{% + \PassOptionsToClass{\CurrentOption}{article}} + +\DeclareStringOption[english]{language} +\DeclareStringOption[Contents]{cntdir} +\DeclareStringOption[mycv_default_style]{style} +\DeclareStringOption[]{mdlname} +\ProcessKeyvalOptions* + +% ----------------------------------------------------------- +% The value of an option declared with <\DeclareStringOption> +% is stored in the macro \<class (or package) name>@<option> +% ----------------------------------------------------------- + +\PassOptionsToPackage{\mycv@language}{babel} +\RequirePackage{babel} + +\LoadClass{article} + +\def\cvcontentsdir{\mycv@cntdir} + +% =============== +% File inclusions +% =============== + +\input{mycv_base} +\input{mycv_misc} +\ifthenelse{\equal{\mycv@style}{none}}% + {\relax}% file style is not wanted + {\input{\mycv@style}} + +% ---------------------- +% use decorations or not +% ---------------------- +\ifthenelse{\boolean{mycv@withDec}}% + {\input{mycv_dec}}% + {\relax} + +\DeclareRobustCommand{\ifmodel}[1]{% + \begingroup + \def\@mdlname{#1} + \ifx\mycv@mdlname\@mdlname + \endgroup + \expandafter\@firstoftwo + \else + \endgroup + \expandafter\@secondoftwo + \fi +} + +% ----------------------------------------------- +% <\ifoption{optionname}{then block}{else block}> +% ----------------------------------------------- + +\DeclareRobustCommand{\ifoption}[1]{% + \begingroup + \ifthenelse{\boolean{mycv@#1}} + {\endgroup\expandafter\@firstoftwo} + {\endgroup\expandafter\@secondoftwo}% +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/mycv/mycv_base.tex b/Master/texmf-dist/tex/latex/mycv/mycv_base.tex new file mode 100644 index 00000000000..0c059f91916 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mycv/mycv_base.tex @@ -0,0 +1,341 @@ +% ------------------------------------------------------- +% start of file 'mycv_base.tex'. +% Copyright 2012 Ghersi Andrea (ghanhawk@gmail.com). +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License version +% 1.3c, available at 'http://www.latex-project.org/lppl'. +% ------------------------------------------------------- + +\ProvidesFile{mycv_base.tex} + +%%%%%%%%%%%%%%%%%% +% % +% Default values % +% % +%%%%%%%%%%%%%%%%%% + +\def\@mainbodypagesize{1.00} +\def\@subbodypagesize{0.45} + +\def\@mainheaderpagesize{1.00} +\def\@subheaderpagesize{0.44} + +\def\@mainfooterpagesize{1.00} +\def\@subfooterpagesize{0.44} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Layout components (parser) % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\@cmdsListSep{:} +\def\@argsListSep{=} + +\expandaftercmds{\DeclareCmdListParser\MyParserCmds}{\@cmdsListSep} +\expandaftercmds{\DeclareCmdListParser\MyParserArgs}{\@argsListSep} + +% ----------------------------------- +% setup file components: header pages +% ----------------------------------- + +\def\@MainHeaderPageBegin{MainHeaderPageBegin} +\def\@SubHeaderPageBegin{SubHeaderPageBegin} +\def\@MainHeaderPageEnd{MainHeaderPageEnd} +\def\@SubHeaderPageEnd{SubHeaderPageEnd} + +% --------------------------------- +% setup file components: body pages +% --------------------------------- + +\def\@MainBodyPageBegin{MainBodyPageBegin} +\def\@MainBodyPageEnd{MainBodyPageEnd} +\def\@SubBodyPageBegin{SubBodyPageBegin} +\def\@SubBodyPageEnd{SubBodyPageEnd} + +\def\@MainFooterPageBegin{MainFooterPageBegin} +\def\@SubFooterPageBegin{SubFooterPageBegin} +\def\@MainFooterPageEnd{MainFooterPageEnd} +\def\@SubFooterPageEnd{SubFooterPageEnd} + +% ------------------- +% regular expressions +% ------------------- + +\def\@regexPreCmd{<precmd:([-!*@.0-9A-Za-z \@cmdsListSep\@argsListSep]+)>} +\def\@regexPostCmd{<postcmd:([-!*@.0-9A-Za-z \@cmdsListSep\@argsListSep]+)>} +\def\@regexArgsList{\@argsListSep([-!*@.0-9A-Za-z \@argsListSep]+)} + +\def\@regexMarginLB{/ml([0-9.-]+.{2})} +\def\@regexMarginRB{/mr([0-9.-]+.{2})} +\def\@regexPageSizeAbs{/pagesize([0-9.]+.{2})/} +\def\@regexPagebreak{/pagebreak/} +\def\@regexPageSize{<([0-9.]+)>} +\def\@regexMarginLE{/endml/} +\def\@regexMarginRE{/endmr/} +\def\@regexFileName{^(.+)@} +\def\@regexCmdName{([a-zA-Z]+)} +\def\@regexFileVar{^.{1}([A-Za-z]+)} +\def\@regexParamTypeA{^[@]} +\def\@regexParamTypeB{^[!]} +\def\@regexParamTypeC{^[*]} + +% ================== +% Auxiliary commands +% ================== + +\newcommand{\@concatCommandArg}[1]{% + \ifnum\pdfmatch{\@regexParamTypeA}{#1}=1 + \StrGobbleLeft{#1}{1}[\arg] + \expandafter\g@addto@macro\expandafter\args% + \expandafter{\expandafter[\arg]} + \else + \ifnum\pdfmatch{\@regexParamTypeB}{#1}=1 + \StrGobbleLeft{#1}{1}[\arg] + \expandafter\g@addto@macro\expandafter\args% + \expandafter{\expandafter<\arg>} + \else + \ifnum\pdfmatch{\@regexParamTypeC}{#1}=1 + \g@addto@macro\args{*} + \else + \g@addto@macro\args{{#1}} + \fi + \fi + \fi% +} + +\newcommand{\@execCommand}[1]{% + \let\args\@empty + \ifnum\pdfmatch{\@regexArgsList}{#1}=1 + \@getRegexResult{\argslist} + \ifnum\pdfmatch{\@regexCmdName}{#1}=1 + \@getRegexResult{\cmd} + \fi + \MyParserArgs[\@concatCommandArg]\argslist + \expandaftercmds{\csuse\cmd}{\args} + \else + \csuse{#1} + \fi% +} + +\newcommand{\@getRegexResult}[1]{% + \StrPosition{\pdflastmatch 1}{>}[\n] + \StrGobbleLeft{\pdflastmatch 1}{\n}[#1]% +} + +\newcommand{\@executeCommandList}[2]{% + \ifnum\pdfmatch{#2}{#1}=1% + \StrPosition{\pdflastmatch 1}{>}[\n] + \StrGobbleLeft{\pdflastmatch 1}{\n}[\cmdlist] + \MyParserCmds[\@execCommand]\cmdlist + \fi% +} + +\newcommand{\@parsePageBegin}[2]{% + \let\pagewidth#2 + \ifnum\pdfmatch{\@regexPageSize}{#1}=1 + \@getRegexResult{\pagewidth} + \fi + \@executeCommandList{#1}{\@regexPreCmd} + \ifnum\pdfmatch{\@regexPageSizeAbs}{#1}=1 + \@getRegexResult{\pagewidth} + \noindent\begin{minipage}[t]{\pagewidth} + \else + \noindent\begin{minipage}[t]{\pagewidth\textwidth} + \fi + \@executeCommandList{#1}{\@regexPostCmd} + \ifnum\pdfmatch{\@regexMarginLB}{#1}=1 + \@getRegexResult{\marginsize} + \begin{mychangemarginLeft}{\marginsize} + \fi + \ifnum\pdfmatch{\@regexMarginRB}{#1}=1 + \@getRegexResult{\marginsize} + \begin{mychangemarginRight}{\marginsize} + \fi% +} + +\newcommand{\@parsePageEnd}[1]{% + \ifnum\pdfmatch{\@regexMarginRE}{#1}=1 + \end{mychangemarginRight} + \fi + \ifnum\pdfmatch{\@regexMarginLE}{#1}=1 + \end{mychangemarginLeft} + \fi + \@executeCommandList{#1}{\@regexPreCmd} + \ifnum\pdfmatch{\@regexPagebreak}{#1}=1 + \end{minipage} + + \else + \end{minipage} + \fi + \@executeCommandList{#1}{\@regexPostCmd} +} + +\newcommand{\@parseFileName}[1]{% + \let\marginsizeleft\relax + \let\marginsizeright\relax + \@executeCommandList{#1}{\@regexPreCmd} + \ifnum\pdfmatch{\@regexMarginLB}{#1}=1 + \@getRegexResult{\marginsizeleft} + \begin{mychangemarginLeft}{\marginsizeleft} + \fi + \ifnum\pdfmatch{\@regexMarginRB}{#1}=1 + \@getRegexResult{\marginsizeright} + \begin{mychangemarginRight}{\marginsizeright} + \fi + \IfBeginWith{#1}{*}{% + \ifnum\pdfmatch{\@regexFileVar}{\noexpand#1}=1 + \@getRegexResult{\filename} + \fi + \input\cvcontentsdir/\csuse{\filename} + }% + {% + \ifnum\pdfmatch{\@regexFileName}{#1}=1 + \@getRegexResult{\filename} + \fi + \input\cvcontentsdir/\filename + } + \@executeCommandList{#1}{\@regexPostCmd} + \ifx\marginsizeright\relax + \relax + \else + \end{mychangemarginRight} + \fi + \ifx\marginsizeleft\relax + \relax + \else + \end{mychangemarginLeft} + \fi +} + +% ============= +% Main commands +% ============= + +\newcommand{\@bodylayoutlistentry}[1]{% + \ifstrmatch{\@SubBodyPageBegin}{#1}{% + \@parsePageBegin{#1}{\@subbodypagesize}% + }% + {% + \ifstrmatch{\@SubBodyPageEnd}{#1}{% + \@parsePageEnd{#1}% + }% + {%else + \ifstrmatch{\@MainBodyPageBegin}{#1}{% + \@parsePageBegin{#1}{\@mainbodypagesize}% + }% + {%else + \ifstrmatch{\@MainBodyPageEnd}{#1}{% + \@parsePageEnd{#1}% + }% + {%else + \@parseFileName{#1}% + }% + }% + }% + }% +} + +\newcommand{\@headerlayoutlistentry}[1]{% + \ifstrmatch{\@MainHeaderPageBegin}{#1}{% + \@parsePageBegin{#1}{\@mainheaderpagesize}% + }% + {%else + \ifstrmatch{\@SubHeaderPageBegin}{#1}{% + \@parsePageBegin{#1}{\@subheaderpagesize}% + }% + {%else + \ifstrmatch{\@MainHeaderPageEnd}{#1}% + {\@parsePageEnd{#1}}% + {%else + \ifstrmatch{\@SubHeaderPageEnd}{#1}{% + \@parsePageEnd{#1}% + }% + {%else + \@parseFileName{#1}% + }% + }% + }% + }% +} + +\newcommand{\@footerlayoutlistentry}[1]{% + \ifstrmatch{\@MainFooterPageBegin}{#1}{% + \@parsePageBegin{#1}{\@mainfooterpagesize}% + }% + {%else + \ifstrmatch{\@SubFooterPageBegin}{#1}{% + \@parsePageBegin{#1}{\@subfooterpagesize}% + }% + {%else + \ifstrmatch{\@MainFooterPageEnd}{#1}% + { \@parsePageEnd{#1}% + }% + {%else + \ifstrmatch{\@SubFooterPageEnd}{#1}{% + \@parsePageEnd{#1}% + }% + {%else + \@parseFileName{#1}% + }% + }% + }% + }% +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Layout components (render) % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newcommand{\@raisewarning}[1]{% + \ClassWarning{mycv}{% + WARNING! The list <#1> used by 'mycv' class is undefined. % + Please, define it before using '\myrenderlayout' command. % + }% +} + +\DeclareRobustCommand{\myrenderlayout}[1][a]{% + \begingroup + \ifsinglechar{b}{#1}{% + \@ifundefined{bodylayoutlist}% + {\@raisewarning{bodylayoutlist}}% else + {\csvloop[\@bodylayoutlistentry]{\bodylayoutlist}}% + }% + {%else + \ifsinglechar{h}{#1}{% + % -------- + % HEADINGS + % -------- + \@ifundefined{headerlayoutlist}% + {\@raisewarning{headerlayoutlist}}% else + {\csvloop[\@headerlayoutlistentry]\headerlayoutlist}% + }% + {%else + % ------------------------------------------------ + % FOOTINGS: sign and treatment of personal details + % ------------------------------------------------ + \ifsinglechar{f}{#1}{% + \@ifundefined{footerlayoutlist}% + {\@raisewarning{footerlayoutlist}}% else + {\csvloop[\@footerlayoutlistentry]\footerlayoutlist}% + }% + {%\else + % -------------- + % ALL COMPONENTS + % -------------- + \@ifundefined{headerlayoutlist}% + {\@raisewarning{headerlayoutlist}}% else + {\csvloop[\@headerlayoutlistentry]\headerlayoutlist}% + \@ifundefined{bodylayoutlist}% + {\@raisewarning{bodylayoutlist}}% else + {\csvloop[\@bodylayoutlistentry]\bodylayoutlist} + \@ifundefined{footerlayoutlist}% + {\@raisewarning{footerlayoutlist}}% else + {\csvloop[\@footerlayoutlistentry]\footerlayoutlist}% + }% + }% + }% + \endgroup +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/mycv/mycv_dec.tex b/Master/texmf-dist/tex/latex/mycv/mycv_dec.tex new file mode 100644 index 00000000000..8283a678587 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mycv/mycv_dec.tex @@ -0,0 +1,226 @@ +% ------------------------------------------------------- +% start of file 'mycv_dec.tex'. +% Copyright 2012 Ghersi Andrea (ghanhawk@gmail.com). +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License version +% 1.3c, available at 'http://www.latex-project.org/lppl'. +% ------------------------------------------------------- + +\ProvidesFile{mycv_dec.tex} + +\RequirePackage{tikz} % for graphics +\usetikzlibrary{shapes,decorations,shadows,fadings} +\usetikzlibrary{decorations.pathmorphing} +\usetikzlibrary{decorations.fractals} +\usetikzlibrary{decorations.shapes} +\usetikzlibrary{calc} +\RequirePackage{xparse} + +%%%%%%%%%%%% +% % +% Settings % +% % +%%%%%%%%%%%% + +\def\@segmentLengthString{} +\def\@segmentLengthValue{} +\def\@lineWidthString{} +\def\@lineWidthValue{} +\def\@segmentAmplitudeString{} +\def\@segmentAmplitudeValue{} +\def\@xBottomRight{-1cm} +\def\@yBottomRight{1cm} +\def\@xTopLeft{1cm} +\def\@yTopLeft{-1cm} + +\tikzfading[% + name=fade out, inner color=transparent!0, + outer color=transparent!100% +] + +\tikzset{ + define mycolor/.code 2 args={\definecolor{#1}{rgb}{#2}}, + DecoratewithShape/.style={% + decorate,decoration={shape backgrounds,shape=#1}% + }, + DecoratewithPathMorphing/.style={% + decorate,decoration=#1% + }, + Mainstyle/.style={ + define mycolor={myred}{0.43,0.06,0,13}, + define mycolor={dpred}{0.80,0.35,0} + } +} + +%%%%%%%%%%%% +% % +% Commands % +% % +%%%%%%%%%%%% + +\newcommand{\versionBasedSettings}[2]{% + \IfBooleanTF#1{% + % --------------------------------------------------------- + % From <xstring> package + % --------------------------------------------------------- + % Macros of this package take the catcodes of tokens into + % account. To avoid unexpected behaviour (particulary with + % tests), you should keep in mind that tokens and their + % catcodes are examined. + % For instance, these two arguments: {\string a\string b} + % and {ab} do not expand into equal strings for xstring! + % Because of the command \string, the first expands into + % ab with catcodes 12 while the second have characters + % with their natural catcodes 11. Catcodes do not match! + % Starred macros do not take catcodes into account. They + % simply convert some arguments into arguments with + % catcodes 10, 11 and 12, and call the non-starred macros + % with these modified arguments. + % --------------------------------------------------------- + \IfStrEqCase*{#2}{% + {radial}{\def\@colorStr{inner color}}% + {ball}{\def\@colorStr{ball color}}% + {none}{\relax}% + }% + [mycv: Unknown option <#2>!!!]% + }{\relax}% +} + +% ----------------------------------------------------- +% Pathmorphing decoration values: +% shape, straight zigzag, random steps, saw, zigzag, +% bent, bumps, coil, snake, Koch snowflake +% Shadings: radial, ball +% ----------------------------------------------------- + +\DeclareDocumentCommand{\mydecorationsPathmorphing}% + {s O{1} m O{gray} D<>{radial} D<>{white}}% +{% + \begingroup + \versionBasedSettings{#1}{#5}% + \begin{tikzpicture}[overlay,remember picture]% + \IfBooleanTF#1{% version with a star (shading) + \shade[ + Mainstyle, + \@lineWidthString=\@lineWidthValue, + \@segmentAmplitudeString=\@segmentAmplitudeValue, + \@segmentLengthString=\@segmentLengthValue, + DecoratewithPathMorphing=#3, + color=#4, + shading=#5, + \@colorStr=#6, + \ifnum#2>0draw\fi + ]}% + {% version without a star (not shading) + \path[ + Mainstyle, + \@lineWidthString=\@lineWidthValue, + \@segmentAmplitudeString=\@segmentAmplitudeValue, + \@segmentLengthString=\@segmentLengthValue, + DecoratewithPathMorphing=#3, + color=#4, + fill=#6, + \ifnum#2>0draw\fi + ]}% + ($ (current page.north west)+ + (\@xTopLeft,\@yTopLeft) $) + rectangle % -- oppure circle (4), ... + ($ (current page.south east)+ + (\@xBottomRight,\@yBottomRight) $); + \end{tikzpicture} + \endgroup +} + +% -------------------------------------- +% Shapes: dart, diamond, rectangle, star +% -------------------------------------- + +\DeclareDocumentCommand{\mydecorationsShape}% + {O{1} m O{gray}} +{% + \begingroup + \begin{tikzpicture}[overlay,remember picture] + \path[ + Mainstyle, + \@lineWidthString=\@lineWidthValue, + \@segmentAmplitudeString=\@segmentAmplitudeValue, + \@segmentLengthString=\@segmentLengthValue, + DecoratewithShape=#2, + color=#3, + \ifnum#1>0draw\fi + ]% + ($ (current page.north west)+ + (\@xTopLeft,\@yTopLeft) $) + rectangle + ($ (current page.south east)+ + (\@xBottomRight,\@yBottomRight) $); + \end{tikzpicture} + \endgroup +} + +\DeclareDocumentCommand{\mydecorationsFading}% + {O{north} m O{80} O{black} D<>{1.0}} +{% + \begin{tikzpicture}[overlay,remember picture] + \draw[path fading=#1,fill=#2!#3!#4,opacity=#5] + ($ (current page.north west)+ + (\@xTopLeft,\@yTopLeft) $) + rectangle % -- oppure circle (4), ... + ($ (current page.south east)+ + (\@xBottomRight,\@yBottomRight) $); + \end{tikzpicture}% +} + +\DeclareRobustCommand{\mydecorationsSetPosXTL}[1]% + [1cm]% +{% + \def\@xTopLeft{#1}% +} + +\DeclareRobustCommand{\mydecorationsSetPosYTL}[1]% + [-1cm]% +{% + \def\@yTopLeft{#1}% +} + +\DeclareRobustCommand{\mydecorationsSetPosXBR}[1]% + [-1cm]% +{% + \def\@xBottomRight{#1}% +} + +\DeclareRobustCommand{\mydecorationsSetPosYBR}[1]% + [1cm]% +{% + \def\@yBottomRight{#1}% +} + +\DeclareDocumentCommand{\mydecorationsSetLineWidth}% + {s O{}}% +{% + \IfBooleanTF#1% + {\def\@lineWidthString{}} % starred + {\def\@lineWidthString{line width}} % not starred + + \def\@lineWidthValue{#2}% +} + +\DeclareDocumentCommand{\mydecorationsSetSegmentAmplitude}% + {s O{}}% +{% + \IfBooleanTF#1% + {\def\@segmentAmplitudeString{}} % starred + {\def\@segmentAmplitudeString{segment amplitude}} % not starred + + \def\@segmentAmplitudeValue{#2}% +} + +\DeclareDocumentCommand{\mydecorationsSetSegmentLength}% + {s O{}}% +{% + \IfBooleanTF#1% + {\def\@segmentLengthString{}} % starred + {\def\@segmentLengthString{segment length}} % not starred + + \def\@segmentLengthValue{#2}% +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/mycv/mycv_default_style.tex b/Master/texmf-dist/tex/latex/mycv/mycv_default_style.tex new file mode 100644 index 00000000000..63d3c503f33 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mycv/mycv_default_style.tex @@ -0,0 +1,103 @@ +% ------------------------------------------------------- +% start of file 'mycv_default_style.tex'. +% Copyright 2012 Ghersi Andrea (ghanhawk@gmail.com). +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License version +% 1.3c, available at 'http://www.latex-project.org/lppl'. +% ------------------------------------------------------- + +\ProvidesFile{mycv_default_style.tex} + +\RequirePackage{titlesec} % for title format and spacing +\RequirePackage{fancyhdr} % custom footer +\RequirePackage{xcolor} % for color +\RequirePackage{calligra} % for calligra font +\RequirePackage{times} % times font +\RequirePackage{marvosym} % symbols - phone +\RequirePackage{amssymb} % symbols - email +\RequirePackage{xparse} + +%%%%%%%%%%% +% % +% Layout % +% % +%%%%%%%%%%% + +% ----------------------------------------------------- +% passing the option 'showframe' to the package permits +% to see the page margins: that may be useful for debug +% ----------------------------------------------------- +\RequirePackage[hmargin=1.25cm,vmargin=1.5cm]{geometry} + +%%%%%%%%%%%%%%%%%%%%% +% % +% Header and footer % +% % +%%%%%%%%%%%%%%%%%%%%% + +\renewcommand{\headrulewidth}{0.0pt} + +\fancyhf{} + +\DeclareRobustCommand{\mycfoot}[1]{% + \cfoot{\color{myheadingscolor}{{\sffamily\tiny{#1}}}}% +} + +\pagestyle{fancy} + +%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Hyperref and colours % +% % +%%%%%%%%%%%%%%%%%%%%%%%% + +% ------------------------------------------ +% setup colours for links, text and headings +% ------------------------------------------ +\definecolor{mylinkcolour}{HTML}{0000FF} % {FF0080} %light purple link for the email +\definecolor{myshadecolor}{HTML}{F0F0F0} % {E4E3E3}%{D4D7FE} %light blue shade +\definecolor{mytextcolor}{HTML}{2b2b2b} % text is almost black +\definecolor{myheadingscolor}{HTML}{701112} % dark red + +% ---------------------- +% setup hyperref package +% ---------------------- +\hypersetup{% + colorlinks,breaklinks,% + urlcolor=mylinkcolour,% + linkcolor=mylinkcolour,% +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Section title format and spacing % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\DeclareDocumentCommand{\mysectionTitleFormat}% + {O{myheadingscolor} O{myheadingscolor}}% +{% + \titleformat{\section}% + {\bigskip\color{#1}\titlerule\scshape\Large\raggedright}% + {}{0em}{}[\color{#2}\titlerule\medskip] +} + +\DeclareDocumentCommand{\mysectionTitleSpacing}% + {O{0pt} O{0pt} O{5pt}}% +{% + \titlespacing{\section}{#1}{#2}{#3}% +} + +\mysectionTitleFormat +\mysectionTitleSpacing + +%%%%%%%%%%%%%%% +% % +% Other stuff % +% % +%%%%%%%%%%%%%%% + +% -------------------------------- +% set text color for the whole doc +% -------------------------------- +\color{mytextcolor}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/mycv/mycv_misc.tex b/Master/texmf-dist/tex/latex/mycv/mycv_misc.tex new file mode 100644 index 00000000000..d2befd393dc --- /dev/null +++ b/Master/texmf-dist/tex/latex/mycv/mycv_misc.tex @@ -0,0 +1,87 @@ +% ------------------------------------------------------- +% start of file 'mycv_misc.tex'. +% Copyright 2012 Ghersi Andrea (ghanhawk@gmail.com). +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License version +% 1.3c, available at 'http://www.latex-project.org/lppl'. +% ------------------------------------------------------- + +\ProvidesFile{mycv_stuff.tex} + +\RequirePackage{hyperref} + +% ----------------------------------------------------- +% partial hyperref setup: the rest is set in style file +% ----------------------------------------------------- + +\hypersetup{% + pdfstartpage = 1, + pdfauthor = \@pdfauthor, + pdftitle = \@pdftitle, + pdfsubject = \@pdfsubject, + pdfproducer = \LaTeX{}, + pdfkeywords = cv curriculum vit\ae{}, + pdfcreator = \LaTeX{} with 'mycv' (\myversionstr) +} + +%%%%%%%%%%% +% % +% Margins % +% % +%%%%%%%%%%% + +\newenvironment{mychangemargin}[2] + {\begin{list}{}{% + \setlength{\topsep}{0pt}% + \setlength{\leftmargin}{#1}% + \setlength{\rightmargin}{#2}% + \setlength{\partopsep}{0pt}% + \setlength{\parsep}{\parskip}}\item[]% + }% + {\end{list}} + +\newenvironment{mychangemarginLeft}[1] + {\begin{list}{}{% + \setlength{\topsep}{0pt}% + \setlength{\leftmargin}{#1}% + \setlength{\partopsep}{0pt}% + \setlength{\parsep}{\parskip}}\item[]% + }% + {\end{list}} + +\newenvironment{mychangemarginRight}[1] + {\begin{list}{}{% + \setlength{\topsep}{0pt}% + \setlength{\rightmargin}{#1}% + \setlength{\partopsep}{0pt}% + \setlength{\parsep}{\parskip}}\item[]% + }% + {\end{list}} + +%%%%%%%%%%%%%%%%%%% +% % +% Customized list % +% % +%%%%%%%%%%%%%%%%%%% + +\newenvironment{myitemize}% + {\renewcommand{\labelitemi}{\ding{43}}\begin{itemize}}% + {\end{itemize}} + +%%%%%%%%%%%%%%% +% % +% Other stuff % +% % +%%%%%%%%%%%%%%% + +\DeclareRobustCommand{\mylang}[2][english]{% + \foreignlanguage{#1}{{z#2}}} %{\color{blue}{#2}}} + +% ------------ +% pdf metadata +% ------------ + +\DeclareRobustCommand{\mypdfsubject}[1]{\def\@pdfsubject{#1}} +\DeclareRobustCommand{\mypdfauthor}[1]{\def\@pdfauthor{#1}} +\DeclareRobustCommand{\mypdftitle}[1]{\def\@pdftitle{#1}} + |