maybe I am already looking at it, but I can't see it, so I would be glad if someone can give me a short hint.
\documentclass[12pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\renewcommand{\theequation}{\textit{Eq. \thesection.\arabic{equation}}}
\begin{document}
\section{Vogelpohlsche Volumenformel}
\begin{equation}
n = \frac{10^{-8} F}{6 C \cdot \eta \cdot V}
\label{eq:Example}
\end{equation}
A reference to the equation \ref{eq:Example} is helpful.
\end{document}
As with this MWE, I redefined the numeration of the equation that it appears on the right as "Eq. 1.1", which works fine. But when I am referencing the equation inside text, I normally write the whole word "equation" and add the reference. Here it gives me also the abbrevation for the reference ("A reference to the equation Eq. 1.1 is helpful.").
What is the way to have the "Eq." in the numeration but not in the reference?
I want to avoid additional packages or so and I also looked up former questions like this one without seeing the solution
How to style equation label and reference differently?
Thanks for your input and have a nive day to you all!
Best Answer
What you have done so far is to change the definition of
\theequation
so that it containsEq.
. This means that any reference created using\label
and\ref
will also containEq.
, which you don't want. As described in Changing the appearance of equation numbers with amsmath, you need to modify the\tagform@
macro. Since this command contains an at character@
, which is a special character for (La)TeX so you need to do this inside\makeatletter....\makeatother
. The following redefinition of\tagform@
does what you want:Notice that I have used
Eq.~#1
rather thanEq. #1
. This just addsEq.
to the original definition of\tagform@
fromamsmath.sty
, which isAs the
Eq
. is now added by\tagform@
your redefinition of\theequation
is no longer needed. You still want the equations numbered inside sections, however, so this has to be taken care of. Rather than redefining\theequation
it is better to use\numberwithin{equation}{section}
because this will cause the equation counter to be reset whenever the section counter is incremented.With these changes your MWE becomes:
and the output is: