# What is the correct way to type "See Eq. (n)

I am writing a document with equations and I am used to refer to equations with \eqref{label}.

However if I want to refer to it in a commentary with parenthesis (see Eq. \eqref{label}), it will make double parenthesis, which is not nice I guess.

I was expecting something like the \cite command which allows for including extra words in it with \citep[something before][something after]{label} but it does not work.

Should I use (see Eq. \ref{label})or is this just sort of a hack and impropoer Latex typo ?

Although I don't think this is the ideal solution, you can redefine the command \eqref, because this means that it will change it for the whole document. If you don't want this, just define a different command.

If you want to define a new command, just write:

\newcommand\myeqref[1]{
(see Eq. \textup{\ref{#1}})
}


## Code

\documentclass{article}
\usepackage{amsmath}

\renewcommand{\eqref}[1]{(see Eq. \textup{\ref{#1}})}

\begin{document}
$$a^2+b^2=c^2\label{eq:1}$$

If I refer to the equation, it does it all by itself, here: \eqref{eq:1}
\end{document}

• what does \textup do ? About redefining \eqref it is not an issue with \NewDocumentCommand as it is possible to modify only the behaviour if optional argument is provided – ClementWalter Apr 26 '16 at 10:52
• @clemlaflemme The original command \eqref is enclosed in \textup, which basically disallows the reference to not be "italic". Try writing \textit{\eqref{eq:1}}, the 1 will stay regular. Maybe you can enclose the whole reference in it, so if you have italic text, the reference will stay up. – Alenanno Apr 26 '16 at 10:54
• @Alenanno No love for a non-breaking space after Eq.? ;) – Jon Apr 26 '16 at 12:16
• @Jon you mean with ~? Sure, I'll fix it when I get back to my computer :P – Alenanno Apr 26 '16 at 12:31

I just use \ref{eq_my_equation} in all cases, as the parentheses around equation numbers aren't necessary in what I write. You could do the same, or just use \ref when required.

Note that (from an answer to this related question) amsmath's \eqref also sets the equation number in the relevant upright font. We could get into a discussion about whether or not that's the right thing to do, but for the purposes of this answer: I've never had to deal with this problem, having never had to refer to an equation from within italics.

Based upon @Alenanno and also including optional arguments for @Steven commands an answer with the more advanced \NewDocumentCommand from package xparse:

\LetLtxMacro{\oldeqref}{\eqref}
\RenewDocumentCommand\eqref{D<>{Eq.}om}{%
\IfNoValueTF{#2}
{#1~\oldeqref{#3}}
{(#2 #1~\textup{\ref{#3}})}%
}


will do the job, that is:\eqref is unchanged but \eqref[something]{label} returns (Something n) and it is also possible to change the base word Eq. (in my example) with \eqref<eqn>{label} and \eqref<eqn>[Something]{label}:

Example

\eqref{eq:label}; \eqref[Before]{eq:label}; \eqref<eqn>{eq:label}; \eqref<eqn>[Before]{eq:label}


Output