Skip to content

theoremstyle "plain": differences amsmath/legacy/new block code #1162

@u-fischer

Description

@u-fischer

Theorems in "plain" style differ between standard LaTeX and amsmath: amsmath adds a period and amsmath ignores \partopsep:

\documentclass{report}
%\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}

\begin{document}
\partopsep=20pt
xxxxxxxxxxx
\begin{theorem}\label{theorem1}some text
\end{theorem}
\begin{lemma}\label{lemma1}some text
\end{lemma}
\end{document}

standard latex:

Image

with amsthm:

Image

with block code

The block code currently produces by default a mix of these settings: a period is added but \partopsep is not ignored

Image

To reproduce the legacy settings, the block code should use an empty punct by default and reset it and begin-extra-vspace if amsthm is loaded:

\DocumentMetadata{}
\documentclass{report}
\IfDocumentMetadataT{
  \EditInstance{thmstyle}{plain}{punct=}
  \AddToHook{package/amsthm/after}{%
    \EditInstance{thmstyle}{plain}{punct=.}
    \EditInstance{block}{thm-plain-1}{begin-extra-vspace=0pt}
    \EditInstance{block}{thm-plain-2}{begin-extra-vspace=0pt}}}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}

\begin{document}
\partopsep=20pt
xxxxxxxxxxx
\begin{theorem}\label{theorem1}some text
\end{theorem}
\begin{lemma}\label{lemma1}some text
\end{lemma}
\end{document}

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions