Fragen zu Zählern

Fragen zu Zählern

Ich brauche Hilfe. Ich möchte etwas wie „Beispiel 5.1.1“ (bedeutet Kapitel 5, Abschnitt 1, das erste Beispiel) anzeigen, aber beim Umschreiben des Codes habe ich ein Problem. Hier ist mein Code:

% Counter Reset
\pgfkeys{
/infoBulle/math/.cd,
counterReset/.store in=\infoBulle@mathCounterReset,
counterReset = chapter, % Use the new counter}



%------Example-------
    \NewTranslation{english}{example}{Example}
    \NewTranslation{french}{example}{Exemple}
    \NewTranslation{german}{example}{Beispiel}
    \newcounter{example}[\infoBulle@mathCounterReset] % The counter will reset at each new section
    % Redefine how the counter is printed
    % \renewcommand{\theexample}{\thesection.\arabic{example}}
    \NewDocumentEnvironment{example}{o}{%
        \stepcounter{example}%
        \begin{mdframed}[%
            style=infoBulle,
            linecolor=mathematicalColor,
            frametitle=\@titleContentMath{\GetTranslation{example}}{\theexample.\thesection}{#1}
            ]\relax%
    }{%
        \end{mdframed}%
    }

Es wird „Beispiel 5.1.5.1“ angezeigt. Wie soll ich es also ändern?

verwandte Informationen