diff options
author | Hans Hagen <pragma@wxs.nl> | 2003-04-22 00:00:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2003-04-22 00:00:00 +0200 |
commit | 30ab0025913bb6e39e7cfd2c37b402083b1f7337 (patch) | |
tree | cb73415b1f5e397d6c2d81300d962405b5b27639 /tex/context/base/meta-nav.tex | |
parent | 44a457e94e531de21ed9138035570e6fc23d9019 (diff) | |
download | context-30ab0025913bb6e39e7cfd2c37b402083b1f7337.tar.gz |
stable 2003.04.22
Diffstat (limited to 'tex/context/base/meta-nav.tex')
-rw-r--r-- | tex/context/base/meta-nav.tex | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/tex/context/base/meta-nav.tex b/tex/context/base/meta-nav.tex new file mode 100644 index 000000000..5628e6f7b --- /dev/null +++ b/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. + +\unprotect + +\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}] + +\setupcomment [\c!symbool={comment-normal,comment-down}] +\setupattachments[\c!symbool={attach-normal,attach-down}] + +\protect \endinput |