]>
gitweb.michael.orlitzky.com - mjotex.git/blob - mjo-proof_by_cases.tex
f86c9d0e64c7740e1b05dd7ffe39b5d1a02c6594
2 % A proof-by-cases environment. This gives you a nicely-indented list
3 % of cases for use in proofs.
7 % Case 1 (x >= 0): herp.
9 % Case 2 (x < 0): derp.
12 % Used below to define pcases.
15 % Using the enumitem package, we define a new type of list, called
16 % ``pcases'' (proof by cases). Each case has a label with an arabic
17 % numeral (the case number), but also a \thiscase identifier. The
18 % macro \thiscase is defined below by the \case command, and gives the
19 % name or conditions or whatever that distinguish one case from
21 \newlist{pcases
}{enumerate
}{1}
23 label=
\textbf{Case~
\arabic*
}~(
\protect\thiscase)
\textbf{:
},
26 leftmargin=
\parindent}
28 % The optional argument here gets stuffed into the \thiscase macro, to
29 % be called by pcases when it creates this list item. The \hfill is a
30 % hack intended to force the proof to start on a new line, rather than
31 % right after the colon. A \newline where the \hfill is does not work,
32 % so we consume the rest of the line instead.
33 \newcommand{\case}[1][]{