1

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.
\documentclass[english]{amsart}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
 \geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=2cm,headsep=2cm,footskip=2cm}
\usepackage{amsthm}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\numberwithin{equation}{section}
\numberwithin{figure}{section}

\makeatother

\usepackage{babel}
\begin{document}
\label{k}

\begin{equation}
hbbhh\label{eq:eee}
\end{equation}


\ref{eq:eee}
\end{document}
1
  • 1
    Try selecting a different style for the cross reference, by right-clicking on it. May 27, 2014 at 9:01

1 Answer 1

3

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:

\usepackage{refstyle}

\makeatletter

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

\AtBeginDocument{\providecommand\eqref[1]{\ref{eq:#1}}}
\RS@ifundefined{subref}
  {\def\RSsubtxt{section~}\newref{sub}{name = \RSsubtxt}}
  {}
\RS@ifundefined{thmref}
  {\def\RSthmtxt{theorem~}\newref{thm}{name = \RSthmtxt}}
  {}
\RS@ifundefined{lemref}
  {\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 .