How do I change the text size for items under \cvitem
to match items under \cventry
that won't cause problems with other \moderncvstyle{xyz}
?
MWE:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic} % banking, casual, classic, empty, oldstyle options
\moderncvcolor{blue} % black, blue, green, grey, orange, purple, red options
\usepackage[scale=0.85]{geometry} % default scale=0.7. height= scale * layoutheight
\usepackage{etoolbox}
\patchcmd{\section}{\vspace*{.5ex}}{\vspace{.5ex}}{}{}
\firstname{John}
\familyname{Doe}
\title{R\'esum\'e} % optional
% the following definition is from the file moderncvstyleclassic.sty
% reformats the \cventry by removing the period at the end of the line
\renewcommand*{\cventry}[7][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
% .\strut% original
\strut% remove period
\ifx&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
% Fixes spacing if using \cvitem in the classic style by redefining \section.
\makeatletter % changes the catcode of @ to 11 aka Make @ symbol a letter
\@ifpackageloaded{moderncvstyleclassic}{%
\let\oldsection\section%
\renewcommand{\section}[1]{\leavevmode\unskip\vspace*{-\baselineskip}\oldsection{#1}}}{}
\makeatother % changes the catcode of @ back to 12 aka Make @ symbol an "other"
\begin{document}
\makecvtitle
\section{Professional Experience}
\cventry{Year--Year}{Intern}{Financial Services Inc.}{Somewhere}{State}{
\begin{itemize}
\item This is something important that I did here. This cventry text is the perfect size.
\item This is something else equally important that I did here. This cventry text is the perfect size.
\end{itemize}}
\section{Skills}
\cvitem[-1.0em]{}{
\begin{itemize}
\item These are the skills I have. Why is this cvitem text larger than cventry text?
\end{itemize}}
\section{Languages}
\cvitem{}{
\begin{itemize}
\item These are the languages I speak. Why is this cvitem text larger than cventry text?
\end{itemize}}
\end{document}
Best Answer
There are 4 different styles provided by
moderncv
:casual
(default),classic
,oldstyle
andbanking
casual
uses the definition of\cvitem
as defined inclassic
;classic
uses the following definition for\cvitem
:oldstyle
uses the following definition of\cvitem
:banking
uses the definition of\cvitem
as defined in\oldstyle
.You can either redefine
\cvitem
, or usexpatch
's\xpatchcmd
to patch#3
and insert\small
:Depending on the style that you use, you may have to adjust the size accordingly. Here's how it would look if you use
classic
:Note that I've removed
\small
from your redefinition of\cventry
since\cventry
uses\cvitem
which now uses\small
by default (due to the patch).