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
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
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 -----------------------------------------------------------------
participants (2)
-
Aditya Mahajan
-
Hans Hagen