Ich möchte, dass meine Theoreme, Lemmata usw. mit eingeschlossenen Abschnitten folgendermaßen gezählt werden:
Theorem 2.1
Lemma 2.2
Proposition 2.3
Corollary 3.4
usw
Hier sind meine Importe für mein Dokument, das die svjour3
Klasse verwendet.
\documentclass[smallextended]{svjour3} % onecolumn (second format)
%\documentclass[twocolumn]{svjour3} % twocolumn
%
\smartqed % flush right qed marks, e.g. at end of proof
%
\usepackage{graphicx}
\usepackage[misc]{ifsym}
%
% \usepackage{mathptmx} % use Times fonts if available on your TeX system
%
% insert here the call for the packages your document requires
%\usepackage{latexsym}
% etc.
\usepackage{mathpazo}
\usepackage{amsmath}
%\usepackage{amsfonts}
\usepackage{array,color}
\usepackage{abstract}
\usepackage[bottom]{footmisc}
%\usepackage{lipsum}
\usepackage[left=1.15in, right=1.15in, bottom=0.60in, includefoot]{geometry}
%\usepackage[all]{xy}
%\usepackage{graphicx}
\usepackage{indentfirst}
%\usepackage{csquotes}
\usepackage{bm}
%\usepackage{amsthm}
\usepackage{mathrsfs}
\usepackage{makeidx}
%\usepackage{ifpdf}
\usepackage{url}
%\usepackage{graphicx}
\usepackage{dsfont}
\usepackage{latexsym}
%\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{color}
\usepackage{mathtools}
%%\usepackage{fixltx2e}
\usepackage{hyperref}
%\usepackage{hyperref}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
%\usepackage{MnSymbol}
%\numberwithin{equation}{subsection}
%
% please place your own definitions here and don't use \def but
% \newcommand{}{}
%
\newcommand{\grs}[1]{\raisebox{-.16cm}{\includegraphics[height=.5cm]{TP#1.pdf}}}
\newcommand{\gra}[1]{\raisebox{-.4cm}{\includegraphics[height=1cm]{TP#1.pdf}}}
\newcommand{\graa}[1]{\raisebox{-.6cm}{\includegraphics[height=1.5cm]{TP#1.pdf}}}
\newcommand{\grb}[1]{\raisebox{-.8cm}{\includegraphics[height=2cm]{TP#1.pdf}}}
\newcommand{\grc}[1]{\raisebox{-1.3cm}{\includegraphics[height=3cm]{TP#1.pdf}}}
\newcommand{\grd}[1]{\raisebox{-1.8cm}{\includegraphics[height=4cm]{TP#1.pdf}}}
\newcommand{\gre}[1]{\raisebox{-2.3cm}{\includegraphics[height=5cm]{TP#1.pdf}}}
\newcommand{\Pl}{\mathscr{P}}
\newcommand{\TL}{\mathcal{TL}}
\newcommand{\G}{\Gamma}
\newcommand{\F}{\mathcal{F}(\mathcal M)}
\newcommand{\g}{\gamma}
\newcommand{\sg}{\sigma}
\newcommand{\mc}{\mathbb{C}}
\newcommand{\ca}{\curvearrowright}
\newcommand{\eh}{\mathcal{H}}
\newcommand{\emm}{\mathcal{M}}
\newcommand{\emmt}{\tilde{\mathcal{M}}}
\newcommand{\enn}{\mathcal N}
\newcommand{\euu}{\mathcal{U}}
\newcommand{\la}{\lambda}
\newcommand{\ra}{\rangle}
\newcommand{\El}{\mathcal{L}}
\newcommand{\Sg}{\Sigma}
\newcommand{\rar}{\rightarrow}
\newcommand{\La}{\Lambda}
\newcommand{\lam}{\lambda}
\newcommand{\bten}{\bar\otimes}
\newcommand{\De}{\Delta}
\newcommand{\tp}{\bar{\otimes}}
\newcommand{\En}{\mathcal{N}}
\newcommand{\Aa}{\mathcal{A}}
\newcommand{\bee}{\mathcal{B}}
\newcommand{\cF}{\mathcal{F}}
\newcommand{\cA}{\mathcal A}
\newcommand{\cB}{\mathcal B}
\newcommand{\cC}{\mathcal C}
\newcommand{\cD}{\mathcal D}
\newcommand{\cE}{\mathcal E}
\newcommand{\cF}{\mathcal F}
\newcommand{\cG}{\mathcal G}
\newcommand{\cH}{\mathcal H}
\newcommand{\ci}{\mathcal I}
\newcommand{\cJ}{\mathcal J}
\newcommand{\cK}{\mathcal K}
\newcommand{\cL}{\mathcal L}
\newcommand{\cM}{\mathcal M}
\newcommand{\cN}{\mathcal N}
\newcommand{\cO}{\mathcal O}
\newcommand{\cP}{\mathcal P}
\newcommand{\cQ}{\mathcal Q}
\newcommand{\cR}{\mathcal R}
\newcommand{\cS}{\mathcal S}
\newcommand{\cT}{\mathcal T}
\newcommand{\cU}{\mathcal U}
\newcommand{\cV}{\mathcal V}
\newcommand{\cW}{\mathcal W}
\newcommand{\cX}{\mathcal X}
\newcommand{\cY}{\mathcal Y}
\newcommand{\cZ}{\mathcal Z}
\newcommand{\rip}{\mathcal{R}ips_\mathcal T}
\newcommand{\mg}{\mathcal G}
\newcommand{\mtil}{\tilde {\mathcal M}}
\newcommand{\mr}{\mathcal{R}}
\newcommand{\mrt}{\tilde{\mathcal{R}}}
\newcommand{\pee}{\mathcal{P}}
\newcommand{\Ad}{\operatorname{Ad}}
\newcommand{\id}{\operatorname{id}}
\newcommand{\Diag}{\operatorname{Diag}}
\newcommand{\Sp}{\operatorname{Sp}}
\newcommand{\GL}{\operatorname{GL}}
\newcommand{\T}{\operatorname{(T)}}
% Insert the name of "your journal" with
% \journalname{myjournal}
%
%\spnewtheorem{main}{Theorem}[section]{\bfseries}{\itshape}
%\renewcommand{\themain}{\arabic{section}.\arabic{main}}
%\spnewtheorem{thm}{Theorem}[section]{\bfseries}{\itshape}
%\renewcommand{\thethm}{\arabic{section}.\arabic{thm}}
\spnewtheorem{theorem}{Theorem}{\bfseries}{\itshape}
\renewcommand{\thetheorem}{\arabic{section}.\arabic{theorem}}
\spnewtheorem{corollary}{Corollary}{\bfseries}{\itshape}
\renewcommand{\thecorollary}{\arabic{section}.\arabic{corollary}}
\spnewtheorem{lemma}{Lemma}{\bfseries}{\itshape}
\renewcommand{\thelemma}{\arabic{section}.\arabic{lemma}}
\spnewtheorem{proposition}{Proposition}{\bfseries}{\itshape}
\renewcommand{\theproposition}{\arabic{section}.\arabic{proposition}}
ich habe versucht,
\spnewtheorem{proposition}[theorem]{Proposition}{\bfseries}{\itshape}
aber das behebt das Problem nicht. Irgendwelche Ideen?
Ich habe auch versucht, einen neuen Zähler zu erstellen, aber das hat das Problem auch nicht behoben
Antwort1
Sie können Ihr Formatierungsziel erreichen, indem Sie der Präambel die folgenden Anweisungen hinzufügen:
\let\corollary\relax
\let\lemma\relax
\let\proposition\relax
\spnewtheorem{corollary}[theorem]{Corollary}{\bfseries}{\itshape}
\spnewtheorem{lemma}[theorem]{Lemma}{\bfseries}{\itshape}
\spnewtheorem{proposition}[theorem]{Proposition}{\bfseries}{\itshape}
\counterwithin{theorem}{section}
Die ersten drei Anweisungen dienen dazu, die Umgebungen , und aufzuheben corollary
. lemma
Die proposition
nächsten drei Anweisungen erstellen diese Umgebungen neu, diesmal mit ihren Zählern, die an theorem
, den Zähler der theorem
Umgebung, gebunden sind. Die letzte Anweisung ordnet den theorem
Zähler dem section
Zähler unter. Da die Zähler der anderen drei theoremähnlichen Umgebungen an den theorem
Zähler gebunden sind, werden auch sie dem section
Zähler untergeordnet.
Hier ist ein MWE (Minimum Working Example):
\documentclass[smallextended]{svjour3}
\usepackage[hmargin=1.15in, bottom=0.6in, includefoot]{geometry}
\smartqed % flush-right qed marks, e.g. at end of proof
\usepackage{graphicx}
\usepackage[misc]{ifsym}
\usepackage[utf8]{inputenc}
\usepackage{mathtools,bm,amssymb,dsfont,mathrsfs}
\usepackage{mathpazo}
\usepackage{array,xcolor}
\usepackage[bottom]{footmisc}
\usepackage{abstract,indentfirst,makeidx}
\usepackage{tikz}
\usepackage{xurl}
\usepackage{hyperref}
\let\corollary\relax
\let\lemma\relax
\let\proposition\relax
\spnewtheorem{corollary}[theorem]{Corollary}{\bfseries}{\itshape}
\spnewtheorem{lemma}[theorem]{Lemma}{\bfseries}{\itshape}
\spnewtheorem{proposition}[theorem]{Proposition}{\bfseries}{\itshape}
\counterwithin{theorem}{section}
\begin{document}
\setcounter{section}{2} % just for this example
\begin{theorem} bla bla \end{theorem}
\begin{corollary} bla bla \end{corollary}
\begin{lemma} bla bla \end{lemma}
\begin{proposition} bla bla \end{proposition}
\end{document}