# stackoverflow like resume based on res.cls

I have created a stackoverflow like CV, based on many snippets scattered here and some other sites (e.g. tags and so on).

Right now, I have something that looks quite OK, although not as powerful as using the moderncv package.

However, I have still a few problems that bother me:

1. tags look really funny if I have a mix of lower and upper case names, see for example gcc and GCC below, or MySQL and Python..
2. because the position environment is very hard to control, I still do a lot of manual formating, . e.g.:

{{\bf {\large Scietific Programmer }}{\em \small Uni. British Columbia, Vancuver }, \hfill May, 2010 - Oct., 2010 } \\

I would like to create some new environment to define this formatting, in such a way that the user can specify the order or the arguments and their format, for example, I want to define just one time how the environment should look like:

\Stelle[\Large][\normal,\italic][\normal][\normal]

the usage shoule be something like this:

\Stelle{Programmer}{CoolComany}{Chicago}{2012-Current}

As a side note, I think the German translation to "job position", "Stelle", is better than position , since the word position can be misunderstood as related to location and formating.

Here is my code so far:

\documentclass[a4papper,overlapped,line]{res}
% \documentclass[a4papper,margin,line]{res}
\newsectionwidth{.7cm}
\usepackage{color}
\definecolor{SOrange}{rgb}{1,0.44,0.04}
\usepackage{scalefnt}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\newcommand{\tagf}[2][]{
{\scalefont{0.8}
\begin{tikzpicture}[baseline={(TAG.base)}]
\node[draw,#1] (TAG) {#2};
\node[font=\tiny,draw,#1] (TAG) {#2};
\end{tikzpicture}
}}

\begin{document}
\name{{\color{SOrange}Big Bird, M.Sc. }}
Seasamestr. 1            & {\it Land-line:}  +49 321 1231234 \\
80337 Munich & {\it Mobile:}                \\
& {\it E-mail:}  bigbird@gmail.com\\
& {\it WWW:} bigbird.blogspot.com\\
&\hspace{2.7em}             \\
\end{tabular}}

\begin{resume}

\begin{changemargin}{-0.7cm}{-2.3cm}
{\setlength{\fboxsep}{18pt}
\colorbox{blue!20}{
\begin{minipage}{0.95\textwidth}

\rmfamily
\begin{flushleft}
\hspace{-0.54cm}{\scalefont{1.2}\textbf{\begin{Huge}\textquotedblleft\end{Huge}}}
\\
\vspace{-0.65cm}
\begin{small}
I have a dream: decent looking CV, for everyone! Good looking Resumes should be available,
sould be documented and easy to use!
\textquotedblright
\end{small}\end{flushleft}
\end{minipage}
}
}
\end{changemargin}

\vspace{0.50cm}
\setlength\parindent{0pt}
\section{\sc {\color{SOrange}\vspace{-0.60cm} \textbf{Professional Experience} }}
\vspace{0.20cm}
{{\bf {\large Systems Engineer }}{\em \small SomeCompany}, \hfill January, 2011 - Current
}
\vspace{.13cm}
\\
Responsibilities include installation and configuration of Linux clusters and workstations, as well .....
% \hspace{-0.8cm}
\par
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{SAMBA}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Red Hat}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Windows}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{NFS}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Python}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Shell}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{MySQL}\hspace{-0.25cm}

{{\bf {\large Scietific Programmer }}{\em \small Uni. British Columbia, Vancuver }, \hfill May, 2010 - Oct., 2010
}
\\
The main task was to implement ...The results were submitted as M.Sc thesis.
\par
\vspace{-0.3cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Fortran95}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Make}\hspace{-0.25cm}
% THIS LOOKS UGLY
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{gcc}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{GCC}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Python}\hspace{-0.25cm}

\section{\sc {\color{SOrange}\vspace{-0.60cm} \textbf{Education} }}
{\bf University of Life},  \hfill {\bf October, 2008 - October, 2011}\\
\vspace{-.7cm}

{\em M. Sc. Sociology }\\
Thesis Title:  How demographics won Romney'',  final GPA 1.3.
\end{resume}
\end{document}


Here is the output with funny looking tags:

I would appreciate it, if someone helped me solving the issues with tags and the new Stelle environment.

### update of results:

see the difference between both suggestions:

gcc without strut is actually with vphantom.

## update of the results:

full source code based on the answers below and some extras can be found in my github latex resume repository. I hope you find use to it ...

