diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-09-21 20:54:51 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-09-21 20:54:51 +0200 |
commit | 7c2efd42267783f01b64e0a47cba89f84742618c (patch) | |
tree | 4517e6bd3e024424dd82c5bb3c5e800cdff06fea /tex/context/modules | |
parent | 56ca0139232f16679918613ef45a5dd643f0f9b3 (diff) | |
download | context-7c2efd42267783f01b64e0a47cba89f84742618c.tar.gz |
2018-09-21 20:00:00
Diffstat (limited to 'tex/context/modules')
-rw-r--r-- | tex/context/modules/mkiv/m-asymptote.lua | 2 | ||||
-rw-r--r-- | tex/context/modules/mkiv/m-asymptote.mkiv | 58 | ||||
-rw-r--r-- | tex/context/modules/mkiv/m-scite.mkiv | 2 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-fonts-charts.mkiv | 2 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-references-identify.mkiv | 69 | ||||
-rw-r--r-- | tex/context/modules/mkiv/x-setups-basics.mkiv | 6 |
6 files changed, 106 insertions, 33 deletions
diff --git a/tex/context/modules/mkiv/m-asymptote.lua b/tex/context/modules/mkiv/m-asymptote.lua index de8d032c8..39a0d987b 100644 --- a/tex/context/modules/mkiv/m-asymptote.lua +++ b/tex/context/modules/mkiv/m-asymptote.lua @@ -1,6 +1,6 @@ if not modules then modules = { } end modules ['m-asymptote'] = { version = 1.001, - comment = "companion to m-pstricks.mkiv", + comment = "companion to m-asymptote.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" diff --git a/tex/context/modules/mkiv/m-asymptote.mkiv b/tex/context/modules/mkiv/m-asymptote.mkiv index c236ceee5..9cd4037fb 100644 --- a/tex/context/modules/mkiv/m-asymptote.mkiv +++ b/tex/context/modules/mkiv/m-asymptote.mkiv @@ -76,51 +76,51 @@ \starttext \startasymptote[demo-1] -settings.prc=true; +settings.prc = true ; -import graph3; -import palette; +import graph3 ; +import palette ; -size(6cm,6cm); -size3(5cm,0); +size(6cm,6cm) ; +size3(5cm,0) ; -currentprojection=orthographic(3,-6,12); -currentlight=light(8,10,2); +currentprojection = orthographic(3,-6,12) ; +currentlight = light(8,10,2) ; -real g(pair z) {return 1-z.x^2-z.y^2;} -real f(pair z) {return -2z.x+2;} +real g(pair z) { return 1-z.x^2-z.y^2 ; } +real f(pair z) { return -2z.x+2 ; } -real x(real t) {return t;} -real y(real t) {return 0;} -real z(real t) {return 1-t^2;} -real a(real t) {return 1;} -real b(real t) {return t;} -real c(real t) {return -t^2;} +real x(real t) { return t ; } +real y(real t) { return 0 ; } +real z(real t) { return 1-t^2 ; } +real a(real t) { return 1 ; } +real b(real t) { return t ; } +real c(real t) { return -t^2 ; } -path3 p=graph(x,y,z,-2,2,operator ..); -path3 o=graph(a,b,c,-2,2,operator ..); +path3 p=graph(x,y,z,-2,2,operator ..) ; +path3 o=graph(a,b,c,-2,2,operator ..) ; -surface r=surface(f,(0,-1),(2,1),nx=3,Spline); -surface s=surface(g,(-2,-2),(2,2),nx=5,Spline); +surface r = surface(f, (0,-1), (2,1), nx = 3, Spline) ; +surface s = surface(g, (-2,-2), (2,2), nx = 5, Spline) ; -path3 q=(-2,-2,-7)--(2,-2,-7)--(2,2,-7)--(-2,2,-7)--cycle; +path3 q = (-2,-2,-7) -- (2,-2,-7) -- (2,2,-7) -- (-2,2,-7) -- cycle ; -draw(q); +draw(q) ; -draw(p,blue+thick(),Arrow3); -draw(o,blue+thick(),Arrow3); +draw(p, blue+thick(), Arrow3) ; +draw(o, blue+thick(), Arrow3) ; -draw(s,lightgray+opacity(0.8),nolight,meshpen=black+thick()); -draw(r,lightgray+opacity(0.8),nolight,meshpen=black+thick()); +draw(s, lightgray + opacity(0.8), nolight, meshpen = black + thick()) ; +draw(r, lightgray + opacity(0.8), nolight, meshpen = black + thick()) ; -draw((1,0,0)--(2,0,-2),black,Arrow3); -draw((1,0,0)--(1,1,0),black,Arrow3); +draw((1,0,0) -- (2,0,-2), black, Arrow3) ; +draw((1,0,0) -- (1,1,0), black, Arrow3) ; \stopasymptote \startasymptote[demo-2] -size(6cm,6cm); +size(6cm,6cm) ; -fill((1cm,2cm)--(3cm,3cm)--(4cm,0cm)--cycle); +fill((1cm,2cm) -- (3cm,3cm) -- (4cm,0cm) -- cycle); \stopasymptote % see end of grph-inc.mkiv for some more options: diff --git a/tex/context/modules/mkiv/m-scite.mkiv b/tex/context/modules/mkiv/m-scite.mkiv index 0c258a860..eaac6ecae 100644 --- a/tex/context/modules/mkiv/m-scite.mkiv +++ b/tex/context/modules/mkiv/m-scite.mkiv @@ -289,6 +289,7 @@ visualizers.register("cld", visualizer) visualizers.register("tex", visualizer) visualizers.register("lua", visualizer) visualizers.register("mps", visualizer) +visualizers.register("pdf", visualizer) visualizers.register("xml", visualizer) visualizers.register("bibtex",visualizer) visualizers.register("btx", visualizer) @@ -306,6 +307,7 @@ visualizers.register("json", visualizer) \definetyping[BTX] [option=bibtex] \definetyping[MPS] [option=mps] \definetyping[MP] [option=mps] +\definetyping[PDF] [option=pdf] \definetyping[CPP] [option=web] \definetyping[WEB] [option=web] \definetyping[TXT] [option=txt] diff --git a/tex/context/modules/mkiv/s-fonts-charts.mkiv b/tex/context/modules/mkiv/s-fonts-charts.mkiv index e94b52a2e..50cd589e4 100644 --- a/tex/context/modules/mkiv/s-fonts-charts.mkiv +++ b/tex/context/modules/mkiv/s-fonts-charts.mkiv @@ -15,7 +15,7 @@ % % title : show unicode blocks % -% comment : show charts of a given fgont +% comment : show charts of a given font % % end info diff --git a/tex/context/modules/mkiv/s-references-identify.mkiv b/tex/context/modules/mkiv/s-references-identify.mkiv new file mode 100644 index 000000000..85187be9d --- /dev/null +++ b/tex/context/modules/mkiv/s-references-identify.mkiv @@ -0,0 +1,69 @@ +%D \module +%D [ file=s-references-identity, +%D version=2018.09.15, +%D title=\CONTEXT\ Style File, +%D subtitle=Analyze References, +%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. + +% begin info +% +% title : analyze reference +% +% comment : show the building blocks of a reference (list) +% +% end info + +\startmodule[references-identify] + +\startluacode + +moduledata.references = moduledata.references or { } + +local context = context +local NC, NR = context.NC, context.NR +local bold = context.bold +local text = context + +function moduledata.references.show(str) + local t = structures.references.identify(str) + context.starttabulate { "|T|T|T|" } + for i=1,#t do + if i == 1 then + context.FL() + else + context.ML() + end + local ti = t[i] + NC() bold(i) NC() bold("reference") NC() bold(ti.reference) NC() NR() + NC() NC() text("kind") NC() text(ti.kind) NC() NR() + NC() NC() text("operation") NC() text(ti.operation) NC() NR() + NC() NC() text("arguments") NC() text(ti.arguments) NC() NR() + NC() NC() text("special") NC() text(ti.special) NC() NR() + end + context.LL() + context.stoptabulate() +end + +\stopluacode + +\installmodulecommandluasingle \showreference {moduledata.references.show} + +\stopmodule + +\continueifinputfile{s-references-identify.mkiv} + +\usemodule[art-01] + +\starttext + + \showreference[page(123),StartMovie{mymovie}] + \showreference[JS(Forget_Changes),CloseDocument] + \showreference[manual::contents] + +\stoptext diff --git a/tex/context/modules/mkiv/x-setups-basics.mkiv b/tex/context/modules/mkiv/x-setups-basics.mkiv index be96466b8..422877bc2 100644 --- a/tex/context/modules/mkiv/x-setups-basics.mkiv +++ b/tex/context/modules/mkiv/x-setups-basics.mkiv @@ -517,7 +517,8 @@ \fi} \def\cmd_show_setup_nop#1% this will trigger 'used' - {\registersort[texcommand][#1]% + {\begingroup + \registersort[texcommand][#1]% \ifconditional\c_cmd_show_setup \writestatus{setup}{#1 / \rawsynonymname{texcommand}{#1}}% \fi @@ -534,7 +535,8 @@ \let\m_cmd_instance\empty \fi \stopelement - \stopelement} + \stopelement + \endgroup} \unexpanded\def\placesetup {\placelistofsorts[texcommand][\c!criterium=\v!used]} \unexpanded\def\placeallsetups{\placelistofsorts[texcommand][\c!criterium=\v!all ]} |