
많은 기사는 다음과 같은 방식으로 구성됩니다.
1. [제1항의 제목]
1.1.[하위 섹션 1.1의 제목].하위 섹션 1.1의 텍스트
1.2.[하위 섹션 1.2의 제목].하위 섹션 1.2의 텍스트.
2. [제목 os 섹션 2]
2.1.[하위 섹션 2.1의 제목].하위 섹션 2.1의 텍스트
2.2.[하위 섹션 2.2의 제목].하위 섹션 2.2의 텍스트.
어떻게 하면 (적절한 방법으로) 할 수 있나요? 감사해요.
답변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
.