LyXKOMA-Script | Cross References to Equations add Prefix

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
valos
Posts: 3
Joined: Fri Dec 21, 2012 7:20 pm

KOMA-Script | Cross References to Equations add Prefix

Post by valos »

Hi,

I've created a dissertation thesis document based on the LyX thesis template. The document class is scrbook from KOMA-Script.

I have some numbered equations something like this.

Code: Select all

                          a + b = c                                 (1.1)
Whenever I reference that equation it also adds automatically a prefix "Equation":
As described in (Equation 1.1) we can see that ...
How can I get rid of the "Equation" prefix? I want to display something like this:
As described in (1.1) we can see that ...

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

KOMA-Script | Cross References to Equations add Prefix

Post by cgnieder »

Hi valos,

Welcome to the LaTeX community!

We'll need to see a Infominimal working example. This is not standard behaviour:

Code: Select all

\documentclass{scrbook}

\begin{document}

\begin{equation}
 a = b + c \label{eq:one}
\end{equation}

See~\ref{eq:one}

\end{document}
Regards
site moderator & package author
valos
Posts: 3
Joined: Fri Dec 21, 2012 7:20 pm

Re: Book (koma script) - cross reference equation problem

Post by valos »

Hello,

Please find the attached minimal example.
The Tex files have been exported from Lyx.

Thank you.
Attachments
minimal.zip
(5.32 KiB) Downloaded 452 times
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

KOMA-Script | Cross References to Equations add Prefix

Post by cgnieder »

Thanks for providing an example. (You could also have attached the .lyx file). I must confess I hadn't noticed that you posted in the LyX forum, otherwise I would have suggested so in my earlier answer.

Anyway, the code responsible for the unwanted behaviour is the following:

Code: Select all

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
% increases link area for cross-references and autoname them
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
The comments suggest that the code has been added manually. Is it part of your LaTeX preamble?

Regards
site moderator & package author
valos
Posts: 3
Joined: Fri Dec 21, 2012 7:20 pm

Re: Book (koma script) - cross reference equation problem

Post by valos »

Yes, that was it. I commented out that line from document's Latex Preamble and now it is working fine.

Many thanks for your help!
Post Reply