TransWikia.com

How to give a general label to an align environment that has sub-equations label?

TeX - LaTeX Asked by samie on August 1, 2021

I have an aligned environment to show a problem’s equation that each subequation has a label. For example:

begin{subequations}
begin{align}
& min_{x} X                                        label{equ: problem1-a}, 
textit{subject to:} & nonumber  
& x_i in {0,1}  forall {i in V}                label{equ: problem1-b} 
end{align}
end{subequations}    

My problem is that, if I want to reference the problem in the text, I should reference one of the equations like problem1-a or problem1-b. But, how can I assign a label to the whole of the problem like label{equ: problem1}?

One Answer

Add a label just after begin{subequations}, but before the align.

documentclass{article}
usepackage{amsmath}

begin{document}
begin{subequations}label{equ: problem1}
begin{align}
& min_{x} X                                        label{equ: problem1-a}, 
textit{subject to:} & nonumber  
& x_i in {0,1}  forall {i in V}                label{equ: problem1-b} 
end{align}
end{subequations}  
See equations eqref{equ: problem1}.
end{document}

Correct answer by Torbjørn T. on August 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP