我目前正在学习 LaTeX,想知道如何制作类似本文档中的标题:http://www.math.northwestern.edu/~kra/papers/primes.pdf
例如 1. 简介 2. 等等
我认为它必须以某种方式涉及 \section 并将其居中,谢谢!
答案1
使用标题安全如上所述(子)节后没有换行符?尤其是http://www.latex-community.org/forum/viewtopic.php?f=5&t=10456我的建议是:
\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}
{\normalfont\bfseries\center}% formatting commands to apply to the whole section heading
{\thesection .}% the label and number
{0.5em}% space between label/number and section title
{}% formatting commands applied just to section title
[]% punctuation or other commands following section title
\titleformat{\subsection}[runin]% runin puts it in the same paragraph
{\normalfont\bfseries}% formatting commands to apply to the whole subsection heading
{\thesubsection .}% the label and number
{0.5em}% space between label/number and subsection title
{}% formatting commands applied just to subsection title
[.]% punctuation or other commands following subsection title
\begin{document}
\section{This is a section}
Some text following.
\subsection{This is a subsection}
Some more text following.
\end{document}
我希望这能满足您的要求。