1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17\unprotect
18
19
20
21
22
23
24
25\def\page_scale_text_box_indeed#1
26 {\scratchheight\ht#1\relax
27 \scratchwidth \wd#1\relax
28 \setbox#1\vpack\bgroup
29 \hpack\bgroup
30 \scale
31 [\c!height=\dimexpr\textheight\d_page_adapts_delta\relax,
32 \c!width=\scratchwidth]
33 {\box#1}
34 \egroup
35 \egroup
36 \global\d_page_adapts_delta\zeropoint
37 \glet\page_scale_text_box\gobbleoneargument
38 \ht#1\scratchheight
39 \wd#1\scratchwidth}
40
41\unexpanded\def\tweakpagegoal[#1]
42 {\ifx\currentoutputroutine\s!singlecolumn
43 \global\d_page_adapts_delta\dimexpr#1\relax
44 \ifdim\d_page_adapts_delta=\zeropoint
45 \glet\page_scale_text_box\gobbleoneargument
46 \else
47 \glet\page_scale_text_box\page_scale_text_box_indeed
48 \fi
49 \else
50 \global\d_page_adapts_delta\zeropoint
51 \glet\page_scale_text_box\gobbleoneargument
52 \fi
53 \page_otr_command_set_vsize}
54
55\protect
56
57\endinput
58 |