# How to set font to default from within a predefined environment?

moderncv's \cventry environment defines for its 3rd argument a slanted font:

\renewcommand*{\cventry}[7][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
.\strut%
\ifx&#7&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}


I'd like to keep that slanted font, but have a way to interject it with the default font, so that I could write something like

\cventry{year}{project}{SLANTED_company1 {\sfdefault AND} SLANTED_company2}{city}{country}{description}


so the output would be "SLANTED_company1 AND SLANTED_company2".

How could I do this?

• \textup{\textsf{and}} ? Jul 9, 2021 at 17:24
• Thank you, perfect! If you put that as an answer, I'll happily accept it
– Zubo
Jul 9, 2021 at 17:28

\textup (upright) undoes the slanted shape so you can use \textup{\textsf{and}}