texlive[53319] Master/texmf-dist: endnotes (4jan20)
commits+karl at tug.org
commits+karl at tug.org
Sat Jan 4 23:05:00 CET 2020
Revision: 53319
http://tug.org/svn/texlive?view=revision&revision=53319
Author: karl
Date: 2020-01-04 23:04:59 +0100 (Sat, 04 Jan 2020)
Log Message:
-----------
endnotes (4jan20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/endnotes/endnotes.pdf
trunk/Master/texmf-dist/doc/latex/endnotes/endnotes.tex
trunk/Master/texmf-dist/tex/latex/endnotes/endnotes.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/endnotes/README.md
Added: trunk/Master/texmf-dist/doc/latex/endnotes/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/endnotes/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/endnotes/README.md 2020-01-04 22:04:59 UTC (rev 53319)
@@ -0,0 +1,2 @@
+# endnotes
+Place footnotes at the end
Property changes on: trunk/Master/texmf-dist/doc/latex/endnotes/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/endnotes/endnotes.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/endnotes/endnotes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/endnotes/endnotes.tex 2020-01-04 22:04:42 UTC (rev 53318)
+++ trunk/Master/texmf-dist/doc/latex/endnotes/endnotes.tex 2020-01-04 22:04:59 UTC (rev 53319)
@@ -1,7 +1,5 @@
\documentclass[pagesize=auto]{scrartcl}
-\usepackage{fixltx2e}
-\usepackage{etex}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
@@ -23,10 +21,11 @@
\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 at 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}
\maketitle
@@ -142,7 +141,15 @@
\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}
Modified: trunk/Master/texmf-dist/tex/latex/endnotes/endnotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/endnotes/endnotes.sty 2020-01-04 22:04:42 UTC (rev 53318)
+++ trunk/Master/texmf-dist/tex/latex/endnotes/endnotes.sty 2020-01-04 22:04:59 UTC (rev 53319)
@@ -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\xFCrgen Spitzm\xFCller 2019-08-17: just warn if \verb|\theendnotes| is
+% used, but noendnotes have been inserted yet.
+%
+% J\xFCrgen Spitzm\xFCller 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 at endnote}
@@ -283,6 +291,7 @@
\newwrite\@enotes
\newif\if at enotesopen \global\@enotesopenfalse
+\newif\if at 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 at 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 at 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 at haveenotes\else
+ \IfFileExists{\jobname.ent}{
+ \if at 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}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
More information about the tex-live-commits
mailing list