diff options
Diffstat (limited to 'Master/texmf-dist/metapost/context/base/mp-text.mp')
-rw-r--r-- | Master/texmf-dist/metapost/context/base/mp-text.mp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/Master/texmf-dist/metapost/context/base/mp-text.mp b/Master/texmf-dist/metapost/context/base/mp-text.mp index c1f9c80e909..efba39d7d1f 100644 --- a/Master/texmf-dist/metapost/context/base/mp-text.mp +++ b/Master/texmf-dist/metapost/context/base/mp-text.mp @@ -86,8 +86,9 @@ string laboff_l ; laboff_l := ".lft" ; string laboff_r ; laboff_r := ".rt" ; string laboff_b ; laboff_b := ".bot" ; string laboff_t ; laboff_t := ".top" ; + string laboff_lt ; laboff_lt := ".ulft" ; -string laboff_rt ; laboff_rt := ".urt" ; +string laboff_rt ; laboff_rt := ".urt" ; % bugged, conflict with r string laboff_lb ; laboff_lb := ".llft" ; string laboff_rb ; laboff_rb := ".lrt" ; string laboff_tl ; laboff_tl := ".ulft" ; @@ -103,18 +104,19 @@ vardef textextstr(expr s, a) = scantokens ss enddef ; -pair laboff.origin ; laboff.origin = (infinity,infinity) ; -pair laboff.raw ; laboff.raw = (infinity,infinity) ; +pair laboff.origin ; laboff.origin = (0,0) ; % (infinity,infinity) ; +pair laboff.raw ; laboff.raw = (0,0) ; % (infinity,infinity) ; vardef thelabel@#(expr s, z) = save p ; picture p ; p = s if not picture s : infont defaultfont scaled defaultscale fi ; - if laboff@#<>laboff.origin : +% wrong, see myway textext +% if laboff@#<>laboff.origin : (p shifted (z + labeloffset*laboff@# - (labxf@#*lrcorner p + labyf@#*ulcorner p + (1-labxf@#-labyf@#)*llcorner p))) - else : - (p shifted z) - fi +% else : +% (p shifted z) +% fi enddef; def build_parshape (expr p, offset_or_path, dx, dy, @@ -258,3 +260,7 @@ def build_parshape (expr p, offset_or_path, dx, dy, endgroup ; enddef ; + +vardef verbatim(expr str) = + ditto & "\detokenize{" & str & "}" & ditto +enddef ; |