
答え1
を使用している場合、最善の提案は、runin シェイプを使用し、最後の (オプションの) 引数で次のように手動で改行することtitlesec
です。\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
2 つの部分を交換するように定義できることです。
numberless
のバリアントも\section*
必要です。