add doc/glosstex.ist to distribution
[barvinok.git] / doc / newproof.sty
blobc7c0f6d2eaeba6de60de50684977b8e72c10a152
1 % This package defines a "\newproof" command similar to "\newtheorem".
2 % Its arguments are
3 % #1 Name of proof environment, eg, "proof".
4 % #2 Starting text, eg, Proof.
5 % #3 Finishing text, eg, [] flushed right.
7 % The package goes on to define a "proof" environment with exactly the
8 % above setup, but other unnumbered environments can be set up in the
9 % same way.
11 % The created environments take one optional argument, which, if present,
12 % goes in brackets after #2. Eg,
14 % \begin{proof}
15 % A proof.
16 % \end{proof}
18 % \begin{proof}[B. L. User]
19 % A named proof.
20 % \end{proof}
22 % \begin{proof}[of Theorem \ref{thm}]
23 % Yet another.
24 % \end{proof}
26 % Command "\qed" is set up to flush "\qedtext" right; "\qedtext" defaults
27 % to a square, but can be re-defined as "QED" or whatever.
29 % M.Piff@shef.ac.uk
31 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
32 \ProvidesPackage{newproof}
33 \newcommand{\newproof}[3]{
34 \newenvironment{#1}[1][]%
36 \begin{trivlist}%
37 \item[\hspace{\labelsep}\textnormal{\textbf{#2%
38 \def\op@@@arg{##1}%
39 \ifx\op@@@arg\empty
40 \else~(##1)\fi
41 }}]%
45 \end{trivlist}%
48 \newproof{proof}{Proof}{\qed}
49 \def\qed{{\ifhmode\unskip\nobreak\hfil\penalty50 \hskip1em \else\nobreak\fi
50 \mbox{}\nobreak\hfil\qedtext%
51 \parfillskip=0pt \finalhyphendemerits=0 \par}}
53 \def\qedtext{\ensuremath{\square}}
54 \RequirePackage{amsfonts}
55 \DeclareMathSymbol{\square} {\mathord}{AMSa}{"03}