\textsc에 문제가 있습니다

\textsc에 문제가 있습니다

명령 을 사용하고 싶습니다 \textsc. 아래 예에서는 \uppercase완벽하게 작동하지만 텍스트를 사용할 때 \textsc텍스트가 오른쪽으로 약 1cm 이동됩니다. \raggedleft또는 명령 을 시도했지만 \vpsace도움이 되지 않았습니다.

\sectionfont{\vspace{0.5cm}\bfseries\fontsize{12pt}{0}\selectfont\uppercase}
\subsectionfont{\raggedright \vspace{0.2cm}\mdseries\fontsize{12pt}{0}\selectfont\textsc}

어떤 아이디어가 있나요?

답변1

글꼴을 사용해야 합니다.선언, 대신에 를 \textsc사용하세요 \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}

관련 정보