更改 res 文件中的部分字體

更改 res 文件中的部分字體

我用來res.cls寫履歷。我想取消粗體部分標題並使用斜體字體(如下圖所示)。 我想要的是

\documentclass[margin]{res}
\setlength{\textwidth}{5.1in} % set width of text portion
\parskip = 0.5cm
\begin{document}
% Center the name
\moveleft.5\hoffset\centerline{\large\bf name}
% Draw a horizontal line
\moveleft\hoffset\vbox{\hrule width\resumewidth height 1pt}\smallskip  
% address, email and phone
\moveleft.5\hoffset\centerline{address}
\moveleft.5\hoffset\centerline{email}
\moveleft.5\hoffset\centerline{phone}
\begin{resume}
\section{EDUCATION}
\textbf{University of ...} \hfill 2015--2019\\ 
BSc in ..., May 2019
\section{EMPLOYMENT} 
...
\end{resume}
\end{document}

在此輸入影像描述

我嘗試使用該titlesec包。如果我添加

\usepackage{titlesec}
\titleformat{\section}{\itshape}{}{}{}[]

對於我的程式碼,它改變了我的部分標題的位置。 在此輸入影像描述

答案1

嗯,使用的模板非常舊,不應該再使用,例如它仍然使用過時的命令,例如\bf.

不過,您可以在序言命令中使用

\renewcommand\sectionfont{\itshape}%\bf

將部分的字體從粗體改為斜體。

順便一提:該類別太舊,無法使用套件titlesec...

請參閱完整的 MWE

\documentclass[margin]{res}

\renewcommand\sectionfont{\itshape}%\bf
\setlength{\textwidth}{5.1in} % set width of text portion
\parskip = 0.5cm


\begin{document}
% Center the name
\moveleft.5\hoffset\centerline{\large\bf name}
% Draw a horizontal line
\moveleft\hoffset\vbox{\hrule width\resumewidth height 1pt}\smallskip  
% address, email and phone
\moveleft.5\hoffset\centerline{address}
\moveleft.5\hoffset\centerline{email}
\moveleft.5\hoffset\centerline{phone}

\begin{resume}
\section{EDUCATION}
\textbf{University of ...} \hfill 2015--2019\\ 
BSc in ..., May 2019
\section{EMPLOYMENT} 
...
\end{resume}
\end{document}

及其結果:

產生的pdf文件

相關內容