섹션의 접미사를 변경하는 방법

섹션의 접미사를 변경하는 방법

내가 원하는 것:

여기에 이미지 설명을 입력하세요

내가 가진 것:

여기에 이미지 설명을 입력하세요

보기 좋지 않다는 건 알지만 이렇게는 필요해요. 나는 이것을 사용 titlesec하고 \subsection{A section}쓰고 있습니다. 감사해요!

답변1

를 사용하는 경우 titlesec가장 좋은 제안은 다음과 같이 runin 모양을 사용하고 \thesubsection마지막(선택 사항) 인수에 수동으로 줄바꿈을 사용하는 것입니다.

하위 섹션의 경우:

\titleformat{\subsection}[runin]{\large\bfseries}{}{0pt}{}[\quad {\thesubsection\\[0.5\baselineskip]}]

(그리고 섹션에 비슷한 것이 필요한 경우...)

\titleformat{\section}[runin]{\Large\bfseries}{}{0pt}{}[\quad {\thesection\\[0.5\baselineskip]}]

특히 제목이 긴 경우에는 조정이 필요할 수 있습니다.

답변2

노력하다\subsection*{A section \quad 2.1}

답변3

섹션 형식을 적절하게 정의하십시오.

\documentclass{book}

\usepackage{titlesec}

\titleformat{name=\section}[hang]
 {\Large\bfseries}
 {}
 {0pt}
 {\maketitlewithnumber{\thesection}}
\titleformat{name=\section,numberless}[hang]
 {\Large\bfseries}
 {}
 {0pt}
 {}
\newcommand{\maketitlewithnumber}[2]{#2~#1}

\begin{document}

\setcounter{chapter}{2} % just to match your numbers

\section{A section}

Some text

\section{Another section}

Some text

\end{document}

비결은 마지막 인수의 자료가 \titleformat섹션 제목을 인수로 가져오므로 \maketitlewithnumber두 부분을 교환하도록 정의할 수 있다는 것입니다.

numberlessfor 변형 도 \section*필요합니다.

여기에 이미지 설명을 입력하세요

관련 정보