1

Still learning some aspects of LaTeX and I was wondering if you might be able to help out. I want to use moderncv package for my CV, and I have a single use of my CV that requires everything (including headings) to be in non-bold text except for certain components to highlight. How do I go about making sure the section headings and cvitem headings are not bolded unless I explicitly use \textbf{} command.

Thanks in advance for your help!

1
  • Thank you! ... that answer worked for me.
    – nynoles
    Commented Mar 3, 2020 at 16:09

1 Answer 1

1

If I understand you right you can do the following. If I did not understand you please make your question clearer, for example by adding an MWE reflecting your situation ...

Depending on the used style the definition for command \cventry can be different. The following MWE uses style classic.

Then the definition for command \cventry is

\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}}

with three formatting informations \bfseries, \slshape and \small.

So simply create a new command \mycventry without these formatting commands like

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

With that command you can force bolded or emphased text as you need by the usual commands.

Please see the following MWE

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{classic} % casual, classic, banking, oldstyle and fancy
\moderncvcolor{blue} 

\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}

% <================================= changed code from moderncvbodyi.sty
\newcommand*{\mycventry}[7][.25em]{% <==================================
  \cvitem[#1]{#2}{%
    {#3}% % <================================================== \bfseries deleted
    \ifthenelse{\equal{#4}{}}{}{, {#4}}% <====================== \slshape deleted
    \ifthenelse{\equal{#5}{}}{}{, #5}%
    \ifthenelse{\equal{#6}{}}{}{, #6}%
    .\strut%
    \ifx&#7&%
    \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}

% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\extrainfo{additional information}
\photo[64pt][0.4pt]{example-image-golden-upright}%
\quote{Some quote}

%\renewcommand{\refname}{Articles}

\setlength{\footskip}{66pt}


\begin{document}

\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution--3}{City--4}{\textit{Grade}--5}{Description--6}  % arguments 3 to 6 can be left empty
\cventry{year--year}{Degree}{really very long Institution--3}{very long City--4}{\textit{Grade}--5}%
  {This is a very long description--6. This is a very long description. 
   This is a very long description. This is a very long description. 
   This is a very long description. This is a very long description}
\mycventry{year--year}{Degree}{Institution--3}{City--4}{Grade--5}{Description--6}  % arguments 3 to 6 can be left empty
\mycventry{year--year}{Degree}{really very long Institution--3}{very long City--4}{Grade--5}%
  {This is a very long description--6. This is a very long description. 
   This is a very long description. This is a very long description. 
   This is a very long description. This is a very long description}
\mycventry{year--year}{\textbf{Degree}}{Institution--3}{City--4}{Grade--5}{Description--6}  % arguments 3 to 6 can be left empty
\mycventry{year--year}{\textbf{Degree}}{really very long \emph{Institution}--3}{very long City--4}{Grade--5}%
  {This is a very long description--6. This is a very long description. 
   This is a very long description. This is a very long description. 
   This is a very long description. This is a very long description}

\end{document}

and its result: enter image description here

You must log in to answer this question.

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