summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-01-04 22:04:59 +0000
committerKarl Berry <karl@freefriends.org>2020-01-04 22:04:59 +0000
commit1f187c0abf4a96c77c0a52e933793d4ce6cc0098 (patch)
treeb892fee1ec23bbf153919802dec44557cd3579f6 /Master
parent40fc7787788cdfcaccef2c17d47de2f8cc68643d (diff)
endnotes (4jan20)
git-svn-id: svn://tug.org/texlive/trunk@53319 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/endnotes/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/endnotes/endnotes.pdfbin267875 -> 276021 bytes
-rw-r--r--Master/texmf-dist/doc/latex/endnotes/endnotes.tex15
-rw-r--r--Master/texmf-dist/tex/latex/endnotes/endnotes.sty27
4 files changed, 38 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/latex/endnotes/README.md b/Master/texmf-dist/doc/latex/endnotes/README.md
new file mode 100644
index 00000000000..3c4ca3c0200
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/endnotes/README.md
@@ -0,0 +1,2 @@
+# endnotes
+Place footnotes at the end
diff --git a/Master/texmf-dist/doc/latex/endnotes/endnotes.pdf b/Master/texmf-dist/doc/latex/endnotes/endnotes.pdf
index cf5f5cecafb..f1ea18f1c18 100644
--- a/Master/texmf-dist/doc/latex/endnotes/endnotes.pdf
+++ b/Master/texmf-dist/doc/latex/endnotes/endnotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/endnotes/endnotes.tex b/Master/texmf-dist/doc/latex/endnotes/endnotes.tex
index a2ded227a1b..4c87fba0242 100644
--- a/Master/texmf-dist/doc/latex/endnotes/endnotes.tex
+++ b/Master/texmf-dist/doc/latex/endnotes/endnotes.tex
@@ -1,7 +1,5 @@
\documentclass[pagesize=auto]{scrartcl}
-\usepackage{fixltx2e}
-\usepackage{etex}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
@@ -23,8 +21,9 @@
\addtokomafont{title}{\rmfamily}
\title{The \pkg{endnotes} package}
-\author{John Lavagnino\thanks{Centre for Computing in the Humanities, King's College London}~~(\mail{John.Lavagnino@kcl.ac.uk})}
-\date{15 January 2003}
+\author{John Lavagnino\thanks{Centre for Computing in the Humanities, King's College London}\thanks{Now Maintained by the \LaTeX3 project, \url{https://github.com/rf-latex/endnotes}}}
+
+\date{2020-01-02}
\begin{document}
@@ -142,6 +141,14 @@ by itself will work.)
\item[JL] John Lavagnino, 15 January 2003: fix my garbled version of
Frank's updates.
+
+\item[JS] Modification by Jürgen Spitzmüller, 17.\,8.\,2019:
+
+ Do not break but just warn if \verb|\theendnotes| is used, but no
+ endnotes have been inserted yet.
+
+ If the last remaining \verb|\endnote| is removed, clear the \verb|*.ent|
+ auxiliary file.
\end{labeling}
diff --git a/Master/texmf-dist/tex/latex/endnotes/endnotes.sty b/Master/texmf-dist/tex/latex/endnotes/endnotes.sty
index d3ef6514baa..7d428d167d2 100644
--- a/Master/texmf-dist/tex/latex/endnotes/endnotes.sty
+++ b/Master/texmf-dist/tex/latex/endnotes/endnotes.sty
@@ -4,9 +4,10 @@
% * ENDNOTES *
% ****************************************
%
-% Date of this version: 15 January 2003.
+% Date of this version: 02 January 2020.
%
%% Copyright 2002 John Lavagnino
+%% Copyright 2019-2020 LaTeX3 Project
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.2
@@ -114,6 +115,11 @@
% Frank's updates.
%
%
+% Jürgen Spitzmüller 2019-08-17: just warn if \verb|\theendnotes| is
+% used, but noendnotes have been inserted yet.
+%
+% Jürgen Spitzmüller 2020-01-02: ensure .ent file is cleared.
+%
% ****************************************
% * ENDNOTE COMMANDS *
% ****************************************
@@ -254,6 +260,8 @@
% ****************************************
%
+\ProvidesPackage{endnotes}[2020-01-02 endnotes package]
+
\@definecounter{endnote}
\def\theendnote{\@arabic\c@endnote}
@@ -283,6 +291,7 @@
\newwrite\@enotes
\newif\if@enotesopen \global\@enotesopenfalse
+\newif\if@haveenotes \global\@haveenotesfalse
\def\@openenotes{\immediate\openout\@enotes=\jobname.ent\relax
\global\@enotesopentrue}
@@ -296,6 +305,7 @@
% of the lines wind up being quite short.
\long\def\@endnotetext#1{%
+ \global\@haveenotestrue
\if@enotesopen \else \@openenotes \fi
\immediate\write\@enotes{\@doanenote{\@theenmark}}%
\begingroup
@@ -309,6 +319,7 @@
% have, requiring the use of \protect for fragile commands.
\long\def\addtoendnotes#1{%
+ \global\@haveenotestrue
\if@enotesopen \else \@openenotes \fi
\begingroup
\newlinechar='40
@@ -316,6 +327,16 @@
\immediate\write\@enotes{#1}%
\endgroup}
+% Check at document end if endnotes have been inserted;
+% if not, assure the *.ent file is cleared if it exists.
+\AtEndDocument{%
+ \if@haveenotes\else
+ \IfFileExists{\jobname.ent}{
+ \if@enotesopen\else\@openenotes\fi
+ \addtoendnotes{}}{}
+ \fi
+}
+
% End of unique endnote code
\def\endnotemark{%
@@ -411,7 +432,9 @@
\def\@endanenote{\par\endgroup}%
\enoteheading
\enotesize
- \input{\jobname.ent}%
+ \InputIfFileExists{\jobname.ent}{}{%
+ \PackageWarning{endnotes}{No endnotes found (file \jobname.ent does not exist)\MessageBreak}
+ }%
\endgroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%