Math & Science ⇒ Equation Numbering
-
- Posts: 25
- Joined: Wed Oct 22, 2008 5:03 pm
Equation Numbering
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Equation Numbering
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¹
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
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? […]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Equation Numbering
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