summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/piff/newproof.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-08 00:29:42 +0000
committerKarl Berry <karl@freefriends.org>2010-12-08 00:29:42 +0000
commitb8dac36db6bad339e035d237cfed1b86713971ce (patch)
tree90f5205c580f7e74eb7eb18297a1c0936808ad19 /Master/texmf-dist/tex/latex/piff/newproof.sty
parentec292c03bd7f22b6c53cc292304730e8a07b10b0 (diff)
piff pd (8dec10)
git-svn-id: svn://tug.org/texlive/trunk@20676 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/piff/newproof.sty')
-rw-r--r--Master/texmf-dist/tex/latex/piff/newproof.sty60
1 files changed, 60 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/piff/newproof.sty b/Master/texmf-dist/tex/latex/piff/newproof.sty
new file mode 100644
index 00000000000..6b9afbad9a2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/piff/newproof.sty
@@ -0,0 +1,60 @@
+% This package defines a "\newproof" command similar to "\newtheorem".
+% Its arguments are
+% #1 Name of proof environment, eg, "proof".
+% #2 Starting text, eg, Proof.
+% #3 Finishing text, eg, [] flushed right.
+%
+% The package goes on to define a "proof" environment with exactly the
+% above setup, but other unnumbered environments can be set up in the
+% same way.
+%
+% The created environments take one optional argument, which, if present,
+% goes in brackets after #2. Eg,
+%
+% \begin{proof}
+% A proof.
+% \end{proof}
+%
+% \begin{proof}[B. L. User]
+% A named proof.
+% \end{proof}
+%
+% \begin{proof}[of Theorem \ref{thm}]
+% Yet another.
+% \end{proof}
+%
+% Command "\qed" is set up to flush "\qedtext" right; "\qedtext" defaults
+% to a square, but can be re-defined as "QED" or whatever.
+%
+% M.Piff@shef.ac.uk
+%
+% This file is placed in the public domain. No provision is made for
+% support of the use of the facilities herein.
+%
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{newproof}
+\newcommand{\newproof}[3]{
+ \newenvironment{#1}[1][]%
+ {%
+ \begin{trivlist}%
+ \item[\hspace{\labelsep}\textnormal{\textbf{#2%
+ \def\op@@@arg{##1}%
+ \ifx\op@@@arg\empty
+ \else~(##1)\fi
+ }}]%
+ }%
+ {%
+ #3
+ \end{trivlist}%
+ }%
+}
+\newproof{proof}{Proof}{\qed}
+\def\qed{{\ifhmode\unskip\nobreak\hfil\penalty50 \hskip1em \else\nobreak\fi
+ \mbox{}\nobreak\hfil\qedtext%
+ \parfillskip=0pt \finalhyphendemerits=0 \par}}
+
+\def\qedtext{\ensuremath{\square}}
+\RequirePackage{amsfonts}
+\DeclareMathSymbol{\square} {\mathord}{AMSa}{"03}
+
+