summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-19 23:04:15 +0000
committerKarl Berry <karl@freefriends.org>2017-04-19 23:04:15 +0000
commitf74161ca4e7eb3c5af9afcbe92522ae3b58987c1 (patch)
tree3c30a13df5ac7968195c85070a2b074578e669d2 /Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv
parent1d5a55ac8f5506a7ae9cfca52f4b588182e199d4 (diff)
context beta/cont-tmf.zip (Apr 16 12:55)
git-svn-id: svn://tug.org/texlive/trunk@43931 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv19
1 files changed, 13 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv
index 1fde9e9c9c5..f2e39c66033 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv
@@ -92,9 +92,12 @@
\newdimen\topdistance
\newdimen\headerdistance
+\newdimen\textdistance
\newdimen\footerdistance
\newdimen\bottomdistance
+\newdimen\textovershoot % available in pagebuilder
+
%D We need to calculate the extra distances:
\newdimen\naturalmarginwidth
@@ -107,6 +110,7 @@
\newdimen\naturalrightmargindistance
\newdimen\naturaltopdistance
\newdimen\naturalheaderdistance
+\newdimen\naturaltextdistance
\newdimen\naturalfooterdistance
\newdimen\naturalbottomdistance
@@ -178,6 +182,7 @@
\global\naturalrightmargindistance\layoutparameter\c!rightmargindistance
\global\naturaltopdistance \layoutparameter\c!topdistance
\global\naturalheaderdistance \layoutparameter\c!headerdistance
+ \global\naturaltextdistance \layoutparameter\c!textdistance
\global\naturalfooterdistance \layoutparameter\c!footerdistance
\global\naturalbottomdistance \layoutparameter\c!bottomdistance
%
@@ -192,6 +197,7 @@
\global\rightmargindistance \layoutdistance\rightmarginwidth\naturalrightmargindistance
\global\topdistance \layoutdistance\topheight \naturaltopdistance
\global\headerdistance \layoutdistance\headerheight \naturalheaderdistance
+ \global\textdistance \naturaltextdistance
\global\footerdistance \layoutdistance\footerheight \naturalfooterdistance
\global\bottomdistance \layoutdistance\bottomheight \naturalbottomdistance
}
@@ -372,7 +378,11 @@
\doifelseassignment{#2}
{\definelayouttarget[#1][#2]}
{\setevalue{\??layoutpaper#1}{#2}%
- \setevalue{\??layoutprint#1}{#3}}%
+ \ifthirdargument
+ \setevalue{\??layoutprint#1}{#3}%
+ \else
+ \setevalue{\??layoutprint#1}{#2}%
+ \fi}%
\fi}
\appendtoks
@@ -447,15 +457,12 @@
\let\setuppaper\page_paper_setup_size_settings
\unexpanded\def\adaptpapersize
- {\global\let\page_paper_reinstate\page_paper_reinstate_indeed
+ {\glet\page_paper_reinstate\page_paper_restore
\setuppapersize}
-\unexpanded\def\page_paper_reinstate_indeed
- {\page_paper_restore
- \global\let\page_paper_reinstate\relax}
-
\appendtoks
\page_paper_reinstate
+ \global\let\page_paper_reinstate\relax
\to \everyaftershipout
\unexpanded\def\page_paper_set_restore#1#2%