Debian Codegraph @

texmf-dist/tex/plain/plain-widow/pxwmanual.tex

raw
1 % This file is part of the CTAN package named plain-widow.
2 %
3 % pxwmanual.tex: add manual \vsize change to pxwreport.tex
4 % Version 1.0, 13.05.2025
5 %
6 % Copyright (C) 2025 Udo Wermuth (author)
7 %
8 % This program is free software: you can redistribute it and/or modify
9 % it under the terms of the GNU General Public License as published by
10 % the Free Software Foundation, either version 3 of the License, or
11 % (at your option) any later version.
12 %
13 % This program is distributed in the hope that it will be useful,
14 % but WITHOUT ANY WARRANTY; without even the implied warranty of
15 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 % GNU General Public License for more details.
17 %
18 % You should have received a copy of the GNU General Public License
19 % along with this program. If not, see <http://www.gnu.org/licenses/>.
20 %
21 \input pxwreport.tex
22 % code from single.tex with ``SINGLE'' replaced by ``MANUAL''
23 \def\footlinedist{30pt }%plain TeX's value: 24pt
24 \def\makefootline{\baselineskip=\footlinedist
25 \lineskiplimit=0pt\line{\the\footline}}
26 \begingroup \dimen255=\footlinedist
27 \gdef\PXnormaldist{\gdef\footlinedist{30 pt}}
28 \advance\dimen255 by +1\baselineskip
29 \xdef\PXplusdist{\noexpand\gdef\noexpand
30 \footlinedist{\the\dimen255 }}
31 \advance\dimen255 by -2\baselineskip
32 \xdef\PXminusdist{\noexpand\gdef\noexpand
33 \footlinedist{\the\dimen255 }}\endgroup
34 \def\PXincVsize{% increase \vsize by one line
35 \global\advance\vsize by +1\baselineskip
36 \PXminusdist\wlog{MANUAL: \vsize + 1 line}}
37 \def\PXdecVsize{% decrease \vsize by one line
38 \global\advance\vsize by -1\baselineskip
39 \PXplusdist\wlog{MANUAL: \vsize - 1 line}}
40 \def\PXresetVsize{% reset \vsize to former value
41 \ifdim\vsize=\PXsaveVsize \else \PXnormaldist
42 \global\vsize=\PXsaveVsize \fi}
43 \def\PXstorevsize{\edef\PXsaveVsize{\the\vsize}}
44 \PXstorevsize % call this if \vsize is changed
45 %
46 % put the following macros into \def\PXpostoutput
47 \def\PXplus(#1){% #1: page number; now +1 line
48 \ifnum#1=\pageno \PXresetVsize \PXincVsize
49 \fi \ignorespaces}
50 \def\PXminus(#1){% #1: page number; now -1 line
51 \ifnum#1=\pageno \PXresetVsize \PXdecVsize
52 \fi \ignorespaces}
53 \def\PXstop(#1){% #1: page number; now no change
54 \ifnum#1=\pageno \PXresetVsize
55 \wlog{MANUAL: \vsize}\fi \ignorespaces}