Is there a way to label equations in Latex with words insted of numbers when doing an array?
I'd like to give a reason each line of my equation list follows from.
Is there a way to label equations in Latex with words insted of numbers when doing an array?
I'd like to give a reason each line of my equation list follows from.
I have a temporary solution where you add text next to each line.
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
Basic way to add text to each line.
\begin{align}
x &= 4^{2} - 1 && \text{given}\\
&= 16 - 1 && \text{exponent}\\
&= 15 && \\ % line without text
&= 15 && \text{subtraction}
\end{align}
Better way when removing numbers.
\begin{align*}
x &= 4^{2} - 1 && \text{given}\\
&= 16 - 1 && \text{exponent}\\
&= 15 && \\
&= 15 && \text{subtraction}
\end{align*}
Below, this example put less space between equation and text, and parenthesis.
\begin{alignat}{2}
x &= 4^{2} - 1 && \qquad\text{(given)}\\
&= 16 - 1 && \qquad\text{(exponent)}\\
&= 15 && \\
&= 15 && \qquad\text{(subtraction)}
\end{alignat}
\end{document}
As in this other answer, you may use the command \tag{}
:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
x+y\label{eq1}\tag{First one}\\
x+z\label{eq2}\tag{Second one}\\
x-y\label{eq3}\tag{Third one}\\
x-z\nonumber
\end{align}
Then you can cite \eqref{eq1}, \eqref{eq2} and \eqref{eq3} separately.
Or you can cite \ref{eq1}, \ref{eq2} and \ref{eq3}.
\end{document}
See the output of the two styles for the in-text citation: