I am searching for the latex code wich produces every numbering before the theorems, propositions, lemmas, corollaries, remark and other simple math equations like the following page of a book: enter image description here

In the above example the section is $1.3$ of chapter $1$. Also note that the numberings are in bold. Thanks for help.

  • You may find an answer at en.wikibooks.org/wiki/LaTeX/Theorems . If not, then ask. In that case please prepare a small complete document that we can copy and edit to show you what to do. – Ethan Bolker May 1 '16 at 14:14
  • \renewcommand{\thetheorem}{(\thesection.\arabic{theorem})} should work if the theorem counter is called theorem – user31729 May 1 '16 at 14:16
  • 1
    using amsthm, \swapnumbers will move the numbers to the beginning of the theorem header. after that, the suggestion by @ChristianHupfer for formatting the numbers is needed to put them in parentheses. finally, fo number theorems consecutively with equations, the equation counter must be specified as the counter used for theorems. consult the amsthm manual for \swapnumber and counter information: texdoc amsthm. – barbara beeton May 1 '16 at 14:32

Define suitably the theorem styles; also some trick has to be used for the equation number in boldface.


% http://tex.stackexchange.com/a/261647/4427
% detach \eqref and \tag making
% equation numbers are boldface

\newtheoremstyle{main}% name
  {\topsep}%   Space above
  {\topsep}%   Space below
  {\itshape}%  Body font (use \slshape if you want slanted type)
  {}%          Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {:}%         Punctuation after thm head
  { }%         Space after thm head: " " = normal interword space;
  {(\thmnumber{#2}) \thmname{#1}\thmnote{ {\normalfont(#3)}}}

\newtheoremstyle{maindefinition}% name
  {\topsep}%   Space above
  {\topsep}%   Space below
  {\upshape}%  Body font
  {}%          Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {:}%         Punctuation after thm head
  { }%         Space after thm head: " " = normal interword space;
  {(\thmnumber{#2}) \thmname{#1}\thmnote{ {\normalfont(#3)}}}%



\chapter{Exactness and intertwining}




We define \emph{something}

Some text

Some statement, an equation
and the end of the statement.

\begin{theorem}[With note]


enter image description here

  • why do you write two codes, maindefinition style and theorem style? – MathStudent May 1 '16 at 15:04
  • 2
    @dulalnarugopal Because, in my opinion, the text in a definition should be upright and not italics. – egreg May 1 '16 at 15:05
  • In the OP's screenshot, the theorem body font appears to be slanted-roman rather than italic. – Mico May 1 '16 at 19:21
  • @Mico That's an easy modification. With due respect to Donald Knuth, I dislike slanted type. – egreg May 1 '16 at 19:32
  • I'm not a big fan of slanted-roman type either. I just wanted to point out this minor detail. :-) – Mico May 1 '16 at 19:49

You also can do that with thmtools+amsthm or with nthm alone. Concerning the equation numbers, it's the leqno option in the document class. Of course you should comment the part of the code you don't want to use:

%%% Code for amsthm
\usepackage{amsthm, thmtools}
within=chapter, headformat = swapnumber, headpunct={:}, spaceabove = 8pt,spacebelow = 8pt]%
\declaretheorem[name=Theorem, style=mythm, %
preheadhook={\renewcommand \theTheorem{(\thesection.\arabic{Theorem})}}]{Theorem}

%%% Code for ntheorem
\renewcommand \theTheorem{(\thesection.\arabic{Theorem})} 


\section{A first section}
  The following assertion is true: %
    a = a\end{equation}


enter image description here

Note thmtools also works with ntheorem, but isn't required here. With amsthm, it eases the definition of new theorem styles.

  • I think the Theorem counter should be reset to 0 whenever \section is encountered. However, \renewcommand \theTheorem{(\thesection.\arabic{Theorem})} doesn't achieve this. Add something like \makeatletter\@addtoreset{equation}{section} \makeatother? Or, \numberwithin{equation}{section}. – Mico May 1 '16 at 18:33
  • @Mico: It is enough to code within=section using thmtools, and \newtheorem{Theorem}{Theorem}[section] for the solution with ntheorem. But do you really think it's better to reset the theorem at sections? I didn't implement a common counter for theorems, definitions, remarks, &c. – Bernard May 1 '16 at 18:47
  • I can't be 100% sure for the case at hand. In general, though, it seems to be more common practice to restart all subordinate counters every time \section is encountered than it is to let the counters be incremented monotonically. – Mico May 1 '16 at 18:49

For the sake of completeness, here's a solution that uses the ntheorem package without other helper packages to define a custom look for the theorem headers.

enter image description here

\documentclass{report} % use a class that features chapter-level headers

%% Customize the appearance of equation numbers
\usepackage[leqno]{mathtools} % for \newtagform and \usetagform macros
\newtagform{bold}[\bfseries]{(}{)} % bold equation numbers
\renewcommand\eqref[1]{\textup{(\ref{#1})}} % but non-bold cross-references

%% Customize the appearance of theorem-like environments
   {\item[\hskip\labelsep\theorem@headerfont(##2) ##1\theorem@separator]}%
   {\item[\hskip\labelsep\theorem@headerfont(##2) ##1 [##3]\theorem@separator]}
\theoremstyle{mythm}  % switch to the newly-defined theorem style


\setcounter{chapter}{1}  % just for this example

A \emph{tame corestriction on $A$} (relative to $E/F$) is a \dots 
(i) Let $\psi_E$, $\psi_F$ be continuous additive characters \dots There exists a unique map $s\colon A\to B$ such that
\begin{equation} \label{eq:co}
\psi_A(ab)=\psi_B(s(a)b), \quad a\in A, b\in B.

  • (+1) @Mico: For the equation number, wouldn't it be simpler to use the \newtagform command, from mathtools? – Bernard May 1 '16 at 16:56
  • @Bernard - Thanks. Indeed, \newtagform is an option, say, \newtagform{bold}[\bfseries]{(}{)} followed by \usetagform{bold}. However, something still has to be done to avoid having cross-referenced equation numbers show up in bold. – Mico May 1 '16 at 17:10
  • \renewcommand\eqref[1]{(\ref{#1})} does the trick. Does it have any side effect? – Bernard May 1 '16 at 17:26
  • @Bernard - Many thanks for this suggestion. I'll edit my answer to use the variant form \renewcommand\eqref[1]{\textup{(\ref{#1})}}. – Mico May 1 '16 at 18:12

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.