summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl')
-rw-r--r--tex/context/base/mkxl/chem-str.mkxl12
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/font-ots.lmt16
-rw-r--r--tex/context/base/mkxl/pack-rul.mkxl2
-rw-r--r--tex/context/base/mkxl/publ-ini.mkxl2
-rw-r--r--tex/context/base/mkxl/scrn-bar.mklx3
-rw-r--r--tex/context/base/mkxl/strc-itm.mklx6
-rw-r--r--tex/context/base/mkxl/tabl-frm.mkxl4
-rw-r--r--tex/context/base/mkxl/tabl-ntb.mkxl12
-rw-r--r--tex/context/base/mkxl/tabl-xtb.mklx50
11 files changed, 59 insertions, 52 deletions
diff --git a/tex/context/base/mkxl/chem-str.mkxl b/tex/context/base/mkxl/chem-str.mkxl
index a4cf376c3..6c9d346b6 100644
--- a/tex/context/base/mkxl/chem-str.mkxl
+++ b/tex/context/base/mkxl/chem-str.mkxl
@@ -268,17 +268,17 @@
\to \everystructurechemical
\def\chem_add_texts
- {\setbox2\hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_mid_text}\hss}%
- \setbox4\hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_top_text}\hss}%
- \setbox6\hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_bot_text}\hss}%
+ {\setbox\scratchboxone \hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_mid_text}\hss}%
+ \setbox\scratchboxtwo \hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_top_text}\hss}%
+ \setbox\scratchboxthree\hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_bot_text}\hss}%
\setbox\b_chem_result\hpack \bgroup
\box\b_chem_result
\hskip-\d_chem_width
- \raise\d_chem_height\hpack{\lower\ht4\box4}%
+ \raise\d_chem_height\hpack{\lower\ht\scratchboxtwo\box\scratchboxtwo}%
\hskip-\d_chem_width
- \lower.5\dimexpr\ht2-\dp2\relax\box2%
+ \lower.5\dimexpr\ht\scratchboxone-\dp\scratchboxone\relax\box\scratchboxone
\hskip-\d_chem_width
- \lower\d_chem_depth \hpack{\raise\dp6\box6}%
+ \lower\d_chem_depth\hpack{\raise\dp\scratchboxthree\box\scratchboxthree}%
\hss
\egroup} % text on top of chemicals
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 38e7f7b70..ed5b54767 100644
--- a/tex/context/base/mkxl/cont-new.mkxl
+++ b/tex/context/base/mkxl/cont-new.mkxl
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2022.12.21 17:10}
+\newcontextversion{2022.12.22 22:14}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl
index 897cf8bf7..77660ad15 100644
--- a/tex/context/base/mkxl/context.mkxl
+++ b/tex/context/base/mkxl/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\immutable\edef\contextformat {\jobname}
-\immutable\edef\contextversion{2022.12.21 17:10}
+\immutable\edef\contextversion{2022.12.22 22:14}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/font-ots.lmt b/tex/context/base/mkxl/font-ots.lmt
index 73c9b7c56..e7fcfc576 100644
--- a/tex/context/base/mkxl/font-ots.lmt
+++ b/tex/context/base/mkxl/font-ots.lmt
@@ -292,9 +292,9 @@ local marks = false
local classes = false
local currentfont = false
local currentdynamic = false
-local currentscale = 1000
-local currentxscale = 1000
-local currentyscale = 1000
+local currentscale = 1000
+local currentxscale = 1000
+local currentyscale = 1000
local factor = 0
local threshold = 0
local checkmarks = false
@@ -2351,6 +2351,7 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
if keepdisc then
keepdisc = false
if notmatchpost[current] ~= notmatchreplace[current] then
+-- print(notmatchpost[current],notmatchreplace[current])
backtrackdisc = current
end
-- we assume a simple text only replace (we could use nuts.count)
@@ -2435,7 +2436,9 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
setdisc(lookaheaddisc,cf,post,new)
end
start = getprev(lookaheaddisc)
+if done then -- new 2022-12-22 : discretionary-001.tex
useddisc = lookaheaddisc -- new 2022-09-25
+end
sweephead[cf] = getnext(clast) or false
sweephead[new] = getnext(cl) or false
elseif backtrackdisc then
@@ -2496,7 +2499,9 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
setdisc(backtrackdisc,pre,post,replace)
end
start = getprev(backtrackdisc)
+if done then -- new 2022-12-22 : discretionary-001.tex
useddisc = backtrackdisc -- new 2022-09-25
+end
sweephead[post] = getnext(clast) or false
sweephead[replace] = getnext(last) or false
else
@@ -2508,10 +2513,11 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
end
end
+-- test case ?
if useddisc and start ~= usedstart then -- make this option per font -- new 2022-09-25
start = getnext(start) -- new 2022-09-25
end -- new 2022-09-25
- return head, start, done, useddisc -- new 2022-09-25
+ return head, start, done, useddisc -- new 2022-09-25
end
local chaintrac do
@@ -3038,7 +3044,7 @@ handlers.gpos_context = handle_contextchain
-- end
-- new 2022-09-25
-
+
local function chained_contextchain(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash)
local steps = currentlookup.steps
local nofsteps = currentlookup.nofsteps
diff --git a/tex/context/base/mkxl/pack-rul.mkxl b/tex/context/base/mkxl/pack-rul.mkxl
index 26b62d8b1..9bb7ddd8d 100644
--- a/tex/context/base/mkxl/pack-rul.mkxl
+++ b/tex/context/base/mkxl/pack-rul.mkxl
@@ -2694,7 +2694,7 @@
\tolerant\protected\def\pack_framed_text_start[#1]#*[#2]#*[#3]% or #1#*[#2]#*[#3]% and pass {#1}
{\bgroup
- \edef\currentframedtext{#1}
+ \edef\currentframedtext{#1}%
\doifelseassignment{#2}
{\pack_framed_text_start_indeed\empty{#2}}
{\pack_framed_text_start_indeed{#2}{#3}}}
diff --git a/tex/context/base/mkxl/publ-ini.mkxl b/tex/context/base/mkxl/publ-ini.mkxl
index 15da8ada5..e64104305 100644
--- a/tex/context/base/mkxl/publ-ini.mkxl
+++ b/tex/context/base/mkxl/publ-ini.mkxl
@@ -906,7 +906,7 @@
\clf_btxfetchlistentries{\currentbtxdataset}%
\egroup
\d_publ_number_width\wd\scratchbox
- \letlistparameter\c!width\d_publ_number_width
+ \letlistparameter\c!width\d_publ_number_width % no need for _reference here, frozen
\fi
\fi
\doifelse{\listparameter\c!prefix}\v!yes\settrue\setfalse\c_publ_prefixed
diff --git a/tex/context/base/mkxl/scrn-bar.mklx b/tex/context/base/mkxl/scrn-bar.mklx
index 155a3b716..5fbd47d6c 100644
--- a/tex/context/base/mkxl/scrn-bar.mklx
+++ b/tex/context/base/mkxl/scrn-bar.mklx
@@ -167,9 +167,6 @@
\def\scrn_bar_goto#action%
{\button{\symbol[#action]}[#action]\hss}
-% todo: this will be \letblackruleparameter\c!width\scratchdimenone (faster)
-% todo: make these setups
-
\def\scrn_bar_alternative_a
{\d_scrn_bar_width \interactionbarparameter\c!width
\d_scrn_bar_distance\interactionbarparameter\c!distance
diff --git a/tex/context/base/mkxl/strc-itm.mklx b/tex/context/base/mkxl/strc-itm.mklx
index fd07208c6..7c3f0af8a 100644
--- a/tex/context/base/mkxl/strc-itm.mklx
+++ b/tex/context/base/mkxl/strc-itm.mklx
@@ -216,8 +216,8 @@
\newdimension \d_strc_itemgroups_list_width
\newdimension \d_strc_itemgroups_asked_width
-\newdimension \d_strc_itemgroups_max_width % multipass
-\newinteger \c_strc_itemgroups_max_items % multipass
+\newdimension \d_strc_itemgroups_max_width \def\d_strc_itemgroups_max_width_reference{\d_strc_itemgroups_max_width}
+\newinteger \c_strc_itemgroups_max_items
\newinteger \c_strc_itemgroups_n_of_items
\newinteger \c_strc_itemgroups_nesting
@@ -960,7 +960,7 @@
\fi
\ifconditional\c_strc_itemgroups_fitting
\ifdim\d_strc_itemgroups_max_width>\zeropoint
- \letitemgroupparameter\c!width\d_strc_itemgroups_max_width
+ \letitemgroupparameter\c!width\d_strc_itemgroups_max_width_reference
\fi
\fi
\strc_itemgroups_calculate_list_width\c_strc_itemgroups_nesting
diff --git a/tex/context/base/mkxl/tabl-frm.mkxl b/tex/context/base/mkxl/tabl-frm.mkxl
index 7f9189c61..e19ea34fe 100644
--- a/tex/context/base/mkxl/tabl-frm.mkxl
+++ b/tex/context/base/mkxl/tabl-frm.mkxl
@@ -23,7 +23,7 @@
\newinteger \c_tabl_framed_c
\newinteger \c_tabl_framed_r
-\newdimension\d_tabl_framed_h
+\newdimension\d_tabl_framed_h \def\d_tabl_framed_h_reference{\d_tabl_framed_h}%
\newdimension\d_tabl_framed_d
\newdimension\b_tabl_framed
@@ -221,7 +221,7 @@
\resetframedparameter\c!background
\letframedparameter\c!frame\v!off
\or
- \letframedparameter\c!height\d_tabl_framed_h
+ \letframedparameter\c!height\d_tabl_framed_h_reference
\fi
\pack_framed_start_framed_whatever}
diff --git a/tex/context/base/mkxl/tabl-ntb.mkxl b/tex/context/base/mkxl/tabl-ntb.mkxl
index 147cb30f5..049dff58c 100644
--- a/tex/context/base/mkxl/tabl-ntb.mkxl
+++ b/tex/context/base/mkxl/tabl-ntb.mkxl
@@ -160,7 +160,7 @@
\newinteger \c_tabl_ntb_current_row_four
\newinteger \c_tabl_ntb_current_col_four
-\newinteger \c_tabl_ntb_running_col
+\newinteger \c_tabl_ntb_running_col \def\c_tabl_ntb_running_col_reference{\c_tabl_ntb_running_col}
\newinteger \c_tabl_ntb_maximum_row
\newinteger \c_tabl_ntb_maximum_col
\newinteger \c_tabl_ntb_maximum_row_span
@@ -758,11 +758,11 @@
\fi[#1]}
\def\tabl_ntb_td_yes[#1]#2\eTD
- {\letnaturaltableparameter \c!ny \m_tabl_ntb_default_nr
- \letnaturaltableparameter \c!nx \m_tabl_ntb_default_nc
- \letnaturaltableparameter \c!nc \plusone
- \letnaturaltableparameter \c!nr \plusone
- \letnaturaltableparameter \c!n \c_tabl_ntb_running_col
+ {\letnaturaltableparameter \c!ny\m_tabl_ntb_default_nr
+ \letnaturaltableparameter \c!nx\m_tabl_ntb_default_nc
+ \letnaturaltableparameter \c!nc\plusone
+ \letnaturaltableparameter \c!nr\plusone
+ \letnaturaltableparameter \c!n \c_tabl_ntb_running_col_reference
\resetnaturaltableparameter\c!m
\resetnaturaltableparameter\c!action% not that important
\setupcurrentnaturaltable[#1]%
diff --git a/tex/context/base/mkxl/tabl-xtb.mklx b/tex/context/base/mkxl/tabl-xtb.mklx
index 57685bbcd..84755cc1c 100644
--- a/tex/context/base/mkxl/tabl-xtb.mklx
+++ b/tex/context/base/mkxl/tabl-xtb.mklx
@@ -15,6 +15,26 @@
\writestatus{loading}{ConTeXt Table Macros / Xtreme}
+\unprotect
+
+\newdimension\d_tabl_x_width \def\d_tabl_x_width_reference {\d_tabl_x_width }
+\newdimension\d_tabl_x_height \def\d_tabl_x_height_reference{\d_tabl_x_height}
+\newdimension\d_tabl_x_depth % not used
+\newdimension\d_tabl_x_distance
+\newdimension\d_tabl_x_final_width \def\d_tabl_x_final_width_reference{\d_tabl_x_final_width}
+\newinteger \c_tabl_x_nx
+\newinteger \c_tabl_x_ny
+\newinteger \c_tabl_x_mode
+\newbox \b_tabl_x
+\newinteger \c_tabl_x_state % 0=empty 1=content 3=splitleft
+\newinteger \c_tabl_x_nesting
+\newinteger \c_tabl_x_skip_mode % 1 = skip
+\newdimension\d_tabl_x_textwidth
+\newinteger \c_tabl_x_swapped
+\newinteger \c_tabl_x_swapped_max
+
+\protect
+
\registerctxluafile{tabl-xtb}{autosuffix}
% todo:
@@ -82,22 +102,6 @@
{\signalcharacter}% not used
\to \everyenableelements
-\newdimension\d_tabl_x_width
-\newdimension\d_tabl_x_height
-\newdimension\d_tabl_x_depth % not used
-\newdimension\d_tabl_x_distance
-\newinteger \c_tabl_x_nx
-\newinteger \c_tabl_x_ny
-\newinteger \c_tabl_x_mode
-\newbox \b_tabl_x
-\newinteger \c_tabl_x_state % 0=empty 1=content 3=splitleft
-\newdimension\d_tabl_x_final_width
-\newinteger \c_tabl_x_nesting
-\newinteger \c_tabl_x_skip_mode % 1 = skip
-\newdimension\d_tabl_x_textwidth
-\newinteger \c_tabl_x_swapped
-\newinteger \c_tabl_x_swapped_max
-
\lettonothing\m_tabl_x_swapped_settings
\aliased\let\currentxtablerow \clf_x_table_r
@@ -436,7 +440,7 @@
\d_split_minimum_free_space\dimexpr\extraxtablesplitheight+\xtableparameter\c!splitoffset\relax
%\c_split_minimum_free_lines\plustwo % not needed here as we're precise enough
\let\tsplitdirectsplitter\tabl_x_split_splitter
- \let\tsplitdirectwidth \d_tabl_x_final_width
+ \let\tsplitdirectwidth \d_tabl_x_final_width_reference
\handledirecttsplit}
\protected\def\tabl_x_split_splitter#height%
@@ -627,7 +631,7 @@
\fi
\setupcurrentxtable[#settings]%
\relax
- \letxtableparameter\c!width\d_tabl_x_width % overloads given width
+ \letxtableparameter\c!width\d_tabl_x_width_reference % overloads given width
\inheritedxtableframed\bgroup
\tabl_x_begin_of_cell
\fi}
@@ -640,7 +644,7 @@
\letxtableparameter\c!height\v!fit % overloads given height
\fi
\relax
- \letxtableparameter\c!width\d_tabl_x_width % overloads given width
+ \letxtableparameter\c!width\d_tabl_x_width_reference % overloads given width
\inheritedxtableframed\bgroup
\tabl_x_begin_of_cell
\fi}
@@ -657,8 +661,8 @@
{\dostarttagged\t!tablecell\empty % can't we just tag the box
\setbox\b_tabl_x\hpack\bgroup
\setupcurrentxtable[#settings]%
- \letxtableparameter\c!width \d_tabl_x_width % overloads given width
- \letxtableparameter\c!height\d_tabl_x_height % overloads given height
+ \letxtableparameter\c!width \d_tabl_x_width_reference % overloads given width
+ \letxtableparameter\c!height\d_tabl_x_height_reference % overloads given height
\clf_x_table_init_construct
\inheritedxtableframed\bgroup
\tabl_x_begin_of_cell
@@ -667,8 +671,8 @@
\protected\def\tabl_x_start_cell_construct_nop
{\dostarttagged\t!tablecell\empty % can't we just tag the box
\setbox\b_tabl_x\hpack\bgroup
- \letxtableparameter\c!width \d_tabl_x_width % overloads given width
- \letxtableparameter\c!height\d_tabl_x_height % overloads given height (commenting it ... nice option)
+ \letxtableparameter\c!width \d_tabl_x_width_reference % overloads given width
+ \letxtableparameter\c!height\d_tabl_x_height_reference % overloads given height (commenting it ... nice option)
\clf_x_table_init_construct
\inheritedxtableframed\bgroup
\tabl_x_begin_of_cell