diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2009-08-23 11:11:32 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2009-08-23 11:11:32 +0000 |
commit | 8fc3039c82d48605b5ca8b2eda3f4fdd755681e1 (patch) | |
tree | 3cd9bbdd599bc4d1ac0409e167fee2136e4c0ec9 /Master/texmf-dist/tex/context/base/m-graph.mkii | |
parent | 850fc99b7cd3ae7a20065531fe866ff7bae642ec (diff) |
this is context 2009.08.19 17:10
git-svn-id: svn://tug.org/texlive/trunk@14827 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/m-graph.mkii')
-rw-r--r-- | Master/texmf-dist/tex/context/base/m-graph.mkii | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/m-graph.mkii b/Master/texmf-dist/tex/context/base/m-graph.mkii new file mode 100644 index 00000000000..db7538e9807 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/m-graph.mkii @@ -0,0 +1,72 @@ +%D \module +%D [ file=m-graph, +%D version=2000.08.06, +%D title=\CONTEXT\ Extra Modules, +%D subtitle=\METAPOST\ graph module support, +%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. + +%D I finally finished graph support, if only because I could +%D not stand the idea that Karel Wesseling would revert to +%D \PiCTeX. + +% pre 2000.08.06 version +% +% \forceMPTEXgraphictrue +% +% \startMPinitializations +% initialize_numbers ; % make sure that pseudo typesetting is set up +% input graph ; % load the graph package +% Autoform := "@g" ; % change the % template char into @ +% \stopMPinitializations + +%D The latest version does things more automatically (and +%D efficiently when no text processing is needed). For +%D definitions embedded in your document, you need to +%D use \type {@} as template character, in external files, +%D \type {%} is also supported. + +\startMPinclusions + input graph ; +\stopMPinclusions + +%D Graphics that have \type {begingraph} in them are +%D recognized as such and force handling of embedded \TEX\ +%D code. + +\forceMPTEXcheck{begingraph} + +%D If you run into troubles, try: +%D +%D \starttyping +%D \forceMPTEXgraphictrue +%D \stoptyping +%D +%D A demo can be run with: +%D +%D \starttyping +%D texexec --mode=demo --pdf m-graph +%D \stoptyping + +\startMPinclusions + % @# is X_ or Y_; $ is Gxcvlin_ or Gycvlin_; l and h are numeric or string + % It would not be OK to set (@#low,@#high) to a pair expression because $ might + % try to rescale @#low when evaluating the right-hand side for @#high. + vardef Gsetr_@\#(suffix $)(expr l, h) = + Gclbnds_@\# ; + if @\#ctyp>0 : + @\#low = if abs @\#ctyp<>log: $ fi Mlog_Str l ; + @\#high = if abs @\#ctyp<>log: $ fi Mlog_Str h ; + else : + -@\#high = if abs @\#ctyp<>log: $ fi Mlog_Str l ; + -@\#low = if abs @\#ctyp<>log: $ fi Mlog_Str h ; + fi + enddef ; +\stopMPinclusions + +\endinput |