diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:52:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:52:10 +0000 |
commit | d3eb995dcf5d1eca7145a9948594114aff0c01f6 (patch) | |
tree | d8c1f3e885ffb5d0bfc3ecaae7244f7e6163866f /Master/texmf-dist/tex/latex/bezos/checkend.sty | |
parent | 618290cc8302cc7c90bf5584387630fd78fb56b5 (diff) |
bezos
git-svn-id: svn://tug.org/texlive/trunk@706 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bezos/checkend.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/bezos/checkend.sty | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/bezos/checkend.sty b/Master/texmf-dist/tex/latex/bezos/checkend.sty new file mode 100644 index 00000000000..49f1ec54975 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bezos/checkend.sty @@ -0,0 +1,56 @@ +% +--------------------------------------------------+ +% | Documentation in clear text follows | +% +--------------------------------------------------+ +% +% (c) 2002 Javier Bezos. All Rights Reserved. +% +% This file can be redistributed and/or modified under the terms +% of the LaTeX Project Public License Distributed from CTAN +% archives in directory macros/latex/base/lppl.txt; either +% version 1 of the License, or any later version. +% +% Please, send your comments and suggestions to <jbezos@wanadoo.es>. +% +% Usage +% ~~~~~ +% When an environment is left open, LaTeX gives an error at the +% end of the document. However it only informs about the first +% of them, while the rest are shown with meaningless errors: +% +% (\end occurred inside a group at level N) +% +% This package replaces them with more useful messages +% which show which environments (in reverse order) were +% not closed. +% +% That's all. There are no user macros. Just use the package. +% +% Code +% ~~~~ + +\def\fileversion{1.0} +\def\filedate{2002/04/20} + +\ProvidesPackage{checkend}[2002/04/20 v1.0 Environment checking] + +\def\chkend@checkend{% + \def\@tempa{document}% + \ifx\@currenvir\@tempa + \else + \count@\errorcontextlines + \errorcontextlines\z@ + \PackageError{checkend}{% + \@currenvir \@currenvline \space open at + \string\end{document}}% + {The package has detected an open environment at the + end\MessageBreak + of the document}% + \errorcontextlines\count@ + \csname end\@currenvir\endcsname + \endgroup + \chkend@checkend + \fi} + +\AtEndDocument{\chkend@checkend} + +\endinput
\ No newline at end of file |