texlive[51568] Master/texmf-dist: versonotes (6jul19)

commits+karl at tug.org commits+karl at tug.org
Sat Jul 6 22:41:23 CEST 2019


Revision: 51568
          http://tug.org/svn/texlive?view=revision&revision=51568
Author:   karl
Date:     2019-07-06 22:41:23 +0200 (Sat, 06 Jul 2019)
Log Message:
-----------
versonotes (6jul19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/versonotes/README
    trunk/Master/texmf-dist/doc/latex/versonotes/sample.pdf
    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

Modified: trunk/Master/texmf-dist/doc/latex/versonotes/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/versonotes/README	2019-07-06 20:41:10 UTC (rev 51567)
+++ trunk/Master/texmf-dist/doc/latex/versonotes/README	2019-07-06 20:41:23 UTC (rev 51568)
@@ -1,7 +1,7 @@
 Package versonotes
 ==================
 
-Version 0.3, 2015 December 8
+Version 0.4, 2019 July 6
 
 This package allows you to place notes on the verso pages of an
 otherwise single-sided document.
@@ -13,33 +13,40 @@
 You can see a sample of how to use the package, and its results, in
 sample.tex and sample.pdf.
 
-The source is at https://bitbucket.org/nxg/versonotes ,
+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.
 
-Release notes
--------------
+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.
 
+  * Added the [rectonotes] option (thanks to Axel Berger for
+    this suggestion).
+
 Version 0.2, 2015 February 16
+    Initial public release.
 
-  * Fixed a few formatting and distribution infelicities.
 
-Version 0.1, 2015 February 14
 
-  * Initial release
-
-
 Norman Gray  
-http://nxg.me.uk
+https://nxg.me.uk
 
-
+[bitbucket]: https://bitbucket.org/nxg/versonotes
 [ctan]: http://www.ctan.org/pkg/versonotes

Modified: trunk/Master/texmf-dist/doc/latex/versonotes/sample.pdf
===================================================================
(Binary files differ)

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	2019-07-06 20:41:10 UTC (rev 51567)
+++ trunk/Master/texmf-dist/source/latex/versonotes/versonotes.drv	2019-07-06 20:41:23 UTC (rev 51568)
@@ -7,9 +7,9 @@
 %% versonotes.dtx  (with options: `driver')
 %% versonotes: Notes on verso pages
 %%
-%% Release version 0.3, 2015 December 8.
+%% Release version 0.4, 2019 July 6.
 %%
-%% Copyright 2014, 2015 Norman Gray <http://nxg.me.uk>
+%% Copyright 2014, 2015, 2019 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: 1ce01fd3d4fc, 2015-09-16T13:05:15+01:00
+%%%% Source: 7d4f5fb7b19e, 2019-07-06T19:09:45+01:00
 %%
 \documentclass{ltxdoc}
 \title{versonotes: Notes on verso pages}
-\author{Norman Gray\\\url{http://nxg.me.uk}}
-\date{Release 0.3, 2015 December 8}
+\author{Norman Gray\\\url{https://nxg.me.uk}}
+\date{Release 0.4, 2019 July 6}
 \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	2019-07-06 20:41:10 UTC (rev 51567)
+++ trunk/Master/texmf-dist/source/latex/versonotes/versonotes.dtx	2019-07-06 20:41:23 UTC (rev 51568)
@@ -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.3, 2015 December 8.
+%% Release version 0.4, 2019 July 6.
 %%
-%% Copyright 2014, 2015 Norman Gray <http://nxg.me.uk>
+%% Copyright 2014, 2015, 2019 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: 1ce01fd3d4fc, 2015-09-16T13:05:15+01:00
+%<+package|driver|example>%%%% Source: 7d4f5fb7b19e, 2019-07-06T19:09:45+01:00
 %%
 %<+package>\NeedsTeXFormat{LaTeX2e}
-%<+package>\ProvidesPackage{versonotes}[2015/12/08 v0.3]
+%<+package>\ProvidesPackage{versonotes}[2019/07/06 v0.4]
 %
 %<*driver>
 \documentclass{ltxdoc}
 \title{versonotes: Notes on verso pages}
-\author{Norman Gray\\\url{http://nxg.me.uk}}
-\date{Release 0.3, 2015 December 8}
+\author{Norman Gray\\\url{https://nxg.me.uk}}
+\date{Release 0.4, 2019 July 6}
 \usepackage{url}
 \newcommand\Lopt[1]{\textsf {#1}} % options
 \newcommand\file[1]{\texttt {#1}}
@@ -64,7 +64,6 @@
 
 \def\bs{$\backslash$}
 
-%\OnlyDescription
 \begin{document}
 \maketitle
 %\tableofcontents
@@ -93,6 +92,11 @@
 %
 % To invoke the package, use the command |\usepackage{versonotes}|.
 %
+% It is possible to start the document other than on page one.  To do
+% this, you can call |\setcounter{page}{|\emph{n}|}| as usual, but it
+% must be done \emph{before} the line |\usepackage{versonotes}|.  The
+% package may get confused if the page number is changed at other times.
+%
 % If two notes come too close after one another, the second would
 % overprint the first if we did not take steps to avoid this.  By
 % default, they are separated from each other by a short horizontal
@@ -112,7 +116,7 @@
 % 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
-% document at the time the package is loaded.
+% document \emph{at the time the package is loaded}.
 % By default, verso paragraphs are set ragged-left; with the
 % declarations in |\versolayout| setting the paragraph parameters.
 % You may reset the first two dimensions with for example
@@ -147,6 +151,9 @@
 % located opposite the position where the |\versonote| macro was
 % called on the \emph{previous} run.
 %
+% \item If notes collide, you may well have to re-run \LaTeX\ several
+% times.  There is quite a lot of state in the |.aux| file.
+%
 % \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
@@ -154,10 +161,28 @@
 %
 % \end{itemize}
 %
-% \subsection*{Acknowledgements}
+% \subsection*{Acknowledgements, and release notes}
 %
-% Thanks to Thomas H.\ Luxon for permission to include the `Paradise
-% Lost' notes in the sample text, and to Axel Berger for suggesting the `rectonotes' option.
+% \iffalse @RELEASENOTES@ \fi
+% 
+% 
+% Thanks to Thomas H. Luxon for permission to include the
+% ‘Paradise Lost’ notes in the sample text.
+% 
+% \begin{description}
+% \item[Version 0.4, 2019 July 6]\relax 
+% Support changing the initial page number
+% (thanks to P J Couch for the suggestion).
+% \item[Version 0.3, 2015 December 8]\relax 
+% \leavevmode\begin{itemize}
+% \item Minor documentation adjustments.
+% \item Added the [rectonotes] option
+% (thanks to Axel Berger for this suggestion).
+% \end{itemize}
+% \item[Version 0.2, 2015 February 16]\relax 
+% Initial public release.
+% \end{description}
+% 
 %
 % \StopEventually{}
 

@@ -252,8 +277,16 @@
 % before being transferred as a unit into |\verso at pages|.
 %    \begin{macrocode}
 \newtoks\verso at currentpage
+%    \end{macrocode}
+% We keep track of page numbers when invoking |\verso at note| below.  We
+% initialise this to be the current page number (typically~1).  Doing
+% this this way means that if the document sets the current page
+% number using |\setcounter{page}{n}| \emph{before} loading the
+% package, then we will respect that.  We will get confused if the
+% page number is changed at other points.
+%    \begin{macrocode}
 \newcount\verso at currentpagenum
-  \verso at currentpagenum=1
+  \verso at currentpagenum=\c at page
 \newcount\verso at currentnotenum
   \verso at currentnotenum=0
 \newdimen\verso at spacerskip
@@ -298,14 +331,14 @@
 \long\def\verso at note#1#2#3{%
   \global\@verso at processversonotestrue
 %    \end{macrocode}
-% Store the target page number, and issue a warning if this was
+% Store the target page number.  It would be nice to issue a warning if this is
 % indicated to appear on the (ignored) first page; such notes are
-% silently discarded below.
+% silently discarded below.  However detecting this here requires that
+% |\@tempcnta| is equal to~1 on the call of this, and we can't
+% guarantee this if we support calling |\setcounter{page}{x}| before
+% loading the package.
 %    \begin{macrocode}
   \@tempcnta=#1
-  \ifnum\@tempcnta=1
-    \PackageWarning{versopages}{page 1 verso text will be ignored}
-  \fi
 %    \end{macrocode}
 % Gather pages from the .aux file, assembling them into a single list
 % in |\verso at pages| with one group per page, each containing a
@@ -518,7 +551,23 @@
 % must similarly do nothing on pages~1 and~2.  This works because
 % in the latter case we have initialised |\verso at pages| with an extra
 % leading |{{}}|.
+%
+% We manage the page skipping by decrementing a `pages to skip'
+% counter.  The more obvious way of doing that it to test the value of
+% |\@tempcnta|, which at this point holds the current page number, but
+% this produces the wrong answer if the document starts at other than
+% page~1 (perhaps because the document includes |\setcounter{page}{99}|).
 %    \begin{macrocode}
+\newcount\verso at pagestoskip
+\if at verso@notesonleft
+  \verso at pagestoskip=1
+\else
+  \verso at pagestoskip=2
+\fi
+%    \end{macrocode}
+%
+% Define |\verso at processonepage@|.
+%    \begin{macrocode}
 \long\def\verso at processonepage@#1#2\@nil{
   \def\@tempa{#1}
 %    \end{macrocode}
@@ -526,12 +575,7 @@
 % recto case).  Any notes which would appear in such a position are
 % silently discarded.
 %    \begin{macrocode}
-  \if at verso@notesonleft
-    \@tempcnta=1
-  \else
-    \@tempcnta=2
-  \fi
-  \ifnum\c at page>\@tempcnta
+  \ifnum\verso at pagestoskip=0
 %    \end{macrocode}
 % If there are no verso-notes on this page, then ship out an empty box.
 %    \begin{macrocode}
@@ -575,6 +619,11 @@
           #1}
       \endgroup
     \fi
+  \else
+%    \end{macrocode}
+% The |\verso at pagestoskip| counter is still positive, so decrement it.
+%    \begin{macrocode}
+    \global\advance\verso at pagestoskip -1
   \fi
 %    \end{macrocode}
 % Finally, set |\verso at pages| to the tail of the list.

Modified: trunk/Master/texmf-dist/tex/latex/versonotes/versonotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/versonotes/versonotes.sty	2019-07-06 20:41:10 UTC (rev 51567)
+++ trunk/Master/texmf-dist/tex/latex/versonotes/versonotes.sty	2019-07-06 20:41:23 UTC (rev 51568)
@@ -7,9 +7,9 @@
 %% versonotes.dtx  (with options: `package')
 %% versonotes: Notes on verso pages
 %%
-%% Release version 0.3, 2015 December 8.
+%% Release version 0.4, 2019 July 6.
 %%
-%% Copyright 2014, 2015 Norman Gray <http://nxg.me.uk>
+%% Copyright 2014, 2015, 2019 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: 1ce01fd3d4fc, 2015-09-16T13:05:15+01:00
+%%%% Source: 7d4f5fb7b19e, 2019-07-06T19:09:45+01:00
 %%
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{versonotes}[2015/12/08 v0.3]
+\ProvidesPackage{versonotes}[2019/07/06 v0.4]
  
 \newif\if at verso@notesonleft
 \@verso at notesonlefttrue
@@ -79,7 +79,7 @@
   \fi
 \newtoks\verso at currentpage
 \newcount\verso at currentpagenum
-  \verso at currentpagenum=1
+  \verso at currentpagenum=\c at page
 \newcount\verso at currentnotenum
   \verso at currentnotenum=0
 \newdimen\verso at spacerskip
@@ -98,9 +98,6 @@
 \long\def\verso at note#1#2#3{%
   \global\@verso at processversonotestrue
   \@tempcnta=#1
-  \ifnum\@tempcnta=1
-    \PackageWarning{versopages}{page 1 verso text will be ignored}
-  \fi
   \@tempdima=#2 % #2 < 0pt is the end-of-document flag
   \loop
     \@tempswafalse
@@ -197,14 +194,15 @@
 \def\verso at mergenotelist{}
 \def\verso at mergenote#1{\xdef\verso at mergenotelist{\verso at mergenotelist #1,}}
 \let\verso at orig@shipout\shipout
+\newcount\verso at pagestoskip
+\if at verso@notesonleft
+  \verso at pagestoskip=1
+\else
+  \verso at pagestoskip=2
+\fi
 \long\def\verso at processonepage@#1#2\@nil{
   \def\@tempa{#1}
-  \if at verso@notesonleft
-    \@tempcnta=1
-  \else
-    \@tempcnta=2
-  \fi
-  \ifnum\c at page>\@tempcnta
+  \ifnum\verso at pagestoskip=0
     \ifx\@tempa\@empty
       \verso at orig@shipout\vbox{}
     \else
@@ -225,6 +223,8 @@
           #1}
       \endgroup
     \fi
+  \else
+    \global\advance\verso at pagestoskip -1
   \fi
   \global\verso at pages={#2}}
 \def\verso at processonepage{



More information about the tex-live-commits mailing list