我仍在学习 LaTeX 的一些方面,想知道您是否可以提供帮助。我想将moderncv
软件包用于我的简历,并且我的简历只有一个用途,即要求所有内容(包括标题)都采用非粗体文本,但某些部分除外,需要突出显示。除非我明确使用命令,否则如何确保章节标题和 cvitem 标题不加粗\textbf{}
。
在此先感谢您的帮助!
答案1
如果我理解正确,您可以执行以下操作。如果我没有理解您的意思,请更清楚地说明您的问题,例如添加反映您情况的 MWE...
根据使用的样式,命令的定义\cventry
可能不同。以下 MWE 使用样式classic
。
那么命令的定义\cventry
是
\renewcommand*{\cventry}[7][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
.\strut%
\ifx&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
包含三种格式信息\bfseries
,\slshape
和\small
。
\mycventry
因此,只需创建一个不带这些格式化命令的新命令即可,例如
\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&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
使用该命令,您可以根据需要通过常用命令强制加粗或强调文本。
请参阅以下 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&%
\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}