# LyX doesn't know eqref?

LyX somehow can't use eqref. (I use version 2.0.2 and wouldn't want to update, if possible, since I've set up everything in a very specific way and wouldn't like a new version to perhaps tamper with that.)
So when I want parenthesis around a number that references some equation, LyX actually uses (\ref{...}). This is annoying, because in propositions and theorem (e.g. from the AMS environment), where everything is emphasized, the number that references is emphasized too - whereas by using eqref (which can be inserted using "evil red code") this wouldn't be the case.

Now in this answer of mine it was indicated, by using an additional package, how to make the number that ref displays always non-emphasized - but the problem remains the the parenthesis are emphaszied.

Is there a way to also make the paranthesis non-emphasized (or ideally get Lyx to use \eqref without "evil red code" ?
The solution from this answer unfortunately doesn't work for me, as it produces an error.

• Does the doc use amsmath in the first place? Without it there is no reason for LyX to use it. – daleif Nov 9 '14 at 11:24
• My impression is that this is more a question about the innards of LyX, so it's better to ask it in a specialized LyX forum. – egreg Nov 9 '14 at 13:00

For the solution to your problem: go to Document > Settings and uncheck "Use refstyle (not prettyref) for cross-references. See the screenshot below

Now some picky comments (feel free to skip these):

In regards to "LyX somehow can't use eqref", I don't agree (see the solution above). Did you mean that as a question? I like to help users ask clearer questions. I understand that it is difficult for many non-native speakers and they seem to appreciate suggestions. The way I would phrase this is "Can LyX somehow use eqref?"

• Does this method use \eqref just for equations and \ref for the other cross references? – egreg Nov 9 '14 at 17:28
• @egreg If you choose "(<Reference>)" for the particular reference (by right-clicking) and you have the setting I described above as unchecked, \eqref will be used for any reference (I believe), such as a reference to a label that is in a caption in a figure float. Is that bad? Should it only be used for equations? – scottkosty Nov 9 '14 at 17:43
• Yes, it's bad: \eqref adds parentheses that are generally unwanted for references to non equations. – egreg Nov 9 '14 at 17:46
• @egreg I see. Well, LyX does things a little strange (as usual): as far as the user knows, they are choosing between parentheses or no parentheses. They do not choose \eqref vs. (\ref) (except through the Document Settings). So it works like this: when you insert a reference, the default is no parentheses. If they choose the "(<Reference>)" option, it is because they go out of their way to choose to have parentheses. In this case, if "Use refstyle" is not selected, then eqref is used. Does that make sense? If not, I can add a more detailed description in my answer. – scottkosty Nov 9 '14 at 17:59
• I'm not sure to have understood how it works. If it's impossible to have \ref for some references and \eqref for others is a notable weakness of the software. – egreg Nov 9 '14 at 19:00