
아래 그림과 같이 텍스트에 하위 섹션 제목을 어떻게 포함합니까? 대부분의 표준 라텍스 템플릿에는 공백이 있습니다.
1.2함수 필드에 대한 Weil의 추측
이 섹션의...
나는 그것이 일을 복잡하게 만든다고 생각하기 때문에 피하려고 노력하고 있습니다. 아래 그림과 같이 섹션 제목에 공백이 있고 하위 섹션 제목 앞에 작은 공간이 있었으면 좋겠습니다.
편집하다:요청에 따라 문제를 보여주는 최소한의 작업 예는 다음과 같습니다.
\documentclass[12pt]{article}
\begin{document}
\section{Section}
Text A
\subsection{Subsection}
There are two problems with this working example: the subsection is not part of this paragraph (and the letters are not the same size as the letters here), and the gap between Text A and the subsection is too large.
\end{document}
TeXmaker를 통해 이것을 넣었을 때 나오는 그림은 다음과 같습니다.
사용 중인 문서 클래스를 변경하게 되어 기쁩니다.
답변1
그림의 출력을 재현하려면 를 사용하십시오 amsart
.
\documentclass[12pt]{amsart}
\newtheorem{theorem}{Theorem}[section]
\theoremstyle{definition}
\newtheorem{remark}[theorem]{Remark}
\begin{document}
Some nonsense words some nonsense words some nonsense words
some nonsense words some nonsense words some nonsense words
some nonsense words some nonsense words some nonsense words
some nonsense words.
\section{Section title}
Some nonsense words some nonsense words some nonsense words
some nonsense words some nonsense words some nonsense words
some nonsense words some nonsense words some nonsense words
some nonsense words.
\subsection{Subsection title}
Some nonsense words some nonsense words some nonsense words
some nonsense words some nonsense words some nonsense words
some nonsense words some nonsense words some nonsense words
some nonsense words.
\begin{theorem}
A theorem statement. A theorem statement. A theorem statement.
A theorem statement. A theorem statement.
\end{theorem}
\begin{remark}
A remark. A remark. A remark. A remark. A remark.
\end{remark}
Some nonsense words some nonsense words some nonsense words
some nonsense words some nonsense words some nonsense words
some nonsense words some nonsense words some nonsense words
some nonsense words.
\subsection{Another subsection title}
Some nonsense words some nonsense words some nonsense words
some nonsense words some nonsense words some nonsense words
some nonsense words some nonsense words some nonsense words
some nonsense words.
\end{document}
답변2
(패키지 없이 article
) 섹션 매크로는 모두 \@startsection
내부적으로 사용됩니다. \@startsection
섹션 제목의 모양을 제어하는 6개의 인수를 사용합니다.
\@startsection
{<sectioning name>}
{<sectioning level>}
{<horizontal indent from left>}
{<vertical skip pre>}
{<skip post>}
{<font choice>}
위의 주장 중 대부분은 자체적으로 설명이 가능하지만 그 중 두 가지는 다소 특별하게 작동합니다.
<vertical skip pre>
제목 뒤의 단락을 들여쓸지 여부를 결정합니다. 이것이 양수이거나 0이면 다음 단락이 정상적으로 들여쓰기되고, 음수이면 들여쓰기가 억제됩니다. 어느 쪽이든 이것의 절대값은 수직 건너뛰기에 사용됩니다.<skip post>
제목이 연속 제목으로 표시되는지 여부를 제어합니다. 이것이 양수인 경우 제목 다음에 수직 건너뛰기로 동작하고 제목이 표시됩니다. 음수이거나 0이면 제목은 연속 제목이 되며 제목과 같은 줄에 있는 텍스트 사이의 가로 건너뛰기가 됩니다.
따라서 이를 해결하고 이제 \subsection
연결 제목 형식으로 재정의할 수 있습니다.
\renewcommand\subsection
{%
\@startsection
{subsection}
{2}
{\z@}
{3.25ex \@plus 1ex \@minus .2ex}
{-1em}
{\normalfont\normalsize\bfseries}%
}
레벨에서 이 형식을 시작하는 경우 에도 같은 방식으로 \subsection
재정의해야 합니다 . \subsubsection
이러한 재정의를 수행하는 완전한 문서:
\documentclass[]{article}
\makeatletter
\renewcommand\subsection
{%
\@startsection
{subsection}
{2}
{\z@}
{3.25ex \@plus 1ex \@minus .2ex}
{-1em}
{\normalfont\normalsize\bfseries}%
}
\renewcommand\subsubsection
{%
\@startsection
{subsubsection}
{3}
{\z@}
{3.25ex \@plus 1ex \@minus .2ex}
{-1em}
{\normalfont\normalsize\bfseries}%
}
\makeatother
\usepackage{duckuments}
\begin{document}
\section{This is a section}\blindduck
\subsection{This is a subsection}\blindduck
\subsubsection{This is a subsubsection}\blindduck
\paragraph{This is a paragraph}\blindduck
\end{document}
답변3
와 :titlesec
article
\documentclass[12pt]{article}
\usepackage{titlesec}
\titleformat{\subsection}[runin]{\normalsize\bfseries}{\thesubsection}{5pt}{}
\begin{document}
\section{Section}
Text A
\subsection{Subsection}
There are two problems with this working example: the subsection is not part of this paragraph (and the letters are not the same size as the letters here), and the gap between Text A and the subsection is too large.
\end{document}