texlive[49449] Master/texmf-dist: continue (18dec18)

commits+karl at tug.org commits+karl at tug.org
Wed Dec 19 00:32:36 CET 2018


Revision: 49449
          http://tug.org/svn/texlive?view=revision&revision=49449
Author:   karl
Date:     2018-12-19 00:32:36 +0100 (Wed, 19 Dec 2018)
Log Message:
-----------
continue (18dec18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/continue/README
    trunk/Master/texmf-dist/doc/latex/continue/continue.pdf
    trunk/Master/texmf-dist/doc/latex/continue/trycontinue.pdf
    trunk/Master/texmf-dist/doc/latex/continue/trycontinue.tex
    trunk/Master/texmf-dist/source/latex/continue/continue.dtx
    trunk/Master/texmf-dist/source/latex/continue/continue.ins
    trunk/Master/texmf-dist/tex/latex/continue/continue.sty

Modified: trunk/Master/texmf-dist/doc/latex/continue/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/continue/README	2018-12-18 23:32:25 UTC (rev 49448)
+++ trunk/Master/texmf-dist/doc/latex/continue/README	2018-12-18 23:32:36 UTC (rev 49449)
@@ -1,15 +1,20 @@
     The continue package provides for a variety of continuation indicators
-on recto (odd numbered) pages in a twosided document when the text 
-continues on the following (verso) page.
+by default on recto (odd numbered) pages in a twosided document when the text 
+continues on the following (verso) page. All pages may be marked and the marking 
+stopped and started. 
 
 Changes in version 0.1 (2015/12/09)
 o First public release
+Changes in version 0.2 (2018/12/09)
+o Second public release
+o All pages may be marked
+o Marking can be stopped and started
 
 
 ------------------------------------------------------------------
   Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
           with Donald Arseneau and Luca Merciadri
-  Copyright 2015 Peter R. Wilson, Donald Arseneau, Luca Merciadri
+  Copyright 2015, 2018 Peter R. Wilson, Donald Arseneau, Luca Merciadri
 
   This work may be distributed and/or modified under the
   conditions of the Latex Project Public License, either
@@ -20,7 +25,7 @@
   and version 1.3 or later is part of all distributions of
   LaTeX version 2003/06/01 or later.
 
-  This work has the LPPL maintenance status "author-maintained".
+  This work has the LPPL maintenance status "unmaintained".
 
   This work consists of the files:
     README (this file)
@@ -57,7 +62,7 @@
 o run: (pdf)latex *.dtx
 o Print *.(pdf|dvi) for a hardcopy of the package manual
 
-2015/12/09
+2018/12/09
 Peter Wilson
 herries dot press at earthlink dot net
 

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

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

Modified: trunk/Master/texmf-dist/doc/latex/continue/trycontinue.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/continue/trycontinue.tex	2018-12-18 23:32:25 UTC (rev 49448)
+++ trunk/Master/texmf-dist/doc/latex/continue/trycontinue.tex	2018-12-18 23:32:36 UTC (rev 49449)
@@ -7,7 +7,7 @@
 %% continue.dtx  (with options: `try')
 %% ------------------------------------------------------------------
 %%   Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-%%   Copyright 2015 Peter R. Wilson, Donald Arseneau, Luca Merciadri
+%%   Copyright 2015, 2018 Peter R. Wilson, Donald Arseneau, Luca Merciadri
 %% 
 %%   This work may be distributed and/or modified under the
 %%   conditions of the Latex Project Public License, either
@@ -18,24 +18,23 @@
 %%   and version 1.3 or later is part of all distributions of
 %%   LaTeX version 2003/06/01 or later.
 %% 
-%%   This work has the LPPL maintenance status "author-maintained".
+%%   This work has the LPPL maintenance status "unmaintained".
 %% 
 %%   This work consists of the files listed in the README file.
 %% ------------------------------------------------------------------
 
-%% trycontinue.tex  An example usage of the continue package
+%% trycontinue.tex  An example usage of the continue package (2018/12/09)
 %%
-%% The document is set in two columns with footnotes on A6 paper (I wanted
+%% The document is set with footnotes on A6 paper (I wanted
 %% to get many pages from little text). It is not pretty but does shows
 %% some of the continue package's capabilities. Try modifying it by changing
 %% options, etc., and see what happens.
 %%
-%% Please contact me, Peter Wilson at herries.press at earthlink.net, if there
+%% You can try and contact me, Peter Wilson at herries.press at earthlink.net, if there
 %% are problems other than the aesthetics.
 %%
 \documentclass[%
   twoside,
-  twocolumn,
   a6paper
   ]%
   {memoir}
@@ -43,7 +42,8 @@
 \usepackage%
 %%  [margin]%
 %%  [word]%
-  [margin,word]%
+%%  [margin,word]%
+  [margin,word,allpages]%
   {continue}
 \usepackage{lipsum}
 %%  try this without the word option
@@ -53,21 +53,22 @@
 
 \begin{document}
 
-\newcommand{\Footnote}[1]{}
-\let\Footnote\footnote
+First\footnote{Foot 1} \lipsum[1]
 
-First\Footnote{Foot 1} \lipsum[1]
+Second\footnote{Foot 2} \lipsum[2]
 
-Second\Footnote{Foot 2} \lipsum[2]
+Third\footnote{Foot 3} \lipsum[3]
 
-Third\Footnote{Foot 3} \lipsum[3]
+\contstop % stop marking
 
-Fourth\Footnote{Foot 4} \lipsum[4]
+Fourth\footnote{Foot 4} \lipsum[4]
 
-Fifth\Footnote{Foot 5} \lipsum[5]
+Fifth\footnote{Foot 5} \lipsum[5]
 
-Sixth\Footnote{Foot 6} \lipsum[6]
+\contgo % start marking
 
+Sixth\footnote{Foot 6} \lipsum[6]
+
 \end{document}
 
 

Modified: trunk/Master/texmf-dist/source/latex/continue/continue.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/continue/continue.dtx	2018-12-18 23:32:25 UTC (rev 49448)
+++ trunk/Master/texmf-dist/source/latex/continue/continue.dtx	2018-12-18 23:32:36 UTC (rev 49449)
@@ -3,7 +3,7 @@
 % continue.dtx
 %
 %  Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-%  Copyright 2015 Peter R. Wilson, Donald Arseneau and Merciadri Luca
+%  Copyright 2015, 2018 Peter R. Wilson, Donald Arseneau and Merciadri Luca
 %
 %  This work may be distributed and/or modified under the
 %  conditions of the Latex Project Public License, either
@@ -14,7 +14,7 @@
 %  and version 1.3 or later is part of all distributions of
 %  LaTeX version 2003/06/01 or later.
 %
-%  This work has the LPPL maintenance status "author-maintained".
+%  This work has the LPPL maintenance status "unmaintained".
 %
 %  This work consists of the files listed in the README file.
 %
@@ -84,6 +84,8 @@
 % \def\dtxfile{continue.dtx}
 % \changes{v0.1}{2015/12/09}{First trial release}
 % \def\fileversion{v0.1} \def\filedate{2015/12/09}
+% \changes{v0.2}{2018/12/09}{Second trial release, markers can be on all pages and stopped and started at will}
+% \def\fileversion{v0.2} \def\filedate{2018/12/09}
 
 % ^^A Flag an option
 % \makeatletter
@@ -136,7 +138,7 @@
 % \newcommand{\BC}{\textsc{bc}}
 % \newcommand{\AD}{\textsc{ad}}
 %
-% \title{\Lpack{Continue}: Continuation marks on recto (odd) pages\thanks{This
+% \title{\Lpack{Continue}: Continuation marks on (by default odd) pages\thanks{This
 %        file (\texttt{\dtxfile}) has version number \fileversion, last revised
 %        \filedate.}}
 %
@@ -149,8 +151,9 @@
 % \maketitle
 % \begin{abstract}
 %    The \Lpack{continue} package provides for a variety of continuation indicators on
-% recto (odd numbered) pages in a twosided document when the text continues on the following
-% (verso) page.  
+% pages in a twosided document when the text continues on the following
+% page. The default is to only mark odd pages but all pages can be marked or marking
+% can be stopped or started at any point.  
 % \end{abstract}
 % \tableofcontents
 %
@@ -200,7 +203,7 @@
 %
 % \subsection{Options}
 %
-%     There are two options that can be used when calling the package denoting the
+%     There are three options that can be used when calling the package denoting the
 % kind and position of the continuation marker.
 %
 % \DescribeOption{margin}
@@ -213,6 +216,11 @@
 % verso page as the continuation marker. If the option is not used then a user
 % specified marker is employed.
 %
+% \DescribeOption{allpages}
+%    With this option the package tries to provide a marker on each page, whether 
+% odd or even.
+% The default is to only provide markers on odd pages.
+%
 %  The relevant portions of the introduction to the \Lpack{fwlw} package are: \\
 % \begin{quotation}
 %  The \Lpack{fwlw} package provides a mechanism to determine ...
@@ -237,7 +245,9 @@
 % \end{quotation}
 %
 %    In essence, the `word' might not be what you might expect, but for most documents
-% the results are good.
+% the results are good. However, page~3 of the example file |trycontinue.tex| prints
+% a blank word as the continuation marker because the first line on the following
+% page is the start of a paragraph which starts with a space.
 %
 %
 %
@@ -262,8 +272,8 @@
 %
 % \DescribeMacro{\flagword}
 %     This command specifies how the continuation word is formated. Its definition is: \\
-%    |\newcommand*{\flagword}{\preflagword\usebox\NextWordBoxC\postflagword}| \\
-% where |\NextWordBoxC| holds the first word on the next recto page (empty if there
+%    |\newcommand*{\flagword}{\preflagword\usebox\NextWordBox\postflagword}| \\
+% where |\NextWordBox| holds the first word on the next recto page (empty if there
 % is no next recto page).
 %
 % \DescribeMacro{\preflagword}
@@ -294,19 +304,18 @@
 %
 %    \begin{macrocode}
 %<*try>
-%% trycontinue.tex  An example usage of the continue package
+%% trycontinue.tex  An example usage of the continue package (2018/12/09)
 %%
-%% The document is set in two columns with footnotes on A6 paper (I wanted
+%% The document is set with footnotes on A6 paper (I wanted
 %% to get many pages from little text). It is not pretty but does shows 
 %% some of the continue package's capabilities. Try modifying it by changing 
 %% options, etc., and see what happens.
 %% 
-%% Please contact me, Peter Wilson at herries.press at earthlink.net, if there
+%% You can try and contact me, Peter Wilson at herries.press at earthlink.net, if there
 %% are problems other than the aesthetics.
 %%
 \documentclass[%
   twoside,
-  twocolumn,
   a6paper
   ]%
   {memoir}
@@ -314,7 +323,8 @@
 \usepackage%
 %%  [margin]%
 %%  [word]%
-  [margin,word]%
+%%  [margin,word]%
+  [margin,word,allpages]%
   {continue}
 \usepackage{lipsum}
 %%  try this without the word option
@@ -324,21 +334,22 @@
 
 \begin{document}
 
-\newcommand{\Footnote}[1]{}
-\let\Footnote\footnote
+First\footnote{Foot 1} \lipsum[1]
 
-First\Footnote{Foot 1} \lipsum[1]
+Second\footnote{Foot 2} \lipsum[2]
 
-Second\Footnote{Foot 2} \lipsum[2]
+Third\footnote{Foot 3} \lipsum[3]
 
-Third\Footnote{Foot 3} \lipsum[3]
+\contstop % stop marking
 
-Fourth\Footnote{Foot 4} \lipsum[4]
+Fourth\footnote{Foot 4} \lipsum[4]
 
-Fifth\Footnote{Foot 5} \lipsum[5]
+Fifth\footnote{Foot 5} \lipsum[5]
 
-Sixth\Footnote{Foot 6} \lipsum[6]
+\contgo % start marking
 
+Sixth\footnote{Foot 6} \lipsum[6]
+
 \end{document}
 
 %</try>
@@ -348,11 +359,12 @@
 %
 %    Announce the name and version of the package, which requires
 % \LaTeXe{} and the \Lpack{atbegshi}, \Lpack{picture}, \Lpack{zref-abspage} and
-% \Lpack{zref-lastpage} packages and has options \Lopt{margin} and \Lopt{word}.
+% \Lpack{zref-lastpage} packages and has options \Lopt{margin}, \Lopt{word} and \Lopt{allpages}
+% (added \Lopt{allpages} 2018/11/30).
 %    \begin{macrocode}
 %<*usc>
  \NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{continue}[2015/12/04 v0.1 Continues on the following page]
+ \ProvidesPackage{continue}[2018/12/09 v0.2 Continues on the following page]
  \PackageInfo{continue}{This is continue using e-TeX.}
 
 %    \end{macrocode}
@@ -362,8 +374,10 @@
 %    \begin{macrocode}
  \newif{\ifcontmargin} \contmarginfalse
  \newif{\ifcontword}   \contwordfalse
+ \newif{\ifcontallpages} \contallpagesfalse
  \DeclareOption{margin}{\contmargintrue}
  \DeclareOption{word}{\contwordtrue}
+ \DeclareOption{allpages}{\contallpagestrue}
  \ProcessOptions
 
 %    \end{macrocode}
@@ -370,6 +384,21 @@
 % \end{macro}
 % \end{macro}
 %
+% \begin{macro}{\ifc at go}
+% \begin{macro}{\contgo}
+% \begin{macro}{\contstop}
+% Continuation marks will stop after |\contstop| but will continue after |\contgo| 
+% (the default)
+%    \begin{macrocode}
+\newif{\ifc at go} \c at gotrue
+\newcommand{\contgo}{\c at gotrue}
+\newcommand{\contstop}{\c at gofalse}
+
+%    \end{macrocode}%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
 % And the required packages needed by the original \Lpack{turnpageetex} package.
 %
 %    \begin{macrocode}
@@ -386,7 +415,6 @@
 %
 %    \begin{macrocode}
 % --------------------------------------------------------------------------
- \ifcontword
 %
 %    \end{macrocode}
 %
@@ -397,16 +425,16 @@
 %    \end{macrocode} 
 % \end{macro}
 %
-% \begin{macro}{\FirstWordBoxC}
-% \begin{macro}{\NextWordBoxC}
-% \begin{macro}{\LastWordBoxC}
+% \begin{macro}{\FirstWordBox}
+% \begin{macro}{\NextWordBox}
+% \begin{macro}{\LastWordBox}
 % \begin{macro}{\LWC at box}
 % \begin{macro}{\LWC at saved}
 % Allocate box registers
 %    \begin{macrocode}
- \newbox\FirstWordBoxC     \global\setbox\FirstWordBoxC\hbox{}
- \newbox\NextWordBoxC      \global\setbox\NextWordBoxC\hbox{}
- \newbox\LastWordBoxC      \global\setbox\LastWordBoxC\hbox{}
+ \newbox\FirstWordBox     \global\setbox\FirstWordBox\hbox{}
+ \newbox\NextWordBox      \global\setbox\NextWordBox\hbox{}
+ \newbox\LastWordBox      \global\setbox\LastWordBox\hbox{}
  \newbox\LWC at box           \global\setbox\LWC at box\hbox{}
  \newbox\LWC at saved
 %    \end{macrocode} 
@@ -441,7 +469,7 @@
       \setbox\@tempboxa\vbox{\unvbox\@cclv \unskip\unkern\unpenalty%     
        \unskip\unkern\unpenalty \unskip\unkern\unpenalty
         \setbox\@tempboxa\lastbox
-        \LWC at getlast@word\@tempboxa\LastWordBoxC
+        \LWC at getlast@word\@tempboxa\LastWordBox
       }
 %\end{comment}
       \ifnum\outputpenalty>-\@MM % not \supereject
@@ -451,22 +479,22 @@
       \else % \supereject, just output, don't look for word on next page
 %      \message{caused by super-eject.}
         \global\setbox\@cclv\box\LWC at saved
-        \global\setbox\NextWordBoxC\hbox{}%
+        \global\setbox\NextWordBox\hbox{}%
         \FWLWCnorm at L@output
-        \global\setbox\FirstWordBoxC\box\NextWordBoxC
+        \global\setbox\FirstWordBox\box\NextWordBox
       \fi
    \else % saved page => just did tiny page to get next word
 %    \message{Just got next line:}{\tracingall\showboxdepth2 \showbox\@cclv}%
       \setbox\@tempboxa\vbox{\penalty\LWC at pen\unvcopy\@cclv \LWC at getall@boxes
         \ifvbox\LWC at box \penalty\LWC at pen\unvbox\LWC at box \LWC at getall@boxes\fi
-        \ifvbox\LWC at box \global\setbox\NextWordBoxC\hbox{}\else
-          \LWC at getfirst@word\LWC at box\NextWordBoxC
+        \ifvbox\LWC at box \global\setbox\NextWordBox\hbox{}\else
+          \LWC at getfirst@word\LWC at box\NextWordBox
         \fi}%  Return tiny page to page list:
       \unvbox\@cclv \ifnum\outputpenalty<\@M \penalty\outputpenalty\fi
       \LWC at vsize\relax
       \global\setbox\@cclv\box\LWC at saved
       \FWLWCnorm at L@output
-      \global\setbox\FirstWordBoxC\box\NextWordBoxC
+      \global\setbox\FirstWordBox\box\NextWordBox
  \fi\fi}
 
 %    \end{macrocode}
@@ -526,10 +554,6 @@
    \else\ifvbox\LWC at box\box\LWC at box\fi\fi}}
 %    \end{macrocode} 
 % \end{macro}
-% Now finish with the fwlw code when it is not needed.
-%    \begin{macrocode}
- \fi
-%    \end{macrocode}
 %
 % The next chunk of code is a revised version of the original \Lpack{turnpageetex} package.
 %    \begin{macrocode}
@@ -552,7 +576,7 @@
  \newcommand*{\postflagword}{}
  \newcommand*{\flagcont}{Continued}
  \newcommand*{\flagend}{End}
- \newcommand*{\flagword}{\preflagword\usebox\NextWordBoxC\postflagword}
+ \newcommand*{\flagword}{\preflagword\usebox\NextWordBox\postflagword}
  \newlength{\contsep}\setlength{\contsep}{\marginparsep}
  \newlength{\contdrop}\setlength{\contdrop}{0.5\footskip}
 %    \end{macrocode}
@@ -571,47 +595,87 @@
 % \end{macro}
 % \end{macro}
 %
-% 
+% \begin{macro}{\c at ntoddpagepos}
+% |\c at ntoddpagepos| calculates the position of the marker on odd pages.
 %    \begin{macrocode}
- \AtBeginShipout{%
- \AtBeginShipoutUpperLeft{%
+ \newcommand{\c at ntoddpagepos}{%
+     \dimen1=1in
+     \advance\dimen1 by \textwidth
+     \advance\dimen1 by \oddsidemargin
+     \dimen3=1in
+     \advance\dimen3 by \topmargin
+     \advance\dimen3 by \headheight
+     \advance\dimen3 by \headsep
+     \advance\dimen3 by \textheight
+     \ifcontmargin
+       \advance\dimen1 by \contsep
+     \else
+       \advance\dimen3 by \contdrop
+     \fi
+ }
 %    \end{macrocode}
+% \end{macro}
 %
-% Specify the location of the continuation marks.
+% \begin{macro}{\c at ntevenpagepos}
+% |\c at ntevenpagepos| calculates the position of the marker on even pages.
+%    \begin{macrocode}
+ \newcommand{\c at ntevenpagepos}{%
+     \dimen1=1in
+     \advance\dimen1 by \textwidth
+     \advance\dimen1 by \evensidemargin
+     \dimen3=1in
+     \advance\dimen3 by \topmargin
+     \advance\dimen3 by \headheight
+     \advance\dimen3 by \headsep
+     \advance\dimen3 by \textheight
+     \ifcontmargin
+       \advance\dimen1 by \contsep
+     \else
+       \advance\dimen3 by \contdrop
+     \fi
+ }
+%    \end{macrocode}
+% \end{macro}
 %
+%
+% \begin{macro}{\c at outcontpage}
+% Output continued marked page.
 %    \begin{macrocode}
-     \ifodd\c at page
-         \dimen1=1in
-         \advance\dimen1 by \textwidth
-         \advance\dimen1 by \oddsidemargin
-         \dimen3=1in
-         \advance\dimen3 by \topmargin
-         \advance\dimen3 by \headheight
-         \advance\dimen3 by \headsep
-         \advance\dimen3 by \textheight
-         \ifcontmargin
-           \advance\dimen1 by \contsep
-         \else
-           \advance\dimen3 by \contdrop
-         \fi
+\newcommand{\c at outcontpage}{%
+  \ifnum\zref at extract{LastPage}{abspage}>\c at abspage
+    \ifcontmargin
+      \put(\dimen1,-\dimen3){{\flagcont}}%
+    \else
+      \put(\dimen1,-\dimen3){\llap{\flagcont}}%
+    \fi
+  \else
+    \ifcontmargin
+      \put(\dimen1,-\dimen3){{\flagend}}%
+    \else
+      \put(\dimen1,-\dimen3){\llap{\flagend}}%
+    \fi
+  \fi
+}% end of \c at outcontpage
 %    \end{macrocode}
-% Otput the page and marks.
+% \end{macro}
+%
+% Output the page and marks.
 %    \begin{macrocode}
-      \ifnum\zref at extract{LastPage}{abspage}>\c at abspage
-        \ifcontmargin
-          \put(\dimen1,-\dimen3){{\flagcont}}%
-        \else
-          \put(\dimen1,-\dimen3){\llap{\flagcont}}%
-        \fi
-      \else
-        \ifcontmargin
-          \put(\dimen1,-\dimen3){{\flagend}}%
-        \else
-          \put(\dimen1,-\dimen3){\llap{\flagend}}%
-        \fi
-      \fi%
-    \fi%
-}}
+\AtBeginShipout{%
+\AtBeginShipoutUpperLeft{%
+ \ifc at go
+  \ifodd\c at page
+    \c at ntoddpagepos
+    \c at outcontpage
+  \else
+    \ifcontallpages
+      \c at ntevenpagepos
+      \c at outcontpage
+    \fi
+  \fi
+ \fi
+} % end AtBeginShipoutUpperLeft
+} % end AtBeginShipout
 %
 %</usc>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/continue/continue.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/continue/continue.ins	2018-12-18 23:32:25 UTC (rev 49448)
+++ trunk/Master/texmf-dist/source/latex/continue/continue.ins	2018-12-18 23:32:36 UTC (rev 49449)
@@ -11,7 +11,7 @@
 %%  and version 1.3 or later is part of all distributions of
 %%  LaTeX version 2003/06/01 or later.
 %%
-%%  This work has the LPPL maintenance status "author-maintained".
+%%  This work has the LPPL maintenance status "unmaintained".
 %%
 %%  This work consists of the files listed in the README file.
 %%
@@ -25,7 +25,7 @@
 \preamble
 ------------------------------------------------------------------
   Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-  Copyright 2015 Peter R. Wilson, Donald Arseneau, Luca Merciadri
+  Copyright 2015, 2018 Peter R. Wilson, Donald Arseneau, Luca Merciadri
 
   This work may be distributed and/or modified under the
   conditions of the Latex Project Public License, either
@@ -36,7 +36,7 @@
   and version 1.3 or later is part of all distributions of
   LaTeX version 2003/06/01 or later.
 
-  This work has the LPPL maintenance status "author-maintained".
+  This work has the LPPL maintenance status "unmaintained".
 
   This work consists of the files listed in the README file.
 ------------------------------------------------------------------

Modified: trunk/Master/texmf-dist/tex/latex/continue/continue.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/continue/continue.sty	2018-12-18 23:32:25 UTC (rev 49448)
+++ trunk/Master/texmf-dist/tex/latex/continue/continue.sty	2018-12-18 23:32:36 UTC (rev 49449)
@@ -7,7 +7,7 @@
 %% continue.dtx  (with options: `usc')
 %% ------------------------------------------------------------------
 %%   Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-%%   Copyright 2015 Peter R. Wilson, Donald Arseneau, Luca Merciadri
+%%   Copyright 2015, 2018 Peter R. Wilson, Donald Arseneau, Luca Merciadri
 %% 
 %%   This work may be distributed and/or modified under the
 %%   conditions of the Latex Project Public License, either
@@ -18,31 +18,36 @@
 %%   and version 1.3 or later is part of all distributions of
 %%   LaTeX version 2003/06/01 or later.
 %% 
-%%   This work has the LPPL maintenance status "author-maintained".
+%%   This work has the LPPL maintenance status "unmaintained".
 %% 
 %%   This work consists of the files listed in the README file.
 %% ------------------------------------------------------------------
 
  \NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{continue}[2015/12/04 v0.1 Continues on the following page]
+ \ProvidesPackage{continue}[2018/12/09 v0.2 Continues on the following page]
  \PackageInfo{continue}{This is continue using e-TeX.}
 
  \newif{\ifcontmargin} \contmarginfalse
  \newif{\ifcontword}   \contwordfalse
+ \newif{\ifcontallpages} \contallpagesfalse
  \DeclareOption{margin}{\contmargintrue}
  \DeclareOption{word}{\contwordtrue}
+ \DeclareOption{allpages}{\contallpagestrue}
  \ProcessOptions
 
+\newif{\ifc at go} \c at gotrue
+\newcommand{\contgo}{\c at gotrue}
+\newcommand{\contstop}{\c at gofalse}
+
  \RequirePackage{atbegshi}
  \RequirePackage{picture}
  \RequirePackage{zref-abspage}
  \RequirePackage{zref-lastpage}
 
- \ifcontword
  \mathchardef\LWC at pen 13452
- \newbox\FirstWordBoxC     \global\setbox\FirstWordBoxC\hbox{}
- \newbox\NextWordBoxC      \global\setbox\NextWordBoxC\hbox{}
- \newbox\LastWordBoxC      \global\setbox\LastWordBoxC\hbox{}
+ \newbox\FirstWordBox     \global\setbox\FirstWordBox\hbox{}
+ \newbox\NextWordBox      \global\setbox\NextWordBox\hbox{}
+ \newbox\LastWordBox      \global\setbox\LastWordBox\hbox{}
  \newbox\LWC at box           \global\setbox\LWC at box\hbox{}
  \newbox\LWC at saved
  \edef\FWLWCnorm at L@output{\the\output}
@@ -57,7 +62,7 @@
       \setbox\@tempboxa\vbox{\unvbox\@cclv \unskip\unkern\unpenalty%
        \unskip\unkern\unpenalty \unskip\unkern\unpenalty
         \setbox\@tempboxa\lastbox
-        \LWC at getlast@word\@tempboxa\LastWordBoxC
+        \LWC at getlast@word\@tempboxa\LastWordBox
       }
       \ifnum\outputpenalty>-\@MM % not \supereject
         \xdef\LWC at vsize{\global\vsize\the\vsize
@@ -65,21 +70,21 @@
         \global\vsize\z@ \global\holdinginserts\@ne
       \else % \supereject, just output, don't look for word on next page
         \global\setbox\@cclv\box\LWC at saved
-        \global\setbox\NextWordBoxC\hbox{}%
+        \global\setbox\NextWordBox\hbox{}%
         \FWLWCnorm at L@output
-        \global\setbox\FirstWordBoxC\box\NextWordBoxC
+        \global\setbox\FirstWordBox\box\NextWordBox
       \fi
    \else % saved page => just did tiny page to get next word
       \setbox\@tempboxa\vbox{\penalty\LWC at pen\unvcopy\@cclv \LWC at getall@boxes
         \ifvbox\LWC at box \penalty\LWC at pen\unvbox\LWC at box \LWC at getall@boxes\fi
-        \ifvbox\LWC at box \global\setbox\NextWordBoxC\hbox{}\else
-          \LWC at getfirst@word\LWC at box\NextWordBoxC
+        \ifvbox\LWC at box \global\setbox\NextWordBox\hbox{}\else
+          \LWC at getfirst@word\LWC at box\NextWordBox
         \fi}%  Return tiny page to page list:
       \unvbox\@cclv \ifnum\outputpenalty<\@M \penalty\outputpenalty\fi
       \LWC at vsize\relax
       \global\setbox\@cclv\box\LWC at saved
       \FWLWCnorm at L@output
-      \global\setbox\FirstWordBoxC\box\NextWordBoxC
+      \global\setbox\FirstWordBox\box\NextWordBox
  \fi\fi}
 
  \def\LWC at getlast@word#1#2{\setbox\@tempboxa\vbox{\hsize\maxdimen \@parboxrestore
@@ -110,49 +115,77 @@
  \def\LWC at repack#1{\global\setbox#1\hbox{\ifhbox\LWC at box
     \unhbox\LWC at box\unskip\unskip\unpenalty\unskip
    \else\ifvbox\LWC at box\box\LWC at box\fi\fi}}
- \fi
 
  \newcommand*{\preflagword}{}
  \newcommand*{\postflagword}{}
  \newcommand*{\flagcont}{Continued}
  \newcommand*{\flagend}{End}
- \newcommand*{\flagword}{\preflagword\usebox\NextWordBoxC\postflagword}
+ \newcommand*{\flagword}{\preflagword\usebox\NextWordBox\postflagword}
  \newlength{\contsep}\setlength{\contsep}{\marginparsep}
  \newlength{\contdrop}\setlength{\contdrop}{0.5\footskip}
  \ifcontword
   \let\flagcont\flagword
  \fi
- \AtBeginShipout{%
- \AtBeginShipoutUpperLeft{%
-     \ifodd\c at page
-         \dimen1=1in
-         \advance\dimen1 by \textwidth
-         \advance\dimen1 by \oddsidemargin
-         \dimen3=1in
-         \advance\dimen3 by \topmargin
-         \advance\dimen3 by \headheight
-         \advance\dimen3 by \headsep
-         \advance\dimen3 by \textheight
-         \ifcontmargin
-           \advance\dimen1 by \contsep
-         \else
-           \advance\dimen3 by \contdrop
-         \fi
-      \ifnum\zref at extract{LastPage}{abspage}>\c at abspage
-        \ifcontmargin
-          \put(\dimen1,-\dimen3){{\flagcont}}%
-        \else
-          \put(\dimen1,-\dimen3){\llap{\flagcont}}%
-        \fi
-      \else
-        \ifcontmargin
-          \put(\dimen1,-\dimen3){{\flagend}}%
-        \else
-          \put(\dimen1,-\dimen3){\llap{\flagend}}%
-        \fi
-      \fi%
-    \fi%
-}}
+ \newcommand{\c at ntoddpagepos}{%
+     \dimen1=1in
+     \advance\dimen1 by \textwidth
+     \advance\dimen1 by \oddsidemargin
+     \dimen3=1in
+     \advance\dimen3 by \topmargin
+     \advance\dimen3 by \headheight
+     \advance\dimen3 by \headsep
+     \advance\dimen3 by \textheight
+     \ifcontmargin
+       \advance\dimen1 by \contsep
+     \else
+       \advance\dimen3 by \contdrop
+     \fi
+ }
+ \newcommand{\c at ntevenpagepos}{%
+     \dimen1=1in
+     \advance\dimen1 by \textwidth
+     \advance\dimen1 by \evensidemargin
+     \dimen3=1in
+     \advance\dimen3 by \topmargin
+     \advance\dimen3 by \headheight
+     \advance\dimen3 by \headsep
+     \advance\dimen3 by \textheight
+     \ifcontmargin
+       \advance\dimen1 by \contsep
+     \else
+       \advance\dimen3 by \contdrop
+     \fi
+ }
+\newcommand{\c at outcontpage}{%
+  \ifnum\zref at extract{LastPage}{abspage}>\c at abspage
+    \ifcontmargin
+      \put(\dimen1,-\dimen3){{\flagcont}}%
+    \else
+      \put(\dimen1,-\dimen3){\llap{\flagcont}}%
+    \fi
+  \else
+    \ifcontmargin
+      \put(\dimen1,-\dimen3){{\flagend}}%
+    \else
+      \put(\dimen1,-\dimen3){\llap{\flagend}}%
+    \fi
+  \fi
+}% end of \c at outcontpage
+\AtBeginShipout{%
+\AtBeginShipoutUpperLeft{%
+ \ifc at go
+  \ifodd\c at page
+    \c at ntoddpagepos
+    \c at outcontpage
+  \else
+    \ifcontallpages
+      \c at ntevenpagepos
+      \c at outcontpage
+    \fi
+  \fi
+ \fi
+} % end AtBeginShipoutUpperLeft
+} % end AtBeginShipout
 
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z



More information about the tex-live-commits mailing list