1

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}}{}
\addto\extrasenglish{%
 \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}

% fancy page header/footer settings
\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

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

% Numerar ecuaciones por sección
\numberwithin{equation}{section}
Werner
  • 603,163
Marco
  • 31
  • 3

1 Answers1

2

So this was the problem....

\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
\addto\extrasenglish{%
 \renewcommand*{\equationautorefname}[1]{}
 \renewcommand{\sectionautorefname}{sec.\negthinspace}
 \renewcommand{\subsectionautorefname}{sec.\negthinspace}
 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}
 \renewcommand{\figureautorefname}{Fig.\negthinspace}
 \renewcommand{\tableautorefname}{Tab.\negthinspace}
}

I had to replace it

Marco
  • 31
  • 3