
답변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
두 부분을 교환하도록 정의할 수 있다는 것입니다.
numberless
for 변형 도 \section*
필요합니다.