summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-09-05 21:54:33 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-09-05 21:54:33 +0200
commit03f6d43b4a5036b4cbb7e4df56db7217717bdadd (patch)
tree68878a79a10e0380c32a53c5a46d90e1673e5726
parent4eaa704abd25421901727c4683447667ac0d58f6 (diff)
downloadcontext-03f6d43b4a5036b4cbb7e4df56db7217717bdadd.tar.gz
2020-09-05 21:15:00
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/cldf-ini.lua2
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkxl2
-rw-r--r--tex/context/base/mkiv/font-ogr.lmt1
-rw-r--r--tex/context/base/mkiv/lpdf-emb.lmt13
-rw-r--r--tex/context/base/mkiv/math-rad.mkvi10
-rw-r--r--tex/context/base/mkiv/meta-imp-mat.mkiv11
-rw-r--r--tex/context/base/mkiv/meta-imp-threesix.mkxl156
-rw-r--r--tex/context/base/mkiv/mlib-mat.lmt4
-rw-r--r--tex/context/base/mkiv/mlib-scn.lmt4
-rw-r--r--tex/context/base/mkiv/scrp-ini.lua8
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin28170 -> 28192 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin256175 -> 256189 bytes
-rw-r--r--tex/context/base/mkiv/syst-aux.mkxl8
-rw-r--r--tex/context/base/mkiv/syst-lua.lmt13
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
19 files changed, 129 insertions, 113 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index c4acaf6fa..d3818d44d 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2020.09.03 20:00}
+\newcontextversion{2020.09.05 21:12}
%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/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index bcb2cbb96..03ff7cd5b 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2020.09.03 20:00}
+\edef\contextversion{2020.09.05 21:12}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/cldf-ini.lua b/tex/context/base/mkiv/cldf-ini.lua
index 65851ce20..7e6af8072 100644
--- a/tex/context/base/mkiv/cldf-ini.lua
+++ b/tex/context/base/mkiv/cldf-ini.lua
@@ -137,7 +137,7 @@ local trialtypesettingstate = createtoken("trialtypesettingstate").index
function context.trialtypesetting()
return texgetcount(trialtypesettingstate) ~= 0
--- return texgetcount("trialtypesettingstate") ~= 0
+ -- return texgetcount("trialtypesettingstate") ~= 0
end
local knownfunctions = (lua.getfunctionstable or lua.get_functions_table)(true)
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 4b13a7ae1..ca66a4283 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2020.09.03 20:00}
+\newcontextversion{2020.09.05 21:12}
%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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 044c57579..367ba9207 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2020.09.03 20:00}
+\edef\contextversion{2020.09.05 21:12}
%D Kind of special:
diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl
index 9b4873115..873643725 100644
--- a/tex/context/base/mkiv/context.mkxl
+++ b/tex/context/base/mkiv/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2020.09.03 20:00}
+\edef\contextversion{2020.09.05 21:12}
%D Kind of special:
diff --git a/tex/context/base/mkiv/font-ogr.lmt b/tex/context/base/mkiv/font-ogr.lmt
index 94cf91494..e57e88ed6 100644
--- a/tex/context/base/mkiv/font-ogr.lmt
+++ b/tex/context/base/mkiv/font-ogr.lmt
@@ -70,6 +70,7 @@ do
local d_descriptions = { } -- setmetatableindex({ },t_descriptions) -- hm, index vs unicode
d_tfmdata.characters = d_characters
d_tfmdata.descriptions = d_descriptions
+ d_tfmdata.parentdata = t_tfmdata -- so we can access it if needed
d_properties.instance = - droppedin -- will become an extra element in the hash
t_properties.virtualized = true
identifiers[droppedin] = d_tfmdata
diff --git a/tex/context/base/mkiv/lpdf-emb.lmt b/tex/context/base/mkiv/lpdf-emb.lmt
index 0f0388af0..d2da4473a 100644
--- a/tex/context/base/mkiv/lpdf-emb.lmt
+++ b/tex/context/base/mkiv/lpdf-emb.lmt
@@ -1667,12 +1667,18 @@ do
local factor = units * bpfactor / scale
local fixdepth = mpshapes.fixdepth
local usecolor = mpshapes.usecolor
- local specification = mpshapes.specification
+ local specification = mpshapes.specification or { }
local shapedefinitions = mpshapes.shapes
local instance = mpshapes.instance
--
simplemprun(instance,"begingroup;",true,true)
setparameterset("mpsfont",specification)
+ specification.scale = specification.scale or scale
+ specification.parameters = parameters
+ specification.properties = properties
+ specification.parentdata = details.fontdata.parentdata
+ -------------.characters = details.fontdata.characters
+ -------------.descriptions = details.fontdata.descriptions
if shapedefinitions then
local preamble = shapedefinitions.parameters.preamble
if preamble then
@@ -1702,6 +1708,11 @@ do
local function resetmps()
setparameterset("mpsfont")
simplemprun(instance,"endgroup;",true,true)
+ specification.parameters = nil
+ specification.properties = nil
+ specification.parentdata = nil
+ -------------.characters = nil
+ -------------.descriptions = nil
end
--
local function getresources()
diff --git a/tex/context/base/mkiv/math-rad.mkvi b/tex/context/base/mkiv/math-rad.mkvi
index 5d7dd1474..a11ec045d 100644
--- a/tex/context/base/mkiv/math-rad.mkvi
+++ b/tex/context/base/mkiv/math-rad.mkvi
@@ -197,10 +197,11 @@
enddef ;
\stopMPextensions
-\startuniqueMPgraphic{math:radical:default}%{...}
+\startuniqueMPgraphic{minifun::math:radical:default}%{...}
draw
math_radical_simple(OverlayWidth,OverlayHeight,OverlayDepth,OverlayOffset)
- withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 30
+ % withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 30
+ withpen pencircle scaled OverlayLineWidth
% dashed evenly
withcolor OverlayLineColor ;
\stopuniqueMPgraphic
@@ -217,7 +218,8 @@
\d_overlay_height \ht\nextbox
\d_overlay_depth \dp\nextbox
\d_overlay_offset \scratchoffset
- \d_overlay_linewidth\linewidth
+ \d_overlay_linewidth\the\dimexpr\triggeredmathstyleparameter\Umathfractionrule
+ %
\edef\overlaylinecolor{\mathradicalparameter\c!color}%
%
\edef\p_mp{\mathradicalparameter\c!mp}%
@@ -241,7 +243,7 @@
\fi
\endgroup}
-\definemathradical[sqrt][mp=math:radical:default]
+\definemathradical[sqrt][mp=minifun::math:radical:default]
% \setupmathradical[sqrt][alternative=normal,color=darkblue]
% \setupmathradical[sqrt][alternative=mp,color=darkgreen]
diff --git a/tex/context/base/mkiv/meta-imp-mat.mkiv b/tex/context/base/mkiv/meta-imp-mat.mkiv
index 495864a9e..e1b5d9d00 100644
--- a/tex/context/base/mkiv/meta-imp-mat.mkiv
+++ b/tex/context/base/mkiv/meta-imp-mat.mkiv
@@ -129,7 +129,9 @@
% main handler
def math_stacker_draw_accent(expr p) =
- draw p withpen pencircle scaled OverlayLineWidth xyscaled (2,3) rotated 45 ;
+% draw p withpen pencircle scaled OverlayLineWidth xyscaled (2,3) rotated 45 ;
+% draw p withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 45 ;
+ draw p withpen pencircle scaled OverlayLineWidth ;
enddef ;
def math_stacker_draw_arrow(expr p) =
@@ -204,11 +206,16 @@
\startuniqueMPgraphic{minifun::math:radical:default}{axis,ex,em}
draw
math_radical_simple(OverlayWidth,OverlayHeight,OverlayDepth,OverlayOffset)
- withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 30
+ % withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 30
+ withpen pencircle scaled OverlayLineWidth
% dashed evenly
withcolor OverlayLineColor ;
\stopuniqueMPgraphic
+% already setup:
+%
+% definemathradical [sqrt] [mp=minifun::math:radical:default]
+
\continueifinputfile{meta-imp-mat.mkiv}
\setupmathstackers [both] [color=darkred,alternative=mp]
diff --git a/tex/context/base/mkiv/meta-imp-threesix.mkxl b/tex/context/base/mkiv/meta-imp-threesix.mkxl
index 277aa85f7..44ddda579 100644
--- a/tex/context/base/mkiv/meta-imp-threesix.mkxl
+++ b/tex/context/base/mkiv/meta-imp-threesix.mkxl
@@ -1,10 +1,23 @@
-% not yet a module
+%D \module
+%D [ file=meta-imp-threesix,
+%D version=2019.00.00,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Don Knuths ThreeSix font,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The design of the font is if course by Don Knuth and can be found in facs9b.ps. I
+%D wish I was clever enough to understand all the good stuff in there.
\startluacode
- local gsub, utfbyte = string.gsub, utf.byte
-
- -- The font from DEK's facs9b.ps (I wish I was clever enough to understand all the good
- -- stuff in there):
+ local unpack = unpack
+ local concat = table.concat
+ local gsub, gmatch, utfbyte = string.gsub, string.gmatch, utf.byte
local font36 = {
["0"] = [[00111100 01111110 11000011 11000011 11000011 11000011 01111110 00111100]],
@@ -65,8 +78,9 @@
preamble = "InitializeThreeSix;",
}
for u, v in table.sortedhash(font36) do
+ local data = remap(v)
local ny = 8
- local nx = (#v - ny + 1) // ny
+ local nx = ((#v + 1) // ny) - 1
local height = ny * 1.1 - 0.1
local width = nx * 1.1 - 0.1
fonts.dropins.registerglyph {
@@ -74,93 +88,18 @@
unicode = utfbyte(u),
width = width,
height = height,
- code = f_code(remap(v)),
+ code = f_code(data),
}
end
end
-
MP.registerthreesix("fontthreesix")
\stopluacode
-% \startMPcalculation{simplefun}
-% def InitializeThreeSix =
-% save Y, N, L, S ; save dx, dy, nx, ny ;
-% save shape, fillcolor, mypen, random, currentpen, spread, hoffset ;
-% string shape, fillcolor, mypen ; boolean random ; pen currentpen ;
-% dx := 11/10 ;
-% dy := - 11/10 ;
-% nx := - dx ;
-% ny := 0 ;
-% shape := getparameterdefault "mpsfont" "shape" "circle" ;
-% random := hasoption "mpsfont" "random" "true" ;
-% fillcolor := getparameterdefault "mpsfont" "color" "" ;
-% mypen := getparameterdefault "mpsfont" "pen" "" ;
-% spread := getparameterdefault "mpsfont" "spread" 0 ;
-% hoffset := 12 * spread / 2 ;
-% currentpen := pencircle
-% if mypen = "fancy" :
-% xscaled 1/20 yscaled 2/20 rotated 45
-% else :
-% scaled 1/20
-% fi ;
-% if shape == "square" :
-% def S =
-% unitsquare if random : randomized 1/10 fi
-% shifted (nx,ny)
-% enddef ;
-% elseif shape = "diamond" :
-% def S =
-% unitdiamond if random : randomized 1/10 fi
-% shifted (nx,ny)
-% enddef ;
-% else :
-% def S =
-% unitcircle if random : randomizedcontrols 1/20 fi
-% shifted (nx,ny)
-% enddef ;
-% fi ;
-% def N =
-% nx := nx + dx ;
-% draw S ;
-% enddef ;
-% if fillcolor = "random" :
-% def Y =
-% nx := nx + dx ;
-% fillup S withcolor white randomized (2/3,2/3,2/3) ;
-% enddef ;
-% elseif fillcolor = "" :
-% def Y =
-% nx := nx + dx ;
-% fillup S ;
-% enddef ;
-% else :
-% def Y =
-% nx := nx + dx ;
-% fillup S withcolor fillcolor ;
-% enddef ;
-% fi ;
-% def L =
-% nx := - dx ;
-% ny := ny + dy ;
-% enddef ;
-% enddef ;
-%
-% vardef ThreeSix (text code) =
-% InitializeThreeSix ;
-% draw image (code) shifted (hoffset,-ny) ;
-% enddef ;
-% \stopMPcalculation
-
\startMPcalculation{simplefun}
def InitializeThreeSix =
save Y, N, L, S ;
- % save dx, dy, nx, ny ;
save shape, fillcolor, mypen, random, threesixpen, spread, hoffset ;
string shape, fillcolor, mypen ; boolean random ; pen threesixpen ;
- % dx := 11/10 ;
- % dy := - 11/10 ;
- % nx := - dx ;
- % ny := 0 ;
shape := getparameterdefault "mpsfont" "shape" "circle" ;
random := hasoption "mpsfont" "random" "true" ;
fillcolor := getparameterdefault "mpsfont" "color" "" ;
@@ -189,10 +128,17 @@
shifted (nx,ny)
enddef ;
fi ;
- def N =
- nx := nx + dx ;
- draw S ;
- enddef ;
+ if fillcolor = "" :
+ def N =
+ nx := nx + dx ;
+ draw S ;
+ enddef ;
+ else :
+ def N =
+ nx := nx + dx ;
+ draw S withcolor "lightgray" ;
+ enddef ;
+ fi ;
if fillcolor = "random" :
def Y =
nx := nx + dx ;
@@ -250,4 +196,40 @@
\definefont[DEKFontC][Serif*fontthreesix-initial]
\definefont[DEKFontD][Serif*fontthreesix-tweak]
-\endinput
+\continueifinputfile{meta-imp-threesix.mkxl}
+
+\starttext
+
+\definefontfeature % color, with some spread
+ [fontthreesix-color]
+ [default]
+ [metapost={category=fontthreesix,shape=diamond,color=random,pen=fancy,spread=.1,random=yes}]
+
+% \definefont[DEKFontA][Serif*fontthreesix-color @ 280pt]
+% \definefont[DEKFontB][Serif*fontthreesix-color @ 80pt]
+
+\definefont[DEKFontA][Serif*fontthreesix-color @ 200pt]
+\definefont[DEKFontB][Serif*fontthreesix-color @ 60pt]
+
+\startTEXpage[align={lohi,middle,nothyphenated},offset=20pt]
+ \offinterlineskip \vskip10pt
+ \DEKFontA T\kern-0.05em\lower.75\exheight\hbox{E}\kern-.05emX \vskip60pt
+ \DEKFontB TOUGH \vskip20pt
+ SMART \vskip20pt
+ UNITED \vskip20pt
+ DISCIPLINED \vskip20pt
+ LOVING \vskip10pt
+\stopTEXpage
+
+\startpagemakeup
+ \setupalign[middle,nothyphenated]
+ \offinterlineskip \vfil\vfil
+ \DEKFontA T\kern-0.05em\lower.75\exheight\hbox{E}\kern-.05emX \vfil\vfil\vfil
+ \DEKFontB TOUGH \vfil
+ SMART \vfil
+ UNITED \vfil
+ DISCIPLINED \vfil
+ LOVING \vfil
+\stoppagemakeup
+
+\stoptext
diff --git a/tex/context/base/mkiv/mlib-mat.lmt b/tex/context/base/mkiv/mlib-mat.lmt
index e5d40319f..3a63b32c7 100644
--- a/tex/context/base/mkiv/mlib-mat.lmt
+++ b/tex/context/base/mkiv/mlib-mat.lmt
@@ -117,8 +117,8 @@ local c_erfcx = c.erfcx registerscript("c_erfcx", function() return mppair(c_
local c_erfi = c.erfi registerscript("c_erfi", function() return mppair(c_topair(c_erfi (c_new(scanpair())))) end)
local c_dawson = c.dawson registerscript("c_dawson", function() return mppair(c_topair(c_dawson(c_new(scanpair())))) end)
-local c_voigt = c.voigt
-local c_voigt_hwhm = c.voigt_hwhm
+local c_voigt = c.voigt
+local c_voigt_hwhm = c.voigt_hwhm
registerscript("c_voigt", function()
return mppair(c_topair(c_voigt(c_new(scanpair()),c_new(scanpair()),c_new(scanpair()))))
diff --git a/tex/context/base/mkiv/mlib-scn.lmt b/tex/context/base/mkiv/mlib-scn.lmt
index 8b0cd730a..ff1cff0e3 100644
--- a/tex/context/base/mkiv/mlib-scn.lmt
+++ b/tex/context/base/mkiv/mlib-scn.lmt
@@ -314,6 +314,10 @@ local function collectnames()
n = n + 1 l[n] = scanstring(1)
elseif t == nullary_code then
n = n + 1 l[n] = scanboolean(1)
+ elseif t == leftbracket_code then
+ scantoken() -- leftbacket
+ n = n + 1 l[n] = scaninteger(1)
+ scantoken() -- rightbacket
elseif t == leftdelimiter_code or t == tag_code or t == capsule_code then
t = scanexpression(true)
n = n + 1 l[n] = (typescanners[t] or scanexpression)()
diff --git a/tex/context/base/mkiv/scrp-ini.lua b/tex/context/base/mkiv/scrp-ini.lua
index 6829cf898..ab6fca4db 100644
--- a/tex/context/base/mkiv/scrp-ini.lua
+++ b/tex/context/base/mkiv/scrp-ini.lua
@@ -221,10 +221,12 @@ local hash = { -- we could put these presets in char-def.lua
[0x30A5] = "non_starter", [0x30A7] = "non_starter", [0x30A9] = "non_starter", [0x30C3] = "non_starter", [0x30E3] = "non_starter",
[0x30E5] = "non_starter", [0x30E7] = "non_starter", [0x30EE] = "non_starter", [0x30F5] = "non_starter", [0x30F6] = "non_starter",
[0x30FC] = "non_starter", [0x30FD] = "non_starter", [0x30FE] = "non_starter", [0x31F0] = "non_starter", [0x31F1] = "non_starter",
- [0x30F2] = "non_starter", [0x30F3] = "non_starter", [0x30F4] = "non_starter", [0x31F5] = "non_starter", [0x31F6] = "non_starter",
- [0x30F7] = "non_starter", [0x30F8] = "non_starter", [0x30F9] = "non_starter", [0x31FA] = "non_starter", [0x31FB] = "non_starter",
- [0x30FC] = "non_starter", [0x30FD] = "non_starter", [0x30FE] = "non_starter", [0x31FF] = "non_starter",
+ [0x31F2] = "non_starter", [0x31F3] = "non_starter", [0x31F4] = "non_starter", [0x31F5] = "non_starter", [0x31F6] = "non_starter",
+ [0x31F7] = "non_starter", [0x31F8] = "non_starter", [0x31F9] = "non_starter", [0x31FA] = "non_starter", [0x31FB] = "non_starter",
+ [0x31FC] = "non_starter", [0x31FD] = "non_starter", [0x31FE] = "non_starter", [0x31FF] = "non_starter",
--
+ [0x301C] = "non_starter", [0x303B] = "non_starter", [0x303C] = "non_starter", [0x309B] = "non_starter", [0x30FB] = "non_starter",
+ [0x30FE] = "non_starter",
-- hyphenation
--
[0x2026] = "hyphen", -- … ellipsis
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 42ba0d960..edb9d62d1 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 7a83e8183..9abda7bce 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/syst-aux.mkxl b/tex/context/base/mkiv/syst-aux.mkxl
index 85d578ff3..30510d6d5 100644
--- a/tex/context/base/mkiv/syst-aux.mkxl
+++ b/tex/context/base/mkiv/syst-aux.mkxl
@@ -2989,6 +2989,8 @@
%D We now use the macro stack which is somewhat leaner and meaner and a little
%D faster too.
+% left overs: too much \protected here
+
\newcount\outerrecurse
\newcount\innerrecurse
@@ -3061,6 +3063,7 @@
\fi{#1}}
\protected\def\syst_helpers_recurse_indeed#1#2% from to
+% {\ifnum#1>#2 %
{\ifnum#1>#2\relax
\expandafter\syst_helpers_recurse_indeed_nop
\else
@@ -3073,7 +3076,7 @@
{\syst_helpers_recurse_content
\syst_helpers_recurse_indeed}
-\protected\def\syst_helpers_recurse_indeed_nop#1#2#3%
+\protected\def\syst_helpers_recurse_indeed_nop#0#0#0%
{}
%D \macros
@@ -3107,7 +3110,6 @@
\let\endofloop\donothing % maybe \syst_helpers_loop_end
-
\protected\def\doloop#1%
{\global\advance\outerrecurse \plusone
\globalpushmacro\recurselevel
@@ -3219,7 +3221,7 @@
\globalpopmacro\recurseaction
\global\advance\outerrecurse\minusone}
-\protected\def\syst_helpers_stepwise_recurse_nop#1#2#3#4%
+\protected\def\syst_helpers_stepwise_recurse_nop#0#0#0#0%
{}
\newcount\fastloopindex
diff --git a/tex/context/base/mkiv/syst-lua.lmt b/tex/context/base/mkiv/syst-lua.lmt
index d74b27689..b1735d44e 100644
--- a/tex/context/base/mkiv/syst-lua.lmt
+++ b/tex/context/base/mkiv/syst-lua.lmt
@@ -7,7 +7,7 @@ if not modules then modules = { } end modules ['syst-lua'] = {
}
local load, type, tonumber = load, type, tonumber
-local find = string.find
+local find, gsub = string.find, string.gsub
local concat = table.concat
local utfchar = utf.char
local S, C, P, lpegmatch, lpegtsplitat = lpeg.S, lpeg.C, lpeg.P, lpeg.match, lpeg.tsplitat
@@ -379,9 +379,12 @@ do
local m = scancsname(true)
local c = channels[n]
local s = c and c:reader()
- if not s then
+ if s then
+ s = gsub(s," *$"," ") -- or just "", no need to fake tex here
+ else
channels[n] = false
- s = "\\par" -- or just "", no need to fake tex here
+ -- s = "\\par"
+ s = "" -- no need to fake tex here
end
setmacro(m, s, prefix) -- checks for frozen
end,
@@ -397,7 +400,9 @@ do
local m = scancsname(true)
local c = channels[n]
local s = c and c:reader()
- if not s then
+ if s then
+ -- should we strip spaces at the end?
+ else
channels[n] = false
s = ""
end
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index c5346406e..14380a7a3 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 2020-09-03 20:00
+-- merge date : 2020-09-05 21:12
do -- begin closure to overcome local limits and interference