]> gitweb.michael.orlitzky.com - mjotex.git/blobdiff - mjo-proof_by_cases.tex
Remove the left margin from proof-by-cases and indent its paragraphs.
[mjotex.git] / mjo-proof_by_cases.tex
index 7dbe91c72db856f82a137d449c6ca9490e2753a7..3f803b8296be53eec992cce11113006fc60e0832 100644 (file)
 \usepackage{enumitem}
 
 % Using the enumitem package, we define a new type of list, called
-% ``pcases'' (proof by cases).
+% ``pcases'' (proof by cases). Each case has a label with an arabic
+% numeral (the case number), but also a \thiscase identifier. The
+% macro \thiscase is defined below by the \case command, and gives the
+% name or conditions or whatever that distinguish one case from
+% another.
 \newlist{pcases}{enumerate}{1}
 \setlist[pcases]{
   label=\textbf{Case~\arabic*}~(\protect\thiscase)\textbf{:},
   ref=\arabic*,
   align=left,
-  leftmargin=\parindent
-}
+  leftmargin=0pt,
+  listparindent=\parindent}
+
+% The optional argument here gets stuffed into the \thiscase macro, to
+% be called by pcases when it creates this list item. The \hfill is a
+% hack intended to force the proof to start on a new line, rather than
+% right after the colon. A \newline where the \hfill is does not work,
+% so we consume the rest of the line instead.
 \newcommand{\case}[1][]{
   \def\thiscase{#1}%
-  \item
+  \item \hfill\par
 }