"Loose" section/paragraph numbering
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)
{\bfseries} % HEADFONT
{} % HEADPUNCT
{5pt plus 1pt minus 1pt} % HEADSPACE
{(\thmnumber{#2}) \thmname{#1}\@ifnotempty{#3}{ (\thmnote{#3})}.} % CUSTOM-HEAD-SPEC
\newtheoremstyle{azimutdefinition}
{\topsep} % ABOVESPACE
{\topsep} % BELOWSPACE
{\normalfont} % BODYFONT
{0pt} % INDENT (empty value is the same as 0pt)
{\bfseries} % HEADFONT
{} % HEADPUNCT
{5pt plus 1pt minus 1pt} % HEADSPACE
{(\thmnumber{#2}) \thmname{#1}\@ifnotempty{#3}{ (\thmnote{#3})}.} % CUSTOM-HEAD-SPEC
\newtheoremstyle{azimutloose}
{\topsep} % ABOVESPACE
{\topsep} % BELOWSPACE
{\normalfont} % BODYFONT
{0pt} % INDENT (empty value is the same as 0pt)
{\bfseries} % HEADFONT
{} % HEADPUNCT
{5pt plus 1pt minus 1pt} % HEADSPACE
{(\thmnumber{#2})\@ifnotempty{#3}{ \thmnote{#3}.}} % CUSTOM-HEAD-SPEC
\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}
egreg's solution can easily be modified to use ntheorem
instead of amsthm
:
\documentclass{book}
\usepackage{ntheorem}
\makeatletter
\newtheoremstyle{azimut}%
{\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
(##2)\ ##1\theorem@separator}\hbox{\strut}}}]}%
{\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
(##2)\ ##1:\ ##3\theorem@separator}\hbox{\strut}}}]}
\newtheoremstyle{azimutnoname}%
{\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
(##2)\theorem@separator}\hbox{\strut}}}]}%
{\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
(##2)\ ##3\theorem@separator}\hbox{\strut}}}]}
\newtheoremstyle{azimutnonumber}%
{\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
##1\theorem@separator}\hbox{\strut}}}]}%
{\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
##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}%
{\item[\hskip\labelsep \theorem@headerfont (##2)\ ##1\theorem@separator]}%
{\item[\hskip\labelsep \theorem@headerfont (##2)\ ##1:\ ##3\theorem@separator]}
\newtheoremstyle{azimutnoname}%
{\item[\hskip\labelsep \theorem@headerfont (##2)\theorem@separator]}%
{\item[\hskip\labelsep \theorem@headerfont (##2)\ ##3\theorem@separator]}
\newtheoremstyle{azimutnonumber}%
{\item[\hskip\labelsep \theorem@headerfont ##1\theorem@separator]}%
{\item[\hskip\labelsep \theorem@headerfont ##1:\ ##3\theorem@separator]}
\makeatother