summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/context/base/buff-ver.mkiv9
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4143 -> 4141 bytes
-rw-r--r--tex/context/base/context-version.pngbin105423 -> 106132 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/file-job.mkvi7
-rw-r--r--tex/context/base/pack-rul.mkiv6
-rw-r--r--tex/context/base/page-ini.mkiv2
-rw-r--r--tex/context/base/page-mak.mkvi4
-rw-r--r--tex/context/base/page-txt.mkvi26
-rw-r--r--tex/context/base/spac-ver.mkiv32
-rw-r--r--tex/context/base/status-files.pdfbin24493 -> 24465 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin182713 -> 182717 bytes
-rw-r--r--tex/context/base/status-mkiv.lua5
-rw-r--r--tex/context/base/strc-flt.mkvi16
-rw-r--r--tex/context/base/strc-pag.mkiv167
-rw-r--r--tex/context/base/tabl-tab.mkiv6
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
20 files changed, 142 insertions, 148 deletions
diff --git a/tex/context/base/buff-ver.mkiv b/tex/context/base/buff-ver.mkiv
index 36de37669..0e6a5e215 100644
--- a/tex/context/base/buff-ver.mkiv
+++ b/tex/context/base/buff-ver.mkiv
@@ -73,18 +73,15 @@
\let\buff_verbatim_set_line_margin\relax
\def\buff_verbatim_set_line_margin_indeed
- {\getpagestatus
- \hskip\ifrightpage\typingparameter\c!oddmargin\else\typingparameter\c!evenmargin\fi\relax}
+ {\hskip\doifoddpageelse\typingparameter\c!oddmargin\else\typingparameter\c!evenmargin\fi\relax}
\def\buff_verbatim_check_margins
{\scratchskip\typingparameter\c!oddmargin\relax
- \ifzeropt\scratchskip
- \else
+ \ifzeropt\scratchskip \else
\let\buff_verbatim_set_line_margin\buff_verbatim_set_line_margin_indeed
\fi
\scratchskip\typingparameter\c!evenmargin\relax
- \ifzeropt\scratchskip
- \else
+ \ifzeropt\scratchskip \else
\let\buff_verbatim_set_line_margin\buff_verbatim_set_line_margin_indeed
\fi
\ifx\buff_verbatim_set_line_margin\relax
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index e1a501530..28568dd86 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.07.06 19:11}
+\newcontextversion{2012.07.06 22:37}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 185ee6c6f..632277752 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.07.06 19:11}
+\newcontextversion{2012.07.06 22:37}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index bd8355785..145d5f6e0 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index 3e516fa8d..28cc385d7 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index 0d017a7ce..b9ded1ad0 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.07.06 19:11}
+\edef\contextversion{2012.07.06 22:37}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 05ef64b22..b30482616 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.07.06 19:11}
+\edef\contextversion{2012.07.06 22:37}
%D For those who want to use this:
diff --git a/tex/context/base/file-job.mkvi b/tex/context/base/file-job.mkvi
index 3bde3f268..b488ee4eb 100644
--- a/tex/context/base/file-job.mkvi
+++ b/tex/context/base/file-job.mkvi
@@ -85,7 +85,8 @@
% document structure
-\ifdefined\textlevel\else \newcount\textlevel \fi % might go away
+\ifdefined\textlevel \else \newcount\textlevel \fi % might go away
+\ifdefined\strc_pagenumbers_flush_final_page \else \let\strc_pagenumbers_flush_final_page\relax \fi % ugly
\unexpanded\def\dostarttext
{\glet\dostarttext\relax
@@ -94,8 +95,8 @@
\unexpanded\def\dostoptext
{\glet\dostoptext\relax
- \flushfinallayoutpage % optional
- \page % anyway
+ \strc_pagenumbers_flush_final_page
+ \page % hm, bonus
\the\everystoptext
\global\everystoptext\emptytoks
\the\everybye
diff --git a/tex/context/base/pack-rul.mkiv b/tex/context/base/pack-rul.mkiv
index b757dfdce..ecc55d565 100644
--- a/tex/context/base/pack-rul.mkiv
+++ b/tex/context/base/pack-rul.mkiv
@@ -97,7 +97,7 @@
\expandafter\noexpand\csname #1parameterhash\endcsname
\expandafter\noexpand\csname do#1parameter\endcsname
\expandafter\noexpand\csname do#1parentparameter\endcsname
- \expandafter\noexpand\csname root#1parameter\endcsname
+ \expandafter\noexpand\csname do#1rootparameter\endcsname
\expandafter\noexpand\csname setupcurrent#1\endcsname
\expandafter\noexpand\csname inherited#1framed\endcsname
\noexpand\??framed}} % if needed we can have a variant
@@ -2599,8 +2599,6 @@
%D {\setupframed} command. There are certainly more places where such improvements
%D can be made.
-% actually, this can be another command handler .. todo
-
\appendtoks
\ifcsname\??regularframedlevel\currentframed\endcsname
% already defined, keeps settings
@@ -2627,7 +2625,7 @@
\bgroup
\edef\currentframed{#1>\the\c_pack_framed_temp}%
\pack_framed_initialize
- \dosingleempty\pack_framed_process}
+ \dosingleempty\pack_framed_defined_process_indeed}
\def\pack_framed_defined_process_indeed[#1]%
{\ifsingleargument % faster
diff --git a/tex/context/base/page-ini.mkiv b/tex/context/base/page-ini.mkiv
index e582bef64..d1b39399a 100644
--- a/tex/context/base/page-ini.mkiv
+++ b/tex/context/base/page-ini.mkiv
@@ -104,7 +104,7 @@
\inpagebodytrue % needed for enabling \blank ! brrr
\page_otr_command_flush_saved_floats
\page_otr_command_set_vsize % this is needed for interacting components, like floats and multicolumns
- \doincrementpageboundcounters % should hook into an every
+ \strc_pagenumbers_increment_counters % should hook into an every
\page_adapts_synchronize
\page_otr_check_for_pending_inserts
\page_spread_flush % defined later
diff --git a/tex/context/base/page-mak.mkvi b/tex/context/base/page-mak.mkvi
index e5a722676..33039b83c 100644
--- a/tex/context/base/page-mak.mkvi
+++ b/tex/context/base/page-mak.mkvi
@@ -116,7 +116,7 @@
{\endgraf
\makeupparameter\c!bottom
\egroup
- \pushpagestate % new
+ \strc_pagenumbers_page_state_push % new
\makeupparameter\c!before
\relax % to be sure we don't enter the \if
\ifdim\ht\b_page_makeup>\vsize
@@ -131,7 +131,7 @@
\ifdoublesided \ifodd\realpageno \else
\getvalue{\??makeupdoublesided\makeupparameter\c!doublesided}%
\fi \fi
- \poppagestate % new
+ \strc_pagenumbers_page_state_pop % new
\egroup
\stoplayout} % includes \page
diff --git a/tex/context/base/page-txt.mkvi b/tex/context/base/page-txt.mkvi
index 241461ec0..504527a0f 100644
--- a/tex/context/base/page-txt.mkvi
+++ b/tex/context/base/page-txt.mkvi
@@ -700,7 +700,7 @@
\let\m_page_layouts_page_number_location_x\relax
\def\page_layouts_place_page_number % also elsewhere .. beware, not \unexpanded else
- {\placelocationpagenumber} % test below fails
+ {\strc_pagenumbers_place_location} % test below fails
\def\page_layouts_reset_page_number_location
{\ifx\m_page_layouts_page_number_location_v\relax\else
@@ -747,14 +747,14 @@
\v!marginedge=>\let\m_page_layouts_page_number_location_h\v!text
\let\m_page_layouts_page_number_location_x\c!marginedgetext]}
-\unexpanded\def\dosetpagenumberlocation
- {\edef\p_page_numbering_location{\directpagenumberingparameter\c!location}%
- \ifx\p_page_numbering_location\m_page_layouts_page_number_location
+\unexpanded\def\strc_pagenumbers_set_location
+ {\edef\p_strc_pagenumbers_location{\directpagenumberingparameter\c!location}%
+ \ifx\p_strc_pagenumbers_location\m_page_layouts_page_number_location
% unchanged
\else
- \let\m_page_layouts_page_number_location\p_page_numbering_location
+ \let\m_page_layouts_page_number_location\p_strc_pagenumbers_location
\page_layouts_reset_page_number_location
- \ifx\p_page_numbering_location\empty
+ \ifx\p_strc_pagenumbers_location\empty
% set otherwise
\else
\page_layouts_identify_page_number_location
@@ -766,11 +766,11 @@
{\begingroup
\setbox\scratchbox\hbox{\ignorespaces\layoutelementparameter\c!marginedgetext\removeunwantedspaces}%
\ifzeropt\wd\scratchbox\else
- \edef\p_page_numbering_width{\directpagenumberingparameter\c!width}%
- \ifx\p_page_numbering_width\empty
+ \edef\p_strc_pagenumbers_width{\directpagenumberingparameter\c!width}%
+ \ifx\p_strc_pagenumbers_width\empty
\box\scratchbox\tfskip
\else
- \hbox to \p_page_numbering_width{\box\scratchbox\hss}%
+ \hbox to \p_strc_pagenumbers_width{\box\scratchbox\hss}%
\fi
\fi
\endgroup}
@@ -779,16 +779,16 @@
{\begingroup
\setbox\scratchbox\hbox{\ignorespaces\layoutelementparameter\c!marginedgetext\removeunwantedspaces}%
\ifzeropt\wd\scratchbox\else
- \edef\p_page_numbering_width{\directpagenumberingparameter\c!width}%
- \ifx\p_page_numbering_width\empty
+ \edef\p_strc_pagenumbers_width{\directpagenumberingparameter\c!width}%
+ \ifx\p_strc_pagenumbers_width\empty
\tfskip\box\scratchbox
\else
- \hbox to \p_page_numbering_width{\hss\box\scratchbox}%
+ \hbox to \p_strc_pagenumbers_width{\hss\box\scratchbox}%
\fi
\fi
\endgroup}
-\dosetpagenumberlocation
+\strc_pagenumbers_set_location % initializes
% will go to page-box.mkiv
diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv
index 8bc8ed354..b69612e6c 100644
--- a/tex/context/base/spac-ver.mkiv
+++ b/tex/context/base/spac-ver.mkiv
@@ -1598,7 +1598,8 @@
\newtoks\everybeforeblankhandling
\newtoks\everyafterblankhandling
-\newconditional\someblankdone
+\newconditional\c_space_vspacing_done
+\newconditional\c_space_vspacing_fixed
\appendtoks
\s_spac_vspacing_temp\zeropoint
@@ -1606,40 +1607,41 @@
\attribute\skippenaltyattribute \attributeunsetvalue
\attribute\skiporderattribute \attributeunsetvalue
\ifgridsnapping
- \settrue\blankisfixed
+ \settrue\c_space_vspacing_fixed
\else
- \setfalse\blankisfixed
+ \setfalse\c_space_vspacing_fixed
\fi
\to \everybeforeblankhandling
\appendtoks
\s_spac_vspacing_temp\plusone\s_spac_vspacing_temp
- \ifconditional\blankisfixed \else
+ \ifconditional\c_space_vspacing_fixed \else
\!!plus \skipgluefactor\s_spac_vspacing_temp
\!!minus\skipgluefactor\s_spac_vspacing_temp
\fi
+ \relax
\to \everyafterblankhandling
\def\setblankcategory#1%
- {\settrue\someblankdone
+ {\settrue\c_space_vspacing_done
\attribute\skipcategoryattribute#1\relax}
\def\setblankorder#1%
{\attribute\skiporderattribute#1\relax}
\def\fixedblankskip
- {\settrue\blankisfixed}
+ {\settrue\c_space_vspacing_fixed}
\def\flexibleblankskip
- {\setfalse\blankisfixed}
+ {\setfalse\c_space_vspacing_fixed}
\def\addblankskip#1#2#3%
- {\settrue\someblankdone
+ {\settrue\c_space_vspacing_done
\advance\s_spac_vspacing_temp#1\dimexpr\ifgridsnapping#3\else#2\fi\relax\relax}
\def\setblankpenalty#1%
{\flushblankhandling
- \settrue\someblankdone
+ \settrue\c_space_vspacing_done
\attribute\skipcategoryattribute \plusthree
\attribute\skippenaltyattribute #1\relax
\flushblankhandling}
@@ -1657,30 +1659,30 @@
\def\dostartblankhandling
{\begingroup
- \setfalse\someblankdone
+ \setfalse\c_space_vspacing_done
\the\everybeforeblankhandling}
\unexpanded\def\stopblankhandling
{\the\everyafterblankhandling
- \ifconditional\someblankdone
+ \ifconditional\c_space_vspacing_done
\vskip\s_spac_vspacing_temp
\fi
\endgroup}
\def\flushblankhandling
{\the\everyafterblankhandling
- \ifconditional\someblankdone
+ \ifconditional\c_space_vspacing_done
\vskip\s_spac_vspacing_temp
\fi
- \setfalse\someblankdone
+ \setfalse\c_space_vspacing_done
\the\everybeforeblankhandling}
\def\addpredefinedblankskip#1#2%
- {\settrue\someblankdone
+ {\settrue\c_space_vspacing_done
\advance\s_spac_vspacing_temp#1\dimexpr\csname\??vspacingamount#2\endcsname\relax}
\def\addaskedblankskip#1#2%
- {\settrue\someblankdone
+ {\settrue\c_space_vspacing_done
\advance\s_spac_vspacing_temp#1\dimexpr#2\relax}
% The main spacer:
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index c48fef255..b6f8f0cf2 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 4e1eb18a6..abeabfefd 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/status-mkiv.lua b/tex/context/base/status-mkiv.lua
index d75b1aed2..53cab34e5 100644
--- a/tex/context/base/status-mkiv.lua
+++ b/tex/context/base/status-mkiv.lua
@@ -540,7 +540,7 @@ return {
{
filename = "strc-pag",
marktype = "mkiv",
- status = "todo",
+ status = "okay",
},
{
filename = "strc-ren",
@@ -567,7 +567,8 @@ return {
{
filename = "strc-reg",
marktype = "mkiv",
- status = "todo",
+ status = "okay",
+ comment = "use setups for rendering",
},
{
filename = "strc-lev",
diff --git a/tex/context/base/strc-flt.mkvi b/tex/context/base/strc-flt.mkvi
index 3b1dc24ae..4787ae32d 100644
--- a/tex/context/base/strc-flt.mkvi
+++ b/tex/context/base/strc-flt.mkvi
@@ -1403,14 +1403,16 @@
{\ifconditional\c_strc_floats_par_float \hbox \else \expandafter \strc_floats_align_content \fi
{\d_strc_float_temp_height\ht\b_strc_floats_content
\box\b_strc_floats_content
- \normalexpanded{\noexpand\doifnotinset{\v!hang}{\floatcaptionparameter\c!location}}{\dotfskip{\floatcaptionparameter\c!distance}}%
+ \doifnotinset\v!hang{\floatcaptionparameter\c!location}
+ {\dotfskip{\floatcaptionparameter\c!distance}}%
\vbox to\d_strc_float_temp_height{#1}}}
\def\strc_floats_build_box_next_left#1%
{\ifconditional\c_strc_floats_par_float \hbox \else \expandafter \strc_floats_align_content \fi
{\d_strc_float_temp_height\ht\b_strc_floats_content
\vbox to\d_strc_float_temp_height{#1}%
- \normalexpanded{\noexpand\doifnotinset{\v!hang}{\floatcaptionparameter\c!location}}{\dotfskip{\floatcaptionparameter\c!distance}}%
+ \doifnotinset\v!hang{\floatcaptionparameter\c!location}
+ {\dotfskip{\floatcaptionparameter\c!distance}}%
\box\b_strc_floats_content}}
\def\strc_floats_build_box_next_outer
@@ -1479,7 +1481,7 @@
\def\strc_floats_build_box_next % beware, we first check on left/rightmargin because there can be left/right also
{\let\next\strc_floats_build_box_next_left
- \normalexpanded{\processallactionsinset[\floatcaptionparameter\c!location]}
+ \processallactionsinset[\floatcaptionparameter\c!location]
[ \v!outermargin=>\let\next\strc_floats_build_box_next_outer_margin,
\v!innermargin=>\let\next\strc_floats_build_box_next_inner_margin,
\v!leftmargin=>\let\next\strc_floats_build_box_next_left_margin,
@@ -1497,7 +1499,7 @@
\let\next\strc_floats_build_box_high
\else
\let\next\strc_floats_build_box_middle
- \normalexpanded{\processallactionsinset[\floatcaptionparameter\c!location]}
+ \processallactionsinset[\floatcaptionparameter\c!location]
[ \v!low=>\let\next\strc_floats_build_box_low,
\v!middle=>\let\next\strc_floats_build_box_middle,
\v!high=>\let\next\strc_floats_build_box_high]%
@@ -1678,14 +1680,14 @@
\def\strc_floats_build_box_top
{\let\next\strc_floats_build_box_top_stack_normal
- \expanded{\processfirstactioninset[\floatcaptionparameter\c!location]}
+ \processfirstactioninset[\floatcaptionparameter\c!location]
[ \v!grid=>\let\next\strc_floats_build_box_top_stack_grid,
\v!stretch=>\let\next\strc_floats_build_box_top_stack_stretch]%
\next}
\def\strc_floats_build_box_bottom
{\let\next\strc_floats_build_box_bottom_stack_normal
- \expanded{\processfirstactioninset[\floatcaptionparameter\c!location]}
+ \processfirstactioninset[\floatcaptionparameter\c!location]
[ \v!grid=>\let\next\strc_floats_build_box_bottom_stack_grid,
\v!stretch=>\let\next\strc_floats_build_box_bottom_stack_stretch]%
\next}
@@ -1708,7 +1710,7 @@
\def\strc_floats_locate_text_float
{\let\next\strc_floats_align_caption
- \expanded{\processallactionsinset[\floatcaptionparameter\c!location]}
+ \processallactionsinset[\floatcaptionparameter\c!location]
[ \v!left=>\let\next\strc_floats_relocate_caption_left,
\v!right=>\let\next\strc_floats_relocate_caption_right,
\v!inner=>\doifrightpagefloatelse{\let\next\strc_floats_relocate_caption_left }{\let\next\strc_floats_relocate_caption_right},
diff --git a/tex/context/base/strc-pag.mkiv b/tex/context/base/strc-pag.mkiv
index cb7cd8b23..8071fbab1 100644
--- a/tex/context/base/strc-pag.mkiv
+++ b/tex/context/base/strc-pag.mkiv
@@ -19,11 +19,11 @@
% Allocation:
-\countdef\realpageno = 0 \realpageno = 1
-\countdef\userpageno = 1 \userpageno = 1
-\countdef\subpageno = 2 \subpageno = 0 % !!
-\countdef\arrangeno = 3 \arrangeno = 0 % !!
-\countdef\pagenoshift = 4 \pagenoshift = 0 % !!
+\countdef\realpageno \zerocount \realpageno \plusone
+\countdef\userpageno \plusone \userpageno \plusone
+\countdef\subpageno \plustwo \subpageno \zerocount % !
+\countdef\arrangeno \plusthree \arrangeno \zerocount % !
+\countdef\pagenoshift\plusfour \pagenoshift\zerocount % !
\let\pageno\userpageno
@@ -33,7 +33,8 @@
\newtoks\everyinitializepagecounters
-\def\initializepagecounters{\the\everyinitializepagecounters}
+\unexpanded\def\initializepagecounters
+ {\the\everyinitializepagecounters}
\appendtoks
\initializepagecounters
@@ -71,27 +72,30 @@
% \stopbodymatter
% \stoptext
-\definecounter[\s!realpage][\c!prefix=\v!no,\c!start=1,\c!prefixsegments=,\s!counter=realpageno,\c!method=\v!page]
-\definecounter[\s!userpage][\c!prefix=\v!no,\c!start=1,\c!prefixsegments=,\s!counter=userpageno,\c!method=\v!page]
-\definecounter[\s!subpage] [\c!prefix=\v!no,\c!start=1,\c!prefixsegments=,\s!counter=subpageno, \c!method=\v!page]
+\definecounter[\s!realpage][\c!prefix=\v!no,\c!start=\plusone,\c!prefixsegments=,\s!counter=realpageno,\c!method=\v!page]
+\definecounter[\s!userpage][\c!prefix=\v!no,\c!start=\plusone,\c!prefixsegments=,\s!counter=userpageno,\c!method=\v!page]
+\definecounter[\s!subpage] [\c!prefix=\v!no,\c!start=\plusone,\c!prefixsegments=,\s!counter=subpageno, \c!method=\v!page]
\newtoks\everysetuprealpagenumber % todo: set state: none, start, stop, reset
\newtoks\everysetupuserpagenumber % todo: set state: none, start, stop, reset
\newtoks\everysetupsubpagenumber % todo: set state: none, start, stop, reset
-\unexpanded\def\setuprealpagenumber{\dosingleargument\dosetuprealpagenumber}
-\unexpanded\def\setupuserpagenumber{\dosingleargument\dosetupuserpagenumber}
-\unexpanded\def\setupsubpagenumber {\dosingleargument\dosetupsubpagenumber}
+\unexpanded\def\setuprealpagenumber{\dosingleargument\strc_pagenumbers_setup_realpage}
+\unexpanded\def\setupuserpagenumber{\dosingleargument\strc_pagenumbers_setup_userpage}
+\unexpanded\def\setupsubpagenumber {\dosingleargument\strc_pagenumbers_setup_subpage }
-\def\dosavepagenumberstate#1{\edef\oldpagenumberstate{\counterparameter#1\c!state}}
+\let\m_strc_pagenumbers_state_old\zerocount
+\let\m_strc_pagenumbers_state_new\zerocount
-\def\dosetuprealpagenumber[#1]{\dosavepagenumberstate\s!realpage\strc_counters_setup[\s!realpage][#1]\the\everysetuprealpagenumber}
-\def\dosetupuserpagenumber[#1]{\dosavepagenumberstate\s!userpage\strc_counters_setup[\s!userpage][#1]\the\everysetupuserpagenumber}
-\def\dosetupsubpagenumber [#1]{\dosavepagenumberstate\s!subpage \strc_counters_setup[\s!subpage ][#1]\the\everysetupsubpagenumber }
+\def\strc_pagenumbers_save_state#1{\edef\m_strc_pagenumbers_state_old\m_strc_pagenumbers_state_old{\counterparameter#1\c!state}}
-\def\resetrealpagenumber {} % not permitted
-\def\resetuserpagenumber {\strc_counters_reset\s!userpage}
-\def\resetsubpagenumber {\strc_counters_reset\s!subpage}
+\def\strc_pagenumbers_setup_realpage[#1]{\strc_pagenumbers_save_state\s!realpage\strc_counters_setup[\s!realpage][#1]\the\everysetuprealpagenumber}
+\def\strc_pagenumbers_setup_userpage[#1]{\strc_pagenumbers_save_state\s!userpage\strc_counters_setup[\s!userpage][#1]\the\everysetupuserpagenumber}
+\def\strc_pagenumbers_setup_subpage [#1]{\strc_pagenumbers_save_state\s!subpage \strc_counters_setup[\s!subpage ][#1]\the\everysetupsubpagenumber }
+
+\unexpanded\def\resetrealpagenumber {} % not permitted
+\unexpanded\def\resetuserpagenumber {\strc_counters_reset\s!userpage}
+\unexpanded\def\resetsubpagenumber {\strc_counters_reset\s!subpage}
\appendtoks
\strc_counters_set\s!realpage\realpageno
@@ -102,7 +106,7 @@
\let\setuppagenumber\setupuserpagenumber
\let\resetpagenumber\resetuserpagenumber
-\def\savecurrentpagestate % \normalexpanded?
+\def\strc_pagenumbers_page_state_save % \normalexpanded?
{\ctxlua{structures.pages.save({
prefix = "\counterparameter\s!userpage\c!prefix",
separatorset = "\counterparameter\s!userpage\c!prefixseparatorset",
@@ -120,13 +124,13 @@
)}}
\prependtoks
- \savecurrentpagestate
+ \strc_pagenumbers_page_state_save
\to \everyshipout
\installcorenamespace{pagestatestack} % no level yet
-\unexpanded\def\pushpagestate{\setxvalue{\??pagestatestack\c!state}{\counterparameter\s!userpage\c!state}}
-\unexpanded\def\poppagestate {\normalexpanded{\setuppagenumber[\c!state=\getvalue{\??pagestatestack\c!state}]}}
+\unexpanded\def\strc_pagenumbers_page_state_push{\setxvalue{\??pagestatestack\c!state}{\counterparameter\s!userpage\c!state}}
+\unexpanded\def\strc_pagenumbers_page_state_pop {\normalexpanded{\setuppagenumber[\c!state=\getvalue{\??pagestatestack\c!state}]}}
\setuppagenumber
[\c!way=\v!by\v!text,
@@ -209,17 +213,17 @@
\def\nextuserpagenumber {\directconvertedcounter\s!userpage\v!next}
\def\nextsubpagenumber {\directconvertedcounter\s!subpage \v!next}
-\def\dodeincrementpageboundcounters % only at the end
+\unexpanded\def\strc_pagenumbers_decrement_counters % only at the end
{\strc_counters_decrement\s!realpage
\strc_counters_decrement\s!userpage
\strc_counters_decrement\s!subpage}
-\def\doincrementpageboundcounters
+\unexpanded\def\strc_pagenumbers_increment_counters
{\incrementpagenumber
\incrementsubpagenumber}
\appendtoks
- \dodeincrementpageboundcounters
+ \strc_pagenumbers_decrement_counters
\to \everygoodbye
% Equivalents (compatibility):
@@ -240,49 +244,38 @@
% States:
-\newif\ifrightpage \rightpagetrue
\newif\ifdoublesided \newconditional\layoutisdoublesided
\newif\ifsinglesided \newconditional\layoutissinglesided
% Realpage and subpage numbers:
-\def\setnextrealpageno{\global\realpageno\strc_counters_incremented\s!realpage\relax}
-\def\setnextsubpageno {\global\subpageno \strc_counters_incremented\s!subpage \relax}
+\unexpanded\def\setnextrealpageno{\global\realpageno\strc_counters_incremented\s!realpage\relax}
+\unexpanded\def\setnextsubpageno {\global\subpageno \strc_counters_incremented\s!subpage \relax}
% Page numbers: (can move to lua) ... inconsistent names
\installcorenamespace{pagenumberinc}
\installcorenamespace{pagenumberdec}
-\def\dodecrementpagenumber {\global\userpageno\strc_counters_decremented\s!userpage\relax}
-\def\doincrementpagenumber {\global\userpageno\strc_counters_incremented\s!userpage\relax}
-
-\def\decrementsubpagenumber{\global\subpageno \strc_counters_decremented\s!subpage \relax}
-\def\incrementsubpagenumber{\global\subpageno \strc_counters_incremented\s!subpage \relax}
+\unexpanded\def\strc_pagenumbers_decrement_userpage{\global\userpageno\strc_counters_decremented\s!userpage\relax}
+\unexpanded\def\strc_pagenumbers_increment_userpage{\global\userpageno\strc_counters_incremented\s!userpage\relax}
-\def\dosynchronizepagenumber{\global\userpagenumberstate\plustwo} % start and visible
+\unexpanded\def\decrementsubpagenumber{\global\subpageno \strc_counters_decremented\s!subpage \relax}
+\unexpanded\def\incrementsubpagenumber{\global\subpageno \strc_counters_incremented\s!subpage \relax}
-\def\decrementpagenumber{\csname\??pagenumberdec\counterparameter\s!userpage\c!state\endcsname}
-\def\incrementpagenumber{\csname\??pagenumberinc\counterparameter\s!userpage\c!state\endcsname}
+\unexpanded\def\strc_pagenumbers_synchronize_userpage{\global\c_strc_pagenumbers_state_userpage\plustwo} % start and visible
-\letvalue{\??pagenumberdec\v!start}\dodecrementpagenumber
-\letvalue{\??pagenumberdec\v!none }\dodecrementpagenumber
-\letvalue{\??pagenumberdec\v!empty}\dodecrementpagenumber
+\unexpanded\def\decrementpagenumber{\csname\??pagenumberdec\counterparameter\s!userpage\c!state\endcsname}
+\unexpanded\def\incrementpagenumber{\csname\??pagenumberinc\counterparameter\s!userpage\c!state\endcsname}
-\letvalue{\??pagenumberinc\v!start}\doincrementpagenumber
-\letvalue{\??pagenumberinc\v!none }\doincrementpagenumber
-\setvalue{\??pagenumberinc\v!empty}{\doincrementpagenumber\dosynchronizepagenumber}
-\letvalue{\??pagenumberinc\v!keep }\dosynchronizepagenumber
+\letvalue{\??pagenumberdec\v!start}\strc_pagenumbers_decrement_userpage
+\letvalue{\??pagenumberdec\v!none }\strc_pagenumbers_decrement_userpage
+\letvalue{\??pagenumberdec\v!empty}\strc_pagenumbers_decrement_userpage
-% Control:
-
-\def\getpagestatus % hierboven gebruiken
- {\ifdoublesided
- \global\rightpagetrue
- % todo: \global\rightpagetrue or \global\rightpagefalse
- \else
- \global\rightpagetrue
- \fi}
+\letvalue{\??pagenumberinc\v!start}\strc_pagenumbers_increment_userpage
+\letvalue{\??pagenumberinc\v!none }\strc_pagenumbers_increment_userpage
+\setvalue{\??pagenumberinc\v!empty}{\strc_pagenumbers_increment_userpage\strc_pagenumbers_synchronize_userpage}
+\letvalue{\??pagenumberinc\v!keep }\strc_pagenumbers_synchronize_userpage
% Setup general page numbering
@@ -293,7 +286,7 @@
\appendtoks
\singlesidedfalse \setfalse\layoutisdoublesided
\doublesidedfalse \setfalse\layoutissinglesided
- \normalexpanded{\processallactionsinset[\directpagenumberingparameter\c!alternative]}
+ \processallactionsinset[\directpagenumberingparameter\c!alternative]
[ \v!singlesided=>\singlesidedtrue\settrue\layoutissinglesided,
\v!doublesided=>\doublesidedtrue\settrue\layoutisdoublesided]%
\ifdefined\trackingmarginnotestrue
@@ -304,22 +297,22 @@
\fi
\fi
\page_backgrounds_recalculate
- \dosetpagenumberlocation
+ \strc_pagenumbers_set_location
\to \everysetuppagenumbering
\ifdefined \page_backgrounds_recalculate \else
\let\page_backgrounds_recalculate\relax
\fi
-\ifdefined \dosetpagenumberlocation \else
- \let\dosetpagenumberlocation\relax
+\ifdefined \strc_pagenumbers_set_location \else
+ \let\strc_pagenumbers_set_location\relax
\fi
-\unexpanded\def\flushfinallayoutpage
- {\edef\p_page_numbering_page{\directpagenumberingparameter\c!page}%
- \ifx\p_page_numbering_page\empty \else
- \ifx\p_page_numbering_page\v!no \else
- \page[\p_page_numbering_page]
+\unexpanded\def\strc_pagenumbers_flush_final_page
+ {\edef\p_strc_pagenumbers_page{\directpagenumberingparameter\c!page}%
+ \ifx\p_strc_pagenumbers_page\empty \else
+ \ifx\p_strc_pagenumbers_page\v!no \else
+ \page[\p_strc_pagenumbers_page]
\fi
\fi}
@@ -329,9 +322,9 @@
% Rendering:
-\unexpanded\def\placelocationpagenumber
- {\ifnum\userpagenumberstate=\plustwo
- \ifnum\overallpagenumberstate=\plusone
+\unexpanded\def\strc_pagenumbers_place_location
+ {\ifnum\c_strc_pagenumbers_state_userpage=\plustwo
+ \ifnum\c_strc_pagenumbers_state=\plusone
\doif{\directpagenumberingparameter\c!strut}\v!yes\strut
\begingroup
\usepagenumberingstyleandcolor\c!style\c!color
@@ -344,8 +337,8 @@
\fi}
\unexpanded\def\completepagenumber
- {\ifnum\userpagenumberstate=\plustwo
- \ifnum\overallpagenumberstate=\plusone
+ {\ifnum\c_strc_pagenumbers_state_userpage=\plustwo
+ \ifnum\c_strc_pagenumbers_state=\plusone
\directpagenumberingparameter\c!left
\labeltexts\v!pagenumber\prefixedpagenumber
\directpagenumberingparameter\c!right
@@ -353,8 +346,8 @@
\fi}
\unexpanded\def\placepagenumber
- {\ifnum\userpagenumberstate=\plustwo
- \ifnum\overallpagenumberstate=\plusone
+ {\ifnum\c_strc_pagenumbers_state_userpage=\plustwo
+ \ifnum\c_strc_pagenumbers_state=\plusone
\labeltexts\v!pagenumber\pagenumber
\fi
\fi}
@@ -366,35 +359,35 @@
% compatible. So, in fact there can be multiple handlers active at the
% same time, but only the current one does something.
-\setnewconstant\realpagenumberstate \plustwo % counter state : 0=stop, 1=start, 2=start and visible
-\setnewconstant\userpagenumberstate \plustwo % counter state : 0=stop, 1=start, 2=start and visible
-\setnewconstant\subpagenumberstate \plustwo % counter state : 0=stop, 1=start, 2=start and visible
-\setnewconstant\overallpagenumberstate\plusone % general number: 0=invisible, 1=visible
+\setnewconstant\c_strc_pagenumbers_state_realpage\plustwo % counter state : 0=stop, 1=start, 2=start and visible
+\setnewconstant\c_strc_pagenumbers_state_userpage\plustwo % counter state : 0=stop, 1=start, 2=start and visible
+\setnewconstant\c_strc_pagenumbers_state_subpage \plustwo % counter state : 0=stop, 1=start, 2=start and visible
+\setnewconstant\c_strc_pagenumbers_state \plusone % general number: 0=invisible, 1=visible
-\def\checkpagenumberstatechange#1#2%
- {\edef\newpagenumberstate{\counterparameter#1\c!state}%
- \ifx\newpagenumberstate\oldpagenumberstate \else
- \doifelse\newpagenumberstate\v!start
+\unexpanded\def\strc_pagenumbers_check_state_change#1#2%
+ {\edef\m_strc_pagenumbers_state_new{\counterparameter#1\c!state}%
+ \ifx\m_strc_pagenumbers_state_new\m_strc_pagenumbers_state_old \else
+ \doifelse\m_strc_pagenumbers_state_new\v!start
{#2\plustwo}%
{#2\zerocount}%
\fi}
\appendtoks % todo: set state: none, start, stop, reset
- \checkpagenumberstatechange\s!realpage\realpagenumberstate
+ \strc_pagenumbers_check_state_change\s!realpage\c_strc_pagenumbers_state_realpage
\to \everysetuprealpagenumber
\appendtoks % todo: set state: none, start, stop, reset
- \checkpagenumberstatechange\s!userpage\userpagenumberstate
+ \strc_pagenumbers_check_state_change\s!userpage\c_strc_pagenumbers_state_userpage
\to \everysetupuserpagenumber
\appendtoks % todo: set state: none, start, stop, reset
- \checkpagenumberstatechange\s!subpage\subpagenumberstate
+ \strc_pagenumbers_check_state_change\s!subpage\c_strc_pagenumbers_state_subpage
\to \everysetupsubpagenumber
\appendtoks % todo: set state: none, start, stop, reset
\doifelse{\directpagenumberingparameter\c!state}\v!start
- {\overallpagenumberstate\plusone }%
- {\overallpagenumberstate\zerocount}%
+ {\c_strc_pagenumbers_state\plusone }%
+ {\c_strc_pagenumbers_state\zerocount}%
\to \everysetuppagenumbering
% Done
@@ -425,7 +418,7 @@
\appendtoks
\edef\askeduserpagenumber{\counterparameter\s!userpage\c!number}%
\ifx\askeduserpagenumber\empty \else
- \normalexpanded{\setuppagenumber[\c!start=\counterparameter\s!userpage\c!number,\c!number=]}%
+ \normalexpanded{\setuppagenumber[\c!start=\askeduserpagenumber,\c!number=]}%
\userpageno\strc_counters_raw\s!userpage
\fi
\to \everysetupuserpagenumber % todo: set state: none, start, stop, reset
@@ -433,7 +426,7 @@
\appendtoks
\edef\askedsubpagenumber{\counterparameter\s!subpage\c!number}%
\ifx\askedsubpagenumber\empty \else
- \normalexpanded{\setupsubpagenumber[\c!start=\counterparameter\s!subpage\c!number,\c!number=]}%
+ \normalexpanded{\setupsubpagenumber[\c!start=\askedsubpagenumber,\c!number=]}%
\subpageno\strc_counters_raw\s!subpage\relax
\fi
\to \everysetupsubpagenumber % todo: set state: none, start, stop, reset
@@ -443,7 +436,7 @@
% \setupuserpagenumber[start=2]
% \starttext \dorecurse{20}{\input knuth \par} \stoptext
-\def\checkpagenumbershift
+\unexpanded\def\strc_pagenumbers_check_change_shift
{\userpageno\strc_counters_raw\s!userpage\relax
\ifnum\realpageno=\plusone
\ifodd\userpageno
@@ -454,12 +447,12 @@
\appendtoks % todo: set state: none, start, stop, reset
% this makes starting at an even page possible
- \checkpagenumbershift
+ \strc_pagenumbers_check_change_shift
\to \everysetupuserpagenumber
\appendtoks % todo: set state: none, start, stop, reset
% this makes starting at an even page possible
- \checkpagenumbershift
+ \strc_pagenumbers_check_change_shift
\to \everysetuppagenumbering
\initializepagecounters
diff --git a/tex/context/base/tabl-tab.mkiv b/tex/context/base/tabl-tab.mkiv
index 20ea1d766..5e19a5683 100644
--- a/tex/context/base/tabl-tab.mkiv
+++ b/tex/context/base/tabl-tab.mkiv
@@ -1346,10 +1346,10 @@
\fi
\ifx\p_tabl_table_split\v!yes
\unexpanded\def\stoptable{\stoptables\egroup}%
- \starttables
+ \expandafter\starttables
\else\ifx\p_tabl_table_split\v!repeat
\unexpanded\def\stoptable{\stoptables\egroup}%
- \starttables
+ \doubleexpandafter\starttables
\else
\ifx\p_tabl_table_frame\empty
\ifinsidefloat\else\startbaselinecorrection\fi
@@ -1357,7 +1357,7 @@
\startframedcontent[\p_tabl_table_frame]%
\fi
\postponenotes
- \firststagestarttable
+ \doubleexpandafter\firststagestarttable
\fi\fi
[#1]}
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 79b749226..c7acc7b5a 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 07/06/12 19:11:14
+-- merge date : 07/06/12 22:37:28
do -- begin closure to overcome local limits and interference