Debian Codegraph @

texmf-dist/doc/latex/mycv/Examples/mycv-examples.dtx

raw
1 % \iffalse meta-comment
2 % mycv-examples : some examples about the usage of the class
3 % 'mycv' (a curriculum vitae class allowing TikZ decorations).
4 %
5 % This work may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License version
7 % 1.3c, available at 'http://www.latex-project.org/lppl'.
8 %
9 % The examples consist of the main source file 'mycv-examples.dtx'
10 % and the derived files:
11 %
12 % mycv-examples.ins,
13 % contents_part[A|B|C].tex,
14 % header_[contacts|title].tex,
15 % model-[common|layouts].tex,
16 % mycv-example-[common|main].tex,
17 % footer_sign.tex,
18 % mycv-example[dpl|dl2].pdf,
19 % mycv-example[spl|sl2].pdf
20 %
21 % Unpacking the examples:
22 %
23 % (pdf)latex mycv-examples.dtx
24 %
25 % Producing the examples:
26 %
27 % see the file 'Examples/Notes.txt'.
28 %
29 % ----------------------------------------------------------
30 % ** This file was automatically generated by <DoPackage.sh>
31 % ** with option(s) 'ctan'.
32 % ** Date: Sun May 20 21:31:37 CEST 2012::1337542297
33 % ----------------------------------------------------------
34 % \fi
35 %<*install>
36 \input docstrip.tex
37
38 \preamble
39 -----------------------------------------------------------
40 Author: Andrea Ghersi
41 Copyright 2012 Ghersi Andrea ([email protected]).
42
43 This work may be distributed and/or modified under the
44 conditions of the LaTeX Project Public License version
45 1.3c, available at 'http://www.latex-project.org/lppl'.
46 -----------------------------------------------------------
47 \endpreamble
48
49 \keepsilent
50 \askforoverwritefalse
51 \usedir{tex/latex/mycv/examples}
52
53 \generate{%
54 \file{mycv-examples.ins}{\nopreamble\nopostamble\from{mycv-examples.dtx}{install}}%
55 \file{mycv-example-common.tex}{\nopreamble\nopostamble\from{mycv-examples.dtx}{mycv-example-common.tex}}%
56 \file{mycv-example-main.tex}{\nopreamble\nopostamble\from{mycv-examples.dtx}{mycv-example-main.tex}}%
57 \file{contents_partA.tex}{\nopreamble\nopostamble\from{mycv-examples.dtx}{contents-partA.tex}}%
58 \file{contents_partB.tex}{\nopreamble\nopostamble\from{mycv-examples.dtx}{contents-partB.tex}}%
59 \file{contents_partC.tex}{\nopreamble\nopostamble\from{mycv-examples.dtx}{contents-partC.tex}}%
60 \file{footer_sign.tex}{\nopreamble\nopostamble\from{mycv-examples.dtx}{footer-sign.tex}}%
61 \file{header_contacts.tex}{\nopreamble\nopostamble\from{mycv-examples.dtx}{header-contacts.tex}}%
62 \file{header_title.tex}{\nopreamble\nopostamble\from{mycv-examples.dtx}{header-title.tex}}%
63 \file{model-common.tex}{\nopreamble\nopostamble\from{mycv-examples.dtx}{model-common.tex}}%
64 \file{model-layouts.tex}{\nopreamble\nopostamble\from{mycv-examples.dtx}{model-layouts.tex}}%
65 }
66
67 \obeyspaces
68 \Msg{**************************************************************}
69 \Msg{* *}
70 \Msg{* See the file 'Notes.txt' for information on how to produce *}
71 \Msg{* pdf files with examples. *}
72 \Msg{* *}
73 \Msg{* Happy (La)TeXing! *}
74 \Msg{* *}
75 \Msg{**************************************************************}
76
77 \endbatchfile
78 %</install>
79 %
80 %
81 % \iffalse
82 %<*mycv-example-common.tex>
83 % \fi
84 \usepackage[utf8]{inputenc}
85 \usepackage[T1]{fontenc}
86 \usepackage{lipsum}
87 \usepackage{tikz}
88
89 \ifoption{withDec}{%
90 \newcommand{\cvdec}{
91 \mydecorationsSetLineWidth[0.3mm]%
92 \mydecorationsPathmorphing*{coil}<radial><lightgray>
93 }%
94 \ifmodel{verSPL2}{
95 \renewcommand{\cvdec}{
96 \mydecorationsSetPosXTL[-4cm]
97 \mydecorationsSetPosYTL[1.5cm]
98 \mydecorationsSetPosYBR[-2cm]
99 \mydecorationsSetPosXBR[4cm]
100 \mydecorationsPathmorphing*[0]{shape}[black]<ball><black>
101 }%
102 }
103 }{\newcommand{\cvdec}{}}
104
105 \input{model-layouts}
106
107 \ifmodel{verSPL} {\mypdftitle{Simple CV example: SPL}} {\relax}
108 \ifmodel{verSPL2}{\mypdftitle{Simple CV example: SPL2}}{\relax}
109 \ifmodel{verDPL} {\mypdftitle{Simple CV example: DPL}} {\relax}
110 \ifmodel{verDPL2}{\mypdftitle{Simple CV example: DPL2}}{\relax}
111
112 \newcommand{\sectionnumber}[1]{\section{Section #1}}
113 \mypdfauthor{Andrea Ghersi}
114 % \iffalse
115 %</mycv-example-common.tex>
116 % \fi
117 %
118 %
119 % \iffalse
120 %<*mycv-example-main.tex>
121 % \fi
122 \def\cvmodel{verDPL} % default model
123 \ifdefined\model\def\cvmodel{\model}\fi
124
125 \documentclass[10pt,mdlname=\cvmodel,cntdir=.,withDec,language=english]{mycv}
126 \input{mycv-example-common}
127
128 \begin{document}
129 \cvdec\myrenderlayout\mycfoot{Last update: \today}
130 \end{document}
131 % \iffalse
132 %</mycv-example-main.tex>
133 % \fi
134 %
135 %
136 % \iffalse
137 %<*contents-partA.tex>
138 % \fi
139
140 \begin{mychangemargin}{0.1in}{0.1in}
141 \lipsum[73]
142 \end{mychangemargin}
143 % \iffalse
144 %</contents-partA.tex>
145 % \fi
146 %
147 %
148 % \iffalse
149 %<*contents-partB.tex>
150 % \fi
151
152 \begin{mychangemargin}{0.1in}{0.1in}
153 \lipsum[74]
154 \end{mychangemargin}
155 % \iffalse
156 %</contents-partB.tex>
157 % \fi
158 %
159 %
160 % \iffalse
161 %<*contents-partC.tex>
162 % \fi
163
164 \begin{mychangemargin}{0.1in}{0.1in}
165 A list:
166 \begin{myitemize}
167 \item this is item 1;
168 \item this is item 2;
169 \item .....
170 \end{myitemize}
171 \end{mychangemargin}
172 % \iffalse
173 %</contents-partC.tex>
174 % \fi
175 %
176 %
177 % \iffalse
178 %<*footer-sign.tex>
179 % \fi
180
181 \bigskip\bigskip
182 \ifmodel{verSPL}{\flushleft}{\relax}
183 {\Large\calligra{Adam Smith}}
184 % \iffalse
185 %</footer-sign.tex>
186 % \fi
187 %
188 %
189 % \iffalse
190 %<*header-contacts.tex>
191 % \fi
192 \def\cvcontactsep{\\}
193 \vspace{0pt} %trick for alignment
194
195 \tikzstyle{mybox} = [%
196 draw=red, fill=blue!20, very thick,
197 rectangle, rounded corners,
198 inner sep=10pt, inner ysep=20pt]
199
200 \tikzstyle{fancytitle} = [
201 fill=red, text=white]
202
203 \begin{tikzpicture}
204 \node (box)[fill=myshadecolor,rounded corners=10pt, minimum size= 2.5cm]{%
205 {\color{black}
206 \begin{tabular*}{6cm}{l|l}
207 &Unknown address XYZXYZXYZ\cvcontactsep
208 \raisebox{-3pt}{\Mobilefone} &+39\,0123\,456789\cvcontactsep
209 \raisebox{-3pt}{\Telefon} &Telephone\cvcontactsep
210 \raisebox{-3pt}{\Email} &\href{mailto:[email protected]}
211 {[email protected]}\cvcontactsep
212 \end{tabular*}
213 }};
214 \node[fancytitle, text width=0.5423\textwidth, text centered,
215 rounded corners] at (box.north){Contacts};
216 \end{tikzpicture}
217 \bigskip
218 % \iffalse
219 %</header-contacts.tex>
220 % \fi
221 %
222 %
223 % \iffalse
224 %<*header-title.tex>
225 % \fi
226 \bigskip
227 {\sffamily\Huge{}Dr. Adam Smith}\\[3pt]%
228 \ifmodel{verSPL2}
229 {{\color{red}\huge\calligra{CurriculumVitae}\\[25pt]}}
230 {{\color{myheadingscolor}\huge\calligra{CurriculumVitae}\\[25pt]}}
231 % \iffalse
232 %</header-title.tex>
233 % \fi
234 %
235 %
236 % \iffalse
237 %<*model-common.tex>
238 % \fi
239 \def\headerlayoutlist{%
240 MainHeaderPageBegin:<postcmd:vspace=10pt>,
241 SubHeaderPageBegin:<precmd:hfill>,
242 header_title@, % header file one
243 SubHeaderPageEnd:<postcmd:hfill>,
244 SubHeaderPageBegin,
245 header_contacts@, % header file two
246 SubHeaderPageEnd,
247 MainHeaderPageEnd%
248 }
249
250 \def\footerlayoutlist{footer_sign@} % footer file
251 % \iffalse
252 %</model-common.tex>
253 % \fi
254 %
255 %
256 % \iffalse
257 %<*model-layouts.tex>
258 % \fi
259 \input{model-common}
260
261 \ifmodel{verSPL}{%
262 \def\bodylayoutlist{%
263 contents_partA@:<precmd:vspace=10pt:sectionnumber=1>,
264 contents_partB@:<precmd:vspace=10pt:sectionnumber=2>,
265 contents_partC@:<precmd:vspace=10pt:sectionnumber=3>,
266 contents_partA@:<precmd:vspace=10pt:sectionnumber=4>,
267 contents_partB@:<precmd:vspace=10pt:sectionnumber=5>
268 }%
269 }{\relax}
270
271 \ifmodel{verSPL2}{%
272 \mysectionTitleFormat[red][red]
273 \color{white}
274
275 \def\bodylayoutlist{%
276 contents_partA@:<precmd:vspace=10pt:sectionnumber=1>,%
277 contents_partB@:<precmd:vspace=10pt:sectionnumber=2>,%
278 contents_partA@:<precmd:vspace=10pt:sectionnumber=3>,%
279 contents_partC@:<precmd:vspace=10pt:sectionnumber=4>,%
280 contents_partA@:<precmd:vspace=10pt:sectionnumber=5>,%
281 contents_partB@:<precmd:vspace=10pt:sectionnumber=6>
282 }%
283 }{\relax}
284
285 \ifmodel{verDPL}{%
286 \def\bodylayoutlist{%
287 MainBodyPageBegin:<0.96>,
288 SubBodyPageBegin,
289 SubBodyPageEnd,
290 SubBodyPageBegin:<0.48>,
291 contents_partA@:<precmd:vspace=10pt:sectionnumber=1>,
292 contents_partB@:<precmd:vspace=10pt:sectionnumber=2>,
293 contents_partC@:<precmd:vspace=10pt:sectionnumber=3>,
294 SubBodyPageEnd:<postcmd:hfill>,
295 SubBodyPageBegin:<0.48>,
296 contents_partA@:<precmd:vspace=10pt:sectionnumber=4>,
297 contents_partB@:<precmd:vspace=10pt:sectionnumber=5>,
298 SubBodyPageEnd,
299 MainBodyPageEnd%
300 }%
301 }{\relax}
302
303 \ifmodel{verDPL2}{%
304 \usepackage{multicol}
305 \setlength{\columnsep}{2.0pc}
306 \setlength\columnseprule{.4pt}
307 \newcommand{\mcbegin}{\begin{multicols}{2}}
308 \newcommand{\mcend}{\end{multicols}}
309
310 \def\bodylayoutlist{%
311 contents_partA@:<precmd:vspace=10pt:mcbegin:sectionnumber=1>,%
312 contents_partB@:<precmd:vspace=10pt:sectionnumber=2>,%
313 contents_partA@:<precmd:vspace=10pt:sectionnumber=3>,%
314 contents_partC@:<precmd:vspace=10pt:sectionnumber=4>,%
315 contents_partA@:<precmd:vspace=10pt:sectionnumber=5>,%
316 contents_partB@:<precmd:vspace=10pt:sectionnumber=6>:<postcmd:mcend>%
317 }%
318 }{\relax}
319 % \iffalse
320 %</model-layouts.tex>
321 % \fi
322 %
323 % \Finale
324 \endinput