3

Package thmbox seems to add an extra space at the beginning of the body of the labeled theorems. See example below. Package thmtools with the thmbox option does the same. Latex original, package amsthm and package ntheorem do not add the extra space. I can solve the problem that occurs with thmbox by placing a % just after the label. However, I do not want to do that because I should edit each already written theorem. Problem is solved by including \ignorespaces in option bodystyle of thmbox. However, then the body is indented. If bodystyle is defined using \noindent\ignorespaces then the body is not indented, but the extra space shows up again.

\documentclass{report}

% ----- no extra space

%\newtheorem{theorem}{Theorem}

%\usepackage{amsthm}
%\newtheorem{theorem}{Theorem}

%\usepackage{ntheorem}
%\newtheorem{theorem}{Theorem}

% ----- extra space

\usepackage{thmbox}
\newtheorem{theorem}{Theorem}

%\usepackage{thmtools}
%\declaretheorem[thmbox=M]{theorem}

\begin{document}

\begin{theorem}\label{L1}
With label.
\end{theorem}
\begin{theorem}
Without label.
\end{theorem}
\begin{theorem}     \label{L2}%
     With label, but solved, even having space characters here and there.
\end{theorem}

\end{document}
5
  • So ... what exactly is your question? Please advise.
    – Mico
    Jan 10, 2012 at 20:03
  • The question is how do I solve the problem with package thmbox or package thmtools with option thmbox, without editing each already written labeled theorem.
    – ASdeL
    Jan 10, 2012 at 20:11
  • It is not obvious, but there is an extra space added at the beginning of the line when there is a \label{} unless one uses \label{}% (trailing % added). Interestingly, even the thmbox documentation shows the use as \label{}%. Jan 11, 2012 at 3:13
  • There also seems to be a different spacing problem when amsthm is used, but not with ntheorem. With amsthm, there appears to be an additional space before the 3 in Theorem 3. Jan 11, 2012 at 3:18
  • You are right. This extra space seems to be added not because of the label or space characters, but because of the long text within the body. That is, in order to obtain evenly spaced "words". With a shorter body no extra space appears before the 3.
    – ASdeL
    Jan 11, 2012 at 13:51

1 Answer 1

2

Put the \label at the end:

\begin{theorem}
With label.\label{L1}
\end{theorem}

It's a bug in thmbox way of doing its work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .