12

I am writing a quite long proof in a LaTeX file and I would like to create a "claim" environment to put inside said proof. Can someone help me to understand how this can be done, or at least redirect me to some manual or other resource where it is explained?

What I would like precisely is two environments:

claim: similar to theorem, but maybe instead of getting Claim (bold), only underlined.

claimproof: similar to the proof environment, but with a black box at the end, to distinguish its end from the end of the full proof of the theorem.

1
  • 2
    Welcome to TeX.SE! have a look at the amsthm, ntheorem, and perhaps thmtools packages to help you with this :)
    – cmhughes
    Mar 24, 2013 at 16:56

1 Answer 1

12

Requires amssymb for the black square.

\newenvironment{claim}[1]{\par\noindent\underline{Claim:}\space#1}{}
\newenvironment{claimproof}[1]{\par\noindent\underline{Proof:}\space#1}{\hfill $\blacksquare$}

You can edit and use Claim's proof for example, or anything else. Also, adjust the space above and below, if you want.

\begin{claim}
foo
\end{claim}

\begin{claimproof}
foo
\end{claimproof}

enter image description here

ps: Following the suggestion by @barbara beeton, to avoid new lines before the black square, replace the last pair of {} by

{\leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill\quad\hbox{$\blacksquare$}}
4
  • @DanielRobert-Nicoud, you're welcome. Try to improve the code using some other commands for spaces above and below, like theorems does. Now you have the starting point.
    – Sigur
    Mar 24, 2013 at 17:01
  • 2
    this definition could leave the black box at the beginning of a line by itself, if you're unlucky enough to have the text of the claim end at the end of a line. better to steal the code from amsthm: \leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill\quad\hbox{$\blacksquare$} Mar 24, 2013 at 17:27
  • How could I imagine this?! Nice! I'll edit and cite your code.
    – Sigur
    Mar 25, 2013 at 10:11
  • @Sigur How can I use the same environment, but with enumeration, i.e. to keep track of Claim 1, Claim 2, and so on? Dec 14, 2014 at 15:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .