Skip to content

\label after an amsthm theorem produces extra horizontal space with pdftex and xetex #835

Open
@mbertucci47

Description

@mbertucci47

With pdflatex or xelatex but not lualatex, a \label after an amsthm theorem produces extra horizontal space.

\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase=latest
  }
\documentclass{article}
\usepackage{kantlipsum}
\usepackage{amsthm}

\newtheorem{lemma}{Lemma}

\begin{document}

\begin{lemma}
\kant[1][1-2]
\end{lemma}
\begin{lemma}\label{foo}
\kant[1][1-2]
\end{lemma}

\end{document}

extra space

This is fixed by putting a % after \label{foo} but this shouldn't be necessary.

The problem doesn't arise with the kernel \newtheorem.

Metadata

Metadata

Labels

area: theoremsand similar structuresbugSomething isn't working in code we maintain (directly)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions