summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-02-25 22:03:00 +0100
committerHans Hagen <pragma@wxs.nl>2011-02-25 22:03:00 +0100
commit3c5dbaefc44f38d6da23a7db2c06a0a4af0996fa (patch)
treec3ad9361af8d3f1dd37de52463fa505680446a1e /metapost
parent15ee46403d36de6f29b4e45171e061708ec69193 (diff)
downloadcontext-3c5dbaefc44f38d6da23a7db2c06a0a4af0996fa.tar.gz
beta 2011.02.25 22:03
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mp-mlib.mp24
1 files changed, 15 insertions, 9 deletions
diff --git a/metapost/context/base/mp-mlib.mp b/metapost/context/base/mp-mlib.mp
index 7b3491539..cedfa9f7b 100644
--- a/metapost/context/base/mp-mlib.mp
+++ b/metapost/context/base/mp-mlib.mp
@@ -100,15 +100,21 @@ vardef rawtextext(expr str) =
withpostscript str
)
else :
- image (
- _tt_n_ := _tt_n_ + 1 ;
- addto currentpicture doublepath unitsquare
- xscaled _tt_w_[_tt_n_]
- yscaled (_tt_h_[_tt_n_] + _tt_d_[_tt_n_])
- withprescript "tx_number=" & decimal _tt_n_
- withprescript "tx_stage=final"
- ; % withpostscript str ;
- ) shifted (0,-_tt_d_[_tt_n_])
+ _tt_n_ := _tt_n_ + 1 ;
+ if known _tt_d_[_tt_n_] :
+ image (
+ addto currentpicture doublepath unitsquare
+ xscaled _tt_w_[_tt_n_]
+ yscaled (_tt_h_[_tt_n_] + _tt_d_[_tt_n_])
+ withprescript "tx_number=" & decimal _tt_n_
+ withprescript "tx_stage=final"
+ ; % withpostscript str ;
+ ) shifted (0,-_tt_d_[_tt_n_])
+ else :
+ image (
+ addto currentpicture doublepath unitsquare ;
+ )
+ fi
fi
enddef ;