## Monday, March 24, 2008

### LaTeX Appendectomies

I have need of a LaTeX package. I think a lot of people would find this package useful. I would prefer not to write it myself.

This package would take a mode argument in the preamble and format the document in one of three ways: as a conference submission, as a camera-ready conference paper, or as a tech report.

Suppose I have a theorem and that theorem has a proof.

• In a conference submission, the theorem would appear in the main text and would be re-stated along with its proof in an appendix.

• In a camera-ready conference paper, the theorem would appear in the main text and the proof would not appear at all.

• In a tech report, the theorem and the proof would appear inline in the main text.

Preferably, proofs could be included in the main text or sent to an appendix on a case-by-case basis. Proofs could also have "sketch" versions and full versions: the sketch version appears in the main text of a conference paper (either kind) and the full version appears only in a tech report.

Suppose that, in proving a theorem, I first prove a lemma.

• If the proof of the theorem appears in the main text (or an appendix), then the lemma and its proof should also appear in the main text (or the appendix), before the theorem.

• If the proof of the theorem is omitted, or if a proof sketch is included which makes no reference to the lemma, then the lemma and its proof should not appear at all.

One should be able to conditionally include text depending on the mode. For example, in camera-ready conference mode, one would probably include the sentence: "Full proofs of all theorems appear in a technical report [citation here]."

The only package I've found that does anything like this is `thrmappendix` , but it doesn't allow for a proof to appear in the main text at all. It's primarily concerned with the appearance and re-appearance of the theorem, with or without its proof; I'm primarily concerned with the appearance or suppression of the proof.