0

I am editing my lecture notes and use the amsthm package. As I missed some of the lectures, I would like to set the counter of the first theorem on the page to some number. Only the first one, e.g. 12.7. Other should follow that numbering. How could one set the counter in this way? It has just worked with \setcounter{section}{12} and \setcounter{defi}{7}. but, I have a different numbering for other theorem styles, as defi refers to the definition style and anme to remark. Any way to set all the counters at once to get a consecutive numbering?

\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}
  • It would be awesome if you could provide a complete, minimal working example that shows all the counters (environments; their names and definitions) you're working with you want to synchronize. It would help future visitors, but also the community in trying to recreate your exact setup. Answers come faster that way. – Werner Jun 27 '17 at 22:36
  • I’m afraid I don’t understand your question: what’s wrong with \setcounter{section}{11} \setcounter{defi}{6} (followed by, say, \setcounter{anme}{3})? – GuM Jun 27 '17 at 22:44
  • Using \defi and \anme is wrong to begin with. You must use \begin{defi}<text>\end{defi} and similarly for the other theorem-like structures. – egreg Jun 27 '17 at 22:47
  • also the syntax \defi is wrong you have no end to the theorem settings, always use \begin{defi}...\end{defi}` – David Carlisle Jun 27 '17 at 22:47
  • 1
    @Kirill: You should say \newtheorem{defi}[anme]{Definition}, then (or something like that). Edit: I didn’t even notice your incorrect syntax using \defi etc. instead of \begin{defi} ... \end{defi} etc.; I guess you should better have a look to the manuals! (;-) – GuM Jun 27 '17 at 23:07
1

I’ll recapitulate the comments that have been made in an answer, so thar this question can be closed.

% 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}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.