diff options
Diffstat (limited to 'tex/context/base/trac-vis.mkiv')
-rw-r--r-- | tex/context/base/trac-vis.mkiv | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/tex/context/base/trac-vis.mkiv b/tex/context/base/trac-vis.mkiv index 694d1b09d..6ee8a6b8d 100644 --- a/tex/context/base/trac-vis.mkiv +++ b/tex/context/base/trac-vis.mkiv @@ -54,10 +54,10 @@ \let\syst_visualizers_vbox\vbox \let\syst_visualizers_vtop\vtop -\unexpanded\def\ruledhbox{\syst_visualizers_hbox attr \visualattribute \ctxcommand{visual("simplehbox")} } -\unexpanded\def\ruledvbox{\syst_visualizers_vbox attr \visualattribute \ctxcommand{visual("simplevbox")} } -\unexpanded\def\ruledvtop{\syst_visualizers_vtop attr \visualattribute \ctxcommand{visual("simplevtop")} } % special case -\unexpanded\def\ruledtopv{\syst_visualizers_vtop attr \visualattribute \ctxcommand{visual("vtop")} } +\unexpanded\def\ruledhbox{\syst_visualizers_hbox attr \visualattribute \clf_getvisual{simplehbox} } +\unexpanded\def\ruledvbox{\syst_visualizers_vbox attr \visualattribute \clf_getvisual{simplevbox} } +\unexpanded\def\ruledvtop{\syst_visualizers_vtop attr \visualattribute \clf_getvisual{simplevtop} } % special case +\unexpanded\def\ruledtopv{\syst_visualizers_vtop attr \visualattribute \clf_getvisual{vtop} } \unexpanded\def\ruledmbox#1{\ruledhbox{\startimath#1\stopimath}} @@ -83,26 +83,33 @@ \to \t_syst_visualizers_optimize \unexpanded\def\showmakeup - {\ctxcommand{setvisual("makeup")}% - \let\normalvtop\ruledtopv - \let\vtop \ruledtopv} + {\dosingleempty\syst_visualizers_makeup} + +\unexpanded\def\syst_visualizers_makeup[#1]% + {\iffirstargument + \clf_setvisual{#1}% + \else + \clf_setvisual{makeup}% + \let\normalvtop\ruledtopv + \let\vtop \ruledtopv + \fi} \unexpanded\def\showallmakeup - {\ctxcommand{setvisual("all")}% + {\clf_setvisual{all}% \let\normalvtop\ruledtopv \let\vtop \ruledtopv \showstruts} \unexpanded\def\showboxes - {\ctxcommand{setvisual("boxes")}% + {\clf_setvisual{boxes}% \let\normalvtop\ruledtopv \let\vtop \ruledtopv} \unexpanded\def\showglyphs - {\ctxcommand{setvisual("glyph")}} + {\clf_setvisual{glyph}} \unexpanded\def\showfontkerns - {\ctxcommand{setvisual("fontkern")}} + {\clf_setvisual{fontkern}} \unexpanded\def\setvisualizerfont {\dosingleempty\syst_visualizers_setfont} @@ -110,18 +117,21 @@ \def\syst_visualizers_setfont[#1]% somename at 4pt {\begingroup \doifelsenothing{#1}{\definedfont[Mono at 4pt]}{\definedfont[#1]}% - \ctxlua{nodes.visualizers.setfont()}% + \clf_setvisualfont\fontid\font \endgroup} +\unexpanded\def\resetvisualizers + {\attribute\visualattribute\attributeunsetvalue} + %D New (these might also be a visualizers): -\definecolor[f:r:t][a=1,t=.25,r=1] -\definecolor[f:g:t][a=1,t=.25,g=1] -\definecolor[f:b:t][a=1,t=.25,b=1] -\definecolor[f:c:t][a=1,t=.25,c=1] -\definecolor[f:m:t][a=1,t=.25,m=1] -\definecolor[f:y:t][a=1,t=.25,y=1] -\definecolor[f:k:t][a=1,t=.25,s=0] +% \definecolor[f:r:t][a=1,t=.25,r=1] +% \definecolor[f:g:t][a=1,t=.25,g=1] +% \definecolor[f:b:t][a=1,t=.25,b=1] +% \definecolor[f:c:t][a=1,t=.25,c=1] +% \definecolor[f:m:t][a=1,t=.25,m=1] +% \definecolor[f:y:t][a=1,t=.25,y=1] +% \definecolor[f:k:t][a=1,t=.25,s=0] % \def\node_backgrounds_boxes_add#1[#2]% % {\node_backgrounds_boxes_initialize @@ -141,14 +151,14 @@ %D Overload: % \def\spac_struts_vide_hbox -% {\hbox attr \visualattribute \ctxcommand{visual("strut")} } +% {\hbox attr \visualattribute \clf_getvisual{strut} } % % \def\spac_struts_vide_hbox -% {\xdef\spac_struts_vide_hbox{\hbox attr \visualattribute \ctxcommand{visual("strut")} }% +% {\xdef\spac_struts_vide_hbox{\hbox attr \visualattribute \clf_getvisual{strut} }% % \spac_struts_vide_hbox} \unexpanded\def\spac_struts_vide_hbox - {\hbox attr \visualattribute \ctxcommand{visual("strut")} } + {\hbox attr \visualattribute \clf_getvisual{strut} } \appendtoks \normalexpanded{\unexpanded\xdef\spac_struts_vide_hbox\expandafter{\spac_struts_vide_hbox}}% @@ -160,7 +170,7 @@ {\dontleavehmode \begingroup \setbox\scratchbox\hbox{\getbuffer}% - \ctxcommand{markfonts(\number\scratchbox)}% + \clf_markvisualfonts\scratchbox \unhbox\scratchbox \endgroup} |