This is a search tool for the LaTeX bugs database.

This search tool allows you to search the LaTeX3 project team's database of all bug reports for LaTeX. If you discover what you believe to be a bug with LaTeX, you can search this database to find out if it has already been reported.

Note that you can only search for bugs which were reported after December 1994, when we made the database public.


You can search for all the bug reports about:
which are the responsibility of:
with the status of:
containing the keyword:
or having the reference
(of the form category/number):
by pressing here:  .
PR number: latex/1553
Synopsis: Extra space after theorem environment with a label
Confidential: no
Responsible: The LaTeX Programming Team
State: closed
Arrival date: Mon Apr 10 00:31:01 1995


Loren Schwiebert
Sun, 09 Apr 1995 18:29:05 -0400

Description of bug:
The problem occurs when using the theorem environment and using \label
the theorem environment.  When the text within the theorem environment
is exactly long enough that the last line either crosses the right margin
of the page or is very close to the right margin (I am unsure exactly how
close it needs to be.), an extra line is inserted after the theorem
environment.



Sample file which indicates the problem:
========================================
\documentclass{article}

\newtheorem{theorem}{Theorem}

\begin{document}

\section{Introduction}

In this paper, a LaTeX error that I have encountered is presented.  I
don't know if the bug is in LaTeX 2e or article.cls.  However, I also
encountered this problem with LaTeX 2.09.  The problem is the extra
line inserted after the theorem environment when the statement of the
theorem ends near (or over) the right margin of the page.  The problem
only occurs if there is a label in the theorem environment.  In my
experience, the problem does not always occur even when those
conditions are met.  The example below illustrates the problem.

\begin{theorem}
This statement of a theorem is a little bit too long.  N-dimensionial.
\label{whatever}
\end{theorem}

Proof.  A formal proof isn't required in this case, since the proof is
by observation.

\begin{theorem}
This statement of a theorem is a little bit too long.  N-dimensionial.
\end{theorem}

Proof.  This example works fine, because there isn't any label in the
theorem environment.

\end{document}


The log file from running LaTeX on the sample:
==============================================
This is TeX, Version 3.1415 (C version 6.1) (format=latex 94.12.13)  9 APR 1995 18:24
**error1.tex
(error1.tex
LaTeX2e <1994/06/01> patch level 4
(/usr/local/tex/lib/texmf/tex/latex2e/base/article.cls
Document Class: article 1994/06/02 v1.2s Standard LaTeX document class
(/usr/local/tex/lib/texmf/tex/latex2e/base/size10.clo
File: size10.clo 1994/06/02 v1.2s Standard LaTeX file (size option)
)
\c@part=\count82
\c@section=\count83
\c@subsection=\count84
\c@subsubsection=\count85
\c@paragraph=\count86
\c@subparagraph=\count87
\c@figure=\count88
\c@table=\count89
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
\c@theorem=\count90
 (error1.aux)
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Info: Redefining \" on input line 5.
LaTeX Info: Redefining \" on input line 5.
 [1

]
(error1.aux) ) 
Here is how much of TeX's memory you used:
 223 strings out of 11043
 2145 string characters out of 74592
 45506 words of memory out of 262141
 3070 multiletter control sequences out of 9500
 4899 words of font info for 18 fonts, out of 100000 for 255
 14 hyphenation exceptions out of 607
 23i,4n,18p,126b,108s stack positions out of 300i,40n,60p,3000b,4000s

Output written on error1.dvi (1 page, 1576 bytes).

============================================================

End of LaTeX2e bug report.
============================================================
>Fix:
LaTeX2e bug report.
Generated by latexbug.tex on 1995/04/09

Reports may be submitted by email to latex-bugs@uni-mainz.de
Please use the subject line:
Subject: Extra space after theorem environment with a label
============================================================


Chris Rowley
Mon, 10 Apr 1995 13:53:07 +0200

Loren

Thanks for sending in your report.

You pointed out that the following input can produce bad spacing:

> \begin{theorem}
> This statement of a theorem is a little bit too long.  N-dimensionial.
> \label{whatever}
> \end{theorem}

This is a known problem: although \label is designed to, if possible,
not change the correct spacing, using it at the end of the environment
is dangerous because here TeX will treat it as an "empty word" in the
paragraph and this, as you noted, can produce an extra, apparently
blank, line.

It is curiuous but true that the safest place for a \label is in the
middle of the paragraph.  One way of doing this is to "attach it to
the paragraph" by putting a % at the emd of the previous line:

\begin{theorem}
This statement of a theorem is a little bit too long.  N-dimensionial.%
\label{whatever}
\end{theorem}


Chris Rowley      ---        On behalf of The LaTeX3 Project Team


Address information
Copyright 1994 — 2011 the LaTeX3 project and Alan Jeffrey.


The LaTeX home page