diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/meta-nav.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/meta-nav.tex | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/meta-nav.tex b/Master/texmf-dist/tex/context/base/meta-nav.tex new file mode 100644 index 00000000000..9c1cbb4dbb4 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/meta-nav.tex @@ -0,0 +1,65 @@ +%D \module +%D [ file=meta-nav, +%D version=2003.03.28, +%D title=\METAPOST\ Graphics, +%D subtitle=Navigational Graphics, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\startuniqueMPgraphic{navplus}{size,color,type,mode} + color c ; numeric s, t ; path p ; + t := \MPvar{type} ; c := \MPvar{color} ; s := \MPvar{size} ; + if \MPvar{mode} = 1 : c := .5[c,white] fi ; + if t = 1 : + p := ((0,0)--(1/2,0)--(1,1/3)--(1,1)--(0,1)--(0,0)--cycle) + xyscaled (3,4) ; + elseif t = 2 : + p := ((0,0)--(1,0)--(1,1)--(0,1)--(1/2,2/5)--(1,1)--(0,1)--cycle) + xyscaled (4,3) ; + else : + p := fullsquare xyscaled (3,3) ; + fi ; + draw p withpen pencircle scaled (1/2) withcolor .75white ; + fill p withcolor c ; + draw p withpen pencircle scaled (1/3) withcolor .5c ; + currentpicture := currentpicture scaled s ; + currentpicture := currentpicture shifted -center currentpicture ; +\stopuniqueMPgraphic + +\setupMPvariables + [navplus] + [size=1ex, + color=black, + type=1, + mode=0] + +\definepalet + [navplus] + [attach=darkred, + comment=darkblue] + +\definesymbol + [comment-normal] + [\uniqueMPgraphic{navplus}{type=1,color=navplus:comment}] +\definesymbol + [comment-down] + [\uniqueMPgraphic{navplus}{type=1,color=navplus:comment,mode=1}] + +\definesymbol + [attach-normal] + [\uniqueMPgraphic{navplus}{type=2,color=navplus:attach}] +\definesymbol + [attach-down] + [\uniqueMPgraphic{navplus}{type=2,color=navplus:attach,mode=1}] + +\unprotect + +\setupcomment [\c!symbol={comment-normal,comment-down}] +\setupattachments[\c!symbol={attach-normal,attach-down}] + +\protect \endinput |