如何暂时改变方程编号深度?

如何暂时改变方程编号深度?

我有像这样的数字(1.2.2.3),我如何获得像(1.2.2.3)'和这样的数字(1.2.2.3.1)

答案1

这里amsmath您可以在“方程编号”部分中找到有关更改或不更改方程编号所需的信息。

简短的摘要:

  • 无需amsmath更改\theequation输出命令并使用包remreset进行内部计数。
  • amsmath需要更改\theequation输出命令并使用\numberwithin内部计数命令。

长答案(现在由于您的评论,您的问题对我来说更清楚一些了):

\documentclass{article}
\usepackage{amsmath}
\numberwithin{equation}{subsubsection}

\newcounter{mySubCounter}

\usepackage{ntheorem}
\theoremprework{\setcounter{mySubCounter}{0}}
\newtheorem{subpoint}[equation]{Teil}

\newcommand{\subpointequation}[1]{%
\refstepcounter{mySubCounter}
\begin{equation*}
#1 \tag{\theequation.\themySubCounter}
\end{equation*}
}

\newcommand{\similarequation}[1]{%
\begin{equation*}
#1\tag{\theequation'}
\end{equation*}
}

\newcommand{\similarsubpointequation}[1]{%
\begin{equation*}
#1\tag{\theequation.\themySubCounter'}
\end{equation*}
}


\begin{document}
\section{eins}
\subsection{eins eins}
\subsection{eins zwei}
\subsubsection{eins zwei eins}
\subsubsection{eins zwei zwei}
\begin{equation}
1+2=3
\end{equation}
\begin{equation}
1\cdot2=2
\end{equation}
\begin{equation}
1-2=-1
\end{equation}
\begin{subpoint}
Hallo
\subpointequation{a+b=c}
\subpointequation{d+e=f\label{def}}
\similarsubpointequation{e+d=f\label{edf}}
\end{subpoint}
\begin{equation}
1\div 2=0.5
\end{equation}
\similarequation{1\div 2=\frac{1}{2}\label{simequation}}
\begin{subpoint}
Tschuss
\subpointequation{g+h=i}
\end{subpoint}
\(d+e=f\) is equation number \eqref{def}

\(1\div 2=\frac{1}{2}\) is equation number \eqref{simequation}

\(e+d=f\) is equation number \eqref{edf}
\end{document}

答案2

我在迪厄多内的《分析论文》系列书中看到过类似的东西。

\documentclass[leqno]{book}
\usepackage{amsmath,amsthm,etoolbox}
\newtheoremstyle{dieudonne}
  {}         % Space above, empty = `usual value'
  {}         % Space below
  {\itshape} % Body font
  {}         % Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {}         % Punctuation after thm head
  { }        % Space after thm head: " " = normal interword space;
  {(\thmnumber{#2})\thmnote{ -- (#3)}}% Thm head spec
\theoremstyle{dieudonne}
\newtheorem{thminn}[equation]{}
\newenvironment{thm}[1][]
  {\thminn[#1]\addtocounter{equation}{-1}\subequations}
  {\endsubequations\endthminn}

\patchcmd{\subequations}{\alph{equation}}{.\arabic{equation}}{}{}
\numberwithin{equation}{section}

\makeatletter
\renewcommand\maketag@@@[1]{\hbox{\m@th\normalfont\bfseries#1}}



\begin{document}
\mainmatter
\chapter{First}
\section{A}
First, a theorem without equations.

\begin{thm}
Nothing.
\end{thm}

Now a theorem with an equation.

\begin{thm}
What's this?
\begin{equation}
a=b
\end{equation}
\end{thm}

Here is an equation
\begin{equation}
1=1
\end{equation}
with some text after it.

\begin{thm}[Mine]
Whose is this?
\begin{equation}
a\ne b
\end{equation}
\end{thm}

\section{B}

Another theorem.

\begin{thm}
Something.
\end{thm}

\end{document}

在此处输入图片描述

相关内容