![]() |
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.
\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}
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}}}%
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 \def\@@rubrichead#1{% \@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
\makeatletter \def\@@rubrichead#1{% \@rubricfont% \makebox[0pt][l]{\rule[-2mm]{\linewidth}{1mm}}% \makebox[\linewidth-2\fboxsep][c]{#1}} \makeatotherThe 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.
Enjoy !
![]() |
![]() |