summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/page-spr.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-02-22 20:29:46 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-02-22 20:29:46 +0100
commit7b271baae19db1528fbe6621bdf50af89a5a336b (patch)
tree4fc24a8f2be20aa90e90f6e1bcb62d69f4946235 /tex/context/base/mkiv/page-spr.mkiv
parent67b9965fe473d18f13ed4c40f1e4e008eb870322 (diff)
downloadcontext-7b271baae19db1528fbe6621bdf50af89a5a336b.tar.gz
2019-02-22 19:43:00
Diffstat (limited to 'tex/context/base/mkiv/page-spr.mkiv')
-rw-r--r--tex/context/base/mkiv/page-spr.mkiv35
1 files changed, 29 insertions, 6 deletions
diff --git a/tex/context/base/mkiv/page-spr.mkiv b/tex/context/base/mkiv/page-spr.mkiv
index dc1e013d5..bb95ee467 100644
--- a/tex/context/base/mkiv/page-spr.mkiv
+++ b/tex/context/base/mkiv/page-spr.mkiv
@@ -23,15 +23,32 @@
% beware, ugly overload, to be redone
+% \def\normalsettextpagecontent#1#2#3% #2 and #3 will disappear
+% {\setbox#1\hbox
+% {\setlayoutcomponentattribute{\v!page:\v!text}%
+% \vbox \layoutcomponentboxattribute to \textheight
+% {\offinterlineskip
+% \freezetextwidth
+% \hsize\textwidth % local variant of \sethsize
+% \boxmaxdepth\maxdepth
+% \noindent % content can be < \hsize
+% \page_otr_command_package_contents#2#3}}%
+% \dp#1\zeropoint
+% \ifconditional\c_page_spread_busy
+% \normalsettextpagecontent_spread{#1}%
+% \else
+% \normalsettextpagecontent_normal{#1}%
+% \fi}
+
\def\normalsettextpagecontent#1#2#3% #2 and #3 will disappear
- {\setbox#1\hbox
+ {\setbox#1\hpack
{\setlayoutcomponentattribute{\v!page:\v!text}%
- \vbox \layoutcomponentboxattribute to \textheight
+ \vpack \layoutcomponentboxattribute to \textheight
{\offinterlineskip
\freezetextwidth
\hsize\textwidth % local variant of \sethsize
\boxmaxdepth\maxdepth
- \noindent % content can be < \hsize
+ \noindent % content can be < \hsize
\page_otr_command_package_contents#2#3}}%
\dp#1\zeropoint
\ifconditional\c_page_spread_busy
@@ -40,12 +57,18 @@
\normalsettextpagecontent_normal{#1}%
\fi}
+% \def\normalsettextpagecontent_normal#1%
+% {\setbox#1\hbox to \makeupwidth
+% {\hss\box#1\hss}} % never change the \hss's
+
\def\normalsettextpagecontent_normal#1%
- {\setbox#1\hbox to \makeupwidth
- {\hss\box#1\hss}} % never change the \hss's
+ {\ifdim\wd#1=\makeupwidth\else
+ \setbox#1\hpack to \makeupwidth
+ {\hss\box#1\hss}% never change the \hss's
+ \fi}
\def\normalsettextpagecontent_spread#1%
- {\setbox#1\hbox to \makeupwidth
+ {\setbox#1\hpack to \makeupwidth
{\ifvoid\b_page_spread_content
\ifconditional\c_page_spread_once
\box#1%