I have a series of theorem styles, two of them look like this:



I want to add a \blacksquare to the end of each definition and a \square to every theorem (that is, in the last line aligned to the right).

I read about redefining the \qedsymbol to the desired value, but no theorem displays any symbol. Then, I tried wrapping the theorem into an additional environment, but then LaTeX throws missing $ errors at me. Both \newenvironment and NewEnviron produce these.

I would prefer to get the theorem system to add the symbol, anyway. So how can I specify the qed symbol to be used in your \newtheorem?

  • 1
    In amsthm, only proofs produce squares at the end. Theorem or Definition themselves should not end with Q.E.D. symbol (since they we have not "D. emonstrated" anything in them). So I'm just making myself sure: you really want these symbols to appear at the end of Theorems and Definitions themselves? – yo' Oct 26 '12 at 16:10
  • 2
    @tohecz: Yes, but I did not invent this. I have always searched for a way to distinctively mark the end of a theorem or a definition to make clear where the theorem/definition ends and regular text continues. I saw this a couple times in literature and think a black square works well as full-stop-like indicator that now follows regular text. As far as I am concerned a Q.E.D. symbol is a hollow square (\square). – bitmask Oct 26 '12 at 16:21
  • As long as you put your theorem in italics/slanted, you don't need any end-mark. But the truth is that I have seen it as well. On the other hand, I've seen a black square for the end of the proof too. – yo' Oct 26 '12 at 16:32
  • 1
    check out my answer to qed-for-theorems-without-proofs. it has a link for an example document dealing with various situations other than simple proofs where an end-of-whatever marker is wanted, compatible with amsthm. actually, this question might be considered a duplicate of that one. – barbara beeton Oct 26 '12 at 16:44
  • I sometimes put a tombstone at the end of examples or at the end of corollaries for which no laid out proof is given. But there is no need to mark the end of all theorems or definitions (definitions are just running text, most of the time, simply set with more evidence): the mark at the end of a statement should have a special meaning, such as the absence of a proof because it's obvious or follows easily from the preceding statement. In my opinion, different tombstones for different environments are definitely out of the question. – egreg Oct 26 '12 at 21:07

You can easily achieve what you want using thmtools as a front-end for amsthm; a little example:





Test definition.
Test theorem.

  • I'm still unable to get this to work. I downloaded the newest thmtools package as my version didn't have declaretheoremstyle (which you have to use for qed to work) but whenever I use that I get an Undefined control sequence. <recently read> \NR@gettitle` which tells me absolutely nothing. Any idea what's going on? – bitmask Nov 16 '12 at 9:49
  • @bitmask without some code is hard to tell what's going on. Please compose a minimal working example illustrating the problem and upload it elsewhere (pastebin, for example), and then provide the link here so I can take a look at the code. – Gonzalo Medina Nov 16 '12 at 13:29
  • I am talking about the general use of the package. For example with exactly the code as you provide it (just with the qed parameter passed to delcaretheoremstyle instead of declaretheorem as per documentation [the latter doesn't have the qed parameter]). I understand that it works for you, but I am unable to determine what the error could mean. Maybe it's my not so up-to-date latex sources plus the newest version of thmtools. Actually, I don't even have to declar any theorem whatsoever, I just have to include the package. – bitmask Nov 16 '12 at 14:55
  • @bitmask so \documentclass{article} \usepackage{amssymb} \usepackage{amsthm} \usepackage{thmtools} \declaretheorem[style=definition,name=Definition,qed=$\blacksquare$]{define} \declaretheorem[style=plain,qed=$\square$]{theorem} \begin{document} \begin{define} Test definition. \end{define} \begin{theorem} Test theorem. \end{theorem} \end{document} exactly as it is gives you errors? If so, could you please tell me exactly the first error obtained? – Gonzalo Medina Nov 16 '12 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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