summaryrefslogtreecommitdiff
path: root/tex/context/base/page-mak.mkvi
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2014-05-03 13:55:34 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2014-05-03 13:55:34 +0200
commit624cbb5da392e9403984dd1cf368c0d408b1c2a8 (patch)
tree489c049ac849bb5bbce7d32e4df477872c58373d /tex/context/base/page-mak.mkvi
parent088de88944c1f2254250bb448c7371a87ff7ee39 (diff)
downloadcontext-624cbb5da392e9403984dd1cf368c0d408b1c2a8.tar.gz
2014-01-03 00:42:00
Diffstat (limited to 'tex/context/base/page-mak.mkvi')
-rw-r--r--tex/context/base/page-mak.mkvi63
1 files changed, 5 insertions, 58 deletions
diff --git a/tex/context/base/page-mak.mkvi b/tex/context/base/page-mak.mkvi
index c910f281d..71af520a1 100644
--- a/tex/context/base/page-mak.mkvi
+++ b/tex/context/base/page-mak.mkvi
@@ -91,60 +91,13 @@
\def\page_makeup_start_yes[#name]% [#settings]%
{\doifelsecommandhandler\??makeup{#name}\page_makeup_start_indeed\page_makeup_start_nop[#name]}%
-% case 1:
-%
-% \setuplayout[height=5cm]
-%
-% case 2:
-%
-% \definelayout[crap][height=10cm]
-% \definelayout[standard][crap]
-%
-% case 3:
-%
-% \setuplayout[standard][height=15cm]
-%
-% case 4:
-%
-% \definelayout[whatever][height=2cm]
-% \setuplayout[whatever]
-
\def\page_makeup_start_indeed[#name][#settings]%
- {% the next grouping hack is somewhat messy:
- \begingroup
- % we need to figure out the current layout
- \xdef\m_page_makeup_name{#name}%
- \let\currentmakeup\m_page_makeup_name
- \let\currentlayout\m_page_makeup_name
- \xdef\m_page_makeup_layout_parent{\layoutparameter\s!parent}%
- \setupcurrentmakeup[#settings]%
- \edef\p_page{\makeupparameter\c!page}%
- \ifx\p_page\empty
- \endgroup
- \page % new, so best not have dangling mess here like references (we could capture then and flush embedded)
- \else\ifx\p_page\v!no
- % nothing
- \endgroup
- \else
- \endgroup
- \page[\p_page]%
- \fi\fi
- % some dirty trickery (sorry) for determining if we have
- % - a layout definition at all
- % - inherit from the parent of that definition
- % - inherit from the current layout otherwise
- \ifx\m_page_makeup_name\currentlayout
- % we already use the layout
- \else\ifx\m_page_makeup_layout_parent\??layout
- % we inherit from the current layout
- \normalexpanded{\setuplayout[#name][\s!parent=\??layout\currentlayout]}% is remembered but checked later anyway
- % \else
- % we have an inherited layout
- \fi\fi
+ {\doifelsenothing{\namedmakeupparameter{#name}\c!page}
+ {\page}% new, so best not have dangling mess here like references (we could capture then and flush embedded)
+ {\page[\namedmakeupparameter{#name}\c!page]}%
\startlayout[#name]% includes \page
\bgroup
- %\edef\currentmakeup{#name}%
- \let\currentmakeup\m_page_makeup_name
+ \edef\currentmakeup{#name}%
\setupcurrentmakeup[#settings]%
\setsystemmode\v!makeup
\the\t_page_makeup_every_setup
@@ -184,12 +137,7 @@
\fi \fi
\strc_pagenumbers_page_state_pop % new
\egroup
- \stoplayout % includes \page
- \ifx\m_page_makeup_name\currentlayout
- \else\ifx\m_page_makeup_layout_parent\??layout
- \normalexpanded{\setuplayout[\m_page_makeup_name][\s!parent=\??layout]}% is remembered but checked later anyway
- % \else
- \fi\fi}
+ \stoplayout} % includes \page
\setvalue{\??makeupdoublesided\v!yes}%
{\emptyhbox
@@ -236,7 +184,6 @@
\c!headerstate=\v!stop,
\c!footerstate=\v!stop,
\c!pagestate=\v!stop] % in manual ! ! !
-% \c!pagestate=\v!start]
\definemakeup
[\v!standard]