2

I have numbers like (1.2.2.3), how do I get numbers like (1.2.2.3)' and (1.2.2.3.1)?

  • Should there really be a prime in the first option? Also, provide some context in terms of the equation numbers. For example, (1.2.2.3) is equation 3 in \subsubsection 1.2.2, right? Do you also have equations inside \subsections and \sections? – Werner Mar 8 '13 at 6:21
  • Yeah there is a prime for two very similar equations. I got subpoint under subsubsection, those are numbered as equations, and sometimes I need equations within subpoints. – h__ Mar 8 '13 at 7:13
2

Here you can find the information necessary to change equation numbering with or without amsmath in the sections "equation numbering".

Short summary:

  • Without amsmath you need to change the command \theequation for the output and use the package remreset for the internal counting.
  • With amsmath you need to change the command \theequation for the output and use the command \numberwithin for the internal counting.

Long answer (now that your problem is a bit clearer to me thanks to your comments):

\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}
  • My other things are all numbered as equations, and I cannot do \numberwithin{equations}{equations}... – h__ Mar 8 '13 at 7:10
1

I've seen something like this in Dieudonné's "Treatise on Analysis" book series.

\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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.