[dev-context] new MyWay about \sometxt

Aditya Mahajan adityam at umich.edu
Tue Jan 30 05:41:41 CET 2007

On Tue, 30 Jan 2007, Mojca Miklavec wrote:

> Hello,
> instead of checking the problems with MyWay about database module, I
> created another unfinished piece about \sometxt (as promised already
> long ago):
>    http://dl.contextgarden.net/myway/sometxt.pdf
> \sometxt{...} should be used instead of textext("...") in metafun
> graphics whenever possible, since it's much more efficient. An average
> user shouldn't care about much more than that. The MyWay is devoted to
> the curious ones. I hope that I included all the major ideas which
> Hans implemented in Summer/Autumn 2006 on my request. Although not all
> of them are documented well enough, I tried to mention them at least.

Very nice. Now, I do not need to look up old mails to figure out how 
to manipulate sometxt. I have one example where \sometxt[...]{...} is 
useful. If you are interested, I can send it to you.

I thought a bit about your feature request, and it is not too 
difficult to implement it. Here is a patch that allows you to use 
\sometext[font][iwona,20pt]{...}. Careful of spurious linebreaks.







   draw fullcircle xyscaled (3cm,2cm);
   label(\sometxt{Hello world!}, origin);

% Does not cause any harm.
   draw fullcircle xyscaled (3cm,2cm);
   label(\sometxt[font]{Hello world!}, origin);

   draw fullcircle xyscaled (3cm,2cm);
   label(\sometxt[font][iwona,20pt]{Hello world!}, origin);



I haven't tested it, but I do not think that this should cause any 
problems with existing code. \definetextext[font] is just a dummy. It 
should work with other things also. You can get rid of the dummy 
by checking in redodofiltersometxt if #1 is has a comma or not. Would 
that extra overhead be useful of gnuplot?

Hans, is there a reason for not defining dodofiltersometxt as

\long\def\dodofiltersometxt#1#2% #3
    \fi#2}% #3

whih will be a bit faster.


More information about the dev-context mailing list