texlive[69249] Master/texmf-dist: versonotes (31dec23)
commits+karl at tug.org
commits+karl at tug.org
Sun Dec 31 22:25:02 CET 2023
Revision: 69249
https://tug.org/svn/texlive?view=revision&revision=69249
Author: karl
Date: 2023-12-31 22:25:02 +0100 (Sun, 31 Dec 2023)
Log Message:
-----------
versonotes (31dec23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/versonotes/sample.pdf
trunk/Master/texmf-dist/doc/latex/versonotes/sample.tex
trunk/Master/texmf-dist/doc/latex/versonotes/versonotes.pdf
trunk/Master/texmf-dist/source/latex/versonotes/versonotes.drv
trunk/Master/texmf-dist/source/latex/versonotes/versonotes.dtx
trunk/Master/texmf-dist/tex/latex/versonotes/versonotes.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/versonotes/README.md
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/versonotes/README
Deleted: trunk/Master/texmf-dist/doc/latex/versonotes/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/versonotes/README 2023-12-31 12:06:01 UTC (rev 69248)
+++ trunk/Master/texmf-dist/doc/latex/versonotes/README 2023-12-31 21:25:02 UTC (rev 69249)
@@ -1,52 +0,0 @@
-Package versonotes
-==================
-
-Version 0.4, 2019 July 6
-
-This package allows you to place notes on the verso pages of an
-otherwise single-sided document.
-
-If, in the run of text, you include a call to the macro
-`\versonote{This is a remark}`, then that text will be placed on the
-opposite (ie, ‘verso’) page, lined up with the macro call.
-
-You can see a sample of how to use the package, and its results, in
-sample.tex and sample.pdf.
-
-The source is at [bitbucket][bitbucket],
-and the package is distributed on CTAN in
-[macros/latex/contrib/versonotes/][ctan]
-
-Copyright 2014, 2015, 2019, Norman Gray.
-
-The package is distributed under the conditions of the LaTeX Project
-Public License, either version 1.3 of this license or (at your option)
-any later version.
-
-Acknowledgements, and release notes
------------------------------------
-
-Thanks to Thomas H. Luxon for permission to include the
-“Paradise Lost” notes in the sample text.
-
-Version 0.4, 2019 July 6
- Support changing the initial page number (thanks to P J
- Couch for the suggestion).
-
-Version 0.3, 2015 December 8
-
- * Minor documentation adjustments.
-
- * Added the [rectonotes] option (thanks to Axel Berger for
- this suggestion).
-
-Version 0.2, 2015 February 16
- Initial public release.
-
-
-
-Norman Gray
-https://nxg.me.uk
-
-[bitbucket]: https://bitbucket.org/nxg/versonotes
-[ctan]: http://www.ctan.org/pkg/versonotes
Added: trunk/Master/texmf-dist/doc/latex/versonotes/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/versonotes/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/versonotes/README.md 2023-12-31 21:25:02 UTC (rev 69249)
@@ -0,0 +1,64 @@
+Package versonotes
+==================
+
+Version 0.5, 2023 December 31
+
+This package allows you to place notes on the verso pages of an
+otherwise single-sided document.
+
+If, in the run of text, you include a call to the macro
+`\versonote{This is a remark}`, then that text will be placed on the
+opposite (ie, ‘verso’) page, lined up with the macro call.
+
+You can see a sample of how to use the package, and its results, in
+[sample.tex](sample.tex) and [sample.pdf](sample.pdf).
+
+The source is available at [the code home page][nxg],
+and the package is distributed on CTAN in
+[macros/latex/contrib/versonotes/][ctan]
+
+Copyright 2014, 2015, 2019, 2023, Norman Gray.
+
+The package is distributed under the conditions of the LaTeX Project
+Public License, either version 1.3 of this licence or (at your option)
+any later version; see the file `lppl.txt` for details.
+
+Acknowledgements, and release notes
+-----------------------------------
+
+
+Thanks to Thomas H. Luxon for permission to include the
+Dartmouth Milton text of “Paradise Lost” notes in the sample
+text.
+
+Version 0.5, 2023 December 31
+
+ * Now compatible with LuaTeX.
+
+ * Now uses L3‐style hooks, but retains compatibility with
+ pre‐2020 engines.
+
+ * Updated the links to the repository, and to the Dart‐
+ mouth Milton text.
+
+Version 0.4, 2019 July 6
+ Support changing the initial page number (thanks to P J
+ Couch for the suggestion).
+
+Version 0.3, 2015 December 8
+
+ * Minor documentation adjustments.
+
+ * Added the [rectonotes] option (thanks to Axel Berger for
+ this suggestion).
+
+Version 0.2, 2015 February 16
+ Initial public release.
+
+
+
+Norman Gray
+https://nxg.me.uk
+
+[nxg]: https://heptapod.host/nxg/versonotes
+[ctan]: https://ctan.org/pkg/versonotes
Property changes on: trunk/Master/texmf-dist/doc/latex/versonotes/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/versonotes/sample.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/versonotes/sample.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/versonotes/sample.tex 2023-12-31 12:06:01 UTC (rev 69248)
+++ trunk/Master/texmf-dist/doc/latex/versonotes/sample.tex 2023-12-31 21:25:02 UTC (rev 69249)
@@ -1,10 +1,20 @@
\documentclass{scrartcl}
-\usepackage{url,ifxetex}
+\usepackage{iftex}
+\usepackage[implicit=false]{hyperref}
+
+\newif\ifusefontspec
\ifxetex
-\usepackage{fontspec}
-\setmainfont[Ligatures=TeX]{Hoefler Text}
+ \usefontspectrue
+\else\ifluatex
+ \usefontspectrue
+\else
+ \usefontspecfalse
+\fi\fi
+\ifusefontspec
+ \usepackage{fontspec}
+ \setmainfont[Ligatures=TeX]{Hoefler Text}
\fi
\def\UrlFont{\ttfamily \small}
@@ -28,15 +38,18 @@
This excerpt comprises the first couple of stanzas of \emph{Paradise
Lost}, with notes. The text and notes are quoted here (with
permission) to illustrate one use of the versonotes package
-(\url{http://www.ctan.org/pkg/versonotes}), and its response to
+(\url{https://www.ctan.org/pkg/versonotes}), and its response to
collisions of notes. Also, because a day with \emph{Paradise Lost} in
it is a day improved.
The text is from
-\url{https://www.dartmouth.edu/~milton/reading_room/pl/book_1/}.
+\url{https://milton.host.dartmouth.edu} (Book 1).
The general editor of this edition is Thomas H. Luxon, and the notes are
-Copyright Trustees of Dartmouth College, 1997-2014; see the colophon
-at \url{https://www.dartmouth.edu/~milton/reading_room/contents/about_mrr.shtml}.
+Copyright 1997-2023, Trustees of Dartmouth College, with a
+\href{https://creativecommons.org/licenses/by-nd/3.0/us/}{CC BY-ND 3.0 licence};
+see the
+\href{https://milton.host.dartmouth.edu/reading_room/contents/about_mrr.shtml}{colophon}
+at that site.
\pagebreak
Modified: trunk/Master/texmf-dist/doc/latex/versonotes/versonotes.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/versonotes/versonotes.drv
===================================================================
--- trunk/Master/texmf-dist/source/latex/versonotes/versonotes.drv 2023-12-31 12:06:01 UTC (rev 69248)
+++ trunk/Master/texmf-dist/source/latex/versonotes/versonotes.drv 2023-12-31 21:25:02 UTC (rev 69249)
@@ -7,9 +7,9 @@
%% versonotes.dtx (with options: `driver')
%% versonotes: Notes on verso pages
%%
-%% Release version 0.4, 2019 July 6.
+%% Release version 0.5, 2023 December 31.
%%
-%% Copyright 2014, 2015, 2019 Norman Gray <https://nxg.me.uk>
+%% Copyright 2014, 2015, 2019, 2023 Norman Gray <https://nxg.me.uk>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -28,12 +28,12 @@
%%
%%%% File: versonotes.dtx
-%%%% Source: 7d4f5fb7b19e, 2019-07-06T19:09:45+01:00
+%%%% Source: b86314fff92e, 2023-12-31T14:55:52+00:00
%%
\documentclass{ltxdoc}
\title{versonotes: Notes on verso pages}
\author{Norman Gray\\\url{https://nxg.me.uk}}
-\date{Release 0.4, 2019 July 6}
+\date{Release 0.5, 2023 December 31}
\usepackage{url}
\newcommand\Lopt[1]{\textsf {#1}} % options
\newcommand\file[1]{\texttt {#1}}
Modified: trunk/Master/texmf-dist/source/latex/versonotes/versonotes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/versonotes/versonotes.dtx 2023-12-31 12:06:01 UTC (rev 69248)
+++ trunk/Master/texmf-dist/source/latex/versonotes/versonotes.dtx 2023-12-31 21:25:02 UTC (rev 69249)
@@ -2,9 +2,9 @@
% This is versonotes.dtx, which supports adding notes on verso pages,
% opposite annotation on the recto pages. Still sketchy
%%
-%% Release version 0.4, 2019 July 6.
+%% Release version 0.5, 2023 December 31.
%%
-%% Copyright 2014, 2015, 2019 Norman Gray <https://nxg.me.uk>
+%% Copyright 2014, 2015, 2019, 2023 Norman Gray <https://nxg.me.uk>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -23,16 +23,16 @@
%%
%%%% File: versonotes.dtx
-%<+package|driver|example>%%%% Source: 7d4f5fb7b19e, 2019-07-06T19:09:45+01:00
+%<+package|driver|example>%%%% Source: b86314fff92e, 2023-12-31T14:55:52+00:00
%%
%<+package>\NeedsTeXFormat{LaTeX2e}
-%<+package>\ProvidesPackage{versonotes}[2019/07/06 v0.4]
+%<+package>\ProvidesPackage{versonotes}[2023/12/31 v0.5]
%
%<*driver>
\documentclass{ltxdoc}
\title{versonotes: Notes on verso pages}
\author{Norman Gray\\\url{https://nxg.me.uk}}
-\date{Release 0.4, 2019 July 6}
+\date{Release 0.5, 2023 December 31}
\usepackage{url}
\newcommand\Lopt[1]{\textsf {#1}} % options
\newcommand\file[1]{\texttt {#1}}
@@ -110,9 +110,18 @@
% finds a stable state. If you find yourself inconvenienced by this,
% it sounds as if you are preparing a critical edition, and you might
% want to venture into a closer relationship with the
-% \Lpackage{eledmac}
-% package.\footnote{\texttt{http://www.ctan.org/pkg/eledmac}}
+% \Lpackage{reledmac}
+% package.\footnote{\texttt{https://www.ctan.org/pkg/reledmac} -- this
+% is the current incarnation, as of 2023, of the eledmac, ledmac and
+% edmac packages for scholarly editions.}.
%
+% \emph{Note}:
+% If we have a long versonote at the bottom of a page, then we
+% don't try to spill over onto the next (that would be possible to
+% implement, but would be a significant jump in complication). We
+% regard this situation as one for the user to work out for themself,
+% perhaps with some strategic page-breaks.
+%
% The dimensions |\versoleftmargin| and |\versotextwidth| specify the
% position of the text block on the verso page. The defaults for
% these are based on the |\textwidth| and |\evensidemargin| of the
@@ -143,8 +152,10 @@
%
% \subsection*{Notes}
% \begin{itemize}
-% \item The package uses the |\pdfsavepos| primitive, and so requires
-% \texttt{pdflatex}, \texttt{xelatex}, or \texttt{luatex}.
+% \item The package uses the |\pdfsavepos| primitive (or the
+% Lua\TeX\ equivalent), and so requires \texttt{pdflatex},
+% \texttt{xelatex}, or \texttt{lualatex}. In practice, this should
+% mean that it will work with any reasonably current \LaTeX\ engine.
%
% \item The notes are handled using the |.aux| file, and so (i) they will
% only appear on the second and subsequent runs; and (ii) they will be
@@ -156,8 +167,7 @@
%
% \item The package is available on CTAN at
% \texttt{macros/latex/contrib/versonotes/}. The source is hosted at
-% \url{https://bitbucket.org/nxg/versonotes}, where you can also find
-% an issues list.
+% \url{https://heptapod.host/nxg/versonotes/}.
%
% \end{itemize}
%
@@ -167,9 +177,16 @@
%
%
% Thanks to Thomas H. Luxon for permission to include the
+% Dartmouth Milton text\footnote{\url{https://milton.host.dartmouth.edu/}} of
% ‘Paradise Lost’ notes in the sample text.
%
% \begin{description}
+% \item[Version 0.5, 2023 December 31]\relax
+% \leavevmode\begin{itemize}
+% \item Now compatible with LuaTeX.
+% \item Now uses L3-style hooks, but retains compatibility with pre-2020 engines.
+% \item Updated the links to the repository, and to the Dartmouth Milton text.
+% \end{itemize}
% \item[Version 0.4, 2019 July 6]\relax
% Support changing the initial page number
% (thanks to P J Couch for the suggestion).
@@ -203,7 +220,7 @@
\@verso at notesonlefttrue
% \end{macrocode}
%
-% Configuration options:
+% Define configuration options for the user:
% \begin{macrocode}
\def\verso at resetmergestate{\verso at mergestate=2}
\DeclareOption{mergecollisions}{\def\verso at resetmergestate{\verso at mergestate=0}}
@@ -221,6 +238,8 @@
\@esphack}
% \end{macrocode}
%
+% \subsection{Housekeeping: sizes and sentinels}
+%
% Now the layout parameters, and defaults.
% The dimensions |\versoleftmargin| and |\versotextwidth| specify the
% position of the text block on the verso page, and the declarations
@@ -318,12 +337,25 @@
% The paper size options to class files set |\paperheight| but not (or
% not necessarily) |\pdfpageheight|. If we don't set this, then
% output vertical positions will come out incorrectly if the latter
-% parameter doesn't default to the right value. The code in this package is
-% specific to pdf\TeX and friends, so we don't have to conditionalise.
+% parameter doesn't default to the right value. Lua\TeX\ and pdf\TeX\
+% (which includes Xe\TeX\ for this purpose) have slightly different
+% ways of organising page sizes, so we do have to conditionalise.
+% Here, we assume that everything that isn't Lua\TeX\ is pdf\TeX-like
+% enough that it has |\pdfpageheight|.
% \begin{macrocode}
-\pdfpageheight=\paperheight
+\RequirePackage{iftex}
+\ifluatex
+ \typeout{Detected LuaTeX}
+ \pageheight=\paperheight
+ \let\pdfsavepos=\savepos
+ \let\pdflastypos=\lastypos
+\else
+ \pdfpageheight=\paperheight
+\fi
% \end{macrocode}
%
+% \subsection{Core logic}
+%
% Macro |\verso at note| is what's written to the aux file, and so is
% what we process on the next run, to discover the set of verso-notes
% we need to produce.
@@ -525,24 +557,53 @@
\def\verso at mergenote#1{\xdef\verso at mergenotelist{\verso at mergenotelist #1,}}
% \end{macrocode}
%
-% Save the original definition of |\shipout|, prior to our
-% redefining it below. We could do this perfectly well using the
-% \Lpackage{everyshi} package, but we do it by hand in order to avoid
-% the extra dependency.
+% \subsection{Overall processing logic, and shipout}
+%
+% We want to use the current shipout mechanism, but also to remain
+% compatible with pre-2020 \LaTeX, so conditionalise appropriately.
+% Note that we can't use the (apparently preferable)
+% |\IfFormatAtLeastTF| command to do this test: we want to continue to
+% work even when we're using a \LaTeX\ which is too old for this
+% command to be defined.
% \begin{macrocode}
-\let\verso at orig@shipout\shipout
+\newif\ifverso at Liii
+\@ifl at t@r\fmtversion{2020/10/01}\verso at Liiitrue\verso at Liiifalse
+\PackageInfo{versonotes}
+ {choosing support for \ifverso at Liii L3\else pre-L3\fi}
% \end{macrocode}
%
+% For the L3 case, we will use the |shipout/before| hook, and use
+% |\RawShipout| to output the separate versonotes pages.
+% See the \texttt{ltshipout-doc} documentation for details.
+% But in the pre-L3 case, save the original definition of |\shipout|
+% (using the L3 |\RawShipout| name for clarity),
+% prior to our redefining it below.
+% We could do this perfectly well using the \Lpackage{everyshi} package,
+% but we do it by hand in order to avoid the extra dependency.
+% \begin{macrocode}
+\ifverso at Liii\else
+ \let\RawShipout\shipout
+\fi
+% \end{macrocode}
%
-% Process a single page of verso-notes.
+% We process the versonotes a page at a time. We don't have to do
+% anything clever, because the page that a versonote lands on is
+% governed by the page that the |\versonote| call appears on. If we
+% have a long versonote at the bottom of a page, then we don't try to
+% spill over onto the next (that would presumably be possible, using
+% the inserts mechanism, but would be a significant jump in
+% complication). We regard this situation as one for the user to work
+% out for themself.
%
% Macro |\verso at processonepage@| consumes the next group in the
-% |\verso at pages| list. This is invoked as part of the redefined
-% |\shipout|.
+% |\verso at pages| list.
%
% Macro |\verso at processonepage| is called just before each shipout of
-% a `real' page. If we are putting notes on verso pages (the usual
-% case), then \emph{before} we ship out page~2, we must construct and
+% a `real' page, as the content of the \texttt{shipout/before} hook
+% (or as part of the redefined |\shipout| in the pre-L3 case).
+% If we are putting notes on verso pages
+% (ie, the usual case, as opposed to recto notes),
+% then \emph{before} we ship out page~2, we must construct and
% ship out the notes for page~2; we will have a set of notes for
% page~1 (which we expect will be empty), which we must discard; we
% achieve this by simply doing nothing if the current page is page~1.
@@ -580,7 +641,7 @@
% If there are no verso-notes on this page, then ship out an empty box.
% \begin{macrocode}
\ifx\@tempa\@empty
- \verso at orig@shipout\vbox{}
+ \RawShipout\vbox{}
% \end{macrocode}
% This is the normal case:
% create a box containing the |\\{...}| contents of the
@@ -614,15 +675,17 @@
% Construct and ship out the page contents.
% \begin{macrocode}
\long\def\\##1{\verso at setnote ##1}
- \verso at orig@shipout\vbox{
+ \RawShipout\vbox{
\verso at currentposition=0pt
#1}
\endgroup
\fi
- \else
% \end{macrocode}
-% The |\verso at pagestoskip| counter is still positive, so decrement it.
+% Otherwise, the |\verso at pagestoskip| counter is still positive,
+% indicating that we are skipping pages.
+% Decrement the counter and do nothing else.
% \begin{macrocode}
+ \else
\global\advance\verso at pagestoskip -1
\fi
% \end{macrocode}
@@ -636,20 +699,26 @@
\def\verso at processonepage{
\if at verso@processversonotes
\expandafter\verso at processonepage@\the\verso at pages\@nil
- \else
% \end{macrocode}
-% We don't seem to have any versonotes in this file, so don't come here again.
+% If this test is false, then we don't seem to have any versonotes in this file,
+% so don't come here again.
% \begin{macrocode}
+ \else
\global\let\verso at processonepage\relax
\fi
}
% \end{macrocode}
%
-% And finally, redefine |\shipout|.
+% And finally, do the |\shipout| gymnastics.
% \begin{macrocode}
-\def\shipout{\verso at processonepage \verso at orig@shipout}
+\ifverso at Liii
+ \AddToHook{shipout/before}{\verso at processonepage}
+\else
+ \def\shipout{\verso at processonepage \RawShipout}
+\fi
% \end{macrocode}
%
+% All done!
% \begin{macrocode}
%</package>
% \end{macrocode}
Modified: trunk/Master/texmf-dist/tex/latex/versonotes/versonotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/versonotes/versonotes.sty 2023-12-31 12:06:01 UTC (rev 69248)
+++ trunk/Master/texmf-dist/tex/latex/versonotes/versonotes.sty 2023-12-31 21:25:02 UTC (rev 69249)
@@ -7,9 +7,9 @@
%% versonotes.dtx (with options: `package')
%% versonotes: Notes on verso pages
%%
-%% Release version 0.4, 2019 July 6.
+%% Release version 0.5, 2023 December 31.
%%
-%% Copyright 2014, 2015, 2019 Norman Gray <https://nxg.me.uk>
+%% Copyright 2014, 2015, 2019, 2023 Norman Gray <https://nxg.me.uk>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -28,10 +28,10 @@
%%
%%%% File: versonotes.dtx
-%%%% Source: 7d4f5fb7b19e, 2019-07-06T19:09:45+01:00
+%%%% Source: b86314fff92e, 2023-12-31T14:55:52+00:00
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{versonotes}[2019/07/06 v0.4]
+\ProvidesPackage{versonotes}[2023/12/31 v0.5]
\newif\if at verso@notesonleft
\@verso at notesonlefttrue
@@ -94,7 +94,15 @@
\advance\verso at pagebottom \headsep
\advance\verso at pagebottom \textheight
\newdimen\verso at currentposition
-\pdfpageheight=\paperheight
+\RequirePackage{iftex}
+\ifluatex
+ \typeout{Detected LuaTeX}
+ \pageheight=\paperheight
+ \let\pdfsavepos=\savepos
+ \let\pdflastypos=\lastypos
+\else
+ \pdfpageheight=\paperheight
+\fi
\long\def\verso at note#1#2#3{%
\global\@verso at processversonotestrue
\@tempcnta=#1
@@ -193,7 +201,13 @@
}
\def\verso at mergenotelist{}
\def\verso at mergenote#1{\xdef\verso at mergenotelist{\verso at mergenotelist #1,}}
-\let\verso at orig@shipout\shipout
+\newif\ifverso at Liii
+\@ifl at t@r\fmtversion{2020/10/01}\verso at Liiitrue\verso at Liiifalse
+\PackageInfo{versonotes}
+ {choosing support for \ifverso at Liii L3\else pre-L3\fi}
+\ifverso at Liii\else
+ \let\RawShipout\shipout
+\fi
\newcount\verso at pagestoskip
\if at verso@notesonleft
\verso at pagestoskip=1
@@ -204,7 +218,7 @@
\def\@tempa{#1}
\ifnum\verso at pagestoskip=0
\ifx\@tempa\@empty
- \verso at orig@shipout\vbox{}
+ \RawShipout\vbox{}
\else
\begingroup
\let\protect\relax
@@ -218,7 +232,7 @@
\vsize=1000mm % larger than any actual note
\normalfont\normalsize
\long\def\\##1{\verso at setnote ##1}
- \verso at orig@shipout\vbox{
+ \RawShipout\vbox{
\verso at currentposition=0pt
#1}
\endgroup
@@ -234,7 +248,11 @@
\global\let\verso at processonepage\relax
\fi
}
-\def\shipout{\verso at processonepage \verso at orig@shipout}
+\ifverso at Liii
+ \AddToHook{shipout/before}{\verso at processonepage}
+\else
+ \def\shipout{\verso at processonepage \RawShipout}
+\fi
\endinput
%%
%% End of file `versonotes.sty'.
More information about the tex-live-commits
mailing list.