In LyXm in "Document Settings" window on "Document class" pane I can choose to use either prettyref or refstyle.

However the TeX code looks as if it used ordinary /ref. Why?

%% LyX 2.1.0 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.




  • 1
    Try selecting a different style for the cross reference, by right-clicking on it. May 27, 2014 at 9:01

1 Answer 1


refstyle or prettyref is used only if you format the reference with the format style formatted cross-reference. You can change the reference to this format by right-clicking on the reference.

If you've activated refstyle, \eqref{} is still used but this command is renewed in the preambel:



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.

  {\def\RSsubtxt{section~}\newref{sub}{name = \RSsubtxt}}
  {\def\RSthmtxt{theorem~}\newref{thm}{name = \RSthmtxt}}
  {\def\RSlemtxt{lemma~}\newref{lem}{name = \RSlemtxt}}

Using prettyref package, \prettyref{} is used, but within LyX it's deprecated since version 2.0.

If you use refstyle: then labels are case-sensitive and LyX will not give an error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .