diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-05-29 21:10:47 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-05-29 21:10:47 +0200 |
commit | e2658addf306f729945c184e46f98df39dd7026c (patch) | |
tree | 0d4b3ec934773cc4e33fa88eda5a8041be2ec36b /tex | |
parent | 8b678f473da7b81842dbc13b50c6303991570521 (diff) | |
download | context-e2658addf306f729945c184e46f98df39dd7026c.tar.gz |
2019-05-29 19:20:00
Diffstat (limited to 'tex')
35 files changed, 319 insertions, 260 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index c6ff7e991..704b2df88 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{2019.05.25 10:45} +\newcontextversion{2019.05.29 19:11} %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 e5c386698..814359e65 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{2019.05.25 10:45} +\edef\contextversion{2019.05.29 19:11} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-cs.mkii b/tex/context/base/mkii/mult-cs.mkii index 4ab875e4d..708c296cb 100644 --- a/tex/context/base/mkii/mult-cs.mkii +++ b/tex/context/base/mkii/mult-cs.mkii @@ -373,6 +373,7 @@ \setinterfacevariable{nohz}{nohz} \setinterfacevariable{noline}{noline} \setinterfacevariable{nomarking}{zadneznaceni} +\setinterfacevariable{nomenubar}{nomenubar} \setinterfacevariable{none}{zadny} \setinterfacevariable{nonumber}{nonumber} \setinterfacevariable{norepeat}{norepeat} diff --git a/tex/context/base/mkii/mult-de.mkii b/tex/context/base/mkii/mult-de.mkii index 5557eb7b8..45a9ded24 100644 --- a/tex/context/base/mkii/mult-de.mkii +++ b/tex/context/base/mkii/mult-de.mkii @@ -570,6 +570,7 @@ \setinterfacevariable{temporary}{temporaer} \setinterfacevariable{test}{test} \setinterfacevariable{text}{text} +\setinterfacevariable{textnote}{textnote} \setinterfacevariable{three}{drei} \setinterfacevariable{thursday}{donnerstag} \setinterfacevariable{tight}{tight} diff --git a/tex/context/base/mkiv/buff-ver.mkiv b/tex/context/base/mkiv/buff-ver.mkiv index e6c88cdb7..dbc9086bd 100644 --- a/tex/context/base/mkiv/buff-ver.mkiv +++ b/tex/context/base/mkiv/buff-ver.mkiv @@ -684,7 +684,9 @@ \else \buff_verbatim_type_file_checked\v!file{#3}% \fi\fi - \endgroup} + \useindentnextparameter\typingparameter % needs checking + \endgroup + \dorechecknextindentation} % needs checking \def\buff_verbatim_type_file_checked#1#2% {\doifelsetypingfile{#2} @@ -895,7 +897,8 @@ \else \buff_verbatim_type_buffer_indeed\currenttyping\empty% [] \fi\fi - \endgroup} + \endgroup + \dorechecknextindentation} \unexpanded\def\buff_verbatim_type_buffer_class#1% {\begingroup @@ -934,7 +937,8 @@ \endofverbatimlines \dostoptagged \stoppacked - \typingparameter\c!after} + \typingparameter\c!after + \dorechecknextindentation} \unexpanded\def\typeinlinebuffer {\dontleavehmode diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 0cd33a4eb..e3d427c21 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,7 +11,9 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2019.05.25 10:45} +% \normalend % uncomment this to get the real base runtime + +\newcontextversion{2019.05.29 19:11} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 2550292e1..daa21816a 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -22,10 +22,14 @@ %D shares cq. when no files are cached by the os it's of course much worse. A zero %D run is .27 sec with luajittex. In luametatex it's faster anyway (2.4 sec). -% http://build.contextgarden.net/waterfall?tag=c/luatex +%D The real minimal startup time can be measured by uncommenting \type {\normalend} +%D in the \type {cont-new.mkiv} file. When we subtract .250 for \LUA\ initialization +%D from 0.300 runtime and also subtract some 0.030 for the resolver, we get about +%D 0.020 for format loading which is pretty fast. We're talking \LUAMETATEX\ here. -% Welcome to context, pronounced as kontekst (rather dutch) and not as -% conτεχt. +% http://build.contextgarden.net/waterfall?tag=c/lua(meta)tex + +%D Welcome to context, pronounced as kontekst (rather dutch) and not as conτεχt. \catcode`\{=1 \catcode`\}=2 \catcode`\#=6 @@ -41,7 +45,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2019.05.25 10:45} +\edef\contextversion{2019.05.29 19:11} \edef\contextkind {beta} %D Kind of special: diff --git a/tex/context/base/mkiv/core-env.mkiv b/tex/context/base/mkiv/core-env.mkiv index 605a92486..27ae8c008 100644 --- a/tex/context/base/mkiv/core-env.mkiv +++ b/tex/context/base/mkiv/core-env.mkiv @@ -17,6 +17,8 @@ \unprotect +\def\wildcardsymbol{*} + %D Modes: %D %D \starttyping @@ -35,12 +37,11 @@ %D %D system modes have a * as prefix %D -%D Sometimes, we want to prevent a mode for being set. Think -%D of situations where a style enables a mode, but an outer -%D level style does not want that. Preventing can be -%D considered a permanent disabling on forehand. +%D Sometimes, we want to prevent a mode for being set. Think of situations where a +%D style enables a mode, but an outer level style does not want that. Preventing can +%D be considered a permanent disabling on forehand. -\def\systemmodeprefix{*} +\let\systemmodeprefix\wildcardsymbol % we will have \installcorenamespace{mode} but need some hackery at the lua end then @@ -141,18 +142,6 @@ {\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi \syst_mode_prefix\lastnamedcs\preventedmode} -% \def\syst_modes_enable_indeed#1% we can speed it up by moving the new outside -% {\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi -% \ifnum\csname\??mode#1\endcsname=\preventedmode \else -% \syst_mode_prefix\lastnamedcs\enabledmode -% \fi} -% -% \def\syst_modes_disable_indeed#1% -% {\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi -% \ifnum\csname\??mode#1\endcsname=\preventedmode \else -% \syst_mode_prefix\lastnamedcs\disabledmode -% \fi} - \def\syst_modes_enable_indeed#1% we can speed it up by moving the new outside {\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi \ifnum\lastnamedcs=\preventedmode\else @@ -181,18 +170,6 @@ % \rawprocesscommacommand[#1]\syst_modes_define_indeed} \fastprocesscommacommand[#1]\syst_modes_define_indeed} -% \def\syst_modes_define_indeed#1% -% {\ifcsname\??mode#1\endcsname -% % already set -% \else -% \syst_modes_new{#1} -% \fi -% \ifx\m_modes_asked\v!keep -% % not changes, disabled when undefined -% \else -% \csname\??mode#1\endcsname\ifx\m_modes_asked\v!yes\enabledmode\else\disabledmode\fi -% \fi} - \def\syst_modes_define_indeed#1% {\ifcsname\??mode#1\endcsname % already set @@ -283,7 +260,6 @@ \def\syst_modes_check_all_lr#1#2#3% {\let\syst_modes_check_all_step\syst_modes_check_all_indeed - % \rawprocesscommacommand[#3]\syst_modes_check_all_step \fastprocesscommacommand[#3]\syst_modes_check_all_step \ifx\syst_modes_check_all_step\gobbleoneargument \expandafter#2% @@ -293,7 +269,6 @@ \def\syst_modes_check_all_ss#1#2[#3]% {\let\syst_modes_check_all_step\syst_modes_check_all_indeed - % \rawprocesscommacommand[#3]\syst_modes_check_all_step \fastprocesscommacommand[#3]\syst_modes_check_all_step \ifx\syst_modes_check_all_step\gobbleoneargument \expandafter#2% @@ -327,28 +302,6 @@ %D Pushing/popping: -% \unexpanded\def\pushmode[#1]% -% {\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi -% \expandafter\edef\csname\??modestack#1\endcsname{\number\csname\??mode#1\endcsname}% -% \expandafter\pushmacro\csname\??modestack#1\endcsname} -% -% \unexpanded\def\popmode[#1]% -% {\ifcsname\??modestack#1\endcsname -% \expandafter\popmacro\csname\??modestack#1\endcsname -% \csname\??mode#1\endcsname\csname\??modestack#1\endcsname\relax -% \fi} -% -% \def\pushsystemmode#1% -% {\ifcsname\??mode\systemmodeprefix#1\endcsname\else\syst_modes_new{\systemmodeprefix#1}\fi -% \expandafter\edef\csname\??modestack\systemmodeprefix#1\endcsname{\number\csname\??mode\systemmodeprefix#1\endcsname}% -% \expandafter\pushmacro\csname\??modestack\systemmodeprefix#1\endcsname} -% -% \def\popsystemmode#1% -% {\ifcsname\??modestack\systemmodeprefix#1\endcsname -% \expandafter\popmacro\csname\??modestack\systemmodeprefix#1\endcsname -% \csname\??mode\systemmodeprefix#1\endcsname\csname\??modestack\systemmodeprefix#1\endcsname\relax -% \fi} - \unexpanded\def\pushmode[#1]% {\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi \expandafter\edef\csname\??modestack#1\expandafter\endcsname\expandafter{\number\lastnamedcs}% @@ -458,14 +411,6 @@ \unexpanded\def\startsetups{} % to please dep checker \unexpanded\def\stopsetups {} % to please dep checker -% \expanded % will become obsolete -% {\def\expandafter\noexpand\csname\e!start\v!setups\endcsname -% {\begingroup\noexpand\doifnextoptionalcselse -% {\noexpand\dostartsetupsA\expandafter\noexpand\csname\e!stop\v!setups\endcsname} -% {\noexpand\dostartsetupsB\expandafter\noexpand\csname\e!stop\v!setups\endcsname}}} -% -% \letvalue{\e!stop\v!setups}\relax - \unexpanded\def\setups{\doifelsenextbgroup\syst_setups_a\syst_setups_b} % {..} or [..] \unexpanded\def\setup {\doifelsenextbgroup\syst_setups \syst_setups_c} % {..} or [..] @@ -507,9 +452,6 @@ \expandafter\syst_setups_process_local \fi} -% \def\syst_setups_process_local -% {\expandafter\processcommalist\expandafter[\m_syst_setups_asked]\syst_setups} - % setups=S1 % setups=lua(S2) % setups=S3 @@ -674,9 +616,9 @@ \def\luasetup#1{\ctxlua{\syst_setups{#1}}} -% % % % +%D System setups: -\def\systemsetupsprefix{*} +\let\systemsetupsprefix\wildcardsymbol \def\systemsetups#1{\syst_setups{\systemsetupsprefix#1}} @@ -687,19 +629,9 @@ \dodoglobal\undefinevalue{\??setup:#1}% \fi} -% \unexpanded\def\resetsetups[#1]% see x-fo for usage -% {\dodoglobal\expandafter\let\csname\??setup -% \ifgridsnapping\ifcsname\??setup\v!grid:#1\endcsname\v!grid\fi -% :#1\endcsname\undefined} - \unexpanded\def\copysetups {\dodoubleargument\syst_setups_copy} -% \def\syst_setups_copy[#1][#2]% -% {\ifcsname\??setup:#2\endcsname -% \expandafter\let\csname\??setup:#1\expandafter\endcsname\csname\??setup:#2\endcsname -% \fi} - \def\syst_setups_copy[#1][#2]% {\ifcsname\??setup:#2\endcsname \expandafter\let\csname\??setup:#1\expandafter\endcsname\lastnamedcs @@ -747,11 +679,6 @@ \unexpanded\def\setgvariable#1#2#3{\expandafter\gdef\csname\??variables#1:#2\endcsname{#3}} \unexpanded\def\setxvariable#1#2#3{\expandafter\xdef\csname\??variables#1:#2\endcsname{#3}} -% \def\getvariable#1#2% -% {\csname -% \ifcsname\??variables#1:#2\endcsname\??variables#1:#2\else\s!empty\fi -% \endcsname} - \def\getvariable#1#2% {\begincsname\??variables#1:#2\endcsname} @@ -775,7 +702,6 @@ \def\syst_variables_check_value#1#2#3% {\ifcsname\??variables#1:#2\endcsname - %\edef\m_syst_variables_temp{\csname\??variables#1:#2\endcsname}% \edef\m_syst_variables_temp{\lastnamedcs}% \ifx\m_syst_variables_temp\empty \expandafter\def\csname\??variables#1:#2\endcsname{#3}% @@ -812,13 +738,12 @@ \expandafter\firstofoneargument \fi} -%D A few more (we could use a public test variable so that we only need -%D to expand once, assuming expandable variables): +%D A few more (we could use a public test variable so that we only need to expand +%D once, assuming expandable variables): \letvalue{\??variables:}\empty \unexpanded\def\doifelseemptyvariable#1#2% - %{\edef\m_syst_string_one{\csname\??variables\ifcsname\??variables#1:#2\endcsname#1:#2\else:\fi\endcsname}% {\edef\m_syst_string_one{\begincsname\??variables#1:#2\endcsname}% \ifx\m_syst_string_one\empty \expandafter\firstoftwoarguments @@ -829,7 +754,6 @@ \let\doifemptyvariableelse\doifelseemptyvariable \unexpanded\def\doifemptyvariable#1#2% - %{\edef\m_syst_string_one{\csname\??variables\ifcsname\??variables#1:#2\endcsname#1:#2\else:\fi\endcsname}% {\edef\m_syst_string_one{\begincsname\??variables#1:#2\endcsname}% \ifx\m_syst_string_one\empty \expandafter\firstofoneargument @@ -838,7 +762,6 @@ \fi} \unexpanded\def\doifnotemptyvariable#1#2% - %{\edef\m_syst_string_one{\csname\??variables\ifcsname\??variables#1:#2\endcsname#1:#2\else:\fi\endcsname}% {\edef\m_syst_string_one{\begincsname\??variables#1:#2\endcsname}% \ifx\m_syst_string_one\empty \expandafter\gobbleoneargument @@ -847,7 +770,6 @@ \fi} \def\getvariabledefault#1#2% #3% can be command - %{\executeifdefined{\??variables#1:#2}}% {#3} {\ifcsname\??variables#1:#2\endcsname \expandafter\expandafter\expandafter\lastnamedcs\expandafter\gobbleoneargument \else diff --git a/tex/context/base/mkiv/font-osd.lua b/tex/context/base/mkiv/font-osd.lua index 91cf1522c..3c30910ab 100644 --- a/tex/context/base/mkiv/font-osd.lua +++ b/tex/context/base/mkiv/font-osd.lua @@ -81,7 +81,7 @@ if not modules then modules = { } end modules ['font-osd'] = { -- script devanag -- malayalam, oriya, tamil and tolugu but not all are checked. Also, some of the -- code below might need to be adapted to the extra scripts. -local insert, imerge, copy = table.insert, table.imerge, table.copy +local insert, imerge, copy, tohash = table.insert, table.imerge, table.copy, table.tohash local next, type = next, type local report = logs.reporter("otf","devanagari") @@ -332,8 +332,8 @@ local two_defaults = { } local one_defaults = { - dev2 = dflt_true, - deva = dflt_true, + dev2 = dflt_true, -- set later + deva = dflt_true, -- set later } local false_flags = { false, false, false, false } @@ -455,6 +455,8 @@ local scripts = { } local scripts_one = { "deva", "mlym", "beng", "gujr", "guru", "knda", "orya", "taml", "telu" } local scripts_two = { "dev2", "mlm2", "bng2", "gjr2", "gur2", "knd2", "ory2", "tml2", "tel2" } +local scripts_old = { } for i=1,#scripts_one do local v = scripts_one[i] scripts_old[v] = v end -- self + local nofscripts = #scripts_one for i=1,nofscripts do @@ -532,6 +534,8 @@ local function initializedevanagi(tfmdata) -- resources.devanagari = devanagari -- + local old = scripts_old[script] or false + -- for s=1,#sequences do local sequence = sequences[s] local steps = sequence.steps @@ -539,9 +543,9 @@ local function initializedevanagi(tfmdata) local features = sequence.features local has_rphf = features.rphf local has_blwf = features.blwf - if has_rphf and has_rphf.deva then + if has_rphf and has_rphf[old] then devanagari.reph = true - elseif has_blwf and has_blwf.deva then + elseif has_blwf and has_blwf[old] then devanagari.vattu = true for i=1,nofsteps do local step = steps[i] @@ -617,13 +621,15 @@ local function initializedevanagi(tfmdata) -- -- needs checking: this might be needed per instance ? -- - if script == "deva" then + if script == "deva" or script == "knda" then sharedfeatures["dv04"] = true -- dv04_remove_joiners - elseif script == "dev2" then + elseif script == "dev2" or script == "knd2" then sharedfeatures["dv01"] = true -- dv01_reorder_matras sharedfeatures["dv02"] = true -- dv02_reorder_reph sharedfeatures["dv03"] = true -- dv03_reorder_pre_base_reordering_consonants sharedfeatures["dv04"] = true -- dv04_remove_joiners + -- elseif script == "knda" then -- see deva, needs checking by Kai + -- elseif script == "knd2" then -- see dev2, needs checking by Kai elseif script == "mlym" then sharedfeatures["pstf"] = true elseif script == "mlm2" then @@ -638,8 +644,6 @@ local function initializedevanagi(tfmdata) -- elseif script == "gjr2" then -- elseif script == "guru" then -- elseif script == "gur2" then - -- elseif script == "knda" then - -- elseif script == "knd2" then elseif script == "taml" then sharedfeatures["dv04"] = true -- dv04_remove_joiners sharedfeatures["pstf"] = true @@ -699,7 +703,6 @@ local function initialize_one(font,attr) -- we need a proper hook into the datas datasets.devanagari = devanagaridata local resources = tfmdata.resources local devanagari = resources.devanagari - for s=1,#datasets do local dataset = datasets[s] if dataset and dataset[1] then -- value diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua index 24a868887..631302200 100644 --- a/tex/context/base/mkiv/font-ots.lua +++ b/tex/context/base/mkiv/font-ots.lua @@ -3178,7 +3178,7 @@ local function testrun(disc,t_run,c_run,...) end local pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true) local renewed = false - if (post or replace) and prev then + if (post or replace) then -- and prev then -- hm, we can start with a disc if post then setlink(posttail,next) else @@ -3419,6 +3419,7 @@ local function t_run_single(start,stop,font,attr,lookupcache) ss = nil end end +lookupmatch = lg else break end @@ -3588,6 +3589,7 @@ local function t_run_multiple(start,stop,font,attr,steps,nofsteps) ss = nil end end +lookupmatch = lg else break end diff --git a/tex/context/base/mkiv/font-shp.lua b/tex/context/base/mkiv/font-shp.lua index a6788bc62..631f3086e 100644 --- a/tex/context/base/mkiv/font-shp.lua +++ b/tex/context/base/mkiv/font-shp.lua @@ -40,26 +40,27 @@ local function packoutlines(data,makesequence) return end if makesequence then --- for index=1,#glyphs do - for index=0,#glyphs-1 do + for index=0,#glyphs do local glyph = glyphs[index] - local segments = glyph.segments - if segments then - local sequence = { } - local nofsequence = 0 - for i=1,#segments do - local segment = segments[i] - local nofsegment = #segment - -- why last first ... needs documenting - nofsequence = nofsequence + 1 - sequence[nofsequence] = segment[nofsegment] - for i=1,nofsegment-1 do + if glyph then + local segments = glyph.segments + if segments then + local sequence = { } + local nofsequence = 0 + for i=1,#segments do + local segment = segments[i] + local nofsegment = #segment + -- why last first ... needs documenting nofsequence = nofsequence + 1 - sequence[nofsequence] = segment[i] + sequence[nofsequence] = segment[nofsegment] + for i=1,nofsegment-1 do + nofsequence = nofsequence + 1 + sequence[nofsequence] = segment[i] + end end + glyph.sequence = sequence + glyph.segments = nil end - glyph.sequence = sequence - glyph.segments = nil end end else @@ -67,32 +68,36 @@ local function packoutlines(data,makesequence) local common = { } local reverse = { } local last = 0 --- for index=1,#glyphs do - for index=0,#glyphs-1 do - local segments = glyphs[index].segments - if segments then - for i=1,#segments do - local h = concat(segments[i]," ") - hash[h] = (hash[h] or 0) + 1 + for index=0,#glyphs do + local glyph = glyphs[index] + if glyph then + local segments = glyph.segments + if segments then + for i=1,#segments do + local h = concat(segments[i]," ") + hash[h] = (hash[h] or 0) + 1 + end end end end --- for index=1,#glyphs do - for index=0,#glyphs-1 do - local segments = glyphs[index].segments - if segments then - for i=1,#segments do - local segment = segments[i] - local h = concat(segment," ") - if hash[h] > 1 then -- minimal one shared in order to hash - local idx = reverse[h] - if not idx then - last = last + 1 - reverse[h] = last - common[last] = segment - idx = last + for index=0,#glyphs do + local glyph = glyphs[index] + if glyph then + local segments = glyph.segments + if segments then + for i=1,#segments do + local segment = segments[i] + local h = concat(segment," ") + if hash[h] > 1 then -- minimal one shared in order to hash + local idx = reverse[h] + if not idx then + last = last + 1 + reverse[h] = last + common[last] = segment + idx = last + end + segments[i] = idx end - segments[i] = idx end end end @@ -119,14 +124,16 @@ local function unpackoutlines(data) if not glyphs then return end --- for index=1,#glyphs do - for index=0,#glyphs-1 do - local segments = glyphs[index].segments - if segments then - for i=1,#segments do - local c = common[segments[i]] - if c then - segments[i] = c + for index=0,#glyphs do + local glyph = glyphs[index] + if glyph then + local segments = glyph.segments + if segments then + for i=1,#segments do + local c = common[segments[i]] + if c then + segments[i] = c + end end end end @@ -219,8 +226,13 @@ local function loadstreams(cache,filename,sub,instance) local glyphs = data.glyphs local streams = { } if glyphs then - for i=0,#glyphs-1 do - streams[i] = glyphs[i].stream or "" + for i=0,#glyphs do + local glyph = glyphs[i] + if glyph then + streams[i] = glyph.stream or "" + else + streams[i] = "" + end end end data.streams = streams diff --git a/tex/context/base/mkiv/lpdf-pde.lua b/tex/context/base/mkiv/lpdf-pde.lua index cb6c112e7..8c5c6ffc1 100644 --- a/tex/context/base/mkiv/lpdf-pde.lua +++ b/tex/context/base/mkiv/lpdf-pde.lua @@ -518,6 +518,7 @@ lpdf_epdf.expanded = expanded local spaces = lpegpatterns.whitespace^1 local optspaces = lpegpatterns.whitespace^0 +local comment = P("%") * (1 - lpegpatterns.newline)^0 local numchar = P("\\")/"" * (R("09")^3/function(s) return char(tonumber(s,8)) end) + P("\\") * P(1) local key = P("/") * C(R("AZ","az","09","__")^1) @@ -526,7 +527,7 @@ local keyword = Ct(Cc("name") * key) local operator = C((R("AZ","az")+P("*")+P("'")+P('"'))^1) local grammar = P { "start", - start = (keyword + number + V("dictionary") + V("array") + V("hexstring") + V("decstring") + spaces)^1, + start = (comment + keyword + number + V("dictionary") + V("array") + V("hexstring") + V("decstring") + spaces)^1, keyvalue = key * optspaces * V("start"), array = Ct(Cc("array") * P("[") * Ct(V("start")^1) * P("]")), dictionary = Ct(Cc("dict") * P("<<") * Ct(V("keyvalue")^1) * P(">>")), @@ -634,6 +635,8 @@ local function analyzefonts(document,resources) -- unfinished, see mtx-pdf for b return fonts end +lpdf_epdf.analyzefonts = analyzefonts + local more = 0 local unic = nil -- cheaper than passing each time as Carg(1) @@ -679,27 +682,34 @@ function lpdf_epdf.getpagecontent(document,pagenumber) local size = #entry local operator = entry[size] if operator == "Tf" then - font = fonts[entry[1]] - unic = font.tounicode - elseif operator == "TJ" then -- { array, TJ } - local list = entry[1] + font = fonts[entry[1][2]] + unic = font and font.tounicode or { } + elseif operator == "TJ" then + local data = entry[1] -- { "array", { ... } } + local list = data[2] -- { { ... }, { ... } } for i=1,#list do local li = list[i] - if type(li) == "table" then - if li[1] == "hex" then +-- if type(li) == "table" then + local kind = li[1] + if kind == "hex" then list[i] = lpegmatch(p_hex_to_utf,li[2]) - else + elseif kind == "string" then list[i] = lpegmatch(p_dec_to_utf,li[2]) + else + list[i] = li[2] -- kern end - else - -- kern - end +-- else +-- -- kern +-- end end - elseif operator == "Tj" or operator == "'" or operator == '"' then -- { string, Tj } { string, ' } { n, m, string, " } - local list = entry[size-1] - if list[1] == "hex" then + elseif operator == "Tj" or operator == "'" or operator == '"' then + -- { string, Tj } { string, ' } { n, m, string, " } + local data = entry[size-1] + local list = data[2] + local kind = list[1] + if kind == "hex" then list[2] = lpegmatch(p_hex_to_utf,li[2]) - else + elseif kind == "string" then list[2] = lpegmatch(p_dec_to_utf,li[2]) end end @@ -728,25 +738,32 @@ function lpdf_epdf.contenttotext(document,list) -- maybe signal fonts local size = #entry local operator = entry[size] if operator == "Tf" then - last_f = entry[2] + last_f = entry[2][2] -- size elseif operator == "TJ" then - local list = entry[1] + local data = entry[1] -- { "array", { ... } } + local list = data[2] -- { { ... }, { ... } } for i=1,#list do local li = list[i] - if type(li) == "string" then + local kind = type(li) + if kind == "string" then last = last + 1 text[last] = li - elseif li < -50 then + elseif kind == "number" and li < -50 then last = last + 1 text[last] = " " end end - line = concat(list) elseif operator == "Tj" then last = last + 1 - text[last] = entry[size-1] + local li = entry[size-1] + local kind = type(li) + if kind == "string" then + last = last + 1 + text[last] = li + end elseif operator == "cm" or operator == "Tm" then - local ty = entry[6] + local data = entry + local ty = entry[6][2] local dy = abs(last_y - ty) if dy > linefactor*last_f then if last > 0 then diff --git a/tex/context/base/mkiv/luat-cod.lua b/tex/context/base/mkiv/luat-cod.lua index 6f79a54e1..522de886c 100644 --- a/tex/context/base/mkiv/luat-cod.lua +++ b/tex/context/base/mkiv/luat-cod.lua @@ -260,6 +260,10 @@ local function find_write_file(id,name) return target_file(name) end +local function find_log_file(name) + return target_file(name) +end + local function open_read_file(name) local f = io.open(name,'rb') return { @@ -278,6 +282,7 @@ local open_data_file = open_read_file callback.register('find_read_file' , find_read_file ) callback.register('open_read_file' , open_read_file ) callback.register('find_write_file', find_write_file) +callback.register('find_log_file', find_log_file) callback.register('find_data_file' , find_data_file ) callback.register('open_data_file' , open_data_file ) diff --git a/tex/context/base/mkiv/luat-fio.lua b/tex/context/base/mkiv/luat-fio.lua index 2996ae66a..26db46a88 100644 --- a/tex/context/base/mkiv/luat-fio.lua +++ b/tex/context/base/mkiv/luat-fio.lua @@ -117,6 +117,8 @@ if not resolvers.initialized() then -- register('read_cidmap_file' , function(file) return loadbinfile(file,"cidmap") end, true) register('find_write_file' , function(id,name) return name end, true) + + register('find_log_file' , function(name) return name end, true) register('find_format_file' , function(name) return name end, true) end diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua index 0fb19e18e..8dfee915a 100644 --- a/tex/context/base/mkiv/mult-def.lua +++ b/tex/context/base/mkiv/mult-def.lua @@ -13368,6 +13368,10 @@ return { ["pe"]="تهنوشت", ["ro"]="endnote", }, + ["textnote"]={ + ["en"]="textnote", + ["nl"]="tekstnoot", + }, ["enumeration"]={ ["cs"]="vycet", ["de"]="nummerierung", diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua index e19f4aa76..846380027 100644 --- a/tex/context/base/mkiv/mult-low.lua +++ b/tex/context/base/mkiv/mult-low.lua @@ -142,7 +142,9 @@ return { -- "parfillleftskip", "parfillrightskip", -- - "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode" + "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", + -- + "wildcardsymbol", }, ["helpers"] = { -- diff --git a/tex/context/base/mkiv/node-rul.lua b/tex/context/base/mkiv/node-rul.lua index 61d78668f..5a8fdc48a 100644 --- a/tex/context/base/mkiv/node-rul.lua +++ b/tex/context/base/mkiv/node-rul.lua @@ -224,7 +224,7 @@ local trace_ruled = false trackers.register("nodes.rules", function(v) trace_ local report_ruled = logs.reporter("nodes","rules") function rules.define(settings) - local nofdata = #data+1 + local nofdata = #data + 1 data[nofdata] = settings local text = settings.text if text then @@ -236,7 +236,7 @@ function rules.define(settings) settings.text = nil end end - context(nofdata) + return nofdata end local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but acceptable for this purpose @@ -265,7 +265,7 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a if not f then return head end - local w, ht, dp = getrangedimensions(parent,f,getnext(l)) + local wd, ht, dp = getrangedimensions(parent,f,getnext(l)) local method = d.method local empty = d.empty == v_yes local offset = d.offset @@ -306,7 +306,7 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a m = 0 end - local function inject(r,w,ht,dp) + local function inject(r,wd,ht,dp) if layer then setattr(r,a_viewerlayer,layer) end @@ -317,7 +317,7 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a setnext(l) flushlist(f) else - local k = new_kern(-w) + local k = new_kern(-wd) if foreground then insert_node_after(head,l,k) insert_node_after(head,k,r) @@ -329,12 +329,12 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a end if trace_ruled then report_ruled("level %a, width %p, height %p, depth %p, nodes %a, text %a", - level,w,ht,dp,n_tostring(f,l),n_tosequence(f,l,true)) + level,wd,ht,dp,n_tostring(f,l),n_tosequence(f,l,true)) end end if mp and mp ~= "" then local r = usernutrule { - width = w, + width = wd, height = ht, depth = dp, type = "mp", @@ -346,22 +346,26 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a ca = color, ta = transparency, } - inject(r,w,ht,dp) + inject(r,wd,ht,dp) else local tx = d.text if tx then local l = copy_list(tx) if d["repeat"] == v_yes then - l = new_leader(w,l) + l = new_leader(wd,l) setattrlist(l,tx) end - l = hpack_nodes(l,w,"exactly") - inject(l,w,ht,dp) + l = hpack_nodes(l,wd,"exactly") + inject(l,wd,ht,dp) else for i=1,level do - local ht = (offset+(i-1)*dy)*e + rulethickness - m - local dp = -(offset+(i-1)*dy)*e + rulethickness + m - local r = new_rule(w,ht,dp) + local hd = (offset+(i-1)*dy)*e - m +-- local ht = hd + rulethickness - m +-- local dp = -hd + rulethickness + m + local ht = hd + rulethickness + local dp = -hd + rulethickness + local r = new_rule(wd,ht,dp) + -- can be done more efficient if color then setattr(r,a_colormodel,colorspace) setattr(r,a_color,color) @@ -369,7 +373,7 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a if transparency then setattr(r,a_transparency,transparency) end - inject(r,w,ht,dp) + inject(r,wd,ht,dp) end end end @@ -390,16 +394,18 @@ local report_shifted = logs.reporter("nodes","shifting") local a_shifted = attributes.private('shifted') -nodes.shifts = nodes.shifts or { } -nodes.shifts.data = nodes.shifts.data or { } +local shifts = nodes.shifts or { } +nodes.shifts = shifts +shifts.data = shifts.data or { } -storage.register("nodes/shifts/data", nodes.shifts.data, "nodes.shifts.data") +storage.register("nodes/shifts/data", shifts.data, "nodes.shifts.data") -local data = nodes.shifts.data +local data = shifts.data -function nodes.shifts.define(settings) - data[#data+1] = settings - context(#data) +function shifts.define(settings) + local nofdata = #data + 1 + data[nofdata] = settings + return nofdata end local function flush_shifted(head,first,last,data,level,parent,strip) -- not that fast but acceptable for this purpose @@ -430,26 +436,28 @@ local function flush_shifted(head,first,last,data,level,parent,strip) -- not tha return head end -nodes.shifts.handler = function(head) +shifts.handler = function(head) return processwords(a_shifted,data,flush_shifted,head) end -function nodes.shifts.enable() +function shifts.enable() enableaction("shipouts","nodes.shifts.handler") end -- linefillers -nodes.linefillers = nodes.linefillers or { } -nodes.linefillers.data = nodes.linefillers.data or { } +local linefillers = nodes.linefillers or { } +nodes.linefillers = linefillers +linefillers.data = linefillers.data or { } -storage.register("nodes/linefillers/data", nodes.linefillers.data, "nodes.linefillers.data") +storage.register("nodes/linefillers/data", linefillers.data, "nodes.linefillers.data") -local data = nodes.linefillers.data +local data = linefillers.data -function nodes.linefillers.define(settings) - data[#data+1] = settings - context(#data) +function linefillers.define(settings) + local nofdata = #data + 1 + data[nofdata] = settings + return nofdata end local function linefiller(current,data,width,location) @@ -486,7 +494,7 @@ local function linefiller(current,data,width,location) end end -function nodes.linefillers.filler(current,data,width,height,depth) +function linefillers.filler(current,data,width,height,depth) if width and width > 0 then local height = height or data.height or 0 local depth = depth or data.depth or 0 @@ -534,7 +542,7 @@ local function find_attr(head,attr) end end -function nodes.linefillers.handler(head) +function linefillers.handler(head) for current, subtype, list in nexthlist, head do if list and subtype == linelist_code then -- why doesn't leftskip take the attributes @@ -658,7 +666,7 @@ end local enable = false -function nodes.linefillers.enable() +function linefillers.enable() if not enable then -- we could now nil it enableaction("finalizers","nodes.linefillers.handler") @@ -700,7 +708,7 @@ implement { implement { name = "defineshift", - actions = { nodes.shifts.define, context }, + actions = { shifts.define, context }, arguments = { { { "continue" }, @@ -714,12 +722,12 @@ implement { implement { name = "enableshifts", onlyonce = true, - actions = nodes.shifts.enable + actions = shifts.enable } implement { name = "definelinefiller", - actions = { nodes.linefillers.define, context }, + actions = { linefillers.define, context }, arguments = { { { "method", "integer" }, @@ -741,7 +749,7 @@ implement { implement { name = "enablelinefillers", onlyonce = true, - actions = nodes.linefillers.enable + actions = linefillers.enable } -- We add a bonus feature here (experiment): diff --git a/tex/context/base/mkiv/node-rul.mkiv b/tex/context/base/mkiv/node-rul.mkiv index 19f398eb9..7f2093bf2 100644 --- a/tex/context/base/mkiv/node-rul.mkiv +++ b/tex/context/base/mkiv/node-rul.mkiv @@ -146,6 +146,12 @@ {\node_rules_set{#1}\barparameter\c!left}% {\relax\barparameter\c!right}} +\unexpanded\def\inlinebar[#1]% + {\node_rules_direct{#1}} + +% \unexpanded\def\inlinecurrentbar +% {\node_rules_direct{\currentbar}} + % store in properties \unexpanded\def\node_rules_set#1% maybe reverse the 1000 (also maybe use more attributes instead of settings) diff --git a/tex/context/base/mkiv/node-scn.lua b/tex/context/base/mkiv/node-scn.lua index a40a5271a..055f5e20d 100644 --- a/tex/context/base/mkiv/node-scn.lua +++ b/tex/context/base/mkiv/node-scn.lua @@ -124,7 +124,7 @@ local function processwords(attribute,data,flush,head,parent,skip) -- we have hl local continue, leaders, done, strip, level = false, false, false, true, -1 while n do local id = getid(n) - if id == glyph_code or id == rule_code or (id == hlist_code and getattr(n,a_runningtext) == 1) then + if id == glyph_code or id == rule_code or (id == hlist_code and getattr(n,a_runningtext)) then local aa = getattr(n,attribute) if aa and aa ~= skip then if aa == a then diff --git a/tex/context/base/mkiv/pack-mrl.mkiv b/tex/context/base/mkiv/pack-mrl.mkiv index 4a0b68332..cd04781c7 100644 --- a/tex/context/base/mkiv/pack-mrl.mkiv +++ b/tex/context/base/mkiv/pack-mrl.mkiv @@ -843,32 +843,32 @@ \unexpanded\def\fillinline {\dosingleempty\pack_fillinline} -\ifdefined\endpar % experiment with \endpar - - \def\pack_fillinline[#1]% - {% \endpar % no, as it interferes with \definedescription cum suis - \begingroup - \setupcurrentfillinlines[#1]% - \directfillinlinesparameter\c!before - \begingroup - \advance\rightskip \directfillinlinesparameter\c!margin\relax - \parfillskip\zeropoint - \pushmacro\endpar - \def\endpar - {\popmacro\endpar - \ifhmode\unskip\hfill\fi - \scratchwidth\dimexpr\directfillinlinesparameter\c!width-\directfillinlinesparameter\c!distance\relax - \ifdim\scratchwidth>\directfillinlinesparameter\c!margin\else\expandafter\rlap\fi - {\kern\directfillinlinesparameter\c!distance - \scratchheight\dimexpr\directfillinlinesparameter\c!rulethickness/\plustwo\relax - \color[\directfillinlinesparameter\c!color]{\vrule\s!width\scratchwidth\s!height\scratchheight\s!depth\scratchheight}}% - \endpar - \endgroup - \endpar - \directfillinlinesparameter\c!after - \endgroup}} % carryover ? - -\else +% \ifdefined\endpar % experiment with \endpar +% +% \def\pack_fillinline[#1]% +% {% \endpar % no, as it interferes with \definedescription cum suis +% \begingroup +% \setupcurrentfillinlines[#1]% +% \directfillinlinesparameter\c!before +% \begingroup +% \advance\rightskip \directfillinlinesparameter\c!margin\relax +% \parfillskip\zeropoint +% \pushmacro\endpar +% \def\endpar +% {\popmacro\endpar +% \ifhmode\unskip\hfill\fi +% \scratchwidth\dimexpr\directfillinlinesparameter\c!width-\directfillinlinesparameter\c!distance\relax +% \ifdim\scratchwidth>\directfillinlinesparameter\c!margin\else\expandafter\rlap\fi +% {\kern\directfillinlinesparameter\c!distance +% \scratchheight\dimexpr\directfillinlinesparameter\c!rulethickness/\plustwo\relax +% \color[\directfillinlinesparameter\c!color]{\vrule\s!width\scratchwidth\s!height\scratchheight\s!depth\scratchheight}}% +% \endpar +% \endgroup +% \endpar +% \directfillinlinesparameter\c!after +% \endgroup}} % carryover ? +% +% \else \def\pack_fillinline[#1]% {%\endgraf % no, as it interferes with \definedescription cum suis @@ -892,6 +892,6 @@ \directfillinlinesparameter\c!after \endgroup}} % carryover ? -\fi +% \fi \protect \endinput diff --git a/tex/context/base/mkiv/spac-hor.mkiv b/tex/context/base/mkiv/spac-hor.mkiv index c0c7d95d2..e51e54f29 100644 --- a/tex/context/base/mkiv/spac-hor.mkiv +++ b/tex/context/base/mkiv/spac-hor.mkiv @@ -1273,4 +1273,13 @@ \def\obeyfollowingtoken{{}} % end \cs scanning +%D Something new: + +\unexpanded\def\interwordspacebefore{\wordboundary\zwnj\hskip\interwordspace\relax} +\unexpanded\def\interwordspaceafter {\hskip\interwordspace\relax\zwnj\wordboundary} + +\unexpanded\def\interwordspacesbefore#1{\dofastloopcs{#1}\interwordspacebefore} +\unexpanded\def\interwordspacesafter #1{\dofastloopcs{#1}\interwordspaceafter} +\unexpanded\def\interwordspaces #1{\wordboundary\zwnj\dofastloopcs{\numexpr#1+\minusone}\interwordspaceafter} + \protect \endinput diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 328354ee5..ee13ad39a 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 94132234a..e3b70eaa0 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/strc-bkm.lua b/tex/context/base/mkiv/strc-bkm.lua index ee9233a9a..41a128333 100644 --- a/tex/context/base/mkiv/strc-bkm.lua +++ b/tex/context/base/mkiv/strc-bkm.lua @@ -42,6 +42,19 @@ local opened = { } local forced = { } local numbered = { } +function bookmarks.setopened(key,value) + if value == nil then + value = true + end + if type(key) == "table" then + for i=1,#key do + opened[key[i]] = value + end + else + opened[key] = value + end +end + function bookmarks.register(settings) local force = settings.force == variables.yes local number = settings.number == variables.yes diff --git a/tex/context/base/mkiv/strc-itm.mkvi b/tex/context/base/mkiv/strc-itm.mkvi index 7895b7968..eea42f2de 100644 --- a/tex/context/base/mkiv/strc-itm.mkvi +++ b/tex/context/base/mkiv/strc-itm.mkvi @@ -906,6 +906,10 @@ \doadaptleftskip {\itemgroupparameter\c!leftmargin}% \doadaptrightskip{\itemgroupparameter\c!rightmargin}% \fi + % + \doadaptleftskip {\itemgroupparameter\c!leftmargindistance}% + \doadaptrightskip{\itemgroupparameter\c!rightmargindistance}% + % \usealignparameter\itemgroupparameter \edef\m_strc_itemgroups_indenting{\itemgroupparameter\c!indenting}% \ifnum\c_strc_itemgroups_nesting>\zerocount @@ -1808,6 +1812,8 @@ [\c!margin=\zeropoint, \c!leftmargin=\zeropoint, \c!rightmargin=\zeropoint, + \c!leftmargindistance=\zeropoint, + \c!rightmargindistance=\zeropoint, \c!indentnext=\v!yes, \c!width=1.5\emwidth, \c!factor=0, diff --git a/tex/context/base/mkiv/syst-aux.mkiv b/tex/context/base/mkiv/syst-aux.mkiv index d6f54f7d0..924043849 100644 --- a/tex/context/base/mkiv/syst-aux.mkiv +++ b/tex/context/base/mkiv/syst-aux.mkiv @@ -5149,19 +5149,26 @@ \let\m_syst_helpers_fast_loop_cs\relax -\unexpanded\def\dofastloopcs#1#2% - {\let\m_syst_helpers_fast_loop_cs#2% +\unexpanded\def\dofastloopcs#1% + {\fastloopfinal#1\relax + \ifcase\fastloopfinal + \expandafter\gobbleoneargument + \else + \expandafter\syst_helpers_fast_loop_cs + \fi} + +\unexpanded\def\syst_helpers_fast_loop_cs#1% + {\let\m_syst_helpers_fast_loop_cs#1% \fastloopindex\plusone - \fastloopfinal#1\relax - \syst_helpers_fast_loop_cs} + \syst_helpers_fast_loop_cs_step} -\unexpanded\def\syst_helpers_fast_loop_cs +\unexpanded\def\syst_helpers_fast_loop_cs_step {\ifnum\fastloopindex>\fastloopfinal \let\m_syst_helpers_fast_loop_cs\relax \else \m_syst_helpers_fast_loop_cs \advance\fastloopindex\plusone - \expandafter\syst_helpers_fast_loop_cs + \expandafter\syst_helpers_fast_loop_cs_step \fi} % Helper: diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv index 2a2d48311..7664074c5 100644 --- a/tex/context/base/mkiv/syst-ini.mkiv +++ b/tex/context/base/mkiv/syst-ini.mkiv @@ -1141,4 +1141,8 @@ \let\normalstartdmath \Ustartdisplaymath \let\normalstopdmath \Ustopdisplaymath +%D Also better here: + +\def\wildcardsymbol{*} + \protect \endinput diff --git a/tex/context/interface/mkii/keys-cs.xml b/tex/context/interface/mkii/keys-cs.xml index f4e65c527..37736a2d7 100644 --- a/tex/context/interface/mkii/keys-cs.xml +++ b/tex/context/interface/mkii/keys-cs.xml @@ -376,6 +376,7 @@ <cd:variable name='nohz' value='nohz'/> <cd:variable name='noline' value='noline'/> <cd:variable name='nomarking' value='zadneznaceni'/> + <cd:variable name='nomenubar' value='nomenubar'/> <cd:variable name='none' value='zadny'/> <cd:variable name='nonumber' value='nonumber'/> <cd:variable name='norepeat' value='norepeat'/> diff --git a/tex/context/interface/mkii/keys-de.xml b/tex/context/interface/mkii/keys-de.xml index e76ea9340..97a18d711 100644 --- a/tex/context/interface/mkii/keys-de.xml +++ b/tex/context/interface/mkii/keys-de.xml @@ -573,6 +573,7 @@ <cd:variable name='temporary' value='temporaer'/> <cd:variable name='test' value='test'/> <cd:variable name='text' value='text'/> + <cd:variable name='textnote' value='textnote'/> <cd:variable name='three' value='drei'/> <cd:variable name='thursday' value='donnerstag'/> <cd:variable name='tight' value='tight'/> diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml index 87182c2a3..e358b27e7 100644 --- a/tex/context/interface/mkiv/context-en.xml +++ b/tex/context/interface/mkiv/context-en.xml @@ -17583,6 +17583,18 @@ <cd:constant type="standard"/> <cd:constant type="cd:dimension"/> </cd:parameter> + <cd:parameter name="leftmargindistance"> + <cd:constant type="yes"/> + <cd:constant type="no"/> + <cd:constant type="standard"/> + <cd:constant type="cd:dimension"/> + </cd:parameter> + <cd:parameter name="rightmargindistance"> + <cd:constant type="yes"/> + <cd:constant type="no"/> + <cd:constant type="standard"/> + <cd:constant type="cd:dimension"/> + </cd:parameter> <cd:parameter name="align"> <cd:inherit name="setupalign"/> </cd:parameter> diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf Binary files differindex e1f854a34..479e16737 100644 --- a/tex/context/interface/mkiv/i-context.pdf +++ b/tex/context/interface/mkiv/i-context.pdf diff --git a/tex/context/interface/mkiv/i-itemgroup.xml b/tex/context/interface/mkiv/i-itemgroup.xml index 84cae20bb..c27c729f7 100644 --- a/tex/context/interface/mkiv/i-itemgroup.xml +++ b/tex/context/interface/mkiv/i-itemgroup.xml @@ -113,6 +113,12 @@ <cd:parameter name="rightmargin"> <cd:resolve name="value-rightskip"/> </cd:parameter> + <cd:parameter name="leftmargindistance"> + <cd:resolve name="value-leftskip"/> + </cd:parameter> + <cd:parameter name="rightmargindistance"> + <cd:resolve name="value-rightskip"/> + </cd:parameter> <cd:parameter name="align"> <cd:inherit name="setupalign"/> </cd:parameter> diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf Binary files differindex 007fc0e61..e428d7f39 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf diff --git a/tex/context/modules/common/s-abbreviations-logos.tex b/tex/context/modules/common/s-abbreviations-logos.tex index 54a969593..410aa1824 100644 --- a/tex/context/modules/common/s-abbreviations-logos.tex +++ b/tex/context/modules/common/s-abbreviations-logos.tex @@ -43,6 +43,7 @@ \logo [ASCIIMATH] {AsciiMath} \logo [ASCIITEX] {ascii\TeXsuffix} \logo [BACHOTEX] {Bacho\TeXsuffix} +\logo [BASIC] {Basic} \logo [BIBTEX] {bib\TeXsuffix} \logo [BLUESKY] {BlueSky} \logo [BMP] {bmp} diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 4379ead13..cf93d030c 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 : 05/25/19 10:45:25 +-- merge date : 05/29/19 19:11:02 do -- begin closure to overcome local limits and interference @@ -28095,7 +28095,7 @@ local function testrun(disc,t_run,c_run,...) end local pre,post,replace,pretail,posttail,replacetail=getdisc(disc,true) local renewed=false - if (post or replace) and prev then + if (post or replace) then if post then setlink(posttail,next) else @@ -28288,6 +28288,7 @@ local function t_run_single(start,stop,font,attr,lookupcache) ss=nil end end +lookupmatch=lg else break end @@ -28441,6 +28442,7 @@ local function t_run_multiple(start,stop,font,attr,steps,nofsteps) ss=nil end end +lookupmatch=lg else break end @@ -29145,7 +29147,7 @@ if not modules then modules={} end modules ['font-osd']={ copyright="TAT Zetwerk / PRAGMA ADE / ConTeXt Development Team", license="see context related readme files" } -local insert,imerge,copy=table.insert,table.imerge,table.copy +local insert,imerge,copy,tohash=table.insert,table.imerge,table.copy,table.tohash local next,type=next,type local report=logs.reporter("otf","devanagari") fonts=fonts or {} @@ -29436,6 +29438,7 @@ local valid={ local scripts={} local scripts_one={ "deva","mlym","beng","gujr","guru","knda","orya","taml","telu" } local scripts_two={ "dev2","mlm2","bng2","gjr2","gur2","knd2","ory2","tml2","tel2" } +local scripts_old={} for i=1,#scripts_one do local v=scripts_one[i] scripts_old[v]=v end local nofscripts=#scripts_one for i=1,nofscripts do local one=scripts_one[i] @@ -29498,6 +29501,7 @@ local function initializedevanagi(tfmdata) local pre_base_reordering_consonants={} reorder_pre_base_reordering_consonants.steps[1].coverage=pre_base_reordering_consonants resources.devanagari=devanagari + local old=scripts_old[script] or false for s=1,#sequences do local sequence=sequences[s] local steps=sequence.steps @@ -29505,9 +29509,9 @@ local function initializedevanagi(tfmdata) local features=sequence.features local has_rphf=features.rphf local has_blwf=features.blwf - if has_rphf and has_rphf.deva then + if has_rphf and has_rphf[old] then devanagari.reph=true - elseif has_blwf and has_blwf.deva then + elseif has_blwf and has_blwf[old] then devanagari.vattu=true for i=1,nofsteps do local step=steps[i] @@ -29578,13 +29582,13 @@ local function initializedevanagi(tfmdata) end end end - if script=="deva" then + if script=="deva" or script=="knda" then sharedfeatures["dv04"]=true - elseif script=="dev2" then + elseif script=="dev2" or script=="knd2" then sharedfeatures["dv01"]=true sharedfeatures["dv02"]=true sharedfeatures["dv03"]=true - sharedfeatures["dv04"]=true + sharedfeatures["dv04"]=true elseif script=="mlym" then sharedfeatures["pstf"]=true elseif script=="mlm2" then |