# Get rid of the word “equation” in cross references

I'm using the thesis template that comes with LyX and whenever I make a cross reference for an equation it comes along with the word "Equation XX.YY" and I just want the number "XX.YY".

The document class is book(KOMA-Script)

options = intoc,bibliography=totoc,index=totoc,BCOR10mm,captions=tableheading,titlepage,fleqn


and the preamble

% increases link area for cross-references and autoname them
% if you change the document language to e.g. French
% you must change "extrasenglish" to "extrasfrench"
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
\renewcommand*{\equationautorefname}[1]{}
\renewcommand{\sectionautorefname}{sec.\negthinspace}
\renewcommand{\subsectionautorefname}{sec.\negthinspace}
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}
\renewcommand{\figureautorefname}{Fig.\negthinspace}
\renewcommand{\tableautorefname}{Tab.\negthinspace}
}

% in case somebody want to have the label "Equation"
%\renewcommand{\eqref}[1]{Equation~(\negthinspace\autoref{#1})}

% that links to image floats jumps to the beginning
% of the float and not to its caption
\usepackage[figure]{hypcap}

% the pages of the TOC is numbered roman
% and a pdf-bookmark for the TOC is added
\let\myTOC\tableofcontents
\renewcommand\tableofcontents{%
\frontmatter
\pdfbookmark[1]{\contentsname}{}
\myTOC
\mainmatter }

% makes caption labels bold
\setkomafont{captionlabel}{\bfseries}
\setcapindent{1em}

% enables calculations
\usepackage{calc}

\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}

% increases the bottom float placement fraction
\renewcommand{\bottomfraction}{0.5}

% avoids that floats are placed above its sections
\let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}

% para organizar la nomenclatura
\usepackage{ifthen}
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{B}}{\item[\textbf{Símbolos latinos}]}{%
\ifthenelse{\equal{#1}{C}}{\item[\textbf{Símbolos griegos}]}{%
\ifthenelse{\equal{#1}{A}}{\item[\textbf{Abreviaturas}]}{%
\ifthenelse{\equal{#1}{D}}{\item[\textbf{Sub y superíndices}]}

{}
}% cierra sub y superíndices
}% cierra abreviaturas
}% cierra griegos
}% cierra latinos

\newcommand{\nomunit}[1]{%
\renewcommand{\nomentryend}{\dotfill#1}}

% Numerar ecuaciones por sección
\numberwithin{equation}{section}

-
Welcome to TeX.sx! –  texenthusiast Mar 15 '13 at 1:02
I do not know, how this must be handled in Lyx, but from the LaTeX/KOMA-Script point of view see Kurt’s answer to How to change the name of document elements like “Figure”, “Contents”, “Bibliography” etc.? –  Speravir Mar 15 '13 at 2:05
With the default settings of the thesis template included in LyX I get just the number. Have you made any other changes? –  Torbjørn T. Mar 15 '13 at 20:08

So this was the problem....

\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}