summaryrefslogtreecommitdiff
path: root/tex/context/base/page-str.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/page-str.mkiv')
-rw-r--r--tex/context/base/page-str.mkiv39
1 files changed, 19 insertions, 20 deletions
diff --git a/tex/context/base/page-str.mkiv b/tex/context/base/page-str.mkiv
index 200a71377..f14f2f716 100644
--- a/tex/context/base/page-str.mkiv
+++ b/tex/context/base/page-str.mkiv
@@ -36,25 +36,25 @@
\unprotect
\let \currentoutputstream \empty
-\newif \ifinoutputstream % will becoem a conditional or mode
+\newif \ifinoutputstream
\newtoks \everyenableoutputstream
\appendtoks
\page_otr_command_flush_side_floats
\to \everyenableoutputstream
-\unexpanded\def\initializeoutputstreams
+\def\initializeoutputstreams
{\ctxlua{streams.initialize()}%
\glet\initializeoutputstreams\relax}
-\unexpanded\def\enableoutputstream[#1]% could be \startoutputsubstream
+\def\enableoutputstream[#1]% could be \startoutputsubstream
{\initializeoutputstreams
\the\everyenableoutputstream
\inoutputstreamtrue
\xdef\currentoutputstream{#1}%
\ctxlua{streams.enable("#1")}}
-\unexpanded\def\disableoutputstream
+\def\disableoutputstream
{\inoutputstreamfalse
\global\let\currentoutputstream\s!default
\ctxlua{streams.disable()}}
@@ -71,13 +71,15 @@
{\ctxlua{streams.stop()}%
\endgroup}
-\unexpanded\def\startoutputsubstream[#1]% just push/pop instead
- {\globalpushmacro\currentoutputstream
+\let\currentoutputsubstream\empty
+
+\def\startoutputsubstream[#1]%
+ {\glet\savedcurrentoutputstream\currentoutputstream
\enableoutputstream[#1]}
-\unexpanded\def\stopoutputsubstream
- {\globalpopmacro\currentoutputstream
- \enableoutputstream[\currentoutputstream]}
+\def\stopoutputsubstream
+ {\glet\currentoutputstream\savedcurrentoutputstream
+ \enableoutputstream[\savedcurrentoutputstream]}
\def\flushoutputstream [#1]{\ctxlua{streams.flush("#1")}}
\def\outputstreamcopy [#1]{\vbox{\ctxlua{streams.flush("#1",true)}}}
@@ -87,8 +89,7 @@
\def\synchronizestreams [#1]{\ctxlua{streams.synchronize("#1")}}
\def\dopushoutputstream [#1]{\ctxlua{streams.push("#1")}}
-\unexpanded\def\pushoutputstream
- {\dosingleempty\dopushoutputstream}
+\def\pushoutputstream {\dosingleempty\dopushoutputstream}
% \unexpanded\def\defineoutputstream[#1]%
% {\doifundefined{otrs:#1}{\expandafter\newbox\csname otrs:#1\endcsname}}
@@ -102,15 +103,13 @@
% \directsetup{stream:\firstoutputstream:bottom}
% \directsetup{stream:\firstoutputstream:reset}
-% Obsolete in \MKIV:
-%
-% \unexpanded\def\definemarknote
-% {\dodoubleempty\dodefinemarknote}
-%
-% \def\dodefinemarknote[#1][#2]{}
-% \def\setmarknote [#1]{\gobbleoneargument}
-% \def\flushmarknotes [#1]{}
-% \def\erasemarknotes [#1]{}
+%D Obsolete in \MKIV:
+
+\unexpanded\def\definemarknote {\dodoubleempty\dodefinemarknote}
+\def\dodefinemarknote[#1][#2]{}
+\def\setmarknote [#1]{\gobbleoneargument}
+\def\flushmarknotes [#1]{}
+\def\erasemarknotes [#1]{}
\protect \endinput