Hi All,
I'm having a bit of a problem numbering some equations.
I need to be some sub numbers on automatic. For example.
\begin{equation}
\frac{1}{2} \label{E4.3_1}
\end{equation}
or
\begin{equation}
\frac{1}{3} \label{E4.3_2}
\end{equation}
Is there a way to do this?
Also is there a way to automatically put a footnote within an equation?
Thanks,
Peaches
Math & Science ⇒ Equation Numbering
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Equation Numbering
The amsmath package offers the right environment for this purpose.
You may be able to modify the equation numbering by using the mathtools package from the mh bundle.
Best regards
Thorsten¹
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
\begin{subequations}
\begin{align}
(a+b)^2&=a^2+2ab+b^2 \\
(a-b)^2&=a^2-2ab+b^2 \\
(a+b)(a-b)&=a^2-b^2
\end{align}
\end{subequations}
\end{document}
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 25
- Joined: Wed Oct 22, 2008 5:03 pm
Re: Equation Numbering
Hi, Thanks for the post, but that is not actually what i need I need two equations to have the same number with a sub 1 and the other with sub 2 and the 1 and 2 actually have to be subscripted to the equation number
as equation number 4.1_1 and equation number 4.1_2
Is there a way to do this automatically?
Thanks,
Peaches
as equation number 4.1_1 and equation number 4.1_2
Is there a way to do this automatically?
Thanks,
Peaches
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Equation Numbering
It is totally clear to me that this is not exactly what you want. It was only supposed to be an approach. Be proactive and don't expect complete solutions right at the beginning. Read the mentioned manuals and see if you can do something on your own.peaches2165 wrote:[…] but that is not actually what i need I need two equations to have the same number with a sub 1 and the other with sub 2 and the 1 and 2 actually have to be subscripted to the equation number as equation number 4.1_1 and equation number 4.1_2 […]
I'm not aware of such an automatism. So you (or anybody else) will have to do this by hand because the above code is all I can offer at the moment. The forum search may yield some useful results.peaches2165 wrote:[…] Is there a way to do this automatically? […]
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Equation Numbering
Try the following slight modification of the subequations environment:
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage{fixltx2e}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\makeatletter
\renewenvironment*{subequations}{%
\refstepcounter{equation}%
\protected@edef\theparentequation{\theequation}%
\setcounter{parentequation}{\value{equation}}%
\setcounter{equation}{0}%
\def\theequation{\theparentequation\textsubscript{\arabic{equation}}}%
\ignorespaces
}{%
\setcounter{equation}{\value{parentequation}}%
\ignorespacesafterend
}
\makeatother