1

I'm writing a resume with the moderncv package. Due to the lack of space, I want to make one section use two columns, separated by a vertical line.

I've saw those solutions here, using \cvlistdoubleitem and multicols. But I'd like to keep the further information provided by \cventry (=> I mean, in my case "basic" and "very basic")

first approach, using tabular

<!-- language: lang-latex -->
\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage{layout}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[top=1in, bottom=1.25in, left=1.25in, right=1.25in]{geometry}
\begin{document}
    \section{headline}
    \begin{tabular}{l@{}|@{\hspace{5mm}}l}
        \cventry{}{C\#}{basic}{}{}{} & \cventry{}{UNIX}{basic}{}{}{} \\
        \cventry{}{vim}{basic}{}{}{} & \cventry{}{\LaTeX}{basic}{}{}{} \\
        \cventry{}{HTML, CSS, PHP}{very basic}{}{}{} \\
    \end{tabular}
\end{document}

results in:

headline                                             site border
========                                                 :
                                                         :
    C#, basic                             |             U:NIX, basic
    vim, basic                            |             L:aTeX, basic
    HTML, CSS, PHP, very basic            |

@{} should - as I understood it - eat up all amounts of whitespace between the first column and the separator, but here its just ignored and I don't know why. => in that example, I want to move the second column and the separator line to the left and push it a bit together, so that both columns are visible and not cut.

second approach, using tabulary

<!-- language: lang-latex -->
\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage{layout}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[top=1in, bottom=1.25in, left=1.25in, right=1.25in]{geometry}
\usepackage{tabulary}
\begin{document}
    \section{headline}
    \begin{tabulary}{1.5\textwidth }{L|L}
        \cventry{}{c\#}{basic}{}{}{} & \cventry{}{UNIX}{basic}{}{}{}    \\
        \vspace{-2cm}                & \vspace{-2cm}                    \\
        \cventry{}{vim}{basic}{}{}{} & \cventry{}{\LaTeX}{basic}{}{}{}  \\
        \vspace{-2cm}                & \vspace{-2cm}                    \\
        \cventry{}{HTML, CSS, PHP}{very basic}{}{}{}                    \\
    \end{tabulary}
\end{document}

results in:

headline                                                   site border
========                                                      :
                                                              :
    C#, basic                      |       UNIX, basic        :
                                   |                          :
    vim, basic                     |       LaTeX, basic       :
                                   |                          :
    HTML, CSS, PHP, very basic     |                          :

the intention of using\vspace was to remove the visible white space between the rows, so that its a bit vertically squeezed - unfortunately, \vspace isn't recognized and I don't know why.

third approach, using tabu

<!-- language: lang-latex -->
\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage{layout}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[top=1in, bottom=1.25in, left=1.25in, right=1.25in]{geometry}
\usepackage{tabu}
\begin{document}
    \section{headline}
    \tracingtabu=3
    \tabulinesep=-10mm
    \begin{tabu} to 170mm {X[1.5,l] | X[1,l]}
        \cventry{}{C\#}{basic}{}{}{} & \cventry{}{UNIX}{basic}{}{}{} \\
        \cventry{}{vim}{basic}{}{}{} & \cventry{}{\LaTeX}{basic}{}{}{} \\
        \cventry{}{HTML, CSS, PHP}{very basic}{}{}{}
    \end{tabu}
\end{document}

results in:

headline                                                   site border
========                                                      :
                                                              :
    C#, basic                      |       UNIX, basic        :
                                   |                          :
    vim, basic                     |       LaTeX, basic       :
                                   |                          :
    HTML, CSS, PHP, very basic     |                          :

\tabulinesep=-10mm should according to the tabu docs specify the minimum amount of whitespace between the rows, which does actually work - but only to "increase", not to "reduce" the whitespace.

\tracingtabu=3 should help to debug tabu, but the additional values in the log doesn't help me, I don't found anything useful out of it.

=> any ideas? I hope, i didn't forget something.

EDIT: My result of @Harish Kumar s suggestion is here

from the log file:

! Undefined control sequence.
<argument> \@firstname
                       {}~\@lastname {}
l.13 \begin{document}

although it is a exact copy of his code.

1 Answer 1

1

Have you tried a minipage with multicols?

\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage{layout}
\usepackage{multicol}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[top=1in, bottom=1.25in, left=1.25in, right=1.25in]{geometry}
\firstname{}
\lastname{}
\setlength{\columnseprule}{0.4pt}
\begin{document}
    \section{headline}
    \hspace*{\hintscolumnwidth}%
    \begin{minipage}{\maincolumnwidth}
    \setlength{\hintscolumnwidth}{0pt}
        \begin{multicols}{2}
        \cventry{}{C\#}{basic}{}{}{} \par \cventry{}{UNIX}{basic}{}{}{} \par
        \cventry{}{vim}{basic}{}{}{} \par \cventry{}{\LaTeX}{basic}{}{}{} \par
        \cventry{}{HTML, CSS, PHP}{very basic}{}{}{} \par
    \end{multicols}
    \end{minipage}
\end{document}

enter image description here

4
  • Thanks. Well, i copy pasted your code and receive that: vpaste.net/lssvP It seems, that multicol itself isn't recognized correctly. I'm still debugging.
    – uuu
    Commented Aug 23, 2015 at 10:55
  • (i added a image of that in my original post)
    – uuu
    Commented Aug 23, 2015 at 11:08
  • @toogley Please update your tex distribution.
    – user11232
    Commented Aug 23, 2015 at 12:56
  • i'm using fedora 22 and the default repository. updating shows the newest version is installed and texlive 2015 comes not until fedora 24 :/
    – uuu
    Commented Aug 23, 2015 at 14:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .