How do I label an array? The label can be anywhere on the right side. I can't find a \label in the array documentation.
Asked
Active
Viewed 3,044 times
0
1 Answers
2
It is not clear, what you like to have. I guess, that you looking for something like this:
Using @Werner comment for staring point, the MWE for above array is:
\documentclass{article}
\usepackage{amsmath} % for "eqref"
\begin{document}
\begin{equation}\label{eq:array}
\begin{array}{ccc}
1 & 2 & 3 \
4 & 5 & 6 \
7 & 8 & 9
\end{array}
\end{equation}
See array \eqref{eq:array} ...
\end{document}
in the case, that your array present an matrix, then you could use bmatrix from the amsmath package:
\documentclass{article}
\usepackage{amsmath} % for "bmatrix" and "eqref"
\begin{document}
\begin{equation}\label{eq:array}
\begin{bmatrix}
1 & 2 & 3 \
4 & 5 & 6 \
7 & 8 & 9
\end{bmatrix}
\end{equation}
See array \eqref{eq:array} ...
\end{document}
Zarko
- 296,517


\labelso you can\reference it later? – Werner Oct 06 '20 at 23:57arrayin question associated with a counter variable? – Mico Oct 07 '20 at 00:18\begin{equation} \left[\begin{array}{..} ... \end{array}\right] \end{equation}? – Werner Oct 07 '20 at 00:19