Saturday, September 12, 2009

[LaTeX] \noqed

So you're writing up a big multi-part proof in LaTeX, and you don't want the halmos (□) to appear at the end of one of your sub-lemmas. You were hoping you could just use the \noqed command, but unfortunately it doesn't exist. Here's what you can do instead.

In general, if you want to change what symbol happens at the end of a proof, you use \renewcommand{\qedsymbol}{ --stuff goes here-- }, and if you want there to be no qed symbol, you define it to be blank: \renewcommand{\qedsymbol}{}. But if you want qed symbols in some of your theorems but just not one or two in particular, you don't want to declare this globally. The trick I've found is to
\def\noqed{\renewcommand{\qedsymbol}{}}
and then drop in a \noqed right before the \end of the proof you don't want qed'd. This works because this \renewcommand only happens locally, inside this particular proof environment.

So there you have it: a \noqed command that works exactly like you think it should.

1 comment:

Yakko Warner said...

Thank you. I now know what my code posts look like to someone who has absolutely no idea what code is.