"It is better to have 100 functions operate on one data structure than have 10 functions operate on 10 data structures." -- Alan Perlis

 CurVe -- Tips and Tricks

Given the amount of people that contacted me to ask how I did my CV (the visual aspect) with CurVe, I finally took the time to write this little explanation page. It is true that some small hacks on top of the class itself are required...

Note hat these tricks are not specific to CurVe actually. I used them to format the section headings in my Ph.D. for example. You can reuse them anywhere you like. Also, note that there are for sure other ways to achieve these effects.

The trick is to draw a gray box first (with the \colorbox command from the color package), and pretend it has zero length by enclosing it in a 0pt sized box (the \makebox command). Then, draw the actual text on top of it, centered in a properly sized box.
\makebox[0pt][l]{\colorbox[gray]{0.7}{\makebox[\\linewidth]{}}}%
\makebox[\\linewidth][c]{the text}


This time, the trick is to draw an M in gray (with the \\textcolor command from the color package), and put it in a 1ex sized, also gray, box.
\makebox[1ex][l]{\colorbox[gray]{0.7}{\\textcolor[gray]{0.7}{M}}}%


### Using these tricks with CurVe:

Disclaimer: you need the latest version of CurVe in order to use these tricks. Using them involve hacking the internals of CurVe. As I don't guarantee that these internals won't ever change, use these tricks at your own risks.

These tricks need to be plugged into the internal \@@rubrichead and \@@subrubric commands, which are defined by the class itself. In order to do this in a clean way (for as much as anything can be done cleanly in LaTeX ...), don't touch the class file, but rather redefine these commands directly in your document, as follows:

\usepackage{color}
\makeatletter
\@rubricfont%
\makebox[0pt][l]{\colorbox[gray]{0.7}{\makebox[\linewidth-4\fboxsep]{}}}%
\makebox[\linewidth-2\fboxsep][c]{#1}}
\def\@@subrubric#1{%
\rule{0bp}{\@beforespace}
{\@subrubricfont%
\makebox[1ex][l]{\colorbox[gray]{0.7}{\textcolor[gray]{0.7}{M}}}#1}%
\@subrubricmark{#1}}
\makeatother


### A variant

Other people have asked me a variant consisting only in underlining the rubrics'titles. Here's an idea: if you have tried my grey box trick above, the trick you're looking for is to use \rule instead of \colorbox. Put this in your preamble:
\makeatletter
\@rubricfont%
\makebox[0pt][l]{\rule[-2mm]{\linewidth}{1mm}}%
\makebox[\linewidth-2\fboxsep][c]{#1}}
\makeatother

The first (optional) argument to \rule is the vertical positionning, the second one is the width, and the last one is the thickness of the rule.

### For any other question:

If there are still some other things you would like to know about my CV (for instance the fonts or symbols used), have a look at the sources below.

Enjoy !