Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How is it possible to remove the indention at the beginning of the theorem text?

\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools}
\declaretheorem[thmbox=L]{boxtheorem L}

\begin{document}
\begin{boxtheorem L}[Euclid]
For every prime $p$, there is a prime $p'>p$.
In particular, there are infinitely many primes.
\end{boxtheorem L}
\end{document}
share|improve this question

2 Answers 2

up vote 8 down vote accepted

This is slightly curious behaviour from the package that you don't notice in many situations. The space is caused by the line break after [Euclid]. Placing a percent sign directly after [Euclid] hides the newline and removes that space.

Sample output

\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools}
\declaretheorem[thmbox=L]{boxtheorem L}

\begin{document}
\begin{boxtheorem L}[Euclid]%
For every prime $p$, there is a prime $p'>p$.
In particular, there are infinitely many primes.
\end{boxtheorem L}
\end{document}

The documentation of thmtools is careful to use percent signs at other places in the documentation, but not in the examples related to the thmbox option.

share|improve this answer
1  
In both the question and the answer, $p’>p$ should be $p'>p$ so the prime shows up. –  Ethan Bolker Mar 22 '13 at 19:58
    
@Swann: Thanks, sometimes the answer is so simple... ;) –  user4811 Mar 22 '13 at 20:19
    
@EthanBolker Well spotted. I have now corrected this. –  Andrew Swann Mar 23 '13 at 16:57

This is due to bad interactions between the packages thmtools and thmbox, I believe. A way to solve this particular situation seems to be patching an internal command of thmtools.

\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools}

\usepackage{etoolbox}
\makeatletter
\patchcmd\thmt@parsetheoremargs
  {\let\@parsecmd\@empty}
  {\let\@parsecmd\ignorespaces}
  {}{}
\makeatother

\declaretheorem[thmbox=L]{boxtheorem L}

\begin{document}
\begin{boxtheorem L}[Euclid]
For every prime $p$, there is a prime $p'>p$.
In particular, there are infinitely many primes.
\end{boxtheorem L}
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.