在 amsthm 中设置第一个计数器

在 amsthm 中设置第一个计数器

我正在编辑我的讲义并使用 amsthm 包。由于我错过了一些讲座,我想将页面上第一个定理的计数器设置为某个数字。仅限第一个,例如 12.7。其他应遵循该编号。如何以这种方式设置计数器?它只适用于 \setcounter{section}{12} 和 \setcounter{defi}{7}。但是,我对其他定理样式有不同的编号,因为 defi 指的是定义样式和注释名称。有没有办法一次设置所有计数器以获得连续的编号?

\documentclass[12pt,ansinew]{article}
\usepackage[german]{babel} 
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}
\usepackage{blindtext}
\theoremstyle{remark}
\newtheorem{anme}{Anmerkung}[section]
% many other newtheorems here
\theoremstyle{definition}
\newtheorem{defi}{Definition}[section]
% many other newtheorems here
\begin{document}
\setcounter{section}{11}
\section{Section A}
\setcounter{defi}{6}
\defi \blindtext
\anme \blindtext
\section{Section B}
\defi \blindtext
\anme \blindtext
\end{document}

答案1

我将重述答案中所发表的评论,以便可以关闭这个问题。

% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly 
                                 % declare the paper format.

\usepackage[T1]{fontenc}         % Not always necessary, but recommended.
% End of standard header.  What follows pertains to the problem at hand.

\usepackage{amsmath} % strictly speaking, this is not needed, but...
\usepackage{amsthm}

\theoremstyle{theorem} % it's the default, but added for clarity
\newtheorem{theo}{Theorem}[section]
\newtheorem{prop}[theo]{Proposition}
\newtheorem{coro}[theo]{Corollary}
\theoremstyle{definition}
\newtheorem{defi}[theo]{Definition}



\begin{document}

\section{First section}

Some text at the beginning of the section.
This is actually the first section in my paper.
\begin{defi}
    Define something.
\end{defi}
A preliminary result:
\begin{prop}
    Blah blah blah.
\end{prop}
Another result:
\begin{prop}
    Mumble mumble.
\end{prop}
My first theorem:
\begin{theo}
    State something.
\end{theo}
With a corollary:
\begin{coro}
    It follows immediately.
\end{coro}
That's enough for the first section.

\setcounter{section}{11}

\section{Later section}

\setcounter{theo}{6} % MUST follow the "\section" command

Some text at the beginning of the section.
This should actually be the twelfth section in my paper.
\begin{defi}
    Define something else.
\end{defi}
Another preliminary result:
\begin{prop}
    Whatever you want.
\end{prop}
Another theorem:
\begin{theo}
    State something.
\end{theo}
With a corollary:
\begin{coro}
    It follows immediately.
\end{coro}
And so on.

\end{document}

相关内容