i have a question regarding equation number formatting:
My document has chapters and sections. I have an equation within a section using the display mode. My equation number has a double dot which i want to change to a single dot. To make it more clear i will give an example how it currently looks like:
2. Chaptername
2.1 Sectionname
equation (2..1)
So i want to change it that it looks like (2.1). I suspect it has something to do with me changing my numbering format for my chapters and sections since i used specific commands to get dots into the chapter and section numbering:
\documentclass[11pt,a4paper,ngerman]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
\ofoot[\pagemark]{\pagemark}
\cfoot[]{}
\author{James Oliver Reppin}
\usepackage[onehalfspacing]{setspace}
%\usepackage{biblatex}
%\bibliography{masterarbeit_bibtex_1}
\usepackage{tocloft}
\addtocontents{toc}{\cftpagenumbersoff{chapter}}
\usepackage{amsmath}
\begin{document}
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\thechapter}{\arabic{chapter}.}
\renewcommand{\thesection}{\thechapter\arabic{section}.}
\chapter{chapter2}
\section{section2}
\begin{equation}
\|x-x_{k}\| = \min_{j=1,...,n} \|x-x_{j}\|
\end{equation}
\end{document}
How do i change it so that i only get the format {chapternumber}{.}{sectionnumber} or as in my example (2.1) ?
.
at the end of\the...
macros, it always comes back to bite you. If needed it should be added where the\the...
macro is used, not in the definition it self.\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
.\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
\ref{somelabel}
to print “2.” ifsomelabel
refers to the second chapter, do you?