
我想使用該\textsc
命令。在下面的範例中,\uppercase
效果非常好,但使用時\textsc
文字會向右移動約 1 公分。我嘗試了\raggedleft
or\vpsace
命令但沒有幫助。
\sectionfont{\vspace{0.5cm}\bfseries\fontsize{12pt}{0}\selectfont\uppercase}
\subsectionfont{\raggedright \vspace{0.2cm}\mdseries\fontsize{12pt}{0}\selectfont\textsc}
有任何想法嗎?
答案1
你需要使用一種字體宣言,所以改為\textsc
使用if \scshape
。
\documentclass{article}
\usepackage{sectsty,lipsum}
\sectionfont{\vspace{5mm}\bfseries\large\uppercase}
\subsectionfont{\vspace{2mm}\mdseries\large\scshape}
\begin{document}
\sloppy % Just for this example
\section{A section}\lipsum[1]
\subsection{A subsection}\lipsum[2]
\end{document}