
多くの記事は次のように構成されています。
1. [第1節のタイトル]
1.1.[サブセクション1.1のタイトル].サブセクション1.1のテキスト
1.2.[サブセクション1.2のタイトル].サブセクション1.2のテキスト。
2. [タイトル2]
2.1.[サブセクション2.1のタイトル].第2.1節のテキスト
2.2.[サブセクション2.2のタイトル].サブセクション2.2のテキスト。
どうすればそれを(適切な方法で)実行できますか? ありがとうございます。
答え1
1つのオプションtitlesec
:
\documentclass{article}
\usepackage{titlesec}
\titleformat{\subsection}[runin]
{\normalfont\large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}[runin]
{\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
\begin{document}
\section{Test section}
test text
\subsection{Test subsection}
test text
\subsection{Test subsection}
test text
\section{Test section}
test text
\subsection{Test subsection}
test text
\subsection{Test subsection}
test text
\end{document}
パッケージなし:
\documentclass{article}
\makeatletter
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{-1.5ex \@plus .2ex}%
{\normalfont\large\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{-1.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}}
\makeatother
\begin{document}
\section{Test section}
test text
\subsection{Test subsection}
test text
\subsection{Test subsection}
test text
\section{Test section}
test text
\subsection{Test subsection}
test text
\subsection{Test subsection}
test text
\end{document}
でサブサブセクション: 改行を削除します (段落と同様) ヴェルナーサブサブセクションの場合にも同様の回答を提供し、また、\@startsection
それについての優れた説明も提供しています。