diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-09-15 19:16:53 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-09-15 19:16:53 +0200 |
commit | e7dc9c1fc474fa15a2cbc34d8f543518f5853361 (patch) | |
tree | 203dc5620b0ac92b72f37c30de1cbe90e18823a3 /tex | |
parent | 03f6d43b4a5036b4cbb7e4df56db7217717bdadd (diff) | |
download | context-e7dc9c1fc474fa15a2cbc34d8f543518f5853361.tar.gz |
2020-09-15 18:10:00
Diffstat (limited to 'tex')
29 files changed, 367 insertions, 96 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index d3818d44d..3e6741cb3 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2020.09.05 21:12} +\newcontextversion{2020.09.15 18:07} %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 03ff7cd5b..fef1d6aea 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2020.09.05 21:12} +\edef\contextversion{2020.09.15 18:07} %D For those who want to use this: diff --git a/tex/context/base/mkiv/back-exp.mkiv b/tex/context/base/mkiv/back-exp.mkiv index e44a23cb2..05e404697 100644 --- a/tex/context/base/mkiv/back-exp.mkiv +++ b/tex/context/base/mkiv/back-exp.mkiv @@ -357,6 +357,6 @@ \ifexporting \dostartexport % in case it is done inside \starttext \fi -\to \everysetupdocument +\to \everystartdocument \protect \endinput diff --git a/tex/context/base/mkiv/buff-ver.mkiv b/tex/context/base/mkiv/buff-ver.mkiv index 3e1eee75a..067ae7c39 100644 --- a/tex/context/base/mkiv/buff-ver.mkiv +++ b/tex/context/base/mkiv/buff-ver.mkiv @@ -39,6 +39,7 @@ \the\everyresettypesetting \resetfontfeature \resetcharacterspacing + \resetbreakpoints \to \everyinitializeverbatim \unexpanded\def\setverbatimspaceskip % to be checked: must happen after font switch diff --git a/tex/context/base/mkiv/buff-ver.mkxl b/tex/context/base/mkiv/buff-ver.mkxl index 292365e8f..4dc82288a 100644 --- a/tex/context/base/mkiv/buff-ver.mkxl +++ b/tex/context/base/mkiv/buff-ver.mkxl @@ -39,6 +39,7 @@ \the\everyresettypesetting \resetfontfeature \resetcharacterspacing + \resetbreakpoints \to \everyinitializeverbatim \unexpanded\def\setverbatimspaceskip % to be checked: must happen after font switch diff --git a/tex/context/base/mkiv/cldf-ini.lua b/tex/context/base/mkiv/cldf-ini.lua index 7e6af8072..24092d852 100644 --- a/tex/context/base/mkiv/cldf-ini.lua +++ b/tex/context/base/mkiv/cldf-ini.lua @@ -368,11 +368,13 @@ end -- interfaces.scanners.foo = function() context("[%s]",tokens.scanners.string()) end : \scan_foo -local storedscanners = interfaces.storedscanners or { } -local interfacescanners = { } -local privatenamespace = "clf_" +local storedscanners = interfaces.storedscanners or { } +local namesofscanners = interfaces.namesofscanners or { } +local interfacescanners = { } +local privatenamespace = "clf_" -interfaces.storedscanners = storedscanners +interfaces.storedscanners = storedscanners +interfaces.namesofscanners = namesofscanners storage.register("interfaces/storedscanners", storedscanners, "interfaces.storedscanners") @@ -381,6 +383,7 @@ local function registerscanner(name,action,protected,public,usage) -- todo: comb local n = storedscanners[name] n = registerfunction("interfaces.scanners."..name,true,n) storedscanners[name] = n + namesofscanners[n] = name name = public and name or (privatenamespace .. name) -- print(">>",name,protected and "protected" or "",usage or "macro") setluatoken(name,n,"global",protected and "protected" or "",usage or "macro") @@ -392,6 +395,20 @@ function interfaces.knownscanner(name) return interfacescanners[name] end +function interfaces.nameofscanner(slot) + return namesofscanners[slot] or slot +end + +if CONTEXTLMTXMODE > 0 then + + callback.register("show_lua_call", function(what, slot) + local name = namesofscanners[slot] + -- return name and formatters["%s: \\%s, slot: %i"](what,name,slot) or "" + return name and formatters["%s \\%s"](what,name) or "" + end) + +end + setmetatablenewindex(interfacescanners, function(t,k,v) report_cld("don't register scanner %a directly",k) -- registerscanner(k,v) diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index ca66a4283..6e2ec0fb3 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2020.09.05 21:12} +\newcontextversion{2020.09.15 18:07} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 367ba9207..2c1bed4a4 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -45,7 +45,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2020.09.05 21:12} +\edef\contextversion{2020.09.15 18:07} %D Kind of special: diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl index 873643725..9d3edf3c1 100644 --- a/tex/context/base/mkiv/context.mkxl +++ b/tex/context/base/mkiv/context.mkxl @@ -29,7 +29,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2020.09.05 21:12} +\edef\contextversion{2020.09.15 18:07} %D Kind of special: diff --git a/tex/context/base/mkiv/core-ini.mkiv b/tex/context/base/mkiv/core-ini.mkiv index bbe66307b..c4ab298bf 100644 --- a/tex/context/base/mkiv/core-ini.mkiv +++ b/tex/context/base/mkiv/core-ini.mkiv @@ -47,12 +47,14 @@ %D Document: -\newtoks \everysetupdocument \newtoks \everyendoftextbody \newtoks \everystarttext \newtoks \everystoptext +\newtoks \everystartdocument +\newtoks \everystopdocument + %D Purity: \newtoks \everyforgetall diff --git a/tex/context/base/mkiv/file-job.mkvi b/tex/context/base/mkiv/file-job.mkvi index a46e519c0..db5ac4db1 100644 --- a/tex/context/base/mkiv/file-job.mkvi +++ b/tex/context/base/mkiv/file-job.mkvi @@ -295,22 +295,81 @@ {\popsystemmode\v!environment \signalendofinput\v!environment} -%D Relatively new (might move as it depends on setups): +%D Upgraded after the ctx 2020 meeting: +%D +%D \starttyping +%D \definedocument[thesis] +%D +%D \setupdocument[a=b,e=f] +%D \setupdocument[thesis][a=x,c=d] +%D +%D % \startsetups[thesis:start] +%D \startsetups[document:start] +%D START +%D \stopsetups +%D +%D \startsetups[thesis:stop] +%D % \startsetups[document:stop] +%D STOP +%D \stopsetups +%D +%D % \startdocument[thesis] +%D \startthesis +%D (\currentdocument/a): \documentvariable{a}\par +%D (\currentdocument/c): \documentvariable{c}\par +%D (\currentdocument/e): \documentvariable{e}\par +%D \stopthesis +%D % \stopdocument +%D \stoptyping -%newtoks\everysetupdocument +\installcorenamespace {document} -\unexpanded\def\startdocument % todo: dostarttagged\t!document - {\dosingleargument\syst_structure_document_start} +\installcommandhandler \??document \s!document \??document + +\setupdocument + [\c!before=\directsetup{\s!document:\v!start}, + \c!after =\directsetup{\s!document:\v!stop}] -\unexpanded\def\syst_structure_document_start[#settings]% - {\setvariables[\s!document][#settings]% - \the\everysetupdocument\relax +\def\syst_document_setup#1% + {\directsetup{\doifelsesetups{\currentdocument:\v!start}\currentdocument\s!document:\v!start}} + +\appendtoks + \normalexpanded {% + \startsetups[\currentdocument:\v!start]\noexpand\directsetup{\ifx\empty\currentdocumentparent\s!document\else\currentdocumentparent\fi:\v!start}\stopsetups + \startsetups[\currentdocument:\v!stop ]\noexpand\directsetup{\ifx\empty\currentdocumentparent\s!document\else\currentdocumentparent\fi:\v!stop }\stopsetups + \setvalue{\e!start\currentdocument}{\dodoubleargument\syst_document_start[\currentdocument]}% + \letvalue{\e!stop \currentdocument}\stopdocument + }% +\to \everydefinedocument + +\unexpanded\def\startdocument % todo: dostarttagged\t!document + {\dodoubleargument\syst_document_start} + +\unexpanded\def\syst_document_start[#namespace][#settings]% + {\pushmacro\currentdocument + \ifsecondargument + \edef\currentdocument{#namespace}% + \setupcurrentdocument[#settings]% + \else\iffirstargument + \doifelseassignment{#namespace}% + {\let\currentdocument\empty + \setupcurrentdocument[#namespace]}% + {\edef\currentdocument{#namespace}}% + \fi\fi + \ifx\empty\currentdocument\else\setmode\currentdocument\fi \starttext + \the\everystartdocument \documentvariable\c!before} \unexpanded\def\stopdocument % todo: dostoptagged\t!document {\documentvariable\c!after - \stoptext} + \the\everystopdocument + \stoptext + \ifx\empty\currentdocument\else\resetmode\currentdocument\fi + \popmacro\currentdocument} + + \let\documentvariable \documentparameter +\unexpanded\def\unexpandeddocumentvariable{\documentparameter} \unexpanded\def\doifelsedocumentvariable#name{\doifelsesomething{\documentvariable{#name}}} \unexpanded\def\doifdocumentvariable #name{\doifsomething {\documentvariable{#name}}} @@ -318,38 +377,21 @@ \let\doifdocumentvariableelse\doifelsedocumentvariable -\def\documentvariable#name% - {\getvariable\s!document{#name}} - -\unexpanded\def\unexpandeddocumentvariable#name% - {\getvariable\s!document{#name}} - -\unexpanded\def\setupdocument[#settings]% - {\setvariables[\s!document][#settings]% - \the\everysetupdocument\relax} - -\unexpanded\def\presetdocument[#settings]% - {\checkvariables[\s!document][#settings]} - -% We silently ignore missing documents. Beware: there are no begin/end setups -% invoked as we expect the loaded document to be wrapped in \startdocument ... -% \stopdocument. This is just a convenient variant of input. -% -% \unexpanded\def\document -% {\dosingleempty\syst_document} -% -% \def\syst_document[#1]#2% -% \startdocument[#1] -% \readfile{#2}{}{}} - -% metadata:author metadata:title metadata:subject - -\setvariables - [document] - [\c!before=\directsetup{\s!document:start}, - \c!after=\directsetup{\s!document:stop}] - -%S The document: namespace will be used elsewhere too. +\unexpanded\def\presetdocument + {\dodoubleargument\syst_document_preset} + +\unexpanded\def\syst_document_preset[#namespace][#settings]% + {\pushmacro\currentdocument + \ifsecondargument + \edef\currentdocument{#namespace}% + \setupcurrentdocument[#settings]% + \else\iffirstargument + \doifelseassignment{#namespace}% + {\let\currentdocument\empty + \setupcurrentdocument[#namespace]}% + {}% + \fi\fi + \popmacro\currentdocument} % Bonus: diff --git a/tex/context/base/mkiv/grph-img.lua b/tex/context/base/mkiv/grph-img.lua index 49b082c58..0dc5efa70 100644 --- a/tex/context/base/mkiv/grph-img.lua +++ b/tex/context/base/mkiv/grph-img.lua @@ -97,6 +97,13 @@ do [0x01] = { name = "TEM", zerolength = true }, -- temporary use } + setmetatableindex(tags, function(t,k) + -- we can add some tracing if needed (global) to get an idea + local v = "tag " .. k + t[k] = v + return v + end) + -- More can be found in http://www.exif.org/Exif2-2.PDF but basically we have -- good old tiff tags here. @@ -254,7 +261,7 @@ do local length = 0 local tagdata = tags[category] if not tagdata then - specification.error = "invalid tag" + specification.error = "invalid tag " .. (category or "?") break elseif tagdata.supported == false then specification.error = "unsupported " .. tagdata.comment diff --git a/tex/context/base/mkiv/lang-ini.lua b/tex/context/base/mkiv/lang-ini.lua index ce2b89f3c..ac5b2c113 100644 --- a/tex/context/base/mkiv/lang-ini.lua +++ b/tex/context/base/mkiv/lang-ini.lua @@ -49,7 +49,7 @@ local uccodes = characters.uccodes local lccodes = characters.lccodes lang.exceptions = lang.hyphenation -local new_langage = lang.new +local new_language = lang.new languages = languages or {} local languages = languages @@ -85,7 +85,7 @@ local function resolve(tag) if data then instance = data.instance if not instance then - instance = new_langage(data.number) + instance = new_language(data.number) data.instance = instance end end @@ -101,7 +101,7 @@ local function tolang(what) -- returns lang object if data then local instance = data.lang if not instance then - instance = new_langage(data.number) + instance = new_language(data.number) data.instance = instance end return instance @@ -502,6 +502,14 @@ else end end + if CONTEXTLMTXMODE > 0 then + numbers[0] = "null" + registered.null = { + number = 0, + instance = new_language(0), + } + end + end -- not that usefull, global values diff --git a/tex/context/base/mkiv/meta-imp-threesix.mkxl b/tex/context/base/mkiv/meta-imp-threesix.mkxl index 44ddda579..56a400b45 100644 --- a/tex/context/base/mkiv/meta-imp-threesix.mkxl +++ b/tex/context/base/mkiv/meta-imp-threesix.mkxl @@ -205,22 +205,33 @@ [default] [metapost={category=fontthreesix,shape=diamond,color=random,pen=fancy,spread=.1,random=yes}] -% \definefont[DEKFontA][Serif*fontthreesix-color @ 280pt] -% \definefont[DEKFontB][Serif*fontthreesix-color @ 80pt] - \definefont[DEKFontA][Serif*fontthreesix-color @ 200pt] \definefont[DEKFontB][Serif*fontthreesix-color @ 60pt] -\startTEXpage[align={lohi,middle,nothyphenated},offset=20pt] - \offinterlineskip \vskip10pt - \DEKFontA T\kern-0.05em\lower.75\exheight\hbox{E}\kern-.05emX \vskip60pt - \DEKFontB TOUGH \vskip20pt - SMART \vskip20pt - UNITED \vskip20pt - DISCIPLINED \vskip20pt - LOVING \vskip10pt +% Or course: + +\startTEXpage + \DEKFontA TEX \stopTEXpage +\startTEXpage + \DEKFontA T\kern-0.05em\lower.75\exheight\hbox{E}\kern-.05emX +\stopTEXpage + +% One of the \CONTEXT\ 2020 posters (inspired by NewYork State AC's press +% conferences as these keywords apply quite well to the audience of the +% meeting): + +% \startTEXpage[align={lohi,middle,nothyphenated},offset=20pt] +% \offinterlineskip \vskip10pt +% \DEKFontA T\kern-0.05em\lower.75\exheight\hbox{E}\kern-.05emX \vskip60pt +% \DEKFontB TOUGH \vskip20pt +% SMART \vskip20pt +% UNITED \vskip20pt +% DISCIPLINED \vskip20pt +% LOVING \vskip10pt +% \stopTEXpage + \startpagemakeup \setupalign[middle,nothyphenated] \offinterlineskip \vfil\vfil diff --git a/tex/context/base/mkiv/mlib-int.lmt b/tex/context/base/mkiv/mlib-int.lmt index 4cdc3b076..86e2e5732 100644 --- a/tex/context/base/mkiv/mlib-int.lmt +++ b/tex/context/base/mkiv/mlib-int.lmt @@ -8,6 +8,7 @@ if not modules then modules = { } end modules ['mlib-int'] = { local factor = number.dimenfactors.bp local mpstring = mp.string +local mpboolean = mp.boolean local getdimen = tex.getdimen local getcount = tex.getcount local getmacro = tokens.getters.macro @@ -122,9 +123,13 @@ registerscript("OverlayOffset", function() return getdimen("d_overlay_off registerscript("OverlayRegion", function() mpstring(getmacro("m_overlay_region")) end) --------------("CurrentLayout", function() mpstring(getmacro("currentlayout")) end) -registerscript("PageFraction", page_fraction) -registerscript("OnRightPage", on_right_page) -registerscript("OnOddPage", is_odd_page ) -registerscript("InPageBody", in_body_page ) +-- should be direct +-- +-- registerscript("PageFraction", page_fraction) + +registerscript("PageFraction", function() return mpboolean(page_fraction()) end) +registerscript("OnRightPage", function() return mpboolean(on_right_page()) end) +registerscript("OnOddPage", function() return mpboolean(is_odd_page ()) end) +registerscript("InPageBody", function() return mpboolean(in_body_page ()) end) registerscript("defaultcolormodel", defaultcolormodel) diff --git a/tex/context/base/mkiv/mult-aux.mkiv b/tex/context/base/mkiv/mult-aux.mkiv index 15a5b26a9..d7921bcc2 100644 --- a/tex/context/base/mkiv/mult-aux.mkiv +++ b/tex/context/base/mkiv/mult-aux.mkiv @@ -677,7 +677,7 @@ \installswitchsetuphandler {#1}{#2}% \installstyleandcolorhandler {#1}{#2}} -\protected\def\installautocommandhandler#1#2#3% automatically defined cloned setups +\protected\def\installautocommandhandler#1#2#3% automatically defines cloned setups {\installbasicparameterhandler{#1}{#2}% \installdefinehandler {#1}{#2}{#3}% \installautosetuphandler {#1}{#2}% diff --git a/tex/context/base/mkiv/node-tra.lua b/tex/context/base/mkiv/node-tra.lua index d56e2adef..2ebfaff12 100644 --- a/tex/context/base/mkiv/node-tra.lua +++ b/tex/context/base/mkiv/node-tra.lua @@ -513,8 +513,8 @@ function number.tobasepoints (n,fmt) return numbertodimen(n,"bp",fmt) end function number.topicas (n,fmt) return numbertodimen(n "pc",fmt) end function number.todidots (n,fmt) return numbertodimen(n,"dd",fmt) end function number.tociceros (n,fmt) return numbertodimen(n,"cc",fmt) end -function number.tonewdidots (n,fmt) return numbertodimen(n,"nd",fmt) end -function number.tonewciceros (n,fmt) return numbertodimen(n,"nc",fmt) end +-------- number.tonewdidots (n,fmt) return numbertodimen(n,"nd",fmt) end +-------- number.tonewciceros (n,fmt) return numbertodimen(n,"nc",fmt) end function nodes.topoints (n,fmt) return nodetodimen(n,"pt",fmt) end function nodes.toinches (n,fmt) return nodetodimen(n,"in",fmt) end @@ -526,8 +526,8 @@ function nodes.tobasepoints (n,fmt) return nodetodimen(n,"bp",fmt) end function nodes.topicas (n,fmt) return nodetodimen(n "pc",fmt) end function nodes.todidots (n,fmt) return nodetodimen(n,"dd",fmt) end function nodes.tociceros (n,fmt) return nodetodimen(n,"cc",fmt) end -function nodes.tonewdidots (n,fmt) return nodetodimen(n,"nd",fmt) end -function nodes.tonewciceros (n,fmt) return nodetodimen(n,"nc",fmt) end +-------- nodes.tonewdidots (n,fmt) return nodetodimen(n,"nd",fmt) end +-------- nodes.tonewciceros (n,fmt) return nodetodimen(n,"nc",fmt) end -- stop redefinition diff --git a/tex/context/base/mkiv/page-imp.mkiv b/tex/context/base/mkiv/page-imp.mkiv index 2f1e75e9d..a83089986 100644 --- a/tex/context/base/mkiv/page-imp.mkiv +++ b/tex/context/base/mkiv/page-imp.mkiv @@ -167,8 +167,17 @@ % \def\page_shipout_box#1{\normalshipout\box#1\relax} % takes a number +\ifcase\contextlmtxmode + \def\page_shipout_show_box{\scratchcounter} +\else + \def\page_shipout_show_box{\showbox diagnose} +\fi + \unexpanded\def\page_shipout_box#1% - {\clf_shipoutpage#1\relax + {\ifcase\tracingoutput\else + \page_shipout_show_box#1\relax + \fi + \clf_shipoutpage#1\relax \global\setbox#1\emptybox \global\deadcycles\zerocount} diff --git a/tex/context/base/mkiv/scrn-ini.mkvi b/tex/context/base/mkiv/scrn-ini.mkvi index 557ceb563..39fef740c 100644 --- a/tex/context/base/mkiv/scrn-ini.mkvi +++ b/tex/context/base/mkiv/scrn-ini.mkvi @@ -231,7 +231,7 @@ % this comes before starttext \def\scrn_identity_document#1#2% - {\doifvariable{document}{metadata:#1}{\setupinteraction[#2=\documentvariable{metadata:#1}]}} + {\doifdocumentvariable{metadata:#1}{\setupinteraction[#2=\documentvariable{metadata:#1}]}} \appendtoks % not interfaced i.e. english \scrn_identity_document {title}\c!title @@ -242,7 +242,7 @@ \scrn_identity_document {keyword}\c!keyword \scrn_identity_document{keywords}\c!keyword \scrn_identity_document {date}\c!date -\to \everysetupdocument +\to \everystartdocument % or stop \setupinteraction [\c!title=, diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex edb9d62d1..ff922bab8 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 9abda7bce..fd0b5705c 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/syst-aux.mkxl b/tex/context/base/mkiv/syst-aux.mkxl index 30510d6d5..95a1079e8 100644 --- a/tex/context/base/mkiv/syst-aux.mkxl +++ b/tex/context/base/mkiv/syst-aux.mkxl @@ -3723,7 +3723,7 @@ {\def\syst_helpers_grab_indeed##1#1{#2{##1}}\syst_helpers_grab_indeed} \protected\def\grabuntil#1% - {\expandafter\syst_helpers_grab\expandafter{\begincsname#1\endcsname}} + {\expandafter\syst_helpers_grab\expandafter{\csname#1\endcsname}} %D The next command build on this mechanism: %D diff --git a/tex/context/base/mkiv/util-dim.lua b/tex/context/base/mkiv/util-dim.lua index 76b5fd20b..bb9eca966 100644 --- a/tex/context/base/mkiv/util-dim.lua +++ b/tex/context/base/mkiv/util-dim.lua @@ -44,8 +44,8 @@ local dimenfactors = allocate { ["pc"] = ( 1/ 12)/65536, ["dd"] = ( 1157/ 1238)/65536, ["cc"] = ( 1157/14856)/65536, - ["nd"] = (20320/21681)/65536, - ["nc"] = ( 5080/65043)/65536 + -- ["nd"] = (20320/21681)/65536, + -- ["nc"] = ( 5080/65043)/65536 } -- print(table.serialize(dimenfactors)) @@ -61,9 +61,9 @@ local dimenfactors = allocate { -- ["ex"]=6.103515625e-005, -- ["in"]=2.1113586636917117e-007, -- ["mm"]=5.3628510057769473e-008, --- ["nc"]=1.1917446679504327e-006, --- ["nd"]=1.4300936015405194e-005, --- ["pc"]=1.2715657552083333e-006, +-- --["nc"]=1.1917446679504327e-006, +-- --["nd"]=1.4300936015405194e-005, +-- --["pc"]=1.2715657552083333e-006, -- ["pt"]=1.52587890625e-005, -- ["sp"]=1, -- } @@ -79,8 +79,8 @@ local dimenfactors = allocate { -- ["ex"]=0.00006103515625, -- ["in"]=0.00000021113587, -- ["mm"]=0.00000005362851, --- ["nc"]=0.00000119174467, --- ["nd"]=0.00001430093602, +-- --["nc"]=0.00000119174467, +-- --["nd"]=0.00001430093602, -- ["pc"]=0.00000127156576, -- ["pt"]=0.00001525878906, -- ["sp"]=1, @@ -128,8 +128,8 @@ function number.tobasepoints (n,fmt) return numbertodimen(n,"bp",fmt) end function number.topicas (n,fmt) return numbertodimen(n "pc",fmt) end function number.todidots (n,fmt) return numbertodimen(n,"dd",fmt) end function number.tociceros (n,fmt) return numbertodimen(n,"cc",fmt) end -function number.tonewdidots (n,fmt) return numbertodimen(n,"nd",fmt) end -function number.tonewciceros (n,fmt) return numbertodimen(n,"nc",fmt) end +-------- number.tonewdidots (n,fmt) return numbertodimen(n,"nd",fmt) end +-------- number.tonewciceros (n,fmt) return numbertodimen(n,"nc",fmt) end --[[ldx-- <p>More interesting it to implement a (sort of) dimen datatype, one diff --git a/tex/context/modules/mkiv/s-present-bars.mkiv b/tex/context/modules/mkiv/s-present-bars.mkiv index 13c09ff3b..37f18ffca 100644 --- a/tex/context/modules/mkiv/s-present-bars.mkiv +++ b/tex/context/modules/mkiv/s-present-bars.mkiv @@ -68,7 +68,7 @@ \setupheadertexts [Breskens 2012] - [\getvariable{document}{title}] + [\documentvariable{title}] \setupbackgrounds [page] @@ -99,9 +99,9 @@ \startsetups document:setup - \doifsomething {\getvariable{document}{color}} { + \doifsomething {\documentvariable{color}} { - \definecolor[maincolor][\getvariable{document}{color}] + \definecolor[maincolor][\documentvariable{color}] } diff --git a/tex/context/modules/mkiv/s-present-boring.mkiv b/tex/context/modules/mkiv/s-present-boring.mkiv new file mode 100644 index 000000000..334d6216d --- /dev/null +++ b/tex/context/modules/mkiv/s-present-boring.mkiv @@ -0,0 +1,143 @@ +%D \module +%D [ file=s-present-boring, % s-pre-15, +%D version=2020.07.10, +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment Boring, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D Because I use a mupdf based viewer and acrobat is not always reliable I nowadays +%D tend to go for simple presentation styles. They mostly serve as a reminder for +%D myself of what I'm supposed to talk about. Just demoing often makes more sense, +%D especially at meetings where there is some interaction. + +\startmodule[present-boring] + +\setupbodyfont + [plex] + +\setuppapersize + [S6] + +\setuplayout + [backspace=20pt, + topspace=20pt, + bottomspace=20pt, + header=0pt, + footer=0pt, + bottom=20pt, + bottomdistance=30pt, + width=middle, + height=fit] + +\definecolor[maincolor] [darkblue] +\definecolor[extracolor][darkyellow] +\definecolor[darkcolor] [darkgray] + +\setupbackgrounds + [page] + [backgroundoffset=10pt, + background=color, + backgroundcolor=darkcolor] + +\setupbackgrounds + [text] [text] + [backgroundoffset=10pt, + background=color, + backgroundcolor=maincolor] + +\setupbackgrounds + [bottom] [text] + [backgroundoffset=10pt, + background=color, + backgroundcolor=extracolor] + +\setupcolors + [textcolor=white] + +\setuphead + [chapter] + [style=\bfc, + after={\blank[line,fixed]}] + +\setupwhitespace + [halfline] + +\setupblank + [halfline,fixed] + +% \setupblank +% [fixed] + +\setuplinenumbering + [typing] + [style=\txx, + color=middlegray] + +\setuptyping + [numbering=line, + location=left, + blank=halfline] + +\startsetups document:start + + \startpagemakeup + \raggedcenter + \vfill + \dontleavehmode \scale [ + width=\textwidth + ] { + \space + {\bf \documentvariable{title}} + \space + } + \vfill + \dontleavehmode \scale [ + width=.8\textwidth + ] { + \space + {\bf \documentvariable{banner}} + \space + } + \vfill + \vfill + \dontleavehmode \scale [ + width=\textwidth + ] { + \qquad + \color[darkcolor]{\documentvariable{location}} + \qquad + } + \vfill + \stoppagemakeup + + \setupbottomtexts [ + { + \words { + \documentvariable{title} + \quad\emdash\quad + \documentvariable{location} + \quad\emdash\quad + \getmarking[title] + } + } + ] + +\stopsetups + +\startsetups document:stop + % +\stopsetups + +\stopmodule + +\continueifinputfile{s-present-boring.mkiv} + +\usemodule[present-common] + +\inputpresentationfile{context/2020/context-2020-tokens.tex} diff --git a/tex/context/modules/mkiv/s-present-tiles.mkiv b/tex/context/modules/mkiv/s-present-tiles.mkiv index 566a610a4..6026dd523 100644 --- a/tex/context/modules/mkiv/s-present-tiles.mkiv +++ b/tex/context/modules/mkiv/s-present-tiles.mkiv @@ -264,7 +264,7 @@ \startalignment[flushleft] \bf \setupinterlinespace - \begstrut\getvariable{document}{title}\endstrut\par + \begstrut\documentvariable{title}\endstrut\par \stopalignment \vfill @@ -272,7 +272,7 @@ \startalignment[flushright] \bf \setupinterlinespace - \begstrut\getvariable{document}{subtitle}\endstrut\par + \begstrut\documentvariable{subtitle}\endstrut\par \stopalignment \stoptopicmakeup diff --git a/tex/context/modules/mkiv/s-system-tokens.mkxl b/tex/context/modules/mkiv/s-system-tokens.mkxl index fd16bade6..3b32b0627 100644 --- a/tex/context/modules/mkiv/s-system-tokens.mkxl +++ b/tex/context/modules/mkiv/s-system-tokens.mkxl @@ -56,5 +56,30 @@ \stoptabulate \stopcolumns + \page + + Here is a typeset table of \type {\startframed} using \type {\luatokentable\startframed}: + + \luatokentable\startframed + + which calls \type {\pack_framed_start_framed} where \type {\luatokentable\pack_framed_start_framed} gives: + + + \unprotect + \luatokentable\pack_framed_start_framed + \protect + + So you can guess what generates this: + + \unprotect + \luatokentable\pack_framed_start_framed_nop + \protect + + And this: + + \unprotect + \luatokentable\pack_framed_start_framed_yes + \protect + \stoptext diff --git a/tex/context/sample/common/cuomo.tex b/tex/context/sample/common/cuomo.tex index 72da38b77..b4ab3f27a 100644 --- a/tex/context/sample/common/cuomo.tex +++ b/tex/context/sample/common/cuomo.tex @@ -1,5 +1,5 @@ -Yeah, my mother is not expandable. And your mother is not expendable. And our -brothers and sisters are not expandable. And we're not going to accept a premise +Yeah, my mother is not expendable. And your mother is not expendable. And our +brothers and sisters are not expendable. And we're not going to accept a premise that human life is disposable. And we're not going to put a dollar figure on human life. First order of business is: save lives. Period. Whatever it costs. Now, I also don't believe it's an either or. I believe you can have an diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 14380a7a3..90eadfd07 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 2020-09-05 21:12 +-- merge date : 2020-09-15 18:07 do -- begin closure to overcome local limits and interference |