Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to define a simple environment to enclose my proofs, actually I just wanted to put a little square right at the end. So, I made this new environment definition:

\newenvironment{Proof}{ \flushleft \textbf{PROOF}}{\rule{1ex}{1ex}}

When I use this environment to enclose simple text, then I get the little square right at the end, after the last character. The problem is when I enclose an enumerate environment because it adds a new line and put the little square at the beginning. In this case my problem is both I don't want the new line and also I need the square at the right ending of the margin. If I consider it this way

\newenvironment{Proof}{ \flushleft \textbf{PROOF}}{\begin{flushright} \rule{1ex}{1ex} \end{flushright}}

then a new line is always added.

share|improve this question
    
I would consider doing what barbara suggests, there's a well-done proof environment. You suggest using a black box (\rule{1ex}{1ex}), this can be achieved too, by redefining \qedsymbol. –  tohecz Feb 7 '13 at 20:23
add comment

1 Answer

up vote 5 down vote accepted

amsthm automatically puts a box (an open box, but that can be redefined) flush right at the end of the last line of proof. if the proof ends with a display or a list, then \qedhere can be used just before the end of that environment to move the box to the proper line.

to start the enumerated list on a new line after the proof header, enter it as

\begin{proof}
 \leavevmode
 \begin{enumerate}
 ...

documentation is available with texdoc amsthm (if you are using a system based on tex live) or by visiting the page and clicking on the line "AMS theorem package user's guide".

to redefine the qed box,

\renewcommand{\qedsymbol}{...}

to change the main proof header,

\renewcommand{\proofname}{Whatever}

(thanks, egreg.)

for a one-time variant, just take advantage of the optional argument:

\begin{proof}[Proof of the XYZ theorem}
share|improve this answer
    
Great! how can exactly redefine the box? –  Daniela Diaz Feb 7 '13 at 20:25
    
Perfect!. Just a last question, sorry because I'm so new on this. How can I change the format of word "proof". –  Daniela Diaz Feb 7 '13 at 20:44
1  
@DanielaDiaz \renewcommand{\proofname}{Whatever} if you don't use babel. If you use babel with language spanish (just as an example), \addto\captionsspanish{\renewcommand{\proofname}{Whatever}} –  egreg Feb 7 '13 at 21:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.