-
It would really be helpful if you reduced your code down to what is needed to show the problem and removed everything else that is not related to this specific problem. –  Peter Grill Nov 13 '12 at 6:53
@PeterGrill, I removed some stuff, more cleaning needed? I also like your suggestions. Any clue how to the define the new environment? –  Oz123 Nov 13 '12 at 7:26
Which environment are you trying to redefined? All you need to do is to add \strut or a \vphantom{} as in my answer below. –  Peter Grill Nov 13 '12 at 7:28
@PeterGrill, position as defined in the class. See point 2 of my question. –  Oz123 Nov 13 '12 at 7:37
Sure, compose an example of the problem with just the postion environment, removing everything else -- then I can focus on the exact issue. –  Peter Grill Nov 13 '12 at 7:41

As requested

But first, let me summarize some things:

• \vphantom{y} doesn't add vertical space like capital letters, in your all minuscule example you could add \vphantom{Ay} for example.

The \strut is something similar by the way. It adds a zero-width vertical rule with a height (above the baseline) of .7\baselineskip and a depth (below the baseline) of .3\baselineskip.
(You get the same effect with \rule[-.3\baselineskip]{0pt}{\baselineskip}.)

Judging of the original example this was too much depth in my opinion, and as all other nodes had majuscule letter there was no need for more adjusting.

