I succeded in renaming my equation names from the german word "Gleichung" into "Formel" through the following page: https://golatex.de/formelverzeichnis-erstellen-t6688,start,8.html
This equation name is used for reference through the \autoref{} function.
Now I get unwanted horizontal spaces after and before the reference like this:
As you can see before the "F" in the reference and after the number there is a big unwanted horizontal space.
I figured out an alternative way which I am not fully happy with:
Here I am using \hyperref[Pythagoras]{Formel~}\ref{Pythagoras} to refer to the equation labeled "Pythagoras". This reference excludes the space between the equation name "Formel" and the number. But I'd like the reference to be together but without the horizontal spaces. How can I achieve this?
This is my code:
\documentclass[a4paper,13pt,twoside]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage{hyperref}
\usepackage{amsmath}
\DeclareNewTOC[
indent=0pt,
hang=2em,
type=equation
]{loe}
\AtBeginDocument{
\newcaptionname{german}\equationname{Formel}
\newcaptionname{german}\listequationname{Formelverzeichnis}
}
\newcommand{\formelref}[1]{
\begingroup
\def\equationautorefname{Formel}
\autoref{#1}
\endgroup
}
\begin{document}
\chapter{Pythagoras}
\begin{equation}
a^2 + b^2 = c^2
\label{Pythagoras}
\end{equation}
\newline
Der Satz des Pythagoras wird über die \formelref{Pythagoras} dargestellt. Möchte man nun die Länge von $c$ bestimmen, verwendet man die \formelref{cPythagoras}.
\begin{equation}
c = \sqrt{a^2 + b^2}
\label{cPythagoras}
\end{equation}
\newline
\textbf{Alternative:}
\newline
Der Satz des Pythagoras wird über die \hyperref[Pythagoras]{Formel~}\ref{Pythagoras} dargestellt. Möchte man nun die Länge von $c$ bestimmen, verwendet man die \hyperref[cPythagoras]{Formel~}\ref{cPythagoras}. % Alternative
\end{document}




}and{) in your\formelrefdefinition. Put%there to prevent them. It is complicated further because\autorefwants to look for a following space, but only sees\endgroup. – Donald Arseneau May 03 '20 at 19:26%in the first place but now I can comprehend better. – owmal May 03 '20 at 19:35germanwithbabelunless you have a good reason to adhere to the pre-1996 rules of German orthography. If you don't, do use the optionngerman. – Mico May 03 '20 at 20:34ngermanis the new orthography ("neue Rechtschreibung") andgermanis the old one. Songermanshould be right. Please correct me if I am wrong, but this Question also seems to support my hypothesis: https://tex.stackexchange.com/questions/67549/whats-the-difference-between-ngerman-and-german-in-babel – owmal May 03 '20 at 20:50