0

I am using the following command to make references to equations of the form "Eq. (X.X)"

\let\originaleqref\eqref
\renewcommand{\eqref}{Eq.~\originaleqref}

(see: Modify \eqref command)

But there is still annoying issue to deal with. Sometimes i want to refer to a bunch of consecutive equations, so the form should be

"Eqs. (X.X) - (X.Z)"

or sometimes to just two equations in the form

"Eqs. (X.X) and (X.Y)".

Additionally i would be absolutely nice if the command would get "oh i have three (four, five...) equations to reference, so i do this":

"Eqs. (X.X), (X.Y) and (X.Z)".

So it seperates all, but not the last mentioned equation with commas, and adds before the last equation an "and". This should be the behavior, if the equations are given in a way telling the command that they should be not(!) be written in the consecutive way as described above.

I provide an MWE just because i have to, although I know, this is not including an possible solution. I apologize for this behavior since i am using this forum for a while, but I have absolutely no glue how to acchieve this.

\documentclass{scrartcl}
\usepackage{amsmath}
\let\originaleqref\eqref
\renewcommand{\eqref}{Eq.~\originaleqref}
\begin{document}
\begin{equation}
1
\label{eq:1}
\end{equation}

\begin{equation}
2
\label{eq:2}
\end{equation}

\begin{equation}
3
\label{eq:3}
\end{equation}
Refer to the first equation: \eqref{eq:1} \\
Refer to the first and second equations: \\ %todo Goal: Eqs. (1) and (2)
Refer to the first to third equations: \\ %todo Goal: Eqs. (1) - (3)
Refer to the first, second and third equation: \\ %todo Goal: Eqs. (1), (2) and (3)
\end{document}

MWE Output

user69453
  • 936

0 Answers0