* A sometxt bug (rather misfeature)
@ 2007-08-29 20:16 Aditya Mahajan
2007-08-29 20:32 ` Aditya Mahajan
0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2007-08-29 20:16 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
Found an interesting sometxt misfeature.
\startMPinclusions
boolean test ; test=true ;
\stopMPinclusions
\startbuffer[test]
if test :
label(\sometxt{True}, origin) ;
fi ;
label(\sometxt{False}, (10,10)) ;
\stopbuffer
\processMPbuffer[test]
\blank[big]
\startMPinitializations
test := false ;
\stopMPinitializations
\processMPbuffer[test]
Too bad context cannnot parse metapost syntax :)
Workaround (ugly)
\startTeXtexts
\TeXtext{1000}{True}
\stopTeXtexts
\startbuffer[test]
if test :
label(sometxt(1000), origin) ;
fi ;
label(\sometxt{False}, (10,10)) ;
\stopbuffer
\processMPbuffer[test]
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] 4+ messages in thread
* Re: A sometxt bug (rather misfeature)
2007-08-29 20:16 A sometxt bug (rather misfeature) Aditya Mahajan
@ 2007-08-29 20:32 ` Aditya Mahajan
2007-08-30 6:51 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2007-08-29 20:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Wed, 29 Aug 2007, Aditya Mahajan wrote:
> Hi,
>
> Found an interesting sometxt misfeature.
>
> \startMPinclusions
> boolean test ; test=true ;
> \stopMPinclusions
>
> \startbuffer[test]
> if test :
> label(\sometxt{True}, origin) ;
> fi ;
> label(\sometxt{False}, (10,10)) ;
> \stopbuffer
>
> \processMPbuffer[test]
>
> \blank[big]
>
> \startMPinitializations
> test := false ;
> \stopMPinitializations
>
> \processMPbuffer[test]
>
> Too bad context cannnot parse metapost syntax :)
>
> Workaround (ugly)
Another workaround, slightly less ugly (as long as you count the
number of \sometxt in the if part.
\startbuffer[test]
if test :
label(\sometxt{True}, origin) ;
else :
txtnext := txtnext + 1 ;
fi ;
label(\sometxt{False}, (10,10)) ;
\stopbuffer
\processMPbuffer[test]
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] 4+ messages in thread
* Re: A sometxt bug (rather misfeature)
2007-08-29 20:32 ` Aditya Mahajan
@ 2007-08-30 6:51 ` Hans Hagen
2007-08-30 14:28 ` Aditya Mahajan
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2007-08-30 6:51 UTC (permalink / raw)
To: mailing list for ConTeXt users
Aditya Mahajan wrote:
> On Wed, 29 Aug 2007, Aditya Mahajan wrote:
>
>> Hi,
>>
>> Found an interesting sometxt misfeature.
>>
>> \startMPinclusions
>> boolean test ; test=true ;
>> \stopMPinclusions
>>
>> \startbuffer[test]
>> if test :
>> label(\sometxt{True}, origin) ;
>> fi ;
>> label(\sometxt{False}, (10,10)) ;
>> \stopbuffer
>>
>> \processMPbuffer[test]
>>
>> \blank[big]
>>
>> \startMPinitializations
>> test := false ;
>> \stopMPinitializations
>>
>> \processMPbuffer[test]
>>
>> Too bad context cannnot parse metapost syntax :)
>>
>> Workaround (ugly)
>
> Another workaround, slightly less ugly (as long as you count the
> number of \sometxt in the if part.
>
> \startbuffer[test]
> if test :
> label(\sometxt{True}, origin) ;
> else :
> txtnext := txtnext + 1 ;
> fi ;
> label(\sometxt{False}, (10,10)) ;
> \stopbuffer
>
> \processMPbuffer[test]
picture p ; p := label(\sometxt{True}, origin) ;
if test then
draw p ;
fi ;
label(\sometxt{False}, (10,10)) ;
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 4+ messages in thread
* Re: A sometxt bug (rather misfeature)
2007-08-30 6:51 ` Hans Hagen
@ 2007-08-30 14:28 ` Aditya Mahajan
0 siblings, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2007-08-30 14:28 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Thu, 30 Aug 2007, Hans Hagen wrote:
> picture p ; p := label(\sometxt{True}, origin) ;
> if test then
> draw p ;
> fi ;
> label(\sometxt{False}, (10,10)) ;
Much cleaner. Thanks.
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] 4+ messages in thread
end of thread, other threads:[~2007-08-30 14:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29 20:16 A sometxt bug (rather misfeature) Aditya Mahajan
2007-08-29 20:32 ` Aditya Mahajan
2007-08-30 6:51 ` Hans Hagen
2007-08-30 14:28 ` Aditya Mahajan
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).