diff options
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/continue/continue.dtx | 216 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/continue/continue.ins | 6 |
2 files changed, 143 insertions, 79 deletions
diff --git a/Master/texmf-dist/source/latex/continue/continue.dtx b/Master/texmf-dist/source/latex/continue/continue.dtx index 6b44d0255db..8cc5863465c 100644 --- a/Master/texmf-dist/source/latex/continue/continue.dtx +++ b/Master/texmf-dist/source/latex/continue/continue.dtx @@ -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@earthlink.net, if there +%% You can try and contact me, Peter Wilson at herries.press@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,20 +334,21 @@ \begin{document} -\newcommand{\Footnote}[1]{} -\let\Footnote\footnote +First\footnote{Foot 1} \lipsum[1] + +Second\footnote{Foot 2} \lipsum[2] -First\Footnote{Foot 1} \lipsum[1] +Third\footnote{Foot 3} \lipsum[3] -Second\Footnote{Foot 2} \lipsum[2] +\contstop % stop marking -Third\Footnote{Foot 3} \lipsum[3] +Fourth\footnote{Foot 4} \lipsum[4] -Fourth\Footnote{Foot 4} \lipsum[4] +Fifth\footnote{Foot 5} \lipsum[5] -Fifth\Footnote{Foot 5} \lipsum[5] +\contgo % start marking -Sixth\Footnote{Foot 6} \lipsum[6] +Sixth\footnote{Foot 6} \lipsum[6] \end{document} @@ -348,11 +359,12 @@ Sixth\Footnote{Foot 6} \lipsum[6] % % 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,14 +374,31 @@ Sixth\Footnote{Foot 6} \lipsum[6] % \begin{macrocode} \newif{\ifcontmargin} \contmarginfalse \newif{\ifcontword} \contwordfalse + \newif{\ifcontallpages} \contallpagesfalse \DeclareOption{margin}{\contmargintrue} \DeclareOption{word}{\contwordtrue} + \DeclareOption{allpages}{\contallpagestrue} \ProcessOptions % \end{macrocode} % \end{macro} % \end{macro} % +% \begin{macro}{\ifc@go} +% \begin{macro}{\contgo} +% \begin{macro}{\contstop} +% Continuation marks will stop after |\contstop| but will continue after |\contgo| +% (the default) +% \begin{macrocode} +\newif{\ifc@go} \c@gotrue +\newcommand{\contgo}{\c@gotrue} +\newcommand{\contstop}{\c@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 @@ Sixth\Footnote{Foot 6} \lipsum[6] % % \begin{macrocode} % -------------------------------------------------------------------------- - \ifcontword % % \end{macrocode} % @@ -397,16 +425,16 @@ Sixth\Footnote{Foot 6} \lipsum[6] % \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@box} % \begin{macro}{\LWC@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@box \global\setbox\LWC@box\hbox{} \newbox\LWC@saved % \end{macrocode} @@ -441,7 +469,7 @@ Sixth\Footnote{Foot 6} \lipsum[6] \setbox\@tempboxa\vbox{\unvbox\@cclv \unskip\unkern\unpenalty% \unskip\unkern\unpenalty \unskip\unkern\unpenalty \setbox\@tempboxa\lastbox - \LWC@getlast@word\@tempboxa\LastWordBoxC + \LWC@getlast@word\@tempboxa\LastWordBox } %\end{comment} \ifnum\outputpenalty>-\@MM % not \supereject @@ -451,22 +479,22 @@ Sixth\Footnote{Foot 6} \lipsum[6] \else % \supereject, just output, don't look for word on next page % \message{caused by super-eject.} \global\setbox\@cclv\box\LWC@saved - \global\setbox\NextWordBoxC\hbox{}% + \global\setbox\NextWordBox\hbox{}% \FWLWCnorm@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@pen\unvcopy\@cclv \LWC@getall@boxes \ifvbox\LWC@box \penalty\LWC@pen\unvbox\LWC@box \LWC@getall@boxes\fi - \ifvbox\LWC@box \global\setbox\NextWordBoxC\hbox{}\else - \LWC@getfirst@word\LWC@box\NextWordBoxC + \ifvbox\LWC@box \global\setbox\NextWordBox\hbox{}\else + \LWC@getfirst@word\LWC@box\NextWordBox \fi}% Return tiny page to page list: \unvbox\@cclv \ifnum\outputpenalty<\@M \penalty\outputpenalty\fi \LWC@vsize\relax \global\setbox\@cclv\box\LWC@saved \FWLWCnorm@L@output - \global\setbox\FirstWordBoxC\box\NextWordBoxC + \global\setbox\FirstWordBox\box\NextWordBox \fi\fi} % \end{macrocode} @@ -526,10 +554,6 @@ Sixth\Footnote{Foot 6} \lipsum[6] \else\ifvbox\LWC@box\box\LWC@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 @@ Sixth\Footnote{Foot 6} \lipsum[6] \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 @@ Sixth\Footnote{Foot 6} \lipsum[6] % \end{macro} % \end{macro} % -% +% \begin{macro}{\c@ntoddpagepos} +% |\c@ntoddpagepos| calculates the position of the marker on odd pages. +% \begin{macrocode} + \newcommand{\c@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} +% +% \begin{macro}{\c@ntevenpagepos} +% |\c@ntevenpagepos| calculates the position of the marker on even pages. % \begin{macrocode} - \AtBeginShipout{% - \AtBeginShipoutUpperLeft{% + \newcommand{\c@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} % -% Specify the location of the continuation marks. % +% \begin{macro}{\c@outcontpage} +% Output continued marked page. % \begin{macrocode} - \ifodd\c@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@outcontpage}{% + \ifnum\zref@extract{LastPage}{abspage}>\c@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@outcontpage % \end{macrocode} -% Otput the page and marks. +% \end{macro} +% +% Output the page and marks. % \begin{macrocode} - \ifnum\zref@extract{LastPage}{abspage}>\c@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@go + \ifodd\c@page + \c@ntoddpagepos + \c@outcontpage + \else + \ifcontallpages + \c@ntevenpagepos + \c@outcontpage + \fi + \fi + \fi +} % end AtBeginShipoutUpperLeft +} % end AtBeginShipout % %</usc> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/continue/continue.ins b/Master/texmf-dist/source/latex/continue/continue.ins index 1cfc3f2435d..513849aa3b7 100644 --- a/Master/texmf-dist/source/latex/continue/continue.ins +++ b/Master/texmf-dist/source/latex/continue/continue.ins @@ -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. ------------------------------------------------------------------ |