5

I'd like to have offset paragraphs inside a proof, say to delineate one case from another. I've been using

    \newtheoremstyle{component}{}{}{}{}{\itshape}{.}{.5em}{\thmnote{#3}#1}
    \theoremstyle{component}
    \newtheorem*{component}{}

and implementing it as

    \begin{component}[Case 1]
    ...
    \end{component}

which works nicely, and has the look I want.

Unfortunately, if this happens to fall towards the end of a proof, I need to manually add a \qedhere at the end, as otherwise the tombstone appears one line below.

Is there some simpler way to implement something similar, that would also solve the tombstone problem? I know I could just go with

    \medskip
    \noindent \emph{Case 1.}
    ...

    \medskip

but that's even more tedious, and is the whole reason I used the component theoremstyle in the first. Thanks for any suggestions you may have.

  • having theorem marks behave properly is, apparently, surprisingly difficult. My current strategy is: turn them off. – Seamus Aug 4 '11 at 15:01
  • tex.stackexchange.com/q/2274 – Seamus Aug 4 '11 at 15:05
  • @Seamus: I really dislike reading math books without end-of-proof markers. This makes quickly scanning a chapter for relevant information so much more difficult. – Caramdir Aug 4 '11 at 21:01
  • A full minimal example would be helpful Where are the \newtheoremstyle and \thmnote macros from? – Seamus Aug 5 '11 at 10:48
  • 2
    IMO, just cope with the \qedhere. amsthm's behaviour is really quite simple once you get it: you need \qedhere if your environment ends with a list (in the TeXnical sense), which is, for common intents and purposes, displayed equations, subtheorems -- as you found out -- and itemize/enumerate. NTheorem's alternative approach is fragile and requires multiple passes, so yes, endmarks are tricky. – Ulrich Schwarz Aug 5 '11 at 11:18
2

(Originally posted as a comment by Ulrich Schwarz)

IMO, just cope with the \qedhere. amsthm's behaviour is really quite simple once you get it: you need \qedhere if your environment ends with a list (in the TeXnical sense), which is, for common intents and purposes, displayed equations, subtheorems -- as you found out -- and itemize/enumerate. NTheorem's alternative approach is fragile and requires multiple passes, so yes, endmarks are tricky.

2

To avoid unneccesary code, it would probably be preferable to treat the cases like list items. By using the package enumitem, you can define a customized list environment with the appropriate behaviour

\newlist{pcases}{enumerate}{1}
\setlist[pcases]{
  label=\underline{Case~\arabic*:}\protect\thiscase.~,
  ref=\arabic*,
  align=left,
  labelsep=0pt,
  leftmargin=0pt,
  labelwidth=0pt,
  parsep=0pt
}
\newcommand{\case}[1][]{%
  \if\relax\detokenize{#1}\relax
    \def\thiscase{}%
  \else
    \def\thiscase{~#1}%
  \fi
  \item
}

You can use it like this:

\begin{proof}
some text
    \begin{pcases}
      \case[$k = 0$] This case is obvious.
      \case[$k > 0$] Then there exists a...
    \end{pcases}
\end{proof}

You would still have to write the \qedhere.

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.