diff options
56 files changed, 317 insertions, 238 deletions
diff --git a/context/data/scite/context/lexers/scite-context-lexer-cpp.lua b/context/data/scite/context/lexers/scite-context-lexer-cpp.lua index d9079855f..7ad187eaf 100644 --- a/context/data/scite/context/lexers/scite-context-lexer-cpp.lua +++ b/context/data/scite/context/lexers/scite-context-lexer-cpp.lua @@ -46,6 +46,10 @@ local macros = { -- copied from cpp.lua "include", "line", "pragma", "undef", "using", "warning" } +local luatexs = { + "word", "halfword", "quarterword", "scaled", "pointer", "glueratio", +} + local space = patterns.space -- S(" \n\r\t\f\v") local any = patterns.any local restofline = patterns.restofline @@ -90,10 +94,12 @@ local operator = token("special", S("+-*/%^!=<>;:{}[]().&|?~")) local p_keywords = exact_match(keywords) local p_datatypes = exact_match(datatypes) local p_macros = exact_match(macros) +local p_luatexs = exact_match(luatexs) local keyword = token("keyword", p_keywords) local datatype = token("keyword", p_datatypes) local identifier = token("default", validword) +local luatex = token("command", p_luatexs) local macro = token("data", #P("#") * startofline * P("#") * S("\t ")^0 * p_macros) @@ -101,6 +107,7 @@ cpplexer._rules = { { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, @@ -121,6 +128,7 @@ if web then { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, @@ -140,6 +148,7 @@ else { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, diff --git a/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua b/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua index d9079855f..7ad187eaf 100644 --- a/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua +++ b/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua @@ -46,6 +46,10 @@ local macros = { -- copied from cpp.lua "include", "line", "pragma", "undef", "using", "warning" } +local luatexs = { + "word", "halfword", "quarterword", "scaled", "pointer", "glueratio", +} + local space = patterns.space -- S(" \n\r\t\f\v") local any = patterns.any local restofline = patterns.restofline @@ -90,10 +94,12 @@ local operator = token("special", S("+-*/%^!=<>;:{}[]().&|?~")) local p_keywords = exact_match(keywords) local p_datatypes = exact_match(datatypes) local p_macros = exact_match(macros) +local p_luatexs = exact_match(luatexs) local keyword = token("keyword", p_keywords) local datatype = token("keyword", p_datatypes) local identifier = token("default", validword) +local luatex = token("command", p_luatexs) local macro = token("data", #P("#") * startofline * P("#") * S("\t ")^0 * p_macros) @@ -101,6 +107,7 @@ cpplexer._rules = { { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, @@ -121,6 +128,7 @@ if web then { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, @@ -140,6 +148,7 @@ else { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, diff --git a/context/data/textadept/context/textadept-context.cmd b/context/data/textadept/context/textadept-context.cmd index 633020a88..cd20e8d3d 100644 --- a/context/data/textadept/context/textadept-context.cmd +++ b/context/data/textadept/context/textadept-context.cmd @@ -1,56 +1,56 @@ -@echo off - -rem This script starts textadept in an adapted mode, stripped from all the stuff we don't need, -rem geared at the file formats that context deals with. The reason for this is that first of -rem all we come from scite, but also because the average user doesn't need that much and can -rem get confused by all kind of options that are irrelevant for editing text files. - -rem This startup script assumes that the files can be found relative to this script. It's kind -rem of tricky because textadept, while being quite configurable, is not really made for such a -rem real bare startup situation but after some trial and error, so far it works out ok. There -rem are still some issues due to assumptions in the original code. In the meantime processing -rem a file from within the editing sessions works ok which is a huge improvement over earlier -rem versions of textadept (it was actually a show stopper) so now textadept can be used as a -rem drop in for scite. We're getting there! - -rem Although I like the idea of textadept, it is no longer a simple Lua binding to scintilla -rem and the claim that it is small is no longer true. The number of Lua lines doesn't really -rem say much if there are many third party dll dependencies (at least I see many files in the -rem zip and most of them probably relate to parts of the graphical interface and therefore most -rem is probably not used at all. The more dependencies there are, the less interesting it is to -rem officially support it as one of the reference editors for context, given that tex and friends -rem aim at long term stability. It's huge and unless I'm mistaken there is no minimal lightweight -rem variant for building a stripped down variant (in editing with mono spaced fonts we don't need -rem all that stuff). A small static stripped binary would be really nice to have (and I'd -rem probably default to using textadept then). I might at some point decide to strip more and just -rem provide what we only need (which is less than is there now). We'll see how it evolves. - -rem In the meantime support for scintillua has been dropped which makes scite vulnerable as there -rem is no default scite (yet) with lpeg built in. Anyway, it means that we will not provide an -rem installer for scite or textadept which does the reference highlighting we've been using for -rem decades. It is up to the user: use lightweight scite or a more dependent but also more -rem configurable texadept. It would be really nice to have multiple options for editing (read: if -rem scite would have scintillua on board.) The same is true for notepad++. Each of them has its -rem advantage (and each is used by context users). - -rem Unless the textadept api changes fundamentally (as happened a couple of times before) this -rem should work: - -start textadept -u %~dp0 %* - -rem I still need to port some of the extra functionality that we have in scite to textadept, which -rem will happen in due time. We use our own lexers because they are more efficient and have some -rem extra options (they were also much faster at that time and could handle very large files; they -rem also build on already existing code in context verbatim mode). By the way, editing char-def.lua -rem in textadept is actually now faster than in scite (using the same lpeg lexers), which is nice. -rem There is no language strip functionality yet as there is no strip (bottom area) as in scite. - -rem The macros.lua file has some hard coded assumptions wrt menu items and the event crashes with a -rem error message that we can't get rid of. I need to figure out a way to close that buffer but -rem somehow the first buffer is closed anyway which is kind of weird. One way out is to just -rem comment: -rem -rem -- textadept.menu.menubar[_L['_Tools']][_L['Select Co_mmand']][2], -rem -rem Maybe I should just copy all the files and remove code we don't need but ... let's delay that +@echo off
+
+rem This script starts textadept in an adapted mode, stripped from all the stuff we don't need,
+rem geared at the file formats that context deals with. The reason for this is that first of
+rem all we come from scite, but also because the average user doesn't need that much and can
+rem get confused by all kind of options that are irrelevant for editing text files.
+
+rem This startup script assumes that the files can be found relative to this script. It's kind
+rem of tricky because textadept, while being quite configurable, is not really made for such a
+rem real bare startup situation but after some trial and error, so far it works out ok. There
+rem are still some issues due to assumptions in the original code. In the meantime processing
+rem a file from within the editing sessions works ok which is a huge improvement over earlier
+rem versions of textadept (it was actually a show stopper) so now textadept can be used as a
+rem drop in for scite. We're getting there!
+
+rem Although I like the idea of textadept, it is no longer a simple Lua binding to scintilla
+rem and the claim that it is small is no longer true. The number of Lua lines doesn't really
+rem say much if there are many third party dll dependencies (at least I see many files in the
+rem zip and most of them probably relate to parts of the graphical interface and therefore most
+rem is probably not used at all. The more dependencies there are, the less interesting it is to
+rem officially support it as one of the reference editors for context, given that tex and friends
+rem aim at long term stability. It's huge and unless I'm mistaken there is no minimal lightweight
+rem variant for building a stripped down variant (in editing with mono spaced fonts we don't need
+rem all that stuff). A small static stripped binary would be really nice to have (and I'd
+rem probably default to using textadept then). I might at some point decide to strip more and just
+rem provide what we only need (which is less than is there now). We'll see how it evolves.
+
+rem In the meantime support for scintillua has been dropped which makes scite vulnerable as there
+rem is no default scite (yet) with lpeg built in. Anyway, it means that we will not provide an
+rem installer for scite or textadept which does the reference highlighting we've been using for
+rem decades. It is up to the user: use lightweight scite or a more dependent but also more
+rem configurable texadept. It would be really nice to have multiple options for editing (read: if
+rem scite would have scintillua on board.) The same is true for notepad++. Each of them has its
+rem advantage (and each is used by context users).
+
+rem Unless the textadept api changes fundamentally (as happened a couple of times before) this
+rem should work:
+
+start textadept -u %~dp0 %*
+
+rem I still need to port some of the extra functionality that we have in scite to textadept, which
+rem will happen in due time. We use our own lexers because they are more efficient and have some
+rem extra options (they were also much faster at that time and could handle very large files; they
+rem also build on already existing code in context verbatim mode). By the way, editing char-def.lua
+rem in textadept is actually now faster than in scite (using the same lpeg lexers), which is nice.
+rem There is no language strip functionality yet as there is no strip (bottom area) as in scite.
+
+rem The macros.lua file has some hard coded assumptions wrt menu items and the event crashes with a
+rem error message that we can't get rid of. I need to figure out a way to close that buffer but
+rem somehow the first buffer is closed anyway which is kind of weird. One way out is to just
+rem comment:
+rem
+rem -- textadept.menu.menubar[_L['_Tools']][_L['Select Co_mmand']][2],
+rem
+rem Maybe I should just copy all the files and remove code we don't need but ... let's delay that
rem as it might get fixed. I'm in no hurry.
\ No newline at end of file diff --git a/context/data/vscode/extensions/context/syntaxes/context-syntax-cpp.json b/context/data/vscode/extensions/context/syntaxes/context-syntax-cpp.json index 67941c551..b0c715972 100644 --- a/context/data/vscode/extensions/context/syntaxes/context-syntax-cpp.json +++ b/context/data/vscode/extensions/context/syntaxes/context-syntax-cpp.json @@ -68,7 +68,7 @@ "name" : "context.comment.long.c" }, "luatex" : { - "match" : "\u005Cb(scaled|halfword)\u005Cb", + "match" : "\u005Cb(word|scaled|quarterword|pointer|halfword|glueratio)\u005Cb", "name" : "context.command.luatex.c" }, "macro" : { diff --git a/context/data/vscode/vscode-context.cmd b/context/data/vscode/vscode-context.cmd index 205d98af6..33212d5b1 100644 --- a/context/data/vscode/vscode-context.cmd +++ b/context/data/vscode/vscode-context.cmd @@ -1,7 +1,7 @@ -@echo off - -rem chcp 65001 - -rem I need to figure ou thow to detach the instance - -start "vs code context" code --ignore-gpu-blacklist --reuse-window --extensions-dir %~dp0\extensions --install-extension context %* 2>&1 nul +@echo off
+
+rem chcp 65001
+
+rem I need to figure ou thow to detach the instance
+
+start "vs code context" code --ignore-gpu-blacklist --reuse-window --extensions-dir %~dp0\extensions --install-extension context %* 2>&1 nul
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf Binary files differindex 61e0cf7b5..bde11d0b4 100644 --- a/doc/context/documents/general/qrcs/setup-cs.pdf +++ b/doc/context/documents/general/qrcs/setup-cs.pdf diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf Binary files differindex 0edc934d1..74be65e0c 100644 --- a/doc/context/documents/general/qrcs/setup-de.pdf +++ b/doc/context/documents/general/qrcs/setup-de.pdf diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf Binary files differindex ef4f960e6..51806d7e1 100644 --- a/doc/context/documents/general/qrcs/setup-en.pdf +++ b/doc/context/documents/general/qrcs/setup-en.pdf diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf Binary files differindex edb05cdfa..fe545f06f 100644 --- a/doc/context/documents/general/qrcs/setup-fr.pdf +++ b/doc/context/documents/general/qrcs/setup-fr.pdf diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf Binary files differindex 739c973f3..d7f3b1b11 100644 --- a/doc/context/documents/general/qrcs/setup-it.pdf +++ b/doc/context/documents/general/qrcs/setup-it.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf Binary files differindex 1d52df51f..dd99323e7 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf Binary files differindex 75474f431..c5075de53 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-en.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-en.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf Binary files differindex 10ccf5725..2733671a1 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf Binary files differindex 8a59b1476..65e1810df 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-it.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-it.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf Binary files differindex ba41f79c7..8fe0b8427 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf Binary files differindex 213394b22..87f12c9c8 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf Binary files differindex 06fc8f12e..94404dd30 100644 --- a/doc/context/documents/general/qrcs/setup-nl.pdf +++ b/doc/context/documents/general/qrcs/setup-nl.pdf diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf Binary files differindex 4d7712f17..b1ad7aca2 100644 --- a/doc/context/documents/general/qrcs/setup-ro.pdf +++ b/doc/context/documents/general/qrcs/setup-ro.pdf diff --git a/metapost/context/base/mpiv/mp-char.mpiv b/metapost/context/base/mpiv/mp-char.mpiv index 54e9d6e88..130bbea0c 100644 --- a/metapost/context/base/mpiv/mp-char.mpiv +++ b/metapost/context/base/mpiv/mp-char.mpiv @@ -31,6 +31,7 @@ numeric flow_shape_width ; flow_shape_width := 45pt ; numeric flow_grid_height ; flow_grid_height := 40pt ; numeric flow_shape_height ; flow_shape_height := 30pt ; numeric flow_chart_offset ; flow_chart_offset := 2pt ; +numeric flow_chart_clip_offset ; flow_chart_offset := 10pt ; string flow_chart_background_color ; flow_chart_background_color := "white" ; boolean flow_show_mid_points ; flow_show_mid_points := false ; boolean flow_show_con_points ; flow_show_con_points := false ; @@ -102,6 +103,7 @@ def flow_new_chart = flow_grid_height := 40pt ; flow_shape_height := 30pt ; flow_chart_offset := 2pt ; + flow_chart_clip_offset := 10pt ; flow_chart_background_color := "white" ; flow_show_mid_points := false ; flow_show_con_points := false ; @@ -1070,7 +1072,7 @@ enddef ; def flow_end_chart = begingroup ; - save p ; path p ; + save p, c ; path p, c ; flow_flush_shapes ; flow_flush_connections ; flow_flush_pictures ; @@ -1086,8 +1088,9 @@ def flow_end_chart = (flow_cmax_x,flow_cmax_y)--(flow_cmin_x,flow_cmax_y)--cycle)) flow_scaled_to_grid ; %draw p withcolor red ; + c := p enlarged flow_chart_clip_offset ; p := p enlarged flow_chart_offset ; - clip currentpicture to p ; + clip currentpicture to c ; setbounds currentpicture to p ; endgroup ; currentpicture := currentpicture scaled flow_chart_scale ; diff --git a/scripts/context/lua/mtx-vscode.lua b/scripts/context/lua/mtx-vscode.lua index 22a821dec..9b907e8c9 100644 --- a/scripts/context/lua/mtx-vscode.lua +++ b/scripts/context/lua/mtx-vscode.lua @@ -2527,7 +2527,7 @@ function scripts.vscode.generate(targetpath) } local capturedluatex = words { -- new - "halfword", "scaled", "pointer", + "word", "halfword", "quarterword", "scaled", "pointer", "glueratio", } local capturedmacros = words { -- copied from cpp.lua @@ -3177,5 +3177,4 @@ else application.help() end --- scripts.vscode.generate([[t:/vscode/data/extensions]]) --- scripts.vscode.generate([[e:\tex-context\tex\texmf-context\context\data\vscode\extensions]]) +scripts.vscode.generate([[t:/vscode/data/context/extensions]]) diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 4651ed0e7..e19a3dfbb 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.06.14 17:49} +\newcontextversion{2019.06.20 18:47} %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 ea6f7becb..4a72dae8b 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.06.14 17:49} +\edef\contextversion{2019.06.20 18:47} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii index ba43a7cb2..b450e464e 100644 --- a/tex/context/base/mkii/mult-ro.mkii +++ b/tex/context/base/mkii/mult-ro.mkii @@ -731,6 +731,7 @@ \setinterfaceconstant{component}{component} \setinterfaceconstant{compoundhyphen}{compoundhyphen} \setinterfaceconstant{compress}{compress} +\setinterfaceconstant{compressdistance}{compressdistance} \setinterfaceconstant{compressseparator}{compressseparator} \setinterfaceconstant{concerns}{concerns} \setinterfaceconstant{connector}{connector} diff --git a/tex/context/base/mkiv/back-exp.lua b/tex/context/base/mkiv/back-exp.lua index f5035d3cf..9f16a9e09 100644 --- a/tex/context/base/mkiv/back-exp.lua +++ b/tex/context/base/mkiv/back-exp.lua @@ -2086,6 +2086,29 @@ do end +do + + local usedparagraphs = { } + + function structurestags.setparagraph(align) + if align ~= "" then + usedparagraphs[locatedtag("paragraph")] = { + dataset = dataset, + tag = tag, + align = align, + } + end + end + + function extras.paragraph(di,element,n,fulltag) + local hash = usedparagraphs[fulltag] + if hash then + setattribute(di,"align",hash.align) + end + end + +end + -- flusher do @@ -4250,3 +4273,9 @@ implement { actions = structurestags.setpublication, arguments = "2 strings" } + +implement { + name = "settagparagraph", + actions = structurestags.setparagraph, + arguments = "string" +} diff --git a/tex/context/base/mkiv/back-exp.mkiv b/tex/context/base/mkiv/back-exp.mkiv index 03dbe709a..3e8469b14 100644 --- a/tex/context/base/mkiv/back-exp.mkiv +++ b/tex/context/base/mkiv/back-exp.mkiv @@ -262,6 +262,13 @@ \fi}% \to \everyenableelements +\appendtoks + \unexpanded\def\dotagparagraph#1% + {\iftrialtypesetting\else + \clf_settagparagraph{#1}\relax + \fi}% +\to \everyenableelements + % The action: \setupbackend[export=yes] % or filename % maybe xhtml css settings will move to setupexport diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 4fa009727..dbf340dc5 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{2019.06.14 17:49} +\newcontextversion{2019.06.20 18:47} %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 8c501d4d5..2d0bf8881 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{2019.06.14 17:49} +\edef\contextversion{2019.06.20 18:47} \edef\contextkind {beta} %D Kind of special: diff --git a/tex/context/base/mkiv/driv-shp.lua b/tex/context/base/mkiv/driv-shp.lua index b9298176a..19bc75f2a 100644 --- a/tex/context/base/mkiv/driv-shp.lua +++ b/tex/context/base/mkiv/driv-shp.lua @@ -506,7 +506,7 @@ local hlist_out, vlist_out do return ot, x + xoffset, y - yoffset end - -- rangedir can stick to widths only + -- to be checked: begin- or enddir kan nil zijn, weird rangedimensions = node.direct.naturalwidth or rangedimensions diff --git a/tex/context/base/mkiv/luat-cnf.lua b/tex/context/base/mkiv/luat-cnf.lua index 979ca36a0..c398b75bb 100644 --- a/tex/context/base/mkiv/luat-cnf.lua +++ b/tex/context/base/mkiv/luat-cnf.lua @@ -31,7 +31,7 @@ texconfig.param_size = 25000 texconfig.save_size = 100000 texconfig.stack_size = 10000 texconfig.function_size = 32768 -texconfig.properties_size = 65536 +texconfig.properties_size = 262144 -- after that, we're a hash texconfig.fix_mem_init = 750000 local stub = [[ diff --git a/tex/context/base/mkiv/luat-cod.lua b/tex/context/base/mkiv/luat-cod.lua index 522de886c..f38966443 100644 --- a/tex/context/base/mkiv/luat-cod.lua +++ b/tex/context/base/mkiv/luat-cod.lua @@ -31,7 +31,7 @@ texconfig.param_size = 25000 texconfig.save_size = 100000 texconfig.stack_size = 10000 texconfig.function_size = 32768 -texconfig.properties_size = 65536 +texconfig.properties_size = 262144 -- nuts are actually kind of pointers (so we jump by size) texconfig.fix_mem_init = 750000 -- registering bytecode chunks diff --git a/tex/context/base/mkiv/math-noa.lua b/tex/context/base/mkiv/math-noa.lua index 376767227..112972d8f 100644 --- a/tex/context/base/mkiv/math-noa.lua +++ b/tex/context/base/mkiv/math-noa.lua @@ -28,7 +28,7 @@ local utfchar, utfbyte = utf.char, utf.byte local formatters, gmatch = string.formatters, string.gmatch local sortedhash = table.sortedhash local insert, remove = table.insert, table.remove -local div = math.div +local div, round = math.div, math.round local bor, band = bit32.bor, bit32.band local fonts = fonts @@ -1557,6 +1557,7 @@ do else correction = correction - 100 end + correction = round(correction) setattr(pointer,a_mathitalics,correction) setattr(parent,a_mathitalics,correction) return -- so no reset later on diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua index 73257968b..62a6de16b 100644 --- a/tex/context/base/mkiv/mlib-pps.lua +++ b/tex/context/base/mkiv/mlib-pps.lua @@ -834,7 +834,7 @@ local tx_reset, tx_process do end elseif #mp_c == 3 then if mp_a and mp_t then - ctx_MPLIBsetCtext(mp_target,f_rgb_nop(mp_c[1],mp_c[2],mp_c[3],mp_a,mp_t),mp_text) + ctx_MPLIBsetCtext(mp_target,f_rgb_yes(mp_c[1],mp_c[2],mp_c[3],mp_a,mp_t),mp_text) else ctx_MPLIBsetCtext(mp_target,f_rgb_nop(mp_c[1],mp_c[2],mp_c[3]),mp_text) end diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua index 8dfee915a..4ec3bd7c2 100644 --- a/tex/context/base/mkiv/mult-def.lua +++ b/tex/context/base/mkiv/mult-def.lua @@ -7337,6 +7337,9 @@ return { ["compressseparator"]={ ["en"]="compressseparator", }, + ["compressdistance"]={ + ["en"]="compressdistance", + }, ["concerns"]={ ["en"]="concerns", ["nl"]="betreft", diff --git a/tex/context/base/mkiv/node-mig.lua b/tex/context/base/mkiv/node-mig.lua index 32b09a186..6c10625eb 100644 --- a/tex/context/base/mkiv/node-mig.lua +++ b/tex/context/base/mkiv/node-mig.lua @@ -24,13 +24,16 @@ local tonut = nuts.tonut local getnext = nuts.getnext local getid = nuts.getid local getlist = nuts.getlist -local getattr = nuts.getattr +----- getattr = nuts.getattr +local getprop = nuts.getprop -local setattr = nuts.setattr +----- setattr = nuts.setattr +local setprop = nuts.setprop local setlink = nuts.setlink local setlist = nuts.setlist local setprev = nuts.setprev local setnext = nuts.setnext +local setboth = nuts.setboth local remove_node = nuts.remove @@ -60,11 +63,11 @@ local function locate(head,first,last,ni,nm) elseif migrate_inserts and id == insert_code then local insert head, current, insert = remove_node(head,current) - setnext(insert) if first then + setnext(insert) setlink(last,insert) else - setprev(insert) + setboth(insert) first = insert end last = insert @@ -72,11 +75,11 @@ local function locate(head,first,last,ni,nm) elseif migrate_marks and id == mark_code then local mark head, current, mark = remove_node(head,current) - setnext(mark) if first then + setnext(mark) setlink(last,mark) else - setprev(mark) + setboth(mark) first = mark end last = mark @@ -98,8 +101,13 @@ function nodes.handlers.migrate(head,where) local id = getid(current) -- inserts_too is a temp hack, we should only do them when it concerns -- newly placed (flushed) inserts - if id == vlist_code or id == hlist_code or (inserts_too and id == insert_code) and not getattr(current,a_migrated) then - setattr(current,a_migrated,1) + + -- todo: getprop / setprop + + -- if id == vlist_code or id == hlist_code or (inserts_too and id == insert_code) and not getattr(current,a_migrated) then + if id == vlist_code or id == hlist_code or (inserts_too and id == insert_code) and not getprop(current,"migrated") then + -- setattr(current,a_migrated,1) + setprop(current,"migrated",true) t_sweeps = t_sweeps + 1 local h = getlist(current) local first, last, ni, nm @@ -112,7 +120,7 @@ function nodes.handlers.migrate(head,where) end if first then t_inserts = t_inserts + ni - t_marks = t_marks + nm + t_marks = t_marks + nm if trace_migrations and (ni > 0 or nm > 0) then report_nodes("sweep %a, container %a, %s inserts and %s marks migrated outwards during %a", t_sweeps,nodecodes[id],ni,nm,where) @@ -126,7 +134,7 @@ function nodes.handlers.migrate(head,where) current = last end end - current = getnext(next) + current = getnext(current) end return head end diff --git a/tex/context/base/mkiv/page-cst.mkiv b/tex/context/base/mkiv/page-cst.mkiv index 8fd02c870..8444e4e16 100644 --- a/tex/context/base/mkiv/page-cst.mkiv +++ b/tex/context/base/mkiv/page-cst.mkiv @@ -401,11 +401,13 @@ \global\setfalse\c_page_floats_flushing} \def\page_grd_command_flush_floats_indeed % much in common with OTRSET - {\wait\ifconditional\c_page_floats_some_waiting - \ifconditional\c_page_floats_pack_flushed - \page_floats_collect\s!text\hsize\emwidth + {\ifconditional\c_page_floats_some_waiting + \ifconditional\c_page_floats_compress_flushed + \page_floats_collect\s!text\hsize\d_page_floats_compress_distance \ifcase\nofcollectedfloats \page_floats_get + % \or + % \page_floats_get \else \setfalse\c_page_floats_center_box % not needed as we do call directly \global\setbox\floatbox\hbox to \hsize diff --git a/tex/context/base/mkiv/page-flt.lua b/tex/context/base/mkiv/page-flt.lua index 41a35d47b..b1f729f7a 100644 --- a/tex/context/base/mkiv/page-flt.lua +++ b/tex/context/base/mkiv/page-flt.lua @@ -87,22 +87,32 @@ end local function setdimensions(t,b) local bw, bh, bd = 0, 0, 0 local nw, nh, nd = 0, 0, 0 + local cw, ch, cd = 0, 0, 0 if b then bw = b.width bh = b.height bd = b.depth + cw = b.cwidth + ch = b.cheight + cd = b.cdepth end if t then - nw = t.width or bw - nh = t.height or bh - nd = t.depth or bd + nw = t.width or bw + nh = t.height or bh + nd = t.depth or bd + cw = t.cwidth or cw + ch = t.cheight or ch + cd = t.cdepth or cd end setdimen("global","floatwidth", bw) setdimen("global","floatheight", bh+bd) setdimen("global","naturalfloatwd", nw) setdimen("global","naturalfloatht", nh) setdimen("global","naturalfloatdp", nd) - return bw, bh, bd, nw, nh, dp + setdimen("global","floatcaptionwd", cw) + setdimen("global","floatcaptionht", ch) + setdimen("global","floatcaptiondp", cd) + return bw, bh, bd, nw, nh, dp, cw, xh, xp end local function get(stack,n,bylabel) @@ -125,19 +135,22 @@ local function get(stack,n,bylabel) end end -function floats.save(which,data) +function floats.save(which,data) -- todo: just pass which = which or default local b = textakebox("floatbox") if b then local stack = stacks[which] noffloats = noffloats + 1 local t = { - n = noffloats, - data = data or { }, - width = getdimen("naturalfloatwd"), - height = getdimen("naturalfloatht"), - depth = getdimen("naturalfloatdp"), - box = b, + n = noffloats, + data = data or { }, + width = getdimen("naturalfloatwd"), + height = getdimen("naturalfloatht"), + depth = getdimen("naturalfloatdp"), + cwidth = getdimen("floatcaptionwd"), + cheight = getdimen("floatcaptionht"), + cdepth = getdimen("floatcaptiondp"), + box = b, } insert(stack,t) -- inspect(stacks) @@ -240,11 +253,15 @@ function floats.collect(which,maxwidth,distance) for i=1,stacksize do local t, b, n = get(stack,i) if t then - local w, h, d, nw = setdimensions(t,b) + local w, h, d, nw, nh, nd, cw, ch, cd = setdimensions(t,b) -- we use the real width - w = nw + if cw > nw then + w = cw + else + w = nw + end -- which could be an option - local rest = maxwidth - w - (1 == 1 and 0 or distance) + local rest = maxwidth - w - distance local fits = rest > -10 if trace_collecting then report_collecting("%s, category %a, number %a, slot %a width %p, rest %p, fit %a","collecting", diff --git a/tex/context/base/mkiv/page-flt.mkiv b/tex/context/base/mkiv/page-flt.mkiv index 83e2b4954..e72ae314a 100644 --- a/tex/context/base/mkiv/page-flt.mkiv +++ b/tex/context/base/mkiv/page-flt.mkiv @@ -63,7 +63,9 @@ \newconditional\c_page_floats_center_box \settrue\c_page_floats_center_box \newconditional\c_page_floats_center_box_local \newconditional\c_page_floats_center_box_global -\newconditional\c_page_floats_pack_flushed \settrue\c_page_floats_pack_flushed +\newconditional\c_page_floats_compress_flushed \settrue\c_page_floats_compress_flushed + +\newdimen \d_page_floats_compress_distance %D For the moment we keep this but they will become private too. diff --git a/tex/context/base/mkiv/page-one.mkiv b/tex/context/base/mkiv/page-one.mkiv index 64c4a7134..356fb4987 100644 --- a/tex/context/base/mkiv/page-one.mkiv +++ b/tex/context/base/mkiv/page-one.mkiv @@ -146,14 +146,18 @@ \page_one_registered_text_area_a#1#2% \unvbox <box> % \ifgridsnapping + \unskip % new per 2019-06-18, otherwise weird bottom floats \vkern\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax \prevdepth\openstrutdepth \page_otr_command_flush_bottom_insertions \vfil \else\ifcase\bottomraggednessmode % ragged (default) + \unskip % new per 2019-06-18, otherwise weird bottom floats \vkern\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax \prevdepth\openstrutdepth + % these have whitespace before but we can have some more options + % like a \vfill or so \page_otr_command_flush_bottom_insertions \vfil \or @@ -161,6 +165,7 @@ \page_otr_command_flush_bottom_insertions \or % baseline + \unskip % new per 2019-06-18, otherwise weird bottom floats \vkern\dimexpr\maxdepth-\d_page_one_natural_depth\relax \page_otr_command_flush_bottom_insertions \fi\fi @@ -373,35 +378,37 @@ \fi \fi \snaptogrid\hpack{\box\floatbox}} % was copy -\def\page_one_command_flush_floats_indeed % much in common with OTRSET +\def\page_one_command_floats_get_compressed + {\setfalse\c_page_floats_center_box % not needed as we do call directly + %% no longer (interferes with footnotes): + %% + %% \page_one_command_set_vsize % test 2011.06.24.001 + %% + \global\setbox\floatbox\hbox to \hsize + {\hfil + \dorecurse\nofcollectedfloats + {\ifcase\columndirection % nog document wide + \page_floats_flush\s!text\plusone + \else + \page_floats_flush\s!text{\the\numexpr\nofcollectedfloats-\recurselevel+1\relax}% + \fi + \hpack to \ifdim\naturalfloatwd>\makeupwidth\makeupwidth\else\naturalfloatwd\fi + {\hss\box\floatbox\hss}% + \ifnum\recurselevel<\nofcollectedfloats + \hfil + \fi}% + \hfil}} + +\def\page_one_command_flush_floats_indeed {\ifconditional\c_page_floats_some_waiting \ifconditional\c_page_floats_pack_flushed - \page_floats_collect\s!text\hsize\emwidth + \page_floats_collect\s!text\hsize\d_page_floats_compress_distance \ifcase\nofcollectedfloats \page_floats_get + \or + \page_floats_get \else - \setfalse\c_page_floats_center_box % not needed as we do call directly - %% no longer (interferes with footnotes): - %% - %% \page_one_command_set_vsize % test 2011.06.24.001 - %% - \global\setbox\floatbox\hbox to \hsize - {\hfil - \dorecurse\nofcollectedfloats - {\ifcase\columndirection % nog document wide - \page_floats_flush\s!text\plusone - \else - \page_floats_flush\s!text{\the\numexpr\nofcollectedfloats-\recurselevel+1\relax}% - \fi - \ifdim\wd\floatbox>\makeupwidth % \hsize - \hpack to \makeupwidth{\hss\box\floatbox\hss}% - \else - \box\floatbox - \fi - \ifnum\recurselevel<\nofcollectedfloats - \hfil - \fi}% - \hfil}% + \page_one_command_floats_get_compressed \fi \else \page_floats_get diff --git a/tex/context/base/mkiv/page-pcl.mkiv b/tex/context/base/mkiv/page-pcl.mkiv index 9772320e7..3cb5bf1c8 100644 --- a/tex/context/base/mkiv/page-pcl.mkiv +++ b/tex/context/base/mkiv/page-pcl.mkiv @@ -398,10 +398,9 @@ \def\page_col_command_flush_floats_indeed % much in common with OTRSET {\ifconditional\c_page_floats_some_waiting - \ifconditional\c_page_floats_pack_flushed + \ifconditional\c_page_floats_compress_flushed \setfalse\c_page_floats_center_box % not needed as we do call directly - % - \page_floats_collect\s!text\hsize\emwidth + \page_floats_collect\s!text\hsize\d_page_floats_compress_distance % \ifnum\nofcollectedfloats=\plusone \ifdim\naturalfloatwd>\hsize @@ -421,7 +420,7 @@ % this could happen at the lua end instead \scratchdimen\dimexpr\wd\floatbox-\naturalfloatwd\relax \ifdim\scratchdimen<\zeropoint - \global\setbox\floatbox\hpack spread -\scratchdimen{\hss\box\floatbox\hss}% + \global\setbox\floatbox\hpack spread -\scratchdimen{\hss\box\floatbox\hss}% \fi % \ifdim\wd\floatbox>\textwidth % \hsize diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex b3bdbce43..c171029ad 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 26ce87818..0f13f1cb4 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-blk.lua b/tex/context/base/mkiv/strc-blk.lua index 89df440c9..6717c3777 100644 --- a/tex/context/base/mkiv/strc-blk.lua +++ b/tex/context/base/mkiv/strc-blk.lua @@ -118,10 +118,12 @@ function blocks.select(state,name,tag,criterium) printblock(ri.index,name,ri.data,hide) else local mtags = metadata.tags - for tag, sta in next, tags do - if mtags[tag] then - printblock(ri.index,name,ri.data,hide) - break + if mtags then + for tag, sta in next, tags do + if mtags[tag] then + printblock(ri.index,name,ri.data,hide) + break + end end end end diff --git a/tex/context/base/mkiv/strc-flt.mkvi b/tex/context/base/mkiv/strc-flt.mkvi index 8e8975a05..a1289bf1d 100644 --- a/tex/context/base/mkiv/strc-flt.mkvi +++ b/tex/context/base/mkiv/strc-flt.mkvi @@ -173,13 +173,26 @@ %\c!bottomafter=, %\c!default=, % default location \c!sidethreshold=.5\strutdp, % set to "old" to check with old method - \c!numbering=\v!yes] + \c!numbering=\v!yes, + \c!compress=\v!yes, % when possible pack floats when flushing + \c!compressdistance=\emwidth] \setupfloatframed [\c!frame=\v!off, \c!offset=\v!overlay, \c!strut=\v!no] +\appendtoks + \doifelse{\floatparameter\c!compress}\v!yes\settrue\setfalse\c_page_floats_pack_flushed + \d_page_floats_compress_distance\floatparameter\c!compressdistance\relax +\to \everysetupfloat + +%D We need to do it again here: + +\setupfloat + [\c!compress=\v!yes, % when possible pack floats when flushing + \c!compressdistance=\emwidth] + %D Individial settings: \installcounterassociation{floatcaption} @@ -1014,15 +1027,28 @@ \def\naturalfloatwidth {\the\naturalfloatht} \def\naturalfloatdepth {\the\naturalfloatdp} +\def\floatcaptionheight{\the\floatcaptionwd} +\def\floatcaptionwidth {\the\floatcaptionht} +\def\floatcaptiondepth {\the\floatcaptiondp} + \newdimen\naturalfloatwd \newdimen\naturalfloatht \newdimen\naturalfloatdp +\newdimen\floatcaptionwd +\newdimen\floatcaptionht +\newdimen\floatcaptiondp + \def\strc_floats_set_natural_dimensions#box% {\global\naturalfloatwd\wd#box\relax \global\naturalfloatht\ht#box\relax \global\naturalfloatdp\dp#box\relax} +\def\strc_floats_set_caption_dimensions#box% + {\global\floatcaptionwd\wd#box\relax + \global\floatcaptionht\ht#box\relax + \global\floatcaptiondp\dp#box\relax} + \def\doifelsemainfloatbody {\ifinsidesplitfloat \ifconditional\splitfloatfirstdone @@ -1573,8 +1599,9 @@ % nothing \or % automatic - \ifnofloatcaption + \ifnofloatcaption \strc_floats_prepare_no_caption + \strc_floats_set_caption_dimensions\voidbox %\page_backgrounds_add_local_to_box\floatbox % was \doglobal but not needed \else % todo: installable maken, variant/method=auto vs macro @@ -1582,6 +1609,7 @@ %\page_backgrounds_add_local_to_box\b_strc_floats_content \setbox\b_strc_floats_caption\hbox % text {\floatcaptionparameter\c!command{\box\b_strc_floats_caption}}% + \strc_floats_set_caption_dimensions\b_strc_floats_caption \moveboxontogrid\b_strc_floats_caption{\floatcaptionparameter\c!grid}\d_strc_floats_caption_height %\page_backgrounds_add_local_to_box\b_strc_floats_caption \strc_floats_build_box diff --git a/tex/context/base/mkiv/strc-tag.mkiv b/tex/context/base/mkiv/strc-tag.mkiv index 84e11a632..621a54040 100644 --- a/tex/context/base/mkiv/strc-tag.mkiv +++ b/tex/context/base/mkiv/strc-tag.mkiv @@ -463,11 +463,14 @@ {\let\currentparagraph\empty \paragraph_start_indeed} +\ifdefined\dotagparagraph \else \let\dotagparagraph \gobbleoneargument \fi + \def\paragraph_start_indeed {\useparagraphstyleandcolor\c!style\c!color \usealignparameter\paragraphparameter \usesetupsparameter\paragraphparameter - \dostarttagged\t!paragraph\currentparagraph} + \dostarttagged\t!paragraph\currentparagraph + \dotagparagraph{\paragraphparameter\c!align}} \unexpanded\def\stopparagraph {\dostoptagged diff --git a/tex/context/base/mkiv/typo-ovl.lua b/tex/context/base/mkiv/typo-ovl.lua index 09cf5e129..6f836551d 100644 --- a/tex/context/base/mkiv/typo-ovl.lua +++ b/tex/context/base/mkiv/typo-ovl.lua @@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['typo-ovl'] = { -- we have hardly any private code. For convenience I hooked it into the existing -- replacement module (as it used the same code anyway). I did some cleanup. -local next = next +local next, type = next, type local context = context @@ -114,7 +114,11 @@ function attributes.applyoverloads(specification,start,stop) else oldlist = getattrlist(current) for k, v in next, overloads do - setattr(current,k,v) + if type(v) == "number" then + setattr(current,k,v) + else + -- can be: ["font"] = number + end end newlist = current -- getattrlist(current) end diff --git a/tex/context/fonts/mkiv/type-imp-plex.mkiv b/tex/context/fonts/mkiv/type-imp-plex.mkiv index 02de45022..4087cd64d 100644 --- a/tex/context/fonts/mkiv/type-imp-plex.mkiv +++ b/tex/context/fonts/mkiv/type-imp-plex.mkiv @@ -132,14 +132,15 @@ % Here's Taco's variant as used in the ConTeXt Group Journal. - \definefontfeature[plexwidened][extend=\luaexpr{1/0.85}] % An odd floating point number to correct monospace. + \definefontfeature[plexwidened] [extend=\luaexpr{1/0.85}] % An odd floating point number to correct monospace. + \definefontfeature[plexwideneddefault][default][extend=\luaexpr{1/0.85}] % An odd floating point number to correct monospace. - \definetypescriptprefix [f:scplexserif] [\s!default,plexwidened] - \definetypescriptprefix [f:scplexsans] [\s!default,plexwidened] + \definetypescriptprefix [f:scplexserif] [plexwideneddefault] + \definetypescriptprefix [f:scplexsans] [plexwideneddefault] \definetypescriptprefix [f:scplexmono] [plexwidened] - \definetypescriptprefix [f:scnarrowplexserif] [\s!default,plexwidened] - \definetypescriptprefix [f:scnarrowplexsans] [\s!default,plexwidened] + \definetypescriptprefix [f:scnarrowplexserif] [plexwideneddefault] + \definetypescriptprefix [f:scnarrowplexsans] [plexwideneddefault] \definetypescriptprefix [f:scnarrowplexmono] [plexwidened] \starttypescript [\s!sans,\s!serif,\s!mono] [ibmplex-thin] [\s!name] @@ -149,7 +150,7 @@ \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!Bold] [\s!file:\typescriptprefix{n:plex\typescriptone}-text] [\s!features=\typescriptprefix{f:plex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!BoldItalic] [\s!file:\typescriptprefix{n:plex\typescriptone}-textitalic] [\s!features=\typescriptprefix{f:plex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}Widened] [\s!file:\typescriptprefix{n:plex\typescriptone}-thin] [\s!features=\typescriptprefix{f:scplex\typescriptone}] - \edefinefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] + \definefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] \edefinefontsynonym [\typescriptprefix{\typescriptone}Caps] [\s!file:\typescriptprefix{n:plex\typescriptone}-thin] [\s!fallbacks=Fake\typescriptprefix{\typescriptone}Caps] \stoptypescript @@ -160,7 +161,7 @@ \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!Bold] [\s!file:\typescriptprefix{n:plex\typescriptone}-medium] [\s!features=\typescriptprefix{f:plex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!BoldItalic] [\s!file:\typescriptprefix{n:plex\typescriptone}-mediumitalic] [\s!features=\typescriptprefix{f:plex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}Widened] [\s!file:\typescriptprefix{n:plex\typescriptone}-extralight] [\s!features=\typescriptprefix{f:scplex\typescriptone}] - \edefinefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] + \definefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] \edefinefontsynonym [\typescriptprefix{\typescriptone}Caps] [\s!file:\typescriptprefix{n:plex\typescriptone}-extralight] [\s!fallbacks=Fake\typescriptprefix{\typescriptone}Caps] \stoptypescript @@ -171,7 +172,7 @@ \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!Bold] [\s!file:\typescriptprefix{n:plex\typescriptone}-semibold] [\s!features=\typescriptprefix{f:plex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!BoldItalic] [\s!file:\typescriptprefix{n:plex\typescriptone}-semibolditalic] [\s!features=\typescriptprefix{f:plex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}Widened] [\s!file:\typescriptprefix{n:plex\typescriptone}-light] [\s!features=\typescriptprefix{f:scplex\typescriptone}] - \edefinefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] + \definefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] \edefinefontsynonym [\typescriptprefix{\typescriptone}Caps] [\s!file:\typescriptprefix{n:plex\typescriptone}-light] [\s!fallbacks=Fake\typescriptprefix{\typescriptone}Caps] \stoptypescript @@ -182,7 +183,7 @@ \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!Bold] [\s!file:\typescriptprefix{n:plex\typescriptone}-bold] [\s!features=\typescriptprefix{f:plex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!BoldItalic] [\s!file:\typescriptprefix{n:plex\typescriptone}-bolditalic] [\s!features=\typescriptprefix{f:plex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}Widened] [\s!file:\typescriptprefix{n:plex\typescriptone}-regular] [\s!features=\typescriptprefix{f:scplex\typescriptone}] - \edefinefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] + \definefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] \edefinefontsynonym [\typescriptprefix{\typescriptone}Caps] [\s!file:\typescriptprefix{n:plex\typescriptone}-regular] [\s!fallbacks=Fake\typescriptprefix{\typescriptone}Caps] \stoptypescript @@ -195,7 +196,7 @@ \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!Bold] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-text] [\s!features=\typescriptprefix{f:narrowplex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!BoldItalic] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-textitalic] [\s!features=\typescriptprefix{f:narrowplex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}Widened] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-thin] [\s!features=\typescriptprefix{f:scnarrowplex\typescriptone}] - \edefinefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] + \definefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] \edefinefontsynonym [\typescriptprefix{\typescriptone}Caps] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-thin] [\s!fallbacks=Fake\typescriptprefix{\typescriptone}Caps] \stoptypescript @@ -206,7 +207,7 @@ \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!Bold] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-medium] [\s!features=\typescriptprefix{f:narrowplex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!BoldItalic] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-mediumitalic] [\s!features=\typescriptprefix{f:narrowplex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}Widened] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-extralight] [\s!features=\typescriptprefix{f:scnarrowplex\typescriptone}] - \edefinefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] + \definefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] \edefinefontsynonym [\typescriptprefix{\typescriptone}Caps] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-extralight] [\s!fallbacks=Fake\typescriptprefix{\typescriptone}Caps] \stoptypescript @@ -217,7 +218,7 @@ \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!Bold] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-semibold] [\s!features=\typescriptprefix{f:narrowplex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!BoldItalic] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-semibolditalic] [\s!features=\typescriptprefix{f:narrowplex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}Widened] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-light] [\s!features=\typescriptprefix{f:scnarrowplex\typescriptone}] - \edefinefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] + \definefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] \edefinefontsynonym [\typescriptprefix{\typescriptone}Caps] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-light] [\s!fallbacks=Fake\typescriptprefix{\typescriptone}Caps] \stoptypescript @@ -228,7 +229,7 @@ \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!Bold] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-bold] [\s!features=\typescriptprefix{f:narrowplex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!BoldItalic] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-bolditalic] [\s!features=\typescriptprefix{f:narrowplex\typescriptone}] \edefinefontsynonym [\typescriptprefix{\typescriptone}Widened] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-regular] [\s!features=\typescriptprefix{f:scnarrowplex\typescriptone}] - \edefinefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] + \definefontfallback[Fake\typescriptprefix{\typescriptone}Caps] [\typescriptprefix{\typescriptone}Widened] [0x0000-0xFFFF] [\s!rscale=0.85,method=uppercase] \edefinefontsynonym [\typescriptprefix{\typescriptone}Caps] [\s!file:\typescriptprefix{n:narrowplex\typescriptone}-regular] [\s!fallbacks=Fake\typescriptprefix{\typescriptone}Caps] \stoptypescript diff --git a/tex/context/interface/mkii/keys-ro.xml b/tex/context/interface/mkii/keys-ro.xml index 04291fb20..75802edd8 100644 --- a/tex/context/interface/mkii/keys-ro.xml +++ b/tex/context/interface/mkii/keys-ro.xml @@ -737,6 +737,7 @@ <cd:constant name='component' value='component'/> <cd:constant name='compoundhyphen' value='compoundhyphen'/> <cd:constant name='compress' value='compress'/> + <cd:constant name='compressdistance' value='compressdistance'/> <cd:constant name='compressseparator' value='compressseparator'/> <cd:constant name='concerns' value='concerns'/> <cd:constant name='connector' value='connector'/> diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml index e358b27e7..9b1c7f57b 100644 --- a/tex/context/interface/mkiv/context-en.xml +++ b/tex/context/interface/mkiv/context-en.xml @@ -10311,6 +10311,13 @@ <cd:constant default="yes" type="yes"/> <cd:constant type="no"/> </cd:parameter> + <cd:parameter name="compress"> + <cd:constant default="yes" type="yes"/> + <cd:constant type="no"/> + </cd:parameter> + <cd:parameter name="compressdistance"> + <cd:constant type="cd:dimension"/> + </cd:parameter> <cd:inherit name="setupframed"/> </cd:assignments> </cd:arguments> diff --git a/tex/context/interface/mkiv/i-chart.xml b/tex/context/interface/mkiv/i-chart.xml index 2b73f1322..7f0a51393 100644 --- a/tex/context/interface/mkiv/i-chart.xml +++ b/tex/context/interface/mkiv/i-chart.xml @@ -119,6 +119,9 @@ <cd:parameter name="offset"> <cd:constant type="cd:dimension"/> </cd:parameter> + <cd:parameter name="clipoffset"> + <cd:constant type="cd:dimension"/> + </cd:parameter> <cd:parameter name="dx"> <cd:constant type="cd:dimension"/> </cd:parameter> @@ -538,4 +541,4 @@ </cd:arguments> </cd:command> -</cd:interface>
\ No newline at end of file +</cd:interface> diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf Binary files differindex ef4f960e6..51806d7e1 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-floats.xml b/tex/context/interface/mkiv/i-floats.xml index 77a0f00a1..8c15b2098 100644 --- a/tex/context/interface/mkiv/i-floats.xml +++ b/tex/context/interface/mkiv/i-floats.xml @@ -205,6 +205,13 @@ <cd:constant type="yes" default="yes"/> <cd:constant type="no"/> </cd:parameter> + <cd:parameter name="compress"> + <cd:constant type="yes" default="yes"/> + <cd:constant type="no"/> + </cd:parameter> + <cd:parameter name="compressdistance"> + <cd:constant type="cd:dimension"/> + </cd:parameter> <!-- end root only --> <cd:inherit name="setupframed"/> </cd:assignments> diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf Binary files differindex 8578ce383..97206e852 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf diff --git a/tex/context/modules/mkiv/m-chart.lua b/tex/context/modules/mkiv/m-chart.lua index 7973640a7..1cdfd9f65 100644 --- a/tex/context/modules/mkiv/m-chart.lua +++ b/tex/context/modules/mkiv/m-chart.lua @@ -648,8 +648,8 @@ end -- todo : make lpeg for splitter -local sign = S("+p") / "1" - + S("-m") / "-1" +local sign = S("+p") / "1" + + S("-mn") / "-1" local full = C(P("left")) + C(P("right")) @@ -962,6 +962,7 @@ local function makechart_indeed(chart) local labeloffset = chartsettings.labeloffset local exitoffset = chartsettings.exitoffset local commentoffset = chartsettings.commentoffset + local clipoffset = chartsettings.clipoffset ctx_tographic(g,"flow_grid_width := %p ;", gridwidth) ctx_tographic(g,"flow_grid_height := %p ;", gridheight) ctx_tographic(g,"flow_shape_width := %p ;", shapewidth) @@ -996,6 +997,7 @@ local function makechart_indeed(chart) offset = radius -- or rulethickness? end ctx_tographic(g,"flow_chart_offset := %p ;",offset) + ctx_tographic(g,"flow_chart_clip_offset := %p ;",clipoffset) -- ctx_tographic(g,"flow_reverse_y := true ;") if chartsettings.option == v_test then @@ -1126,6 +1128,7 @@ implement { { "ny", "integer" }, { "x", "integer" }, { "y", "integer" }, + { "clipoffset", "dimension" }, { "labeloffset", "dimension" }, { "commentoffset", "dimension" }, { "exitoffset", "dimension" }, diff --git a/tex/context/modules/mkiv/m-chart.mkvi b/tex/context/modules/mkiv/m-chart.mkvi index 4c5ea7e02..a9d3dfdd9 100644 --- a/tex/context/modules/mkiv/m-chart.mkvi +++ b/tex/context/modules/mkiv/m-chart.mkvi @@ -52,6 +52,7 @@ [\c!width=12\bodyfontsize, \c!height=7\bodyfontsize, \c!offset=\FLOWlineparameter\c!rulethickness, + \c!clipoffset=\bodyfontsize, \c!dx=2\bodyfontsize, \c!dy=2\bodyfontsize, \c!nx=0, @@ -203,6 +204,7 @@ dx \dimexpr\FLOWchartparameter\c!dx\relax dy \dimexpr\FLOWchartparameter\c!dy\relax offset \dimexpr\FLOWchartparameter\c!offset\relax + clipoffset \dimexpr\FLOWchartparameter\c!clipoffset\relax % bodyfont {\FLOWchartparameter\c!bodyfont} dot {\FLOWchartparameter\c!dot} % private option hcompact {\FLOWchartparameter\c!hcompact} % undocumented option diff --git a/tex/generic/context/luatex/luatex-basics-nod.lua b/tex/generic/context/luatex/luatex-basics-nod.lua index 2b996829e..418b9d69d 100644 --- a/tex/generic/context/luatex/luatex-basics-nod.lua +++ b/tex/generic/context/luatex/luatex-basics-nod.lua @@ -12,7 +12,7 @@ end -- Don't depend on code here as it is only needed to complement the font handler -- code. I will move some to another namespace as I don't see other macro packages --- use the context logic. It's a subset anyway. +-- use the context logic. It's a subset anyway. More will be stripped. -- Attributes: @@ -73,75 +73,6 @@ nodes.disccodes = disccodes nodes.handlers.protectglyphs = node.protect_glyphs -- beware: nodes! nodes.handlers.unprotectglyphs = node.unprotect_glyphs -- beware: nodes! --- These are now gone in generic as they are context specific. - --- local flush_node = node.flush_node --- local remove_node = node.remove --- local traverse_id = node.traverse_id --- --- function nodes.remove(head, current, free_too) --- local t = current --- head, current = remove_node(head,current) --- if t then --- if free_too then --- flush_node(t) --- t = nil --- else --- t.next, t.prev = nil, nil --- end --- end --- return head, current, t --- end --- --- function nodes.delete(head,current) --- return nodes.remove(head,current,true) --- end - ------ getfield = node.getfield ------ setfield = node.setfield - ------.getfield = getfield ------.setfield = setfield ------.getattr = getfield ------.setattr = setfield - ------.tostring = node.tostring or tostring ------.copy = node.copy ------.copy_node = node.copy ------.copy_list = node.copy_list ------.delete = node.delete ------.dimensions = node.dimensions ------.end_of_math = node.end_of_math ------.flush_list = node.flush_list ------.flush_node = node.flush_node ------.flush = node.flush_node ------.free = node.free ------.insert_after = node.insert_after ------.insert_before = node.insert_before ------.hpack = node.hpack ------.new = node.new ------.tail = node.tail ------.traverse = node.traverse ------.traverse_id = node.traverse_id ------.slide = node.slide ------.vpack = node.vpack - ------.first_glyph = node.first_glyph ------.has_glyph = node.has_glyph or node.first_glyph ------.current_attr = node.current_attr ------.has_field = node.has_field ------.usedlist = node.usedlist ------.protrusion_skippable = node.protrusion_skippable ------.write = node.write - ------.has_attribute = node.has_attribute ------.set_attribute = node.set_attribute ------.unset_attribute = node.unset_attribute - ------.protect_glyphs = node.protect_glyphs ------.unprotect_glyphs = node.unprotect_glyphs ------.mlist_to_hlist = node.mlist_to_hlist - -- in generic code, at least for some time, we stay nodes, while in context -- we can go nuts (e.g. experimental); this split permits us us keep code -- used elsewhere stable but at the same time play around in context @@ -166,16 +97,12 @@ nuts.getattr = direct.get_attribute nuts.getboth = direct.getboth nuts.getchar = direct.getchar nuts.getcomponents = direct.getcomponents -----.getdepth = direct.getdepth -----.getdir = direct.getdir nuts.getdirection = direct.getdirection nuts.getdisc = direct.getdisc nuts.getfield = direct.getfield nuts.getfont = direct.getfont -----.getheight = direct.getheight nuts.getid = direct.getid nuts.getkern = direct.getkern -----.getleader = direct.getleader nuts.getlist = direct.getlist nuts.getnext = direct.getnext nuts.getoffsets = direct.getoffsets @@ -186,15 +113,10 @@ nuts.setattr = direct.setfield nuts.setboth = direct.setboth nuts.setchar = direct.setchar nuts.setcomponents = direct.setcomponents -----.setdepth = direct.setdepth -----.setdir = direct.setdir nuts.setdirection = direct.setdirection nuts.setdisc = direct.setdisc nuts.setfield = setfield -----.setfont = direct.setfont -----.setheight = direct.setheight nuts.setkern = direct.setkern -----.setleader = direct.setleader nuts.setlink = direct.setlink nuts.setlist = direct.setlist nuts.setnext = direct.setnext diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 252742e9f..b72b1a888 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 : 06/14/19 17:49:06 +-- merge date : 06/20/19 18:47:00 do -- begin closure to overcome local limits and interference |