summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/checkend
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-26 20:47:41 +0000
committerKarl Berry <karl@freefriends.org>2019-06-26 20:47:41 +0000
commit254a48177d1aa20024bd8f025928ceb86b6527a2 (patch)
treea44d3a68178643ae44e2585e5cbe879e0ca2d9e7 /Master/texmf-dist/tex/latex/checkend
parent49c94d5579a372eab383c97cbf6d6b4c747f1602 (diff)
checkend (26jun19)
git-svn-id: svn://tug.org/texlive/trunk@51475 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/checkend')
-rw-r--r--Master/texmf-dist/tex/latex/checkend/checkend.sty71
1 files changed, 71 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/checkend/checkend.sty b/Master/texmf-dist/tex/latex/checkend/checkend.sty
new file mode 100644
index 00000000000..347949ae114
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/checkend/checkend.sty
@@ -0,0 +1,71 @@
+%
+% Copyright (C) 2002-2019 Javier Bezos http://www.texnia.com
+%
+% This file may be distributed and/or modified under the conditions of
+% the MIT License. A version can be found at the end of this file.
+%
+% 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.1}
+\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
+
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file