Math & Sciencesubequation with equation

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
samwell187
Posts: 5
Joined: Mon May 16, 2011 4:21 pm

subequation with equation

Post by samwell187 »

is it possible to have a "master" equation and then subequations below it? So in the example below, I'd like the number of equation that says no~letter to be (1), and then a to be (1a) and b to be (1b)

Code: Select all

\begin{subequations}
hello
\beq
no~letter
\eeq
hi
\beq
a
\eeq
hi again
\beq
b
\eeq
\end{subequations}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

subequation with equation

Post by Ijon Tichy »

Your code snippet is somehow unclear. A Infominimal working example would be better. However using amsmath or mathtools (which uses amsmath) you can do:

Code: Select all

\documentclass{article}

\usepackage{mathtools}

\begin{document}
\begin{subequations}
\begin{align}
  a&=b\tag{\theparentequation}\\% Set another tag than the automatic one.
  b&=c\\
  c&=d
\end{align}
\end{subequations}
\end{document}
See the amsmath manual section 3.1 for more information about \tag and section 3.11.3 about counter parentequation.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
samwell187
Posts: 5
Joined: Mon May 16, 2011 4:21 pm

subequation with equation

Post by samwell187 »

thanks! this is what i needed
(sorry, \beq and \eeq mean \begin and \end{equation} for me :D )
Post Reply