Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LaTeX multiple equation references in one

Tags:

latex

Is it possible to combine multiple equation references into one, like it is for the \cite command? What I would like is the following:

\begin{subequations}  \begin{align}   a & = b \label{eq1} \\   c & = d \label{eq2}  \end{align} \end{subequations}  Some text referring to the formulas \eqref{eq1,eq2}. 

which would then compile as "Some text referring to the formulas (1a,b)." Obviously, this example doesn't work, but I'm hoping there's a package out there that does something similar. Any ideas?

like image 606
Teake Avatar asked Jul 25 '10 10:07

Teake


People also ask

How do you reference multiple equations in LaTeX?

You can then use \cref{eq2,eq1,eq3,eq5,thm2,def1} in order to do it. Show activity on this post. The amsmath package introduces the subequations environment. The first label, 'all1', before the \begin{align} , creates a label for the complete set of equations (1, in this case).

How do you reference equations in LaTeX?

To reference a LaTeX table or equation in LaTeX you need to make sure that you insert a label in your table or equation and that such label has a tab: prefix for tables and a eqn: prefix for equations. Notice the \label{tab:somelabel} inside the \caption . Notice the \label{eqn:somelabel}.

How do you cross reference in LaTeX?

One of the most useful features of LaTeX is its ability to handle cross-references. To use this, we first define a label at the section (or equation, table, etc.) we want to reference, using the \label{} command, e.g. The argument to the \label command is just a text string that you'll use to reference that part.


2 Answers

This is a simple solution that requires no additional packages, just one additional label:

\begin{subequations}  \label{eq1}  \begin{align}   a & = b \label{eq11} \\   c & = d \label{eq12}  \end{align} \end{subequations} 

And when you do \eqref{eq1} it will display as (1).

like image 51
Luis E. Avatar answered Sep 30 '22 04:09

Luis E.


You can use cleveref-package. Here's documentation.

You can then use \cref{eq2,eq1,eq3,eq5,thm2,def1} in order to do it.

like image 44
phimuemue Avatar answered Sep 30 '22 04:09

phimuemue