0

I want to add my language skills to my resume. I used moderncv document class to shape my resume. And I tried to add table for those but the resulted output is not a uniform table. Is There any way to adjust my table on my preference? Thanks in advance

reproducible code

\documentclass{moderncv}
\moderncvtheme{classic}
\usepackage{booktabs}

\firstname{John}
\lastname{Doe}

\setlength\tabcolsep{6pt}

\begin{document}

\makecvtitle

\section{Test Score}
\cvitemwithcomment{\textit{GRE}}{%
        \centering
        \begin{tabular}{*{5}{c}}
            \toprule
            \multicolumn{2}{c}{Verbal Reasoning} & \multicolumn{2}{c}{Quantitative Reasoning}          & Analytical Writing \\ \midrule
            & xxx (xx\%) &  xxx (xx\%) & & xx (xx\%) & \\ \bottomrule
        \end{tabular}%
}{}
\cvitemwithcomment{TOEFL iBT}{%
        \centering
        \begin{tabular}{*{5}{c}}
            \toprule
            Reading & Listening & Speaking & Writing \\ \midrule
            \\             xx                & xx              & xx                 & xx \\ \bottomrule
        \end{tabular}%
}{}
\end{document}

Expected output

This is my expected table by using moderncv document class:

enter image description here

UPDATE

centering numeric figure respect to corresponding text is preferred. Also, reduce the vertical and horizontal line space and keep them geometrically aligned are expected. Any idea?

1 Answer 1

1

Here is an example using tabularx:

\documentclass{moderncv}
\moderncvtheme{classic}
\usepackage{booktabs}
\usepackage{tabularx}

\newcolumntype{Y}{>{\centering\arraybackslash}X}
\firstname{John}
\lastname{Doe}

\setlength\tabcolsep{6pt}

\begin{document}

\makecvtitle

\section{Test Score}
\cvitemwithcomment{\textit{GRE}}{%
        \centering
        \begin{tabularx}{\textwidth-\hintscolumnwidth-\separatorcolumnwidth}{YYY}
            \toprule
            Verbal  Reasoning & Quantitative Reasoning          & Analytical Writing \\ \midrule
             xxx (xx\%) &  xxx (xx\%) & xx (xx\%)  \\ \bottomrule
        \end{tabularx}%
}{}
\cvitemwithcomment{TOEFL iBT}{%
        \centering
        \begin{tabularx}{\textwidth-\hintscolumnwidth-\separatorcolumnwidth}{YYYY}
            \toprule
            Reading & Listening & Speaking & Writing \\ \midrule
            xx                & xx              & xx                 & xx \\ \bottomrule
        \end{tabularx}%
}{}
\end{document}

enter image description here

In order to achieve horizontally and vertically centered contents, you could also use the following:

\documentclass{moderncv}
\moderncvtheme{classic}
\usepackage{booktabs}
\usepackage{tabularx}

\renewcommand\tabularxcolumn[1]{>{\centering\arraybackslash}m{#1}}
\firstname{John}
\lastname{Doe}

\setlength\tabcolsep{6pt}

\begin{document}

\makecvtitle

\section{Test Score}
\cvitemwithcomment{\textit{GRE}}{%
        \centering
        \begin{tabularx}{\textwidth-\hintscolumnwidth-\separatorcolumnwidth}{XXX}
            \toprule
            Verbal Reasoning & Quantitative Reasoning          & Analytical Writing \\ \midrule
             xxx (xx\%) &  xxx (xx\%) & xx (xx\%)  \\ \bottomrule
        \end{tabularx}%
}{}
\cvitemwithcomment{TOEFL iBT}{%
        \centering
        \begin{tabularx}{\textwidth-\hintscolumnwidth-\separatorcolumnwidth}{XXXX}
            \toprule
            Reading & Listening & Speaking & Writing \\ \midrule
            xx                & xx              & xx                 & xx \\ \bottomrule
        \end{tabularx}%
}{}
\end{document}
1
  • In my opinion, you should re-define the X column type as m{#1}.
    – Bernard
    Commented Jan 7, 2018 at 19:18

You must log in to answer this question.

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