\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman\usepackage[T1]{fontenc} % To switch to the T1 encoding
\firstname{John} % Your first name
\familyname{Doe} % Your last name
\begin{document}
\cvitem{Issue}{\textsc{Lorem, Ipsum, \textbf{Hello, Word}, Dolor, Sit, Amet}}
\end{document}
这将产生
我怎样才能使粗体字也显示小写字母?
我试过
\textsc{Lorem, Ipsum, \textbf{\textsc{Hello, World}}, Dolor, Sit, Amet}
但这并没有改变什么。
答案1
嗯,这取决于使用的字体,因为并非所有字体都有粗体小写字母的字形。请注意,我添加了一行\moderncvstyle{classic}
以获取可编译的代码(在发布之前,请务必测试您给出的代码)。
例如您可以使用字体libertine
:
\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman\usepackage[T1]{fontenc} % To switch to the T1 encoding
\moderncvstyle{classic}
\usepackage{libertine} % <==============================================
\firstname{John} % Your first name
\familyname{Doe} % Your last name
\begin{document}
\cvitem{Issue}{\textsc{Lorem, Ipsum, \textbf{Hello, Word}, Dolor, Sit, Amet}}
\end{document}
结果如下:
或者,您可以使用字体lmodern
(没有粗体小型大写字母),并使用 Computer Modern 字体(cmr
)中的粗体小型大写字母:
\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman\usepackage[T1]{fontenc} % To switch to the T1 encoding
\moderncvstyle{classic}
\usepackage{lmodern}
\firstname{John} % Your first name
\familyname{Doe} % Your last name
\begin{document}
\cvitem{Issue}{\textsc{Lorem, Ipsum, \textbf{Hello, Word}, Dolor, Sit, Amet}}
\cvitem{Issue}{\textsc{Lorem, Ipsum, \textbf{Hello, Word}, Dolor, Sit, Amet}
{\fontfamily{cmr}\textsc{\textbf{Hello World in cmr}}}} % <=============
\end{document}
结果如下: