ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* metafun/label: utf8 and spaces
@ 2007-06-28 15:16 Patrick Gundlach
  2007-06-28 16:01 ` Patrick Gundlach
  2007-06-29 21:18 ` Mojca Miklavec
  0 siblings, 2 replies; 5+ messages in thread
From: Patrick Gundlach @ 2007-06-28 15:16 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: metafun/label: utf8 and spaces
  2007-06-28 15:16 metafun/label: utf8 and spaces Patrick Gundlach
@ 2007-06-28 16:01 ` Patrick Gundlach
  2007-06-28 17:04   ` Aditya Mahajan
  2007-06-29 21:18 ` Mojca Miklavec
  1 sibling, 1 reply; 5+ messages in thread
From: Patrick Gundlach @ 2007-06-28 16:01 UTC (permalink / raw)
  To: ntg-context


> 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)

Patrick
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: metafun/label: utf8 and spaces
  2007-06-28 16:01 ` Patrick Gundlach
@ 2007-06-28 17:04   ` Aditya Mahajan
  0 siblings, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2007-06-28 17:04 UTC (permalink / raw)
  To: ntg-context

Quoting Patrick Gundlach <patrick@gundla.ch>:

>
>> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: metafun/label: utf8 and spaces
  2007-06-28 15:16 metafun/label: utf8 and spaces Patrick Gundlach
  2007-06-28 16:01 ` Patrick Gundlach
@ 2007-06-29 21:18 ` Mojca Miklavec
  2007-07-02 10:16   ` Patrick Gundlach
  1 sibling, 1 reply; 5+ messages in thread
From: Mojca Miklavec @ 2007-06-29 21:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: metafun/label: utf8 and spaces
  2007-06-29 21:18 ` Mojca Miklavec
@ 2007-07-02 10:16   ` Patrick Gundlach
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick Gundlach @ 2007-07-02 10:16 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-02 10:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-28 15:16 metafun/label: utf8 and spaces Patrick Gundlach
2007-06-28 16:01 ` Patrick Gundlach
2007-06-28 17:04   ` Aditya Mahajan
2007-06-29 21:18 ` Mojca Miklavec
2007-07-02 10:16   ` Patrick Gundlach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).