% % myqed.sty % % % Display of the end symbol in e.g. a proof or an example environment. % % % If you are using the amsmath package, use \qed in an amsmath % math environment (gather*, align*, ...) if the last line of a proof or an % example is a mathematical formula. % % Use \showqed if the proof or the example ends with a list environment. % % If you do not want the end symbol to appear on a line by itself, % add a % at the end of the last line of the proof or example environment. % % IMPORTANT: Load this package after loading amsmath! % \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{myqed} [1995/05/31 QED displaying package (BDS).] \@ifpackageloaded{myfleqn}{\endinput}{} \ifx\Box\undefined \usepackage{latexsym} \fi \ifx\Diamond\undefined \usepackage{latexsym} \fi \newcommand{\currentqedsymbol}{\Box} \newif\if@qeddisplayed \@qeddisplayedtrue \def\noqed{\global\@qeddisplayedtrue} \def\setqed#1{\global\@qeddisplayedfalse\renewcommand{\currentqedsymbol}{#1}} \def\showqed{\if@qeddisplayed% \else\nobreak\hspace*{\fill}{$\currentqedsymbol$}\global\@qeddisplayedtrue\fi} \@ifpackageloaded{amsmath}{% \def\qed{\ifmmode\tag*{$\currentqedsymbol$}\global\@qeddisplayedtrue \else\showqed\fi} }{% \def\qed{\ifmmode\qquad\currentqedsymbol\global\@qeddisplayedtrue \else\showqed\fi} } \ifx\symlasy\undefined\usepackage{latexsym}\fi \let\myqeddefined=1