\textsc 的問題

\textsc 的問題

我想使用該\textsc命令。在下面的範例中,\uppercase效果非常好,但使用時\textsc文字會向右移動約 1 公分。我嘗試了\raggedleftor\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}

相關內容