diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-11-19 11:48:53 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-11-19 11:48:53 +0100 |
commit | 4b089e589d39346a66a27d04f9857fe16e4b7b41 (patch) | |
tree | ab037efa5ee53d50a777454a9cf310fba470e401 | |
parent | 5c3cfe6a56aafb26c7fc6e3aaccec7acec9b621a (diff) | |
download | context-4b089e589d39346a66a27d04f9857fe16e4b7b41.tar.gz |
2020-11-19 11:26:00
36 files changed, 521 insertions, 808 deletions
diff --git a/scripts/context/lua/mtx-install.lua b/scripts/context/lua/mtx-install.lua index eba8dd5c9..1c9c29f71 100644 --- a/scripts/context/lua/mtx-install.lua +++ b/scripts/context/lua/mtx-install.lua @@ -152,11 +152,16 @@ function install.identify() local name = files[i] local size = filesize(name) local base = gsub(name,pattern,"") - local stamp = hashdata(io.loaddata(name)) - details[i] = { base, size, stamp } - total = total + size + local data = io.loaddata(name) + if data and #data > 0 then + local stamp = hashdata(data) + details[i] = { base, size, stamp } + total = total + size + else + report("%-24s : bad file %a",tree,name) + end end - report("%-20s : %4i files, %3.0f MB",tree,#files,total/(1000*1000)) + report("%-24s : %4i files, %3.0f MB",tree,#files,total/(1000*1000)) savetable(path .. ".tma",details) diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 5a4a8adf0..e9b6498ba 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2020.11.18 19:13} +\newcontextversion{2020.11.19 11:23} %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 a78367225..7b8c74210 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2020.11.18 19:13} +\edef\contextversion{2020.11.19 11:23} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-de.mkii b/tex/context/base/mkii/mult-de.mkii index 17d730d24..b9235f6b7 100644 --- a/tex/context/base/mkii/mult-de.mkii +++ b/tex/context/base/mkii/mult-de.mkii @@ -1368,7 +1368,6 @@ \setinterfaceelement{type}{type} % definitions for interface commands for language de % -\setinterfacecommand{CAPPED}{KAP} \setinterfacecommand{Character}{Buchstabe} \setinterfacecommand{Characters}{Buchstaben} \setinterfacecommand{MONTH}{MONAT} diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index b55138767..53f8ab353 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2020.11.18 19:13} +\newcontextversion{2020.11.19 11:23} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkiv/context-characters.lmx b/tex/context/base/mkiv/context-characters.lmx deleted file mode 100644 index f018e412b..000000000 --- a/tex/context/base/mkiv/context-characters.lmx +++ /dev/null @@ -1,110 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -<!-- - filename : context-characters.lmx - comment : companion to context.tex - author : Hans Hagen, PRAGMA-ADE, Hasselt NL - copyright: PRAGMA ADE / ConTeXt Development Team - license : see context related readme files ---> - -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> - <head> - <script type='text/javascript'> - <!-- - window.focus(); - --> - </script> - <title><?lua pv('title') ?></title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <style type="text/css"> - <!-- - <?lmx-include context.css ?> - #type { - text-align: center ; - } - #variable { - width: 10em ; - text-align: right ; - margin-right: 1em ; - } - #value { - text-align: left ; - } - --> - </style> - </head> - <body> <!-- onclick="location.reload()" --> - <div id="top"><div id="top-one"><div id="top-two"> - <?lua pv('title') ?> - </div></div></div> - <div id="left"><div id="left-one"><div id="left-two"> - <!-- empty --> - </div></div></div> - <div id="right"><div id="right-safari"><div id="right-one"><div id="right-two"><div id="right-three"><div id="right-four"><div id="right-five"> - <!-- empty --> - </div></div></div></div></div></div></div> - <div id="right"><div id="right-safari"><div id="right-one"><div id="right-two"><div id="right-three"><div id="right-four"><div id="right-five"></div></div></div></div></div></div></div> - <div id="main"><div id='main-settings'> - <?lmx-define-begin chr-head ?> - <tr> - <th><div id="value"> </div></th> - <th colspan='2'><div id="value">characters </div></th> - <th colspan='2'><div id="value">unicodes </div></th> - <th colspan='2'><div id="value">indices </div></th> - <th colspan='1'><div id="value">fonts </div></th> - </tr> - <tr> - <th><div id="value"> </div></th> - <th><div id="value">before utf </div></th> - <th><div id="value">after utf </div></th> - <th><div id="value">before hex </div></th> - <th><div id="value">after hex </div></th> - <th><div id="value">after hex </div></th> - <th><div id="value">after dec </div></th> - <th><div id="value">filename </div></th> - </tr> - <?lmx-define-end ?> - <?lmx-define-begin chr-body ?> - <tr> - <td valign="top"><div id="value"><?lua t((nodes.tracers.characters.equal(v.before,v.after) and "=") or "!") ?></div></td> - <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.string(v.before)) ?> </div></td> - <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.string(v.after)) ?> </div></td> - <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.unicodes(v.before)) ?> </div></td> - <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.unicodes(v.after)) ?> </div></td> - <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.indices(v.after)) ?> </div></td> - <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.indices(v.after,true)) ?> </div></td> - <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.fonts(v.after)) ?> </div></td> - </tr> - <?lmx-define-end ?> - <?lmx-define-begin chr-none ?> - <tr> - <td><br/></td> - <td></td> - <td></td> - <td></td> - <td></td> - <td></td> - </tr> - <?lmx-define-end ?> - <?lua if tracers.knownlist('characters') then ?> - <h1>Processed Words</h1> - <table> - <?lmx-resolve chr-head ?> - <?lua for k,v in pairs(tracers.list['characters']) do if v.before and v.after then ?> - <?lmx-resolve chr-body ?> - <?lua else ?> - <?lmx-resolve chr-none ?> - <?lua end end ?> - </table> - <br/> - <?lua end ?> - </div></div> - <div id="bottom"><div id="bottom-one"><div id="bottom-two"> - Job Name: <?lua p(environment.jobname) ?> - ConTeXt Version: <?lua p(environment.version) ?> - </div></div></div> - </body> -</html> diff --git a/tex/context/base/mkiv/context-debug.lmx b/tex/context/base/mkiv/context-debug.lmx deleted file mode 100644 index 51b18c837..000000000 --- a/tex/context/base/mkiv/context-debug.lmx +++ /dev/null @@ -1,112 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -<!-- - filename : context-debug.lmx - comment : companion to context.tex - author : Hans Hagen, PRAGMA-ADE, Hasselt NL - copyright: PRAGMA ADE / ConTeXt Development Team - license : see context related readme files ---> - -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> - <head> - <script type='text/javascript'> - <!-- - window.focus(); - --> - </script> - <title><?lua pv('title') ?></title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <style type="text/css"> - <!-- - <?lmx-include context.css ?> - #type { - text-align: center ; - } - #variable { - width: 10em ; - text-align: right ; - margin-right: 1em ; - } - #value { - text-align: left ; - } - --> - </style> - </head> - <body> - <div id="top"><div id="top-one"><div id="top-two"> - <?lua pv('title') ?> - </div></div></div> - <div id="left"><div id="left-one"><div id="left-two"> - <!-- empty --> - </div></div></div> - <div id="right"><div id="right-safari"><div id="right-one"><div id="right-two"><div id="right-three"><div id="right-four"><div id="right-five"> - <!-- empty --> - </div></div></div></div></div></div></div> - <div id="main"><div id='main-settings'> - <?lua if tracers.knownlist('scratch') then ?> - <h1>Scratch Variables</h1> - <table> - <tr> - <th align='middle'>index</th> - <th align='middle'> dimen</th> - <th align='middle'> count</th> - <th align='left' > toks</th> - </tr> - <?lua for k,v in pairs(tracers.list['scratch']) do ?> - <tr> - <th align='middle'><?lua t(v) ?></th> - <th align='middle'> <?lua t(tracers.dimen(v)) ?></th> - <th align='middle'> <?lua t(tracers.count(v)) ?></th> - <th align='left' > <?lua t(tracers.toks (v)) ?></th> - </tr> - <?lua end ?> - </table> - <br/> - <?lua end ?> - <?lmx-define-begin tvv-head ?> - <tr> - <th><div id="type" >type </div></th> - <th><div id="variable">variable</div></th> - <th><div id="value" >value </div></th> - </tr> - <?lmx-define-end ?> - <?lmx-define-begin tvv-body ?> - <tr> - <th><div id="type" ><?lua t(tracers.type(v)) ?></div></th> - <th><div id="variable"><?lua t(tracers.name(v)) ?></div></th> - <th><div id="value" ><?lua t(tracers.cs(v)) ?></div></th> - </tr> - <?lmx-define-end ?> - <?lua if tracers.knownlist('internals') then ?> - <h1>Internal Variables</h1> - <table> - <?lmx-resolve tvv-head ?> - <?lua for k,v in pairs(tracers.list['internals']) do ?> - <?lmx-resolve tvv-body ?> - <?lua end ?> - </table> - <br/> - <?lua end ?> - <?lua if tracers.knownlist('context') then ?> - <h1>ConTeXt Variables</h1> - <table> - <?lmx-resolve tvv-head ?> - <?lua for k,v in pairs(tracers.list['context']) do ?> - <?lmx-resolve tvv-body ?> - <?lua end ?> - </table> - <br/> - <?lua end ?> - </div></div> - <div id="bottom"><div id="bottom-one"><div id="bottom-two"> - Job Name: <?lua p(environment.jobname) ?> - ConTeXt Version: <?lua p(environment.version) ?> - Real Page: <?lua p(tracers.cs('c:realpageno')) ?> - Page: <?lua p(tracers.cs('c:pageno')) ?> - </div></div></div> - </body> -</html> diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index bd7941cf1..2331cd2e2 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -45,7 +45,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2020.11.18 19:13} +\edef\contextversion{2020.11.19 11:23} %D Kind of special: diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl index 4a2ea9d5d..e28f32f07 100644 --- a/tex/context/base/mkiv/context.mkxl +++ b/tex/context/base/mkiv/context.mkxl @@ -29,7 +29,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2020.11.18 19:13} +\edef\contextversion{2020.11.19 11:23} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error @@ -147,7 +147,7 @@ \loadmkxlfile{cldf-int} % interface -\loadmarkfile{trac-ctx} % maybe move up +\loadmkxlfile{trac-ctx} % maybe move up \loadmarkfile{toks-aux} @@ -158,13 +158,13 @@ \loadmkxlfile{layo-ini} -\loadmarkfile{node-ini} +\loadmkxlfile{node-ini} \loadmkxlfile{cldf-bas} % basics / depends on nodes -\loadmkivfile{node-fin} +\loadmkxlfile{node-fin} \loadmkxlfile{node-mig} -%loadmarkfile{node-pag} +%loadmkxlfile{node-pag} \loadmkxlfile{driv-ini} @@ -179,8 +179,8 @@ \loadmkxlfile{attr-eff} \loadmkxlfile{attr-mkr} -\loadmarkfile{trac-tex} -\loadmarkfile{trac-deb} % will move up +\loadmkxlfile{trac-tex} +\loadmkxlfile{trac-deb} % will move up \loadmkxlfile{supp-box} @@ -414,7 +414,7 @@ \loadmkxlfile{blob-ini} \loadmkxlfile{trac-vis} -\loadmarkfile{trac-jus} +\loadmkxlfile{trac-jus} \loadmkxlfile{typo-cln} \loadmarkfile{typo-wrp} diff --git a/tex/context/base/mkiv/font-ini.mklx b/tex/context/base/mkiv/font-ini.mklx index 75db6e276..7bb7f832a 100644 --- a/tex/context/base/mkiv/font-ini.mklx +++ b/tex/context/base/mkiv/font-ini.mklx @@ -362,7 +362,7 @@ %D \macros{definedfont} -\let\thedefinedfont\relax % not to be confused with \everydefinefont +\mutable\let\thedefinedfont\relax % not to be confused with \everydefinefont \permanent\tolerant\protected\def\definedfont[#specification]% {\ifarguments @@ -420,7 +420,7 @@ {\edef#macro{\clf_nbfs\dimexpr#body\relax}% \global\letcsname\??fontnormalizedbody\number\dimexpr#body\endcsname#macro} -\def\thenormalizedbodyfontsize#body% +\permanent\def\thenormalizedbodyfontsize#body% {\clf_nbfs\dimexpr#body\relax} \edef\normalizedglobalbodyfontsize{\thenormalizedbodyfontsize\bodyfontsize} @@ -656,12 +656,12 @@ % 4:x{\definedfont[Serif sa 4]x}\par % 5:x{\definedfont[Serif sa 5]x}\par -\def\safontscale{\number\dimexpr\v_font_size_absolute\relax} -\def\mofontscale{\number\dimexpr\font_basics_set_mapped_fontsize\v_font_size_absolute\relax} +\permanent\def\safontscale{\number\dimexpr\v_font_size_absolute\relax} +\permanent\def\mofontscale{\number\dimexpr\font_basics_set_mapped_fontsize\v_font_size_absolute\relax} -\let\somefontname\s!unknown -\let\somefontspec\s!unknown -\let\somefontsize\zerocount +\mutable\let\somefontname\s!unknown +\mutable\let\somefontspec\s!unknown +\mutable\let\somefontsize\zerocount \newcount\scaledfontmode % also used at the lua end \newcount\scaledfontsize % also used at the lua end @@ -810,7 +810,7 @@ %D When fontclasses are used, we define the font global, since namespaces are %D used. Otherwise we parse the specs each time. -\let\fontfile\s!unknown +\mutable\let\fontfile\s!unknown %D Relatively new: @@ -852,7 +852,7 @@ \ifdefined\everyfont \else \newtoks\everyfont \fi \ifdefined\everyfontswitch \else \newtoks\everyfontswitch \fi -\def\setfontcharacteristics{\the\everyfont} +\permanent\def\setfontcharacteristics{\the\everyfont} % \appendtoks % \ifcase\c_fonts_auto_language @@ -880,15 +880,12 @@ %D %D The implementation looks as follows: -\protected\def\definefont % [name][spec][1.6 | line=10pt | setup_id] - {\dotripleempty\font_basics_define_font} - -\def\font_basics_define_font - {\ifthirdargument +\permanent\tolerant\protected\def\definefont[#1]#*[#2]#*[#3]% [name][spec][1.6 | line=10pt | setup_id] + {\ifparameter#3\or \expandafter\font_basics_define_font_a \else \expandafter\font_basics_define_font_b - \fi} + \fi[#1][#2][#3]} \def\font_basics_define_font_a[#name][#specification][#settings]% [name][spec][1.6 | line=10pt | setup_id] {\doifelsesetups{#settings}% @@ -913,7 +910,7 @@ \permanent\tolerant\protected\def\definefrozenfont[#name]#spacer[#specification]#spacer[#settings]% {\ifparameter#name\or \begingroup - \font_basics_define_font[#name][#specification][#settings]% + \definefont[#name][#specification][#settings]% \csname#name\endcsname \glet\lastglobalrawfontcall\lastrawfontcall \endgroup @@ -932,7 +929,7 @@ \newconditional\c_font_auto_size \settrue\c_font_auto_size -\let\lastfontidentifier\empty +\mutable\let\lastfontidentifier\empty \def\v_font_identifier_basic{\??fontinstancebasic \lastfontidentifier-\fontsize-\fontface} \def\v_font_identifier_class{\??fontinstanceclass\fontclass-\lastfontidentifier-\fontsize-\fontface} @@ -994,7 +991,7 @@ \installcorenamespace{fontenvironments} -\def\currentfontbodysize % gets number (the normal sa 1 etc) +\permanent\def\currentfontbodysize % gets number (the normal sa 1 etc) {\ifcsname\??fontenvironments\fontclass\s!default\somefontsize\endcsname \lastnamedcs \orelse\ifcsname\??fontenvironments\s!default\somefontsize\endcsname @@ -1003,7 +1000,7 @@ \somefontsize \fi} -\def\currentfontbodyscale % gets character (x xx a etc) +\permanent\def\currentfontbodyscale % gets character (x xx a etc) {\csname\??fontenvironments \ifcsname\??fontenvironments\fontclass\s!default\fontsize\endcsname\fontclass\s!default\fontsize\orelse \ifcsname\??fontenvironments \s!default\fontsize\endcsname \s!default\fontsize\orelse @@ -1019,7 +1016,7 @@ \ifcsname\??fontenvironments \s!default\s!text \endcsname\lastnamedcs\else \csname\??fontenvironments \s!default \endcsname \fi} -\def\currentfontscale % used in default definition +\permanent\def\currentfontscale % used in default definition {\csname\??fontenvironments \ifcsname\??fontenvironments\fontclass\s!default\xfontsize\endcsname\fontclass\s!default\fontsize\orelse \ifcsname\??fontenvironments \s!default\xfontsize\endcsname \s!default\fontsize\orelse @@ -1043,7 +1040,7 @@ \newconstant\currentxfontsize -\def\xfontsize{\ifcase\currentxfontsize\fontsize\or\s!x\else\s!xx\fi} +\permanent\def\xfontsize{\ifcase\currentxfontsize\fontsize\or\s!x\else\s!xx\fi} %D Now we enter the area of font switching. The switching mechanism has to take care %D of several situations, like: @@ -1132,7 +1129,7 @@ \letvalue\??fontenvironments\empty % so we default to empty -\def\bodyfontvariable#parameter% +\permanent\def\bodyfontvariable#parameter% {\csname\??fontenvironments \ifcsname\??fontenvironments\fontclass\normalizedbodyfontsize#parameter\endcsname\fontclass\normalizedbodyfontsize#parameter\orelse \ifcsname\??fontenvironments\fontclass #parameter\endcsname\fontclass #parameter\orelse @@ -1146,7 +1143,7 @@ \ifcsname\??fontenvironments \normalizedbodyfontsize#parameter\endcsname\lastnamedcs\orelse \ifcsname\??fontenvironments\s!default #parameter\endcsname\lastnamedcs\fi} -\def\bodyfontsizevariable#size#parameter% +\permanent\def\bodyfontsizevariable#size#parameter% {\csname\??fontenvironments \ifcsname\??fontenvironments\fontclass#size#parameter\endcsname\fontclass#size#parameter\orelse \ifcsname\??fontenvironments\fontclass #parameter\endcsname\fontclass #parameter\orelse @@ -1160,9 +1157,9 @@ \ifcsname\??fontenvironments #size#parameter\endcsname\lastnamedcs\orelse \ifcsname\??fontenvironments\s!default #parameter\endcsname\lastnamedcs\fi} -\def\bodyfontinterlinespace{\bodyfontvariable\c!interlinespace} % used elsewhere +\permanent\def\bodyfontinterlinespace{\bodyfontvariable\c!interlinespace} % used elsewhere -\def\bodyfontdimension#class#size#parameter#body% +\permanent\def\bodyfontdimension#class#size#parameter#body% {\the\dimexpr \ifcsname\??fontenvironments #class#size#parameter\endcsname \lastnamedcs \orelse \ifcsname\??fontenvironments#class\s!default#parameter\endcsname \lastnamedcs\dimexpr#body\relax\orelse % factor @@ -1178,28 +1175,27 @@ \newmacro\m_font_body \newmacro\m_font_body_normalized -\permanent\protected\def\definebodyfontenvironment % todo - {\dotripleempty\font_basics_define_body_font_environment} - -\def\font_basics_define_body_font_environment - {\ifthirdargument - \singleexpandafter\font_basics_define_body_font_environment_class - \orelse\ifsecondargument - \expandafter\font_basics_define_body_font_environment_empty - \else +\permanent\tolerant\protected\def\definebodyfontenvironment[#1]#*[#2]#*[#3]% todo + {\ifarguments \expandafter\font_basics_define_body_font_environment_unset - \fi} + \or + \expandafter\font_basics_define_body_font_environment_unset + \or + \expandafter\font_basics_define_body_font_environment_empty + \or + \expandafter\font_basics_define_body_font_environment_class + \fi[#1][#2][#3]} -\let\setupbodyfontenvironment\definebodyfontenvironment +\aliased\let\setupbodyfontenvironment\definebodyfontenvironment %D First we handle the class specific case. Beware: you can change values before %D a bodyfont is loaded but changing them afterwards can be sort of tricky as %D values are not consulted afterwards. -\def\processbodyfontenvironmentlist#1% no \protected as then we cannot use it in alignments (still?) +\permanent\def\processbodyfontenvironmentlist#1% no \protected as then we cannot use it in alignments (still?) {\clf_processbodyfontsizes{\strippedcsname#1}} -\def\bodyfontenvironmentlist +\permanent\def\bodyfontenvironmentlist {\clf_getbodyfontsizes} \def\font_basics_define_body_font_environment_class[#class][#body][#settings]% @@ -1695,10 +1691,10 @@ % we need to check the fontclass -\def\registerfontclass#class% +\permanent\def\registerfontclass#class% {\letgvalue{\??fontclassyes#class}\v!yes} % global ? -\def\setcurrentfontclass#class% +\permanent\def\setcurrentfontclass#class% {\ifcsname\??fontclassyes#class\endcsname \edef\fontclass{#class}% \orelse\ifcsname\??fontclassnop#class\endcsname @@ -1721,7 +1717,7 @@ %D So far for synchronisation. (We can inline the following macros.) -\protected\def\setcurrentfont#body#style#alternative#size% not used +\permanent\protected\def\setcurrentfont#body#style#alternative#size% not used {\edef\fontbody {#body}% \edef\fontstyle {#style}% \edef\fontalternative{#alternative}% @@ -1729,7 +1725,7 @@ \font_helpers_check_big_math_synchronization \font_helpers_synchronize_font} -\protected\def\setcurrentfontbody#body% % not used +\permanent\protected\def\setcurrentfontbody#body% % not used {\edef\fontbody{#body}% \font_helpers_synchronize_font} @@ -1894,8 +1890,8 @@ \lastnamedcs \fi} -\let\applyfontstrategies \font_helpers_check_strategy_a -\let\applyfontclassstrategies\font_helpers_check_strategy_class_a +\permanent\let\applyfontstrategies \font_helpers_check_strategy_a +\permanent\let\applyfontclassstrategies\font_helpers_check_strategy_class_a %D Let's synchronize: @@ -1925,8 +1921,8 @@ {\ifcase\currentxfontsize\else \currentxfontsize\zerocount % also \sx and \sxx ? - \let\tx \normaltx - \let\txx\normaltxx + \enforced\let\tx \normaltx + \enforced\let\txx\normaltxx \fi} \let\font_helpers_check_nested_x_fontsize\relax @@ -1935,14 +1931,14 @@ {\font_helpers_check_nested_x_fontsize \font_helpers_set_current_font_xxx_alternative{#alternative}{4}\scriptstyle \currentxfontsize\plusone - \let\tx\txx} + \enforced\let\tx\txx} \def\font_helpers_set_current_font_xx_alternative#alternative% {\font_helpers_check_nested_x_fontsize \font_helpers_set_current_font_xxx_alternative{#alternative}{5}\scriptscriptstyle \currentxfontsize\plustwo - \let\tx\empty - \let\txx\empty} + \enforced\let\tx\empty + \enforced\let\txx\empty} %D This alterative is not really needed, but for old time's sake we keep it there. %D We can speed it up when needed. @@ -2028,7 +2024,7 @@ % to freeze or not ... -\protected\def\tx +\permanent\protected\def\tx {\currentxfontsize\plusone \ifmmode \scriptstyle @@ -2037,9 +2033,9 @@ \else \font_scale_defined_x \fi - \let\tx\txx} + \enforced\let\tx\txx} -\protected\def\txx +\permanent\protected\def\txx {\currentxfontsize\plustwo \ifmmode \scriptscriptstyle @@ -2048,39 +2044,39 @@ \else \font_scale_defined_xx \fi - \let\tx \empty - \let\txx\empty} + \enforced\let\tx \empty + \enforced\let\txx\empty} -\protected\def\sx +\permanent\protected\def\sx {\currentxfontsize\plusone \ifmmode \scriptstyle \else \font_scale_inherit_x \fi - \let\tx\txx - \let\sx\sxx} + \enforced\let\tx\txx + \enforced\let\sx\sxx} -\protected\def\sxx +\permanent\protected\def\sxx {\currentxfontsize\plustwo \ifmmode \scriptscriptstyle \else \font_scale_inherit_xx \fi - \let\tx \empty - \let\txx\empty - \let\sx \empty - \let\sxx\empty} + \enforced\let\tx \empty + \enforced\let\txx\empty + \enforced\let\sx \empty + \enforced\let\sxx\empty} \permanent\protected\def\useinheritxsizes{\settrue \c_font_inherit_scale} % not yet public, playground for WS and me \permanent\protected\def\usedefinedxsizes{\setfalse\c_font_inherit_scale} % not yet public, playground for WS and me -\let\normaltx \tx -\let\normaltxx\txx +\aliased\let\normaltx \tx +\aliased\let\normaltxx\txx -\let\normalsx \sx -\let\normalsxx\sxx +\aliased\let\normalsx \sx +\aliased\let\normalsxx\sxx %D When asking for a complete font switch, for instance from 10 to 12~points, the %D next macro does the job. First we normalize the size, next we define the current @@ -2088,11 +2084,11 @@ %D math families and finally we activate the default typeface and also set the font %D specific parameters assigned to \type {\everybodyfont}. -\def\textface {\currentbodyfontdimension\s!text } -\def\scriptface {\currentbodyfontdimension\s!script } -\def\scriptscriptface{\currentbodyfontdimension\s!scriptscript} -\def\xtextface {\currentbodyfontdimension\s!x } -\def\xxtextface {\currentbodyfontdimension\s!xx } +\permanent\def\textface {\currentbodyfontdimension\s!text } +\permanent\def\scriptface {\currentbodyfontdimension\s!script } +\permanent\def\scriptscriptface{\currentbodyfontdimension\s!scriptscript} +\permanent\def\xtextface {\currentbodyfontdimension\s!x } +\permanent\def\xxtextface {\currentbodyfontdimension\s!xx } \installcorenamespace{fontbodyfaces} @@ -2107,15 +2103,15 @@ \def\font_basics_set_faces_preset {\edef\font_basics_set_faces{% 0.2 sec on 10K \tfa - \noexpand\edef\noexpand\textface {\currentbodyfontdimension\s!text }% - \noexpand\edef\noexpand\scriptface {\currentbodyfontdimension\s!script }% - \noexpand\edef\noexpand\scriptscriptface{\currentbodyfontdimension\s!scriptscript}% - \noexpand\edef\noexpand\xtextface {\currentbodyfontdimension\s!x }% - \noexpand\edef\noexpand\xxtextface {\currentbodyfontdimension\s!xx }% + \enforced\noexpand\edef\noexpand\textface {\currentbodyfontdimension\s!text }% + \enforced\noexpand\edef\noexpand\scriptface {\currentbodyfontdimension\s!script }% + \enforced\noexpand\edef\noexpand\scriptscriptface{\currentbodyfontdimension\s!scriptscript}% + \enforced\noexpand\edef\noexpand\xtextface {\currentbodyfontdimension\s!x }% + \enforced\noexpand\edef\noexpand\xxtextface {\currentbodyfontdimension\s!xx }% }% \global\letcsname\??fontbodyfaces\fontbody\endcsname\font_basics_set_faces} -\def\currentbodyfontdimension#parameter% there can be factors here +\permanent\def\currentbodyfontdimension#parameter% there can be factors here {\the\dimexpr \ifcsname\??fontenvironments\fontclass\normalizedbodyfontsize#parameter\endcsname \lastnamedcs @@ -2463,6 +2459,8 @@ %D Handy for defining additional glyphs: +% todo: public implementors + \let\getprivateglyphslot\clf_getprivateglyphslot % kind of private macro \let\getprivatechar \clf_getprivatechar % gives back a utf ! diff --git a/tex/context/base/mkiv/font-nod.lua b/tex/context/base/mkiv/font-nod.lua index f3cd37f17..ed307e7c5 100644 --- a/tex/context/base/mkiv/font-nod.lua +++ b/tex/context/base/mkiv/font-nod.lua @@ -19,7 +19,6 @@ local match, rep = string.match, string.rep fonts = fonts or { } nodes = nodes or { } - local fonts = fonts local nodes = nodes local context = context @@ -40,9 +39,6 @@ local tonode = nuts.tonode local injections = nodes.injections or { } nodes.injections = injections -local char_tracers = tracers.characters or { } -tracers.characters = char_tracers - local step_tracers = tracers.steppers or { } tracers.steppers = step_tracers @@ -112,135 +108,9 @@ local function freeze(h,where) end end -function char_tracers.collect(head,list,tag,n) - n = n or 0 - local ok = false - local fn = nil - while head do - local char, id = isglyph(head) - if char then - local font = id - if font ~= fn then - ok, fn = false, font - end - if not ok then - ok = true - n = n + 1 - list[n] = list[n] or { } - list[n][tag] = { } - end - local l = list[n][tag] - -- l[#l+1] = { char, font, i } - l[#l+1] = { char, font } - elseif id == disc_code then - -- skip - -- local pre, post, replace = getdisc(head) - -- if replace then - -- for n in nextglyph, replace do - -- l[#l+1] = { c, f } - -- end - -- end - -- if pre then - -- for n in nextglyph, pre do - -- l[#l+1] = { c, f } - -- end - -- end - -- if post then - -- for n in nextglyph, post do - -- l[#l+1] = { c, f } - -- end - -- end - else - ok = false - end - head = getnext(head) - end -end - -function char_tracers.equal(ta, tb) - if #ta ~= #tb then - return false - else - for i=1,#ta do - local a = ta[i] - local b = tb[i] - -- if a[1] ~= b[1] or a[2] ~= b[2] or a[3] ~= b[3] then - if a[1] ~= b[1] or a[2] ~= b[2] then - return false - end - end - end - return true -end - -function char_tracers.string(t) - local tt = { } - for i=1,#t do - tt[i] = utfchar(t[i][1]) - end - return concat(tt,"") -end - local f_unicode = formatters["%U"] local f_badcode = formatters["{%i}"] -function char_tracers.unicodes(t,decimal) - local tt = { } - for i=1,#t do - local n = t[i][1] - if n == 0 then - tt[i] = "-" - elseif decimal then - tt[i] = n - else - tt[i] = f_unicode(n) - end - end - return concat(tt," ") -end - --- function char_tracers.indices(t,decimal) --- local tt = { } --- for i=1,#t do --- local n = t[i][3] --- if n == 0 then --- tt[i] = "-" --- elseif decimal then --- tt[i] = n --- else --- tt[i] = f_unicode(n) --- end --- end --- return concat(tt," ") --- end - -function char_tracers.start() - local npc = handlers.characters -- should accept nuts too - local list = { } - function handlers.characters(head) - local n = #list - char_tracers.collect(head,list,'before',n) - head = npc(head) -- for the moment tonode - char_tracers.collect(head,list,'after',n) - if #list > n then - list[#list+1] = { } - end - return head - end - function char_tracers.stop() - tracers.list['characters'] = list - local variables = { - ['title'] = 'ConTeXt Character Processing Information', - ['color-background-one'] = lmx.get('color-background-yellow'), - ['color-background-two'] = lmx.get('color-background-purple'), - } - lmx.show('context-characters.lmx',variables) - handlers.characters = npc - tasks.restart("processors", "characters") - end - tasks.restart("processors", "characters") -end - local stack = { } function tracers.start(tag) diff --git a/tex/context/base/mkiv/font-sty.mklx b/tex/context/base/mkiv/font-sty.mklx index 7dc3116f6..0cb76eee9 100644 --- a/tex/context/base/mkiv/font-sty.mklx +++ b/tex/context/base/mkiv/font-sty.mklx @@ -55,18 +55,20 @@ \newconstant\c_fonts_basics_alternative_style_method +% maybe permanent + \def\font_basics_define_alternative_style_indeed#variantone#varianttwo#command% {\setuvalue{\??alternativestyle#command}{\font_helpers_apply_alternative_style{#variantone}{#varianttwo}}% \ifcsname#command\endcsname % no redefinition \orelse\ifnum\c_fonts_basics_alternative_style_method=\plusone \ifthirdargument - \setuevalue{#command}{\triggergroupedcommandcs\begincsname\??alternativestyle#command\endcsname}% + \permanent\setuevalue{#command}{\triggergroupedcommandcs\begincsname\??alternativestyle#command\endcsname}% \else - \setuvalue{#command}{\triggergroupedcommand{#variantone}}% + \permanent\setuvalue{#command}{\triggergroupedcommand{#variantone}}% \fi \else - \setuvalue{#command}{\triggergroupedcommand{#variantone}}% + \permanent\setuvalue{#command}{\triggergroupedcommand{#variantone}}% \fi} \def\font_helpers_apply_alternative_style diff --git a/tex/context/base/mkiv/math-def.mkiv b/tex/context/base/mkiv/math-def.mkiv index 14ceeb61e..901f075d3 100644 --- a/tex/context/base/mkiv/math-def.mkiv +++ b/tex/context/base/mkiv/math-def.mkiv @@ -15,13 +15,15 @@ \unprotect -%D Some day this will be done at the lua end. +\pushoverloadmode % cap etc \startluacode mathematics.define(\number\defaultmathfamily) -- mathematics.xml.registerentities() \stopluacode +\popoverloadmode + \activatemathcharacters %D The \mfunction macro is an alternative for \hbox with a controlable font diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua index 140acd185..8a6f4b4f8 100644 --- a/tex/context/base/mkiv/mlib-pps.lua +++ b/tex/context/base/mkiv/mlib-pps.lua @@ -501,8 +501,8 @@ implement { arguments = { "dimen", "dimen", "dimen" }, actions = function(wd,ht,dp) local hd = ht + dp - setmacro("sx",wd ~= 0 and factor/wd or 0) - setmacro("sy",hd ~= 0 and factor/hd or 0) + setmacro("mlib_sx",wd ~= 0 and factor/wd or 0) + setmacro("mlib_sy",hd ~= 0 and factor/hd or 0) end } diff --git a/tex/context/base/mkiv/mlib-pps.mkiv b/tex/context/base/mkiv/mlib-pps.mkiv index 051130585..74d6ae142 100644 --- a/tex/context/base/mkiv/mlib-pps.mkiv +++ b/tex/context/base/mkiv/mlib-pps.mkiv @@ -86,7 +86,7 @@ \unexpanded\def\MPLIBfigure#1#2% {\setbox\scratchbox\hpack{\externalfigure[#1][\c!mask=#2]}% \clf_mpsetsxsy\wd\scratchbox\ht\scratchbox\zeropoint - \vpack to \zeropoint{\vss\hpack to \zeropoint{\fastsxsy{\sx}{\sy}{\box\scratchbox}\hss}}} + \vpack to \zeropoint{\vss\hpack to \zeropoint{\fastsxsy{\mlib_sx}{\mlib_sy}{\box\scratchbox}\hss}}} % horrible (we could inline scale and matrix code): diff --git a/tex/context/base/mkiv/mlib-pps.mkxl b/tex/context/base/mkiv/mlib-pps.mkxl index 6f6db4c14..3830de762 100644 --- a/tex/context/base/mkiv/mlib-pps.mkxl +++ b/tex/context/base/mkiv/mlib-pps.mkxl @@ -83,7 +83,7 @@ \permanent\protected\def\MPLIBfigure#1#2% {\setbox\scratchbox\hpack{\externalfigure[#1][\c!mask=#2]}% \clf_mpsetsxsy\wd\scratchbox\ht\scratchbox\zeropoint - \vpack to \zeropoint{\vss\hpack to \zeropoint{\fastsxsy{\sx}{\sy}{\box\scratchbox}\hss}}} + \vpack to \zeropoint{\vss\hpack to \zeropoint{\fastsxsy{\mlib_sx}{\mlib_sy}{\box\scratchbox}\hss}}} % horrible (we could inline scale and matrix code): diff --git a/tex/context/base/mkiv/node-fin.mkxl b/tex/context/base/mkiv/node-fin.mkxl new file mode 100644 index 000000000..183e02429 --- /dev/null +++ b/tex/context/base/mkiv/node-fin.mkxl @@ -0,0 +1,78 @@ +%D \module +%D [ file=attr-ini, +%D version=2007.06.06, % probably a bit older +%D title=\CONTEXT\ Node Macros, +%D subtitle=Finalizing, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Node Support / Finalizing} + +\unprotect + +\registerctxluafile{node-shp}{optimize} +% \registerctxluafile{node-fin}{autosuffix,optimize} % we might generalize this one +\registerctxluafile{node-fin}{optimize} % we might generalize this one + +\permanent\protected\def\finalizeobjectbox #1{\clf_finalizebox#1\relax} +\permanent\protected\def\finalizeshipoutbox#1{\clf_finalizebox#1\relax} + +% Experimental (for Aditya): + +\permanent\protected\def\cleanupbox#1{\clf_cleanupbox#1\relax} + +% Tricky stuff: this might become obsolete. It is about time to check this out +% now (after more than a decade)! The few times that we need this we can better +% copy some of the sensitive attributes (mostly color). + +\definesystemattribute[trigger][public] + +\newcount\c_syst_attr_trigger + +\permanent\edef\startinheritattributes{\c_attr_trigger\plusone} +\permanent\edef\stopinheritattributes {\c_attr_trigger\attributeunsetvalue} + +\permanent\def\syst_attr_trigger_copy_yes{\afterassignment\syst_attr_trigger_copy_indeed\c_syst_attr_trigger} +\permanent\def\syst_attr_trigger_dump_yes{\afterassignment\syst_attr_trigger_dump_indeed\c_syst_attr_trigger} + +\def\syst_attr_trigger_copy_indeed + {\ifvbox\c_syst_attr_trigger + \vpack attr \triggerattribute \plusone {\unvcopy\c_syst_attr_trigger}% + \else + \hpack attr \triggerattribute \plusone {\unhcopy\c_syst_attr_trigger}% + \fi} + +\def\syst_attr_trigger_dump_indeed + {\ifvbox\c_syst_attr_trigger + \vpack attr \triggerattribute \plusone {\unvbox\c_syst_attr_trigger}% + \else + \hpack attr \triggerattribute \plusone {\unhbox\c_syst_attr_trigger}% + \fi} + +\permanent\protected\def\enableattributeinheritance + {\clf_enablestatetriggering + \enforced\let\attributedcopy\syst_attr_trigger_copy_yes + \enforced\let\attributedbox \syst_attr_trigger_dump_yes} + +\permanent\protected\def\disableattributeinheritance + {\clf_disablestatetriggering + \enforced\let\attributedcopy\copy + \enforced\let\attributedbox \box} + +\disableattributeinheritance + +\installtexdirective + {attributes.inheritance} + {\enableattributeinheritance} + {\disableattributeinheritance} + +% \appendtoks +% \enableattributeinheritance % might become default +% \to\everyjob + +\protect \endinput diff --git a/tex/context/base/mkiv/node-ini.mkiv b/tex/context/base/mkiv/node-ini.mkiv index b52695ef6..10a486e88 100644 --- a/tex/context/base/mkiv/node-ini.mkiv +++ b/tex/context/base/mkiv/node-ini.mkiv @@ -17,10 +17,6 @@ \newcount\filterstate \filterstate\plusone % hm, public -\ifcase\contextlmtxmode \else - \registerctxluafile{node-cmp}{autosuffix} -\fi - \registerctxluafile{node-ini}{autosuffix} \registerctxluafile{node-met}{} \registerctxluafile{node-nut}{autosuffix} @@ -54,14 +50,4 @@ \unexpanded\def\visualizenextnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,false,true)}}} \unexpanded\def\visualizeflatnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,true,true)}}} -\unexpanded\def\starttracingnodes[#1]{\ctxlua{nodes.tracers.characters.start("#1")}} -\unexpanded\def\stoptracingnodes {\ctxlua{nodes.tracers.characters.stop()}} - -% \starttext -% \starttracingnodes[characters] -% \input tufte \par -% \input tufte \par -% \stoptracingnodes -% \stoptext - \protect \endinput diff --git a/tex/context/base/mkiv/node-ini.mkxl b/tex/context/base/mkiv/node-ini.mkxl new file mode 100644 index 000000000..4cb322448 --- /dev/null +++ b/tex/context/base/mkiv/node-ini.mkxl @@ -0,0 +1,56 @@ +%D \module +%D [ file=node-ini, +%D version=2006.08.20, +%D title=\CONTEXT\ Node Macros, +%D subtitle=Initialization, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Node Support / Initialization} + +\unprotect + +\newcount\filterstate \filterstate\plusone % hm, public + +\registerctxluafile{node-cmp}{autosuffix} +\registerctxluafile{node-ini}{autosuffix} +\registerctxluafile{node-met}{} +\registerctxluafile{node-nut}{autosuffix} +\registerctxluafile{node-res}{} +%registerctxluafile{node-ppt}{} % experimental, not used so probably useless +\registerctxluafile{node-aux}{autosuffix} +\registerctxluafile{node-gcm}{autosuffix} +\registerctxluafile{node-tst}{} +\registerctxluafile{node-tra}{} % we might split it off (module) +\registerctxluafile{node-snp}{autosuffix} +\registerctxluafile{node-tsk}{} +\registerctxluafile{node-tex}{autosuffix} +\registerctxluafile{node-dir}{} % experimental, not yet (and maybe never) used +\registerctxluafile{node-pro}{} +\registerctxluafile{node-ser}{autosuffix} +\registerctxluafile{node-ext}{} +\registerctxluafile{node-acc}{} % experimental +%registerctxluafile{node-prp}{} % makes no sense (yet) +\registerctxluafile{node-scn}{} +\registerctxluafile{node-syn}{} +\registerctxluafile{node-par}{autosuffix} + +%D This might go away (needs checking anyway, very old code): + +\newcount\c_node_tracers_show_box % box number + +\permanent\protected\def\shownextnodes{\afterassignment\node_tracers_show_next\c_node_tracers_show_box} +\permanent\protected\def\showflatnodes{\afterassignment\node_tracers_show_flat\c_node_tracers_show_box} + +\def\node_tracers_show_next{\ctxlua{texio.write_nl('log',nodes.serializebox(\number\c_node_tracers_show_box,false,true))}} +\def\node_tracers_show_flat{\ctxlua{texio.write_nl('log',nodes.serializebox(\number\c_node_tracers_show_box,true, true))}} + +\permanent\protected\def\visualizenextnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,false,true)}}} +\permanent\protected\def\visualizeflatnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,true,true)}}} + +\protect \endinput diff --git a/tex/context/base/mkiv/node-pag.lua b/tex/context/base/mkiv/node-pag.lua deleted file mode 100644 index 9b8202042..000000000 --- a/tex/context/base/mkiv/node-pag.lua +++ /dev/null @@ -1,30 +0,0 @@ -if not modules then modules = { } end modules ['node-pag'] = { - version = 1.001, - comment = "companion to node-pag.mkiv", - author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", - copyright = "PRAGMA ADE / ConTeXt Development Team", - license = "see context related readme files" -} - --- this callback might disappear and come back in the same way --- as par builders - -pagebuilders = pagebuilders or { } - -local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming - -local actions = nodes.tasks.actions("pagebuilders") - -local function processor(head,groupcode,size,packtype,maxdepth,direction) - starttiming(pagebuilders) - local _, done = actions(head,groupcode,size,packtype,maxdepth,direction) - stoptiming(pagebuilders) - return (done and head) or true --- return vpack(head) -end - ---~ callbacks.register('pre_output_filter', processor, "preparing output box") - ---~ statistics.register("output preparation time", function() ---~ return statistics.elapsedseconds(pagebuilders) ---~ end) diff --git a/tex/context/base/mkiv/node-pag.mkiv b/tex/context/base/mkiv/node-pag.mkiv deleted file mode 100644 index 970939dcf..000000000 --- a/tex/context/base/mkiv/node-pag.mkiv +++ /dev/null @@ -1,20 +0,0 @@ -%D \module -%D [ file=node-pag, -%D version=2008.09.30, -%D title=\CONTEXT\ Node Macros, -%D subtitle=Page Building, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -\writestatus{loading}{ConTeXt Node Macros / Page Building} - -\unprotect - -\registerctxluafile{node-pag}{} - -\protect \endinput diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 842543ac0..01700f5fc 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 30b41d6e6..09db66519 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-not.mklx b/tex/context/base/mkiv/strc-not.mklx index dbdc1c26d..299873830 100644 --- a/tex/context/base/mkiv/strc-not.mklx +++ b/tex/context/base/mkiv/strc-not.mklx @@ -1855,26 +1855,26 @@ %D Compatibility macros: -\permanent\protected\def\setupfootnotedefinition{\setupnotation [\v!footnote]} -\permanent\protected\def\setupfootnotes {\setupnote [\v!footnote]} -\permanent \def\footnotetext {\setnotetext [\v!footnote]} -\permanent\protected\def\placefootnotes {\dodoubleempty\strc_notes_place_footnotes [\v!footnote]} -\permanent\protected\def\placelocalfootnotes {\dodoubleempty\strc_notes_place_local_footnotes[\v!footnote]} -\permanent\protected\def\startlocalfootnotes {\startlocalnotes [\v!footnote]} % alleen footnote +\permanent\protected\def\setupfootnotedefinition{\setupnotation [\v!footnote]} +\permanent\protected\def\setupfootnotes {\setupnote [\v!footnote]} +\permanent \def\footnotetext {\setnotetext [\v!footnote]} +\permanent\protected\def\placefootnotes {\strc_notes_place_footnotes [\v!footnote]} +\permanent\protected\def\placelocalfootnotes {\strc_notes_place_local_footnotes[\v!footnote]} +\permanent\protected\def\startlocalfootnotes {\startlocalnotes [\v!footnote]} % alleen footnote \permanent\protected\def\stoplocalfootnotes {\stoplocalnotes } -\def\strc_notes_place_footnotes[#list][#settings]% - {\ifsecondargument - \placenotes[#list][#settings,\c!height=\textheight]% - \else +\tolerant\def\strc_notes_place_footnotes[#list]#spacer[#settings]% + {\ifarguments\or \placenotes[#list][\c!height=\textheight]% + \or + \placenotes[#list][#settings,\c!height=\textheight]% \fi} -\def\strc_notes_place_local_footnotes[#list][#settings]% - {\ifsecondargument - \placelocalnotes[#list][#settings,\c!height=\textheight]% - \else +\tolerant\def\strc_notes_place_local_footnotes[#list]#spacer[#settings]% + {\ifarguments\or \placelocalnotes[#list][\c!height=\textheight]% + \or + \placelocalnotes[#list][#settings,\c!height=\textheight]% \fi} %D Goodies: diff --git a/tex/context/base/mkiv/strc-tag.mkxl b/tex/context/base/mkiv/strc-tag.mkxl index ebe1f4c2f..08d8fef6c 100644 --- a/tex/context/base/mkiv/strc-tag.mkxl +++ b/tex/context/base/mkiv/strc-tag.mkxl @@ -344,12 +344,12 @@ \fi} \protected\def\strc_tags_enable_properties - {\let\getelementtag \strc_tags_get_element_tag - \let\setupelementuserproperties\strc_tags_set_element_user_properties} + {\enforced\let\getelementtag \strc_tags_get_element_tag + \enforced\let\setupelementuserproperties\strc_tags_set_element_user_properties} \protected\def\strc_tags_disable_properties - {\let\getelementtag \donothing - \let\setupelementuserproperties\gobbletwooptionals} + {\enforced\let\getelementtag \donothing + \enforced\let\setupelementuserproperties\gobbletwooptionals} %D The triggers: diff --git a/tex/context/base/mkiv/syst-aux.mkxl b/tex/context/base/mkiv/syst-aux.mkxl index 8847cb6b1..5410590a6 100644 --- a/tex/context/base/mkiv/syst-aux.mkxl +++ b/tex/context/base/mkiv/syst-aux.mkxl @@ -201,11 +201,11 @@ \permanent\def\gobbleeightarguments #-#-#-#-#-#-{} \permanent\def\gobbleninearguments #-#-#-#-#-#-#-{} -\permanent\def\gobbleoneoptional [#-]{} -\permanent\def\gobbletwooptionals [#-][#-]{} -\permanent\def\gobblethreeoptionals[#-][#-][#-]{} -\permanent\def\gobblefouroptionals [#-][#-][#-][#-]{} -\permanent\def\gobblefiveoptionals [#-][#-][#-][#-][#-]{} +\permanent\tolerant\def\gobbleoneoptional [#-]{} +\permanent\tolerant\def\gobbletwooptionals [#-]#*[#-]{} +\permanent\tolerant\def\gobblethreeoptionals[#-]#*[#-]#*[#-]{} +\permanent\tolerant\def\gobblefouroptionals [#-]#*[#-]#*[#-]#*[#-]{} +\permanent\tolerant\def\gobblefiveoptionals [#-]#*[#-]#*[#-]#*[#-]#*[#-]{} %D Reserved macros for tests: diff --git a/tex/context/base/mkiv/trac-ctx.mkxl b/tex/context/base/mkiv/trac-ctx.mkxl new file mode 100644 index 000000000..656a7a9aa --- /dev/null +++ b/tex/context/base/mkiv/trac-ctx.mkxl @@ -0,0 +1,58 @@ +%D \module +%D [ file=trac-ctx, +%D version=2012.07.13, +%D title=\CONTEXT\ Tracing Macros, +%D subtitle=TeX Trackers, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Tracing Macros / TeX Trackers} + +\registerctxluafile{trac-ctx}{} + +\unprotect + +\permanent\protected\def\installtextracker #1#2#3{\clf_installtextracker {#1}{\detokenize{#2}}{\detokenize{#3}}} +\permanent\protected\def\installtexdirective #1#2#3{\clf_installtexdirective {#1}{\detokenize{#2}}{\detokenize{#3}}} +\permanent\protected\def\installtexexperiment#1#2#3{\clf_installtexexperiment{#1}{\detokenize{#2}}{\detokenize{#3}}} + +\appendtoks + \clf_initializetextrackers + \clf_initializetexdirectives + \clf_initializetexexperiments +\to \everyjob + +\protect \endinput + +% this is one option: +% +% \newconditional\c_math_virtual_tx +% \newconditional\c_math_virtual_px +% \newconditional\c_math_virtual_lm +% +% \installtexdirective {fonts.math.virtual.tx} {\settrue \c_math_virtual_tx} {\setfalse\c_math_virtual_tx} +% \installtexdirective {fonts.math.virtual.px} {\settrue \c_math_virtual_px} {\setfalse\c_math_virtual_px} +% \installtexdirective {fonts.math.virtual.lm} {\settrue \c_math_virtual_lm} {\setfalse\c_math_virtual_lm} +% +% but as it makes the typescript look ugly we wil use: +% +% \installtexdirective {fonts.math.virtual.tx} {\enablemode[fonts.math.virtual.tx]} {\disablemode[fonts.math.virtual.tx]} +% \installtexdirective {fonts.math.virtual.px} {\enablemode[fonts.math.virtual.px]} {\disablemode[fonts.math.virtual.px]} +% \installtexdirective {fonts.math.virtual.lm} {\enablemode[fonts.math.virtual.lm]} {\disablemode[fonts.math.virtual.lm]} +% +% which could be: +% +% \def\mode_f_m_v_tx{fonts.math.virtual.tx} +% \def\mode_f_m_v_px{fonts.math.virtual.px} +% \def\mode_f_m_v_lm{fonts.math.virtual.lm} +% +% \installtexdirective \mode_f_m_v_tx {\enablemode[\mode_f_m_v_tx]} {\disablemode[\mode_f_m_v_tx]} +% \installtexdirective \mode_f_m_v_px {\enablemode[\mode_f_m_v_px]} {\disablemode[\mode_f_m_v_px]} +% \installtexdirective \mode_f_m_v_lm {\enablemode[\mode_f_m_v_lm]} {\disablemode[\mode_f_m_v_lm]} +% +% alas .. we don't want to define this in the core diff --git a/tex/context/base/mkiv/trac-deb.lmt b/tex/context/base/mkiv/trac-deb.lmt index 88d686462..b9827c3a9 100644 --- a/tex/context/base/mkiv/trac-deb.lmt +++ b/tex/context/base/mkiv/trac-deb.lmt @@ -13,147 +13,53 @@ local status = status local tonumber, tostring, type = tonumber, tostring, type local format, concat, match, find, gsub = string.format, table.concat, string.match, string.find, string.gsub -local lpegmatch = lpeg.match --- maybe tracers -> tracers.tex (and tracers.lua for current debugger) +local report_nl = logs.newline +local report_str = logs.writer ------ report_tex = logs.reporter("tex error") ------ report_lua = logs.reporter("lua error") -local report_nl = logs.newline -local report_str = logs.writer +tracers = tracers or { } +local tracers = tracers -tracers = tracers or { } -local tracers = tracers +local implement = interfaces.implement --- this is old tracing stuff ... will go to its own module +local ioflush = io.flush +local ioread = io.read +local writenl = texio.write_nl +local write = texio.write -tracers.lists = { } -local lists = tracers.lists +local runlocal = tex.runlocal +local terminaldata = false +local context = context -tracers.strings = { } -local strings = tracers.strings - -local texgetdimen = tex.getdimen -local texgettoks = tex.gettoks -local texgetcount = tex.getcount -local texgethelp = tex.gethelptext or function() end -local fatalerror = tex.fatalerror - -local implement = interfaces.implement - --- this is used in lmx files but needs to be redone - -strings.undefined = "undefined" - -function tracers.dimen(name) - local d = texgetdimen(name) - return d and number.topoints(d) or strings.undefined -end - -function tracers.count(name) - return texgetcount(name) or strings.undefined -end - -function tracers.toks(name,limit) - local t = texgettoks(name) - return t and string.limit(t,tonumber(limit) or 40) or strings.undefined -end - -function tracers.primitive(name) - return tex[name] or strings.undefined -end - -lists.scratch = { - 0, 2, 4, 6, 8 -} - -lists.internals = { - 'p:hsize', 'p:parindent', 'p:leftskip','p:rightskip', - 'p:vsize', 'p:parskip', 'p:baselineskip', 'p:lineskip', 'p:topskip' -} - -lists.context = { - 'd:lineheight', - 'c:realpageno', 'c:userpageno', 'c:pageno', 'c:subpageno' -} - -local types = { - ['d'] = tracers.dimen, - ['c'] = tracers.count, - ['t'] = tracers.toks, - ['p'] = tracers.primitive +interfaces.implement { + name = "fetchterminaldata", + actions = function() + context(terminaldata) + end, } -local splitboth = lpeg.splitat(":") - -function tracers.type(csname) - local tag, name = lpegmatch(splitboth,csname) - return tag or "" -end - -function tracers.name(csname) - local tag, name = lpegmatch(splitboth,csname) - return name or csname -end - -function tracers.cs(csname) - local tag, name = lpegmatch(splitboth,csname) - if name and types[tag] then - return types[tag](name) - else - return tracers.primitive(csname) - end -end - -function tracers.knownlist(name) - local l = lists[name] - return l and #l > 0 -end - --- till here - -do - - local ioflush = io.flush - local ioread = io.read - local writenl = texio.write_nl - local write = texio.write - - local runlocal = tex.runlocal - local terminaldata = false - local context = context - - interfaces.implement { - name = "fetchterminaldata", - actions = function() - context(terminaldata) - end, - } - - function texio.terminal() - writenl("\n" .. "entering interactive mode, use \\quit to abort reading" .."\n\n") - while true do - write(">") - ioflush() - terminaldata = ioread() - if terminaldata == "\\quit" then - terminaldata = false - break - else - runlocal("t_syst_terminal_data",nil,nil,true) -- obeymode - end +function texio.terminal() + writenl("\n" .. "entering interactive mode, use \\quit to abort reading" .."\n\n") + while true do + write(">") + ioflush() + terminaldata = ioread() + if terminaldata == "\\quit" then + terminaldata = false + break + else + runlocal("t_syst_terminal_data",nil,nil,true) -- obeymode end end - - interfaces.implement { - name = "readfromterminal", - public = true, - protected = true, - actions = texio.terminal, - } - end +interfaces.implement { + name = "readfromterminal", + public = true, + protected = true, + actions = texio.terminal, +} + local savedluaerror = nil local usescitelexer = nil local quitonerror = true @@ -408,15 +314,6 @@ local function reportback(lmxname,default,variables) end end -function lmx.showdebuginfo(lmxname) - local variables = { - ['title'] = 'ConTeXt Debug Information', - ['color-background-one'] = lmx.get('color-background-green'), - ['color-background-two'] = lmx.get('color-background-blue'), - } - reportback(lmxname,"context-debug.lmx",variables) -end - local function showerror(lmxname) local readstate = status.readstate() local filename = readstate.filename @@ -491,22 +388,21 @@ directives.register("system.showerror", lmx.overloaderror) local implement = interfaces.implement -implement { name = "showtrackers", actions = trackers.show } -implement { name = "enabletrackers", actions = trackers.enable, arguments = "string" } -implement { name = "disabletrackers", actions = trackers.disable, arguments = "string" } -implement { name = "resettrackers", actions = trackers.reset } +implement { name = "showtrackers", public = true, protected = true, actions = trackers.show } +implement { name = "enabletrackers", public = true, protected = true, actions = trackers.enable, arguments = "optional" } +implement { name = "disabletrackers", public = true, protected = true, actions = trackers.disable, arguments = "optional" } +implement { name = "resettrackers", public = true, protected = true, actions = trackers.reset } -implement { name = "showdirectives", actions = directives.show } -implement { name = "enabledirectives", actions = directives.enable, arguments = "string" } -implement { name = "disabledirectives", actions = directives.disable, arguments = "string" } +implement { name = "showdirectives", public = true, protected = true, actions = directives.show } +implement { name = "enabledirectives", public = true, protected = true, actions = directives.enable, arguments = "optional" } +implement { name = "disabledirectives", public = true, protected = true, actions = directives.disable, arguments = "optional" } -implement { name = "showexperiments", actions = experiments.show } -implement { name = "enableexperiments", actions = experiments.enable, arguments = "string" } -implement { name = "disableexperiments", actions = experiments.disable, arguments = "string" } +implement { name = "showexperiments", public = true, protected = true, actions = experiments.show } +implement { name = "enableexperiments", public = true, protected = true, actions = experiments.enable, arguments = "optional" } +implement { name = "disableexperiments", public = true, protected = true, actions = experiments.disable, arguments = "optional" } -implement { name = "showdebuginfo", actions = lmx.showdebuginfo } -implement { name = "overloaderror", actions = lmx.overloaderror } -implement { name = "showlogcategories", actions = logs.show } +implement { name = "overloaderror", public = true, protected = true, actions = lmx.overloaderror } +implement { name = "showlogcategories", public = true, protected = true, actions = logs.show } local debugger = utilities.debugger diff --git a/tex/context/base/mkiv/trac-deb.lua b/tex/context/base/mkiv/trac-deb.lua index 4667b66ee..a6154e5dc 100644 --- a/tex/context/base/mkiv/trac-deb.lua +++ b/tex/context/base/mkiv/trac-deb.lua @@ -13,106 +13,13 @@ local status = status local tonumber, tostring, type = tonumber, tostring, type local format, concat, match, find, gsub = string.format, table.concat, string.match, string.find, string.gsub -local lpegmatch = lpeg.match --- maybe tracers -> tracers.tex (and tracers.lua for current debugger) +local report_nl = logs.newline +local report_str = logs.writer ------ report_tex = logs.reporter("tex error") ------ report_lua = logs.reporter("lua error") -local report_nl = logs.newline -local report_str = logs.writer - -tracers = tracers or { } -local tracers = tracers - --- this is old tracing stuff ... will go to its own module - -tracers.lists = { } -local lists = tracers.lists - -tracers.strings = { } -local strings = tracers.strings - -local texgetdimen = tex.getdimen -local texgettoks = tex.gettoks -local texgetcount = tex.getcount -local texgethelp = tex.gethelptext or function() end -local fatalerror = tex.fatalerror - -local implement = interfaces.implement - --- this is used in lmx files but needs to be redone - -strings.undefined = "undefined" - -function tracers.dimen(name) - local d = texgetdimen(name) - return d and number.topoints(d) or strings.undefined -end - -function tracers.count(name) - return texgetcount(name) or strings.undefined -end - -function tracers.toks(name,limit) - local t = texgettoks(name) - return t and string.limit(t,tonumber(limit) or 40) or strings.undefined -end - -function tracers.primitive(name) - return tex[name] or strings.undefined -end - -lists.scratch = { - 0, 2, 4, 6, 8 -} - -lists.internals = { - 'p:hsize', 'p:parindent', 'p:leftskip','p:rightskip', - 'p:vsize', 'p:parskip', 'p:baselineskip', 'p:lineskip', 'p:topskip' -} - -lists.context = { - 'd:lineheight', - 'c:realpageno', 'c:userpageno', 'c:pageno', 'c:subpageno' -} - -local types = { - ['d'] = tracers.dimen, - ['c'] = tracers.count, - ['t'] = tracers.toks, - ['p'] = tracers.primitive -} - -local splitboth = lpeg.splitat(":") - -function tracers.type(csname) - local tag, name = lpegmatch(splitboth,csname) - return tag or "" -end - -function tracers.name(csname) - local tag, name = lpegmatch(splitboth,csname) - return name or csname -end - -function tracers.cs(csname) - local tag, name = lpegmatch(splitboth,csname) - if name and types[tag] then - return types[tag](name) - else - return tracers.primitive(csname) - end -end - -function tracers.knownlist(name) - local l = lists[name] - return l and #l > 0 -end - --- till here - --- for now here +tracers = tracers or { } +local tracers = tracers +local implement = interfaces.implement local savedluaerror = nil local usescitelexer = nil @@ -349,15 +256,6 @@ local function reportback(lmxname,default,variables) end end -function lmx.showdebuginfo(lmxname) - local variables = { - ['title'] = 'ConTeXt Debug Information', - ['color-background-one'] = lmx.get('color-background-green'), - ['color-background-two'] = lmx.get('color-background-blue'), - } - reportback(lmxname,"context-debug.lmx",variables) -end - local function showerror(lmxname) local filename, linenumber, errorcontext = status.filename, tonumber(status.linenumber) or 0, "" if not filename then @@ -443,7 +341,6 @@ implement { name = "showexperiments", actions = experiments.show } implement { name = "enableexperiments", actions = experiments.enable, arguments = "string" } implement { name = "disableexperiments", actions = experiments.disable, arguments = "string" } -implement { name = "showdebuginfo", actions = lmx.showdebuginfo } implement { name = "overloaderror", actions = lmx.overloaderror } implement { name = "showlogcategories", actions = logs.show } diff --git a/tex/context/base/mkiv/trac-deb.mkiv b/tex/context/base/mkiv/trac-deb.mkiv index 77f54b5aa..fefd55142 100644 --- a/tex/context/base/mkiv/trac-deb.mkiv +++ b/tex/context/base/mkiv/trac-deb.mkiv @@ -40,10 +40,4 @@ % \enabledirectives[system.showerror] -\ifcase\contextlmtxmode \else - \newtoks \t_syst_terminal_data - % \t_syst_terminal_data {\beginlocalcontrol\clf_fetchterminaldata\endlocalcontrol} - \t_syst_terminal_data {\clf_fetchterminaldata} -\fi - \protect \endinput diff --git a/tex/context/base/mkiv/trac-deb.mkxl b/tex/context/base/mkiv/trac-deb.mkxl new file mode 100644 index 000000000..37a901aa3 --- /dev/null +++ b/tex/context/base/mkiv/trac-deb.mkxl @@ -0,0 +1,48 @@ +%D \module +%D [ file=trac-deb, +%D version=2005.11.06, +%D title=\CONTEXT\ Tracing Macros, +%D subtitle=Debugger, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Tracing Macros / Debugger} + +%registerctxluafile{trac-lmx}{} +\registerctxluafile{trac-deb}{autosuffix} + +\unprotect + +\permanent\protected\def\breakpoint{\showdebuginfo\wait} + +% \showtrackers % defined at the lua end +% \enabletrackers [#1] % defined at the lua end +% \disabletrackers [#1] % defined at the lua end +% \resettrackers % defined at the lua end +% +% \showdirectives % defined at the lua end +% \enabledirectives [#1] % defined at the lua end +% \disabledirectives [#1] % defined at the lua end +% +% \showexperiments % defined at the lua end +% \enableexperiments [#1] % defined at the lua end +% \disableexperiments[#1] % defined at the lua end +% +% \showdebuginfo % defined at the lua end +% \overloaderror % defined at the lua end +% +% \showlogcategories % defined at the lua end + +% \enabledirectives[system.showerror] + +\newtoks \t_syst_terminal_data + +%t_syst_terminal_data {\beginlocalcontrol\clf_fetchterminaldata\endlocalcontrol} +\t_syst_terminal_data {\clf_fetchterminaldata} + +\protect \endinput diff --git a/tex/context/base/mkiv/trac-jus.mkxl b/tex/context/base/mkiv/trac-jus.mkxl new file mode 100644 index 000000000..0eacc886d --- /dev/null +++ b/tex/context/base/mkiv/trac-jus.mkxl @@ -0,0 +1,24 @@ +%D \module +%D [ file=trac-jus, +%D version=2012.11.27, +%D title=\CONTEXT\ Tracing Macros, +%D subtitle=Justification, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Tracing Macros / Justification} + +\registerctxluafile{trac-jus}{} + +\unprotect + +\definesystemattribute [justification] [public] + +\protected\def\showjustification{\clf_showjustification} % currently no argument (default 1), todo: public implementor + +\protect \endinput diff --git a/tex/context/base/mkiv/trac-tex.mkxl b/tex/context/base/mkiv/trac-tex.mkxl new file mode 100644 index 000000000..f9c763c4f --- /dev/null +++ b/tex/context/base/mkiv/trac-tex.mkxl @@ -0,0 +1,69 @@ +%D \module +%D [ file=trac-tex, +%D version=2009.07.20, +%D title=\CONTEXT\ Tracking Macros, +%D subtitle=\TEX, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Tracking Macros / TeX} + +\registerctxluafile{trac-tex}{} + +%D All tracing flags at the \TEX\ end will be redone this way so +%D that we have a similar mechanism for \TEX\ and \LUA. Also, the +%D currently used if's might become conditionals. + +\unprotect + +% \def\enabletextracerwhatever {...} +% \def\disabletextracerwhatever{...} + +\mutable\let\alltextracers\empty % so that we can report available tracers + +\permanent\protected\def\installtextracer#1% + {\addtocommalist{#1}\alltextracers} + +\permanent\protected\def\enabletextracers [#1]{\processcommalist[#1]\syst_textracers_enable } +\permanent\protected\def\disabletextracers[#1]{\processcommalist[#1]\syst_textracers_disable} + +\def\syst_textracers_enable #1{\begincsname enabletracer#1\endcsname} +\def\syst_textracers_disable#1{\begincsname disabletracer#1\endcsname} + +% The next one is for Taco, although we can use directives as well: + +\protected\def\nomkivstatistics{\enabledirectives[system.nostatistics]} + +%D This is not really a tracker but for decades it lived in my \type {cont-loc} +%D file. I moved it here because I wanted someone else to use it. This macro is not +%D really useful for users. I kept the \LUA\ variant in \type {cont-loc.mkiv}. + +\installcorenamespace{profilemacrocount} +\installcorenamespace{profilemacromacro} + +\newtoks\t_syst_profile + +\appendtoks + \the\t_syst_profile +\to \everystoptext + +\permanent\protected\def\profilemacro#1% an oldie, but modernized a bit + {\edef\p_name{\csstring#1}% + \ifcsname\??profilemacrocount\p_name\endcsname \else + \expandafter\newcount\csname\??profilemacrocount\p_name\endcsname + \letcsname\??profilemacromacro\p_name\endcsname#1% + \xtoksapp\t_syst_profile + {\writestatus + {profile}% + {\string#1: \noexpand\the\csname\??profilemacrocount\p_name\endcsname}}% + \enforced\protected\xdef#1% + {\global\advance\csname\??profilemacrocount\p_name\endcsname\plusone + \expandafter\noexpand\csname\??profilemacromacro\p_name\endcsname}% + \fi} + +\protect \endinput diff --git a/tex/context/base/mkiv/typo-cap.mkxl b/tex/context/base/mkiv/typo-cap.mkxl index 1674f1eed..587ab62ef 100644 --- a/tex/context/base/mkiv/typo-cap.mkxl +++ b/tex/context/base/mkiv/typo-cap.mkxl @@ -81,6 +81,8 @@ \protected\def\typo_capitale_Words{\clf_setcharactercasing{\v!Words}\fontid\font} \protected\def\typo_capitale_camel{\clf_setcharactercasing{\v!camel}\fontid\font} +\pushoverloadmode + \permanent\protected\def\WORD {\triggergroupedcommandcs\typo_capitale_WORD } \permanent\protected\def\word {\triggergroupedcommandcs\typo_capitale_word } \permanent\protected\def\Word {\triggergroupedcommandcs\typo_capitale_Word } @@ -90,6 +92,8 @@ \aliased\let\WORDS\WORD \aliased\let\words\word +\popoverloadmode + %D \macros %D {kap,KAP,Kap,Kaps,nokap,userealcaps,usepseudocaps} %D diff --git a/tex/context/interface/mkii/keys-de.xml b/tex/context/interface/mkii/keys-de.xml index 828ef7138..ec8c15ee2 100644 --- a/tex/context/interface/mkii/keys-de.xml +++ b/tex/context/interface/mkii/keys-de.xml @@ -1380,7 +1380,6 @@ <!-- definitions for interface commands for language de --> <cd:commands> - <cd:command name='CAPPED' value='KAP'/> <cd:command name='Character' value='Buchstabe'/> <cd:command name='Characters' value='Buchstaben'/> <cd:command name='MONTH' value='MONAT'/> diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 142d53e44..92109f0ce 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 2020-11-18 19:13 +-- merge date : 2020-11-19 11:23 do -- begin closure to overcome local limits and interference |