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.

My problem involes a qed symbol which appears too early. My observations are that it happens after a displaymath inside an item of an unboxed inline list. All of this seems to be necessary to produce the error.

The packages involved are ntheorem, thmtools and enumitem.

If I compile this code with lualatex using TeXLive 2011.

\documentclass{scrreprt}

\PassOptionsToPackage{thmmarks}{ntheorem}
\PassOptionsToPackage{inline}{enumitem}

\usepackage{amsmath,MnSymbol}
\usepackage{ntheorem,thmtools}
\usepackage{
    enumitem,
}

\declaretheoremstyle[qed={\quad\blacksquare}]{plain}
\declaretheorem[style=plain,numbered=no,name=Proof]{proof}%

\begin{document}

\begin{proof}
  \begin{enumerate*}[mode=unboxed]
    \[a\]
    Still proof.
  \end{enumerate*}
\end{proof}

\end{document}

the output becomes:

qed symbol is placed before end of proof

The symbol is placed correctly if the enumerate* environment isn't used or if $$ or \begin{displaymath and \end{displaymath} is used to mark displaymath mode instead of \[ and \].

Clearly, the qed symbol should be at the end of the proof after “Still proof.” – What am I doing wrong? Couldn't find anything so far.

share|improve this question
    
I also encountered similiar misplacements of the qed symbol in other contexts, but I couldn't reproduce them so far. If I find further such reproduceable misplacements, I'll post them, too. –  k.stm Oct 26 '12 at 16:22
    
this problem doesn't occur with amsthm. i'm not a user of ntheorem, so you may have other reasons for using it. –  barbara beeton Oct 26 '12 at 16:36
    
@barbarabeeton I use it to define certain theoremstyles. Maybe I can switch. But this, of course, still wouldn't really solve this particular problem. –  k.stm Oct 26 '12 at 16:51
    
in the ams author faq, there's a question that deals with qed and other symbols in "nonstandard" places in and out of proofs, by reference to a linked example file. it's specific to amsthm, but maybe it would give you some ideas. sorry i can't help with ntheorem. –  barbara beeton Oct 26 '12 at 17:04
2  
ntheorem seems to add the \qed to the last display mode equation. So, a hackish solution would be to end the proof with \vspace{-\belowdisplayskip}\[\]. –  Peter Grill Oct 26 '12 at 21:06
show 1 more comment

2 Answers

up vote 3 down vote accepted

As per my earlier comment ntheorem seems to add the \qed to the very last display mode equation. So a hack is to to end a proof with

\vspace{-\belowdisplayskip}\[\]

enter image description here

Code:

\documentclass{scrreprt}

\PassOptionsToPackage{thmmarks}{ntheorem}
\PassOptionsToPackage{inline}{enumitem}

\usepackage{amsmath,MnSymbol}
\usepackage{ntheorem,thmtools}
\usepackage{
    enumitem,
}

\declaretheoremstyle[qed={\quad\blacksquare}]{plain}
\declaretheorem[style=plain,numbered=no,name=Proof]{proof}%

\begin{document}

\begin{proof}
  \begin{enumerate*}[mode=unboxed]
    \[a\]
    Still proof.
  \end{enumerate*}
  \vspace{-\belowdisplayskip}\[\]
\end{proof}
\end{document}
share|improve this answer
    
I accepted the answer even though it is – as you said yourself – merely a hackish solution. I personally just switched to using the displaymath-environment. But thanks anyway! –  k.stm Aug 25 '13 at 8:13
add comment

The problem is due to the use of the enumitem package.

Ntheorem supports a finite set of standard LaTeX environments. The algorithm consists of modifications to these environments to trace where the end mark belongs (for the implementation, see its documentation).

As there are dozens of packages that define own environments, it is not possible to support all of them.

share|improve this answer
1  
Welcome to TeX.SX! Are you considering to register your account? –  egreg Aug 25 '13 at 21:47
add comment

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.