# "Loose" section/paragraph numbering

EDIT Playing around with the nice amsthm solution by egreg below I realized that I really would prefer an equivalent ntheorem construction. Can anyone help out here?

There are Math books which use a "loose" section/paragraph numbering style like this:

Chapter 1 Foundations

(1.1) Definition

[...]

(1.2) Remark

[...]

(1.3)

[Some more content without an explicit title, possibly spanning several paragraphs.]

(1.4) Theorem

[...]

Proof [...]

(1.5)

[Some other background story without explicit title, possibly spanning several paragraphs.]

(1.6) Some free title like "Further insight"

[...]

I hope you get the idea. What is the recommended way to achieve such a numbering style in Latex? Is it possible within the amsthm or ntheorem Package?

The style I observed in some books is that the numbering is always given in parentheses (maybe to distinguish them from normal chapter/sectioning numbering). Number and (if given) title are in bold font, but same font size as normal text.

• Is there an associated ToC? If so, what do you put for the empty numbered paragraphs? Also, did you mean to place brackets around the numbering?
– Werner
Commented Oct 28, 2019 at 15:10
• @Werner No ToC is needed, but \ref{...} should work. I've added some info on parentheses and font to my question. Commented Oct 28, 2019 at 15:39

Not so difficult with amsthm: it just takes to define some suitable theorem styles. See https://tex.stackexchange.com/a/17555/4427 and https://tex.stackexchange.com/a/353540/4427

\documentclass{book}
\usepackage{amsthm}

\makeatletter
\newtheoremstyle{azimutplain}
{\topsep}   % ABOVESPACE
{\topsep}   % BELOWSPACE
{\itshape}  % BODYFONT
{0pt}       % INDENT (empty value is the same as 0pt)
{5pt plus 1pt minus 1pt} % HEADSPACE
\newtheoremstyle{azimutdefinition}
{\topsep}   % ABOVESPACE
{\topsep}   % BELOWSPACE
{\normalfont}  % BODYFONT
{0pt}       % INDENT (empty value is the same as 0pt)
{5pt plus 1pt minus 1pt} % HEADSPACE
\newtheoremstyle{azimutloose}
{\topsep}   % ABOVESPACE
{\topsep}   % BELOWSPACE
{\normalfont}  % BODYFONT
{0pt}       % INDENT (empty value is the same as 0pt)
{5pt plus 1pt minus 1pt} % HEADSPACE
\makeatother

\theoremstyle{azimutplain}
\newtheorem{theorem}{Theorem}[chapter]

\theoremstyle{azimutdefinition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{remark}[theorem]{Remark}

\theoremstyle{azimutloose}
\newtheorem{looseinner}[theorem]{}
\makeatletter
\newenvironment{loose}[1][]
{\@ifempty{#1}{\looseinner}{\looseinner[#1]}}
{\endlooseinner}
\makeatother

\begin{document}

\chapter{Foundations}

\begin{definition}
Some text
\end{definition}

\begin{remark}
Some text
\end{remark}

\begin{loose}
Some more content without an explicit title, possibly spanning several paragraphs.

Some more content without an explicit title, possibly spanning several paragraphs.
\end{loose}

\begin{theorem}
Some text
\end{theorem}
\begin{proof}
Some text
\begin{loose}
Some other background story without explicit title, possibly spanning several paragraphs.

Some other background story without explicit title, possibly spanning several paragraphs.\qedhere
\end{loose}
\end{proof}

\begin{loose}[Further insight]
Some text
\end{loose}

\end{document}


• Thank you. This looks nice indeed. As I'm currently an ntheorem-user, is there a solution for ntheorem, too? Commented Oct 28, 2019 at 21:51
• @azimut Sorry, I never consider ntheorem. Commented Oct 28, 2019 at 21:52

egreg's solution can easily be modified to use ntheorem instead of amsthm:

\documentclass{book}

\usepackage{ntheorem}

\makeatletter
\newtheoremstyle{azimut}%
(##2)\ ##1\theorem@separator}\hbox{\strut}}}]}%
(##2)\ ##1:\ ##3\theorem@separator}\hbox{\strut}}}]}
\newtheoremstyle{azimutnoname}%
(##2)\theorem@separator}\hbox{\strut}}}]}%
(##2)\ ##3\theorem@separator}\hbox{\strut}}}]}
\newtheoremstyle{azimutnonumber}%
##1\theorem@separator}\hbox{\strut}}}]}%
##1:\ ##3\theorem@separator}\hbox{\strut}}}]}
\makeatother

\theoremstyle{azimut}
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{definition}[theorem]{Definition}
\newtheorem{remark}[theorem]{Remark}

\theoremstyle{azimutnoname}
\newtheorem{looseinner}[theorem]{}
\makeatletter
\newenvironment{loose}[1][]
{\ifx\relax#1\relax\looseinner\else\looseinner[#1]\fi}
{\endlooseinner}
\makeatother

\theoremstyle{azimutnonumber}
\newtheorem{proof}{Proof}

\begin{document}

\chapter{Foundations}

\begin{definition}
Some text
\end{definition}

\begin{remark}
Some text
\end{remark}

\begin{loose}
Some more content without an explicit title, possibly spanning several paragraphs.

Some more content without an explicit title, possibly spanning several paragraphs.
\end{loose}

\begin{theorem}
Some text
\end{theorem}
\begin{proof}
Some text
\begin{loose}
Some other background story without explicit title, possibly spanning several paragraphs.

Some other background story without explicit title, possibly spanning several paragraphs.
\end{loose}
\end{proof}

\begin{loose}[Further insight]
Some text
\end{loose}

\end{document}


The style definitions above are just an adapted version of ntheorem's default style break. If you want to omit the line break after headings, use adapted versions of the plain style instead.

\makeatletter
\newtheoremstyle{azimut}%