# [Tex/LaTex] Change theorem counter in Springer template

codecountersnumbering

I used Springer template for my book, more concrete I used svmono.

Here is a MWE, that is the shortened version of my template file.

  \documentclass[graybox,envcountsec,sectrefs,vecarrow,envcountresetsect]{svmono}
\usepackage[utf8]{inputenc}
\usepackage[vietnam]{babel}
\usepackage{savesym}
\usepackage{mathptmx}
\savesymbol{hbar}
\usepackage{helvet}
\usepackage{courier}
\usepackage{type1cm}
\usepackage{fouriernc}
\usepackage{esvect}
\let\remark\relax
\let\endremark\relax
\renewcommand{\thesection}{\arabic{section}.}
\renewcommand\definitionname{Định nghĩa}
\spnewtheorem*{remark}{Remark}{\itshape}{\rmfamily}
\renewcommand\remarkname{Chú ý}
\renewcommand\lemmaname{Bổ đề}
\begin{document}
\chapter{The direction of a segment}
\section{Some basics definition}
\begin{definition}
That is definition
\end{definition}
\begin{theorem}
This is theorem.
\end{theorem}
\begin{remark}
This is remark
\end{remark}
\begin{lemma}
this is lemma
\end{lemma}
\end{document}


I want to numbering the chapter like Chapter I, not chapter 1 as in this template did. I also want to numbering the theorem, definition, remark, lemma section-wise, i.e Theorem 2.1(the first theorem in section 2), the next enviroment(definition, lemma, ..) will be Defintion 2.2,..i.e use the same counter in a section for every enviroment(except the proof enviroment) ?

Here's one possibility. Using the predefined structures from svmono.cls, there's no easy way to make the changes to the counters. You have two possibilities:

1. Define new structures with the desired numbering schema, as I illustrate below for definitions, lemmata and theorems:

\documentclass[graybox,sectrefs,vecarrow,envcountresetsect]{svmono}
\usepackage[utf8]{inputenc}
\usepackage[vietnam]{babel}
\usepackage{savesym}
\usepackage{mathptmx}
\savesymbol{hbar}
\usepackage{helvet}
\usepackage{courier}
\usepackage{type1cm}
\usepackage{fouriernc}
\usepackage{esvect}
\usepackage{chngcntr}
% chapter numbering in Roman numerals
\renewcommand{\thechapter}{\Roman{chapter}}
% section numbering arabic, without chapter counter
\renewcommand{\thesection}{\arabic{section}}
\renewcommand\definitionname{Định nghĩa}

\let\remark\relax
\let\endremark\relax

\spnewtheorem*{remark}{Remark}{\itshape}{\rmfamily}
\spnewtheorem{theo}{Theorem}[section]{\bfseries}{\itshape}
\spnewtheorem{lemm}[theo]{Lemma}{\bfseries}{\itshape}
\spnewtheorem{defi}[theo]{Definition}{\bfseries}{\itshape}

\renewcommand\remarkname{Chú ý}
\renewcommand\lemmaname{Bổ đề}

\usepackage{titlesec}
% Add a period after the section number
\titleformat{\section}
{\normalfont\large\bfseries}{\thesection.}{0.4em}{}

% counters within section counter
\counterwithin{definition}{section}
\counterwithin{theorem}{section}
\counterwithin{lemma}{section}

\begin{document}
\chapter{The direction of a segment}
\section{Some basics definition}
\begin{defi}
That is definition
\end{defi}
\begin{theo}
This is theorem.
\end{theo}
\begin{remark}
This is remark
\end{remark}
\begin{lemm}
this is lemma
\end{lemm}
\end{document}


1. If, for some reason, new structures are not possible (perhaps you already have written a large amount of your text), then you can first annihilate the original definitions (by \letting the corresponding macros to \relax) and then make new definitions with the desired numbering schema:

\documentclass[graybox,sectrefs,vecarrow,envcountresetsect]{svmono}
\usepackage[utf8]{inputenc}
\usepackage[vietnam]{babel}
\usepackage{savesym}
\usepackage{mathptmx}
\savesymbol{hbar}
\usepackage{helvet}
\usepackage{courier}
\usepackage{type1cm}
\usepackage{fouriernc}
\usepackage{esvect}
\usepackage{chngcntr}
% chapter numbering in Roman numerals
\renewcommand{\thechapter}{\Roman{chapter}}
% section numbering arabic, without chapter counter
\renewcommand{\thesection}{\arabic{section}}
\renewcommand\definitionname{Định nghĩa}

\let\remark\relax
\let\endremark\relax
\let\definition\relax
\let\enddefinition\relax
\let\lemma\relax
\let\lemma\relax
\let\theorem\relax
\let\endtheorem\relax

\spnewtheorem*{remark}{Remark}{\itshape}{\rmfamily}
\spnewtheorem{theorem}{Theorem}[section]{\bfseries}{\itshape}
\spnewtheorem{lemma}[theorem]{Lemma}{\bfseries}{\itshape}
\spnewtheorem{definition}[theorem]{Definition}{\bfseries}{\itshape}

\renewcommand\remarkname{Chú ý}
\renewcommand\lemmaname{Bổ đề}

\usepackage{titlesec}
% Add a period after the section number
\titleformat{\section}
{\normalfont\large\bfseries}{\thesection.}{0.4em}{}

% counters within section counter
\counterwithin{definition}{section}
\counterwithin{theorem}{section}
\counterwithin{lemma}{section}

\begin{document}
\chapter{The direction of a segment}
\section{Some basics definition}
\begin{definition}
That is definition
\end{definition}
\begin{theorem}
This is theorem.
\end{theorem}
\begin{remark}
This is remark
\end{remark}
\begin{lemma}
this is lemma
\end{lemma}
\end{document}