
내 문서의 한 인스턴스에는 다음이 있습니다.
\section{\large Multi-worded section heading }
현재 목차에서는 다른 모든 제목보다 더 크게 나타납니다(내가 LaTeX에 그렇게 하도록 지시했기 때문에 의심의 여지가 없습니다). 다른 제목과 동일하게 변경하려면 어떻게 해야 합니까?
답변1
나는 이것을 다음과 같이 이해했습니다. 섹션 제목 중 하나/몇 개에서만 글꼴을 변경하고 싶습니다(전체가 아님). 가장 쉬운 방법은 \section
like 의 선택적 인수를 사용하는 것입니다 .
%\section[optional content]{regular content }
\section[Multi-worded section heading]{\large Multi-worded section heading }
제목과 목차를 실행하는 데 형식화되지 않은 선택적 콘텐츠가 사용됩니다. 다음은 클래스가 포함된 MWE입니다 article
(어떤 클래스인지는 알려주지 않았습니다!).
\documentclass{article}
\begin{document}
\tableofcontents
\section{Some section}
\section[A section]{\Huge A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\section{Some section again}
\end{document}
섹션 번호가 작을수록 확실히 보기 흉해 보입니다. 더 좋은 방법은 다음과 같은 새 명령을 정의하는 것입니다.
\makeatletter
\newcommand\mysection{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Huge\bfseries}} %%<-- \Large replaced by \Huge
\makeatother
아래와 같이 사용하십시오.
\documentclass{article}
\makeatletter
\newcommand\mysection{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Huge\bfseries}}
\makeatother
\begin{document}
\tableofcontents
\section{Some section}
\mysection{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\section{Some section again}
\end{document}
이러한 변경 사항을 모든 섹션에 적용하려면 다음을 사용하는 것이 좋습니다 sectsty
(Werner가 링크한 대로:섹션에는 작은 대문자가 있지만 ToC에는 없음또는 titlesec
패키지( titleformat*{\section}{\Huge}
)를 사용하세요.