Hi, is there any way to get utf-8 labels and without the 'strange' space glyph? -------------------------------------------------- \startMPenvironment[+] \enableregime[utf] \stopMPenvironment \starttext foobar baz äöß % <-- OK \startuniqueMPgraphic{bla} label("foobar baz äöß",(3cm,3cm)); % <-- broken draw btex foobar baz äöß etex % <--- OK \stopuniqueMPgraphic \useMPgraphic{bla} \stoptext -------------------------------------------------- Patrick
Quoting Patrick Gundlach
is there any way to get utf-8 labels and without the 'strange' space glyph?
A follow-up/answer... (I hate doing this)
textext is a perfect substitute for label. (see metafun-p.pdf)
I think of textext (and \sometxt) as a substitute for btex ... etex, not of label. I substitute of label should also accept a position variable, so that one could write texlabel.top("$x^2$", origin) ; I know this should be simple, but I do not understand the metapost macro language to write such a macro. Writing label.top(textext("$x^2$"), origin) is too verbose. Suggestions? Aditya
On 6/28/07, Patrick Gundlach wrote:
Hi,
is there any way to get utf-8 labels and without the 'strange' space glyph?
--------------------------------------------------
\startMPenvironment[+] \enableregime[utf] \stopMPenvironment
\starttext foobar baz äöß % <-- OK
\startuniqueMPgraphic{bla} label("foobar baz äöß",(3cm,3cm)); % <-- broken draw btex foobar baz äöß etex % <--- OK \stopuniqueMPgraphic
\useMPgraphic{bla}
\stoptext --------------------------------------------------
Why not this one? (Much faster, less problems, etc.) \enableregime[utf-8] \starttext \startuniqueMPgraphic{bla} label(\sometxt{foobar baz äöß},(3cm,3cm)); \stopuniqueMPgraphic \useMPgraphic{bla} \stoptext Metapost strings are something I wouldn't use anyway, although Aditya's idea is also a nice one (a dirty way would be to redefine label to use textext instead - I don't mean it too seriously of course). Mojca (http://dl.contextgarden.net/myway/sometxt.pdf)
Hi Mojca,
label("foobar baz äöß",(3cm,3cm)); % <-- broken draw btex foobar baz äöß etex % <--- OK
Why not this one? [\sometxt] (Much faster, less problems, etc.)
(with the sound of 'wizard of oz') Because, because, because... I didn't know about it. Thanks! Patrick
participants (3)
-
Aditya Mahajan
-
Mojca Miklavec
-
Patrick Gundlach