I'm trying to have an old fashioned style of (sub)section numbering as in EGA (Eléments de Géométrie Algébrique, by A.Grothendieck and J.Dieudonné). For a LaTeX written example, see here.
I did it with the use of the titlesec package, and the following problem arrises : if a section has the shape runin and an amsthm environment follows immediately, the environment creates a line break as usual, which I do not want.
Here is a minimal working example :
\documentclass{article}
\usepackage{titlesec}
\usepackage{amsthm}
\titleformat{\subsection}[runin]{\normalsize\bfseries}{(\thesubsection)}{5pt}{}
\newtheorem*{thm}{Theorem}
\begin{document}
\section{A section}
\subsection{}
\begin{thm}
Foo bar.
\end{thm}
\end{document}
In this MWE, the line break after (1.1) to begin the thm environment : I would like Theorem to be right after (1.1) on the same line.
How can I do that ?
Best Answer
The style is really old fashioned.
;-)
Define
thm
to share thesubsection
counter and modify how the theorem headers are printed.