• The class option a4papper gives me—to no surprise—a warning as this option is none.
• Even though res is based on the article class it does not forward an option like a4paper so that I even get a warning than.
• … which is the reason for using [a4paper]{article} in my examples (but you can, of course, use any class you want)
• Your \hspace{-.25cm} is unneeded if you add a % at the end of the lines containing your tag. (→ What is the use of percent signs at the end of lines?)
(In my comment I was wrong: The additional horizontal space doesn't come from outer sep but from the space that is inserted.)
• \fontsize{0.1}{.1} doesn't work, it even gives a warning:

LaTeX Font Warning: Font shape OT1/cmr/m/n' in size <0.1> not available
size <5> substituted on input line 48.

• font=\tiny doesn't get used, as it gets overwritten, too.

• All the while you're using \scalefont{0.8} anyway. Let's just use that.
• Don't use \it. (→ Does it matter if I use \textit or \it, \bfseries or \bf, etc)

Now, before we play with all the \vphantoms, \rules and \struts they are, we just make use of TikZ' own styles, namely:

• text height and
• text depth.

We get the most appealing output (in my eyes) when we don't use a depth (ignoring all descenders in letters like y and g) and set the height to the one of a majuscule letter. When the above mentioned TikZ styles are used the actual heights and depths of the node text are ignored.

We could mimic this output using \vphantom{A}\smash{#2} as the node text (#2 being the actual text), or, with the help of amsmath's extension of \smash, \smash[b]{#2} (b stands for bottom, i.e. only the bottom part is smashed).

TikZ' default settings of inner xsep and inner ysep of .3333em make sure that the lines have a little padding to the text. (These settings can be changed, too, of course, to get yet another output.)

## To cut a long story short

### Code

\newcommand{\tagf}[2][]{{%
\scalefont{0.8}%
\sbox0{A}%
\tikz[baseline={(TAG.base)}]{
\node[draw=blue!80, fill=blue!20,  rounded corners, text height=\ht0, text depth=0pt, #1] (TAG) {#2};
}%
}}


## Depths? Heights? What the …?

(\strut has problems inside a TikZ-node inside tabular so I removed it from the last column.)

# Full code

\documentclass[a4paper]{article}
\usepackage{parskip}% to mimic res' output
\usepackage{tikz}   % loads xcolor by default
\usepackage{scalefnt}
\usepackage{amsmath}% only for the extended version of \smash
\usepackage{calc}
\usetikzlibrary{shapes.geometric}
\newcommand{\tagf}[2][]{{%
\scalefont{0.8}%
\sbox0{A}%
\tikz[baseline={(TAG.base)}]{
\node[draw=blue!80, fill=blue!20,  rounded corners, text height=\ht0, text depth=0pt, #1] (TAG) {#2};
}%
}}
\begin{document}
Responsibilities include installation and configuration of Linux clusters and workstations
\tagf{SAMBA}%
\tagf{Red Hat}%
\tagf{Windows}%
\tagf{NFS}%
\tagf{Python}%
\tagf{Shell}%
\tagf{MySQL} %
Responsibilities include installation and configuration of Linux clusters and workstations
\par
Responsibilities include installation and configuration of Linux clusters and workstations
\tagf{Fortran95}%
\tagf{Make}%
\tagf{gcc}%
\tagf{GCC}%
\tagf{Python}
Responsibilities include installation and configuration of Linux clusters and workstations
\par

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following code should not be used inside your resumee! %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\boxme}[2][black]{{%
\fboxrule=.4pt%
\fboxsep=0pt%
{\color{#1}\fbox{\color{black}#2}}%
}}
\newcommand{\showmeheightanddepth}[2][]{%
\global\sbox0{#2}%
\rlap{\kern-.4em\rule[-.1pt]{\wd0+.8em}{.2pt}}% baseline
\boxme{#2}#1
& \the\ht0
& \the\dp0
& \the\dimexpr\ht0+\dp0\relax
& \ifx#2\strut\else\let\boxme\dontboxmeinsideTikZ%
\tagf[text height=, text depth=]{#2}\fi
}
\newcommand{\dontboxmeinsideTikZ}[2][black]{%
#2%
}
\edef\baselineskipinnormaltext{\the\baselineskip}
\begin{tabular}{lrrrc}
boxed & height & depth & totalheight & Ti\emph{k}Z \\\hline
\showmeheightanddepth{ace}\\
\showmeheightanddepth{ABC}\\
\showmeheightanddepth{gy}\\
\showmeheightanddepth{Age}\\
\showmeheightanddepth{\vphantom{A}\smash{\boxme[green]{Age}}}\\
\showmeheightanddepth{\smash[b]{\boxme[green]{Age}}}\\ % needs \usepackage{amsmath}
\showmeheightanddepth[ (\texttt{strut})]{\strut}
\end{tabular}
\end{document}

-
you are my \LaTeX god! Thanks a bunch for sharing so much knowledge. –  Oz123 Nov 14 '12 at 21:39

You need to add a \strut so that each node is the same height:

As per Qrrbrbirlbel's suggestion, using \vphantom{y} produces slightly tighter output:

\newcommand{\tagf}[2][]{%
\begin{tikzpicture}[baseline={(TAG.base)}]
\node[draw,#1] (TAG) {#2};
\node[font=\tiny,draw,#1] (TAG) {#2\vphantom{y}};
\end{tikzpicture}
}


## Code:

\documentclass{article}
\usepackage{xcolor}
\usepackage{tikz}

\newcommand{\mytag}[1]{%
\begin{tikzpicture}[baseline={(TAG.base)}]
\node[draw, minimum height=1ex] (TAG) {#1};
\end{tikzpicture}}

\newcommand{\tagf}[2][]{%
\begin{tikzpicture}[baseline={(TAG.base)}]
\node[draw,#1] (TAG) {#2};
\node[font=\tiny,draw,#1] (TAG) {#2\strut};
\end{tikzpicture}
}

\begin{document}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{SAMBA}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Red Hat}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Windows}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{NFS}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Python}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Shell}\hspace{-0.25cm}
\tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{MySQL}\hspace{-0.25cm}
\end{document}


You can also greatly simply your code if you use \tikzset to define styles, and use a \foreach loop for repetitive tasks:

\documentclass{article}
\usepackage{xcolor}
\usepackage{tikz}

\newcommand{\tagf}[2][]{%
\begin{tikzpicture}[baseline={(TAG.base)}]
\node[draw,#1] (TAG) {#2};
\node[font=\tiny,draw,#1] (TAG) {#2\vphantom{y}};
\end{tikzpicture}
}

\tikzset{My Tag Style/.style={blue!80, fill=blue!20,  rounded corners, , font=\fontsize{0.1}{.1}}}

\begin{document}
\foreach \x in {SAMBA, Red Hat, Windows, NFS, Python, Shell, MySQL} {%
\tagf[My Tag Style]{\x}\hspace{-0.25cm}
}
\end{document}

-
Alternative: \vphantom{y} (not so much depth, looks a bit nicer IMO) –  Qrrbrbirlbel Nov 13 '12 at 7:01
@Qrrbrbirlbel: Yep, added that option. –  Peter Grill Nov 13 '12 at 7:06
@Qrrbrbirlbel, I just added both to my document. \strut is better, because there is not difference between gcc and GCC. See my attached images. –  Oz123 Nov 13 '12 at 9:54
@Qrrbrbirlbel: I guess the best solution really would be to use \vphantom{} and list the letters with the greatest height and depth in there. That way you would have exactly the right size. Just have to be careful that if the letters are changes, that the \vphantom{}` is adjusted. Of course you could automate this as well, but probably not worth the effort since this is not something you are using repeatedly. –  Peter Grill Nov 13 '12 at 19:56
@Qrrbrbirlbel, you really ought to post an answer instead of so many comments. Would be nice if you did actually! Would not harm any way, and for sure you will get my upvote! –  Oz123 Nov 13 '12 at 22:47