我正在对论文进行 TeX 处理关于 Waldspurger 的结果由 Jacquet 撰写,我发现该论文的格式如下:
这里 (3.2) 代表第 3.2 节,而方程编号 3.1.11 则来自该节及其对应的编号。我知道如何处理方程 (3.1.11),但我不知道如何对第 (3.1) 节进行这样的编号。我发现这个答案它会删除小节标题,但我必须手动输入数字。
编辑:以下是我所做的更多内容。正如我所说,我使用了上面链接的答案中的解决方案
\newcommand{\fakesubsection}[1]{%
\par\refstepcounter{subsection}% Increase subsection counter
\subsectionmark{#1}% Add subsection mark (header)
\addcontentsline{toc}{subsection}{\protect\numberline{\thesubsection}#1}% Add subsection to ToC
% Add more content here, if needed.
}
并将其放到每个小节中。这在某种程度上产生了鬼小节,没有标题,但仍然有效。现在我想添加小编号,如我上面上传的图片所示,如第二段中的 (3.2)。我正在使用article
类,但将其更改为其他任何内容对我来说都没关系。只是希望有一个与原始论文一致的编号(关联)。
答案1
您可以使用titlesec
。
\documentclass[leqno]{article}
\usepackage{amsmath}
\usepackage{titlesec}
\titleformat{\subsection}[runin]
{\normalfont\normalsize}
{(\thesubsection)}
{0pt}
{}
\titlespacing{\subsection}
{\parindent}% space before the title
{\topsep}% vertical space above subsections
{\fontdimen2\font}% a normal space
\labelformat{equation}{\thesubsection.\theequation}
\counterwithin{equation}{subsection}
\renewcommand{\theequation}{\arabic{equation}}
\begin{document}
\setcounter{section}{2} % just to reproduce your numbers
\section{Test}
\subsection{}
\setcounter{equation}{10} % just to reproduce your numbers
some text for the subsection some text for the subsection
some text for the subsection some text for the subsection
some text for the subsection some text for the subsection
some text before the equation some text before the equation
some text before the equation some text before the equation
some text before the equation some text before the equation
\begin{equation}\label{test}
1=1
\end{equation}
\subsection{}
some text for the subsection with \eqref{test} some text for the subsection
some text for the subsection some text for the subsection
some text for the subsection some text for the subsection
some text for the subsection some text for the subsection
\end{document}
如果某些小节有标题,则可以进行管理,但您应该指出所需的格式。