Re: [NTG-context] TeX-MP interaction in mkii and mkiv

2008-10-13 Thread Mojca Miklavec
On Fri, Oct 10, 2008 at 7:24 PM, Aditya Mahajan wrote:
 On Fri, 10 Oct 2008, Hans Hagen wrote:

 Aditya Mahajan wrote:
 Hi,

 Another difference in mkii and mkiv handling of sometxt. If there is a
 line break in \sometxt{ ... } then it fails in mkii, but runs in mkiv. For
 example,

 \starttext

 \startMPcode

draw \sometxt{A very
 long string} ;

 \stopMPcode

 \stoptext

 I vaguely understand why this is happening, but I do not know if it can be
 corrected.

 in mkii we obey lines because it gives better tracing etc etc given that
 we use external files; this will work:


draw \sometxt{A very %
 long string} ;


 Ah, thanks.

 indeed mkiv is different but let's consider it an improvement; i don't
 want to waste time on mkii fixes that are not that important

 I understand that. We need to document all these differences between mkii
 and mkiv with regards to mp interaction for those who want to write code
 that works in both. Mojca, any plans to update your MyWay?

If you want to do changes, just go ahead (you might be more
competitive to describe them).

Otherwise: I'm not sure what all the differences are.
1.) withcolor doesn't work
2.) \startTeXtexsts cannot be used
3.) the example above fails in mkii

What else?

Mojca
___
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
___


Re: [NTG-context] TeX-MP interaction in mkii and mkiv

2008-10-13 Thread Aditya Mahajan
On Mon, 13 Oct 2008, Mojca Miklavec wrote:

 On Fri, Oct 10, 2008 at 7:24 PM, Aditya Mahajan wrote:
 On Fri, 10 Oct 2008, Hans Hagen wrote:

 Aditya Mahajan wrote:
 Hi,

 Another difference in mkii and mkiv handling of sometxt. If there is a
 line break in \sometxt{ ... } then it fails in mkii, but runs in mkiv. For
 example,

 \starttext

 \startMPcode

draw \sometxt{A very
 long string} ;

 \stopMPcode

 \stoptext

 I vaguely understand why this is happening, but I do not know if it can be
 corrected.

 in mkii we obey lines because it gives better tracing etc etc given that
 we use external files; this will work:


draw \sometxt{A very %
 long string} ;


 Ah, thanks.

 indeed mkiv is different but let's consider it an improvement; i don't
 want to waste time on mkii fixes that are not that important

 I understand that. We need to document all these differences between mkii
 and mkiv with regards to mp interaction for those who want to write code
 that works in both. Mojca, any plans to update your MyWay?

 If you want to do changes, just go ahead (you might be more
 competitive to describe them).

 Otherwise: I'm not sure what all the differences are.
 1.) withcolor doesn't work
 2.) \startTeXtexsts cannot be used
 3.) the example above fails in mkii

In MKIV certain commands inside \sometxt should be unexpandable. I do not 
really understand which ones, but I occasionally get errors which can be 
fixed by making the command unexpandable.

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
___


Re: [NTG-context] TeX-MP interaction in mkii and mkiv

2008-10-10 Thread Aditya Mahajan
Hi,

Another difference in mkii and mkiv handling of sometxt. If there is a 
line break in \sometxt{ ... } then it fails in mkii, but runs in mkiv. For 
example,

\starttext

\startMPcode

   draw \sometxt{A very
long string} ;

\stopMPcode

\stoptext

I vaguely understand why this is happening, but I do not know if it can be 
corrected.

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
___


Re: [NTG-context] TeX-MP interaction in mkii and mkiv

2008-10-10 Thread Hans Hagen
Aditya Mahajan wrote:
 Hi,
 
 Another difference in mkii and mkiv handling of sometxt. If there is a 
 line break in \sometxt{ ... } then it fails in mkii, but runs in mkiv. For 
 example,
 
 \starttext
 
 \startMPcode
 
draw \sometxt{A very
 long string} ;
 
 \stopMPcode
 
 \stoptext
 
 I vaguely understand why this is happening, but I do not know if it can be 
 corrected.

in mkii we obey lines because it gives better tracing etc etc given that 
we use external files; this will work:


draw \sometxt{A very %
 long string} ;


indeed mkiv is different but let's consider it an improvement; i don't 
want to waste time on mkii fixes that are not that important

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


Re: [NTG-context] TeX-MP interaction in mkii and mkiv

2008-10-10 Thread Aditya Mahajan
On Fri, 10 Oct 2008, Hans Hagen wrote:

 Aditya Mahajan wrote:
 Hi,

 Another difference in mkii and mkiv handling of sometxt. If there is a
 line break in \sometxt{ ... } then it fails in mkii, but runs in mkiv. For
 example,

 \starttext

 \startMPcode

draw \sometxt{A very
 long string} ;

 \stopMPcode

 \stoptext

 I vaguely understand why this is happening, but I do not know if it can be
 corrected.

 in mkii we obey lines because it gives better tracing etc etc given that
 we use external files; this will work:


draw \sometxt{A very %
 long string} ;


Ah, thanks.

 indeed mkiv is different but let's consider it an improvement; i don't
 want to waste time on mkii fixes that are not that important

I understand that. We need to document all these differences between mkii 
and mkiv with regards to mp interaction for those who want to write code 
that works in both. Mojca, any plans to update your MyWay?

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
___


Re: [NTG-context] TeX-MP interaction in mkii and mkiv

2008-10-02 Thread Aditya Mahajan
On Thu, 2 Oct 2008, Aditya Mahajan wrote:

 Hi,

 I cannot understand why mkii and mkiv give different output in the attached 
 example modified from Thomas's presentation module. The output of MKII is 
 correct. In MKIV, the first picture (Left) is not correct, and I cannot 
 understand why is this the case.

 I am using the latest minimals and the latest svn luatex.

MKIV is very strict about the spaces. I had

Left  := \sometxt[taspresent:sometxt:left] {\folio} ysized 6cm;
Right := \sometxt[taspresent:sometxt:right]{\folio} ysized 6cm;

(notice the space before \folio in Left). MKIV does not like that. If I 
remove the space, everything is fine.

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
___


Re: [NTG-context] TeX-MP interaction in mkii and mkiv

2008-10-02 Thread Taco Hoekwater


Aditya Mahajan wrote:
 On Thu, 2 Oct 2008, Aditya Mahajan wrote:
 
 Hi,

 I cannot understand why mkii and mkiv give different output in the attached 
 example modified from Thomas's presentation module. The output of MKII is 
 correct. In MKIV, the first picture (Left) is not correct, and I cannot 
 understand why is this the case.

 I am using the latest minimals and the latest svn luatex.
 
 MKIV is very strict about the spaces. I had
 
 Left  := \sometxt[taspresent:sometxt:left] {\folio} ysized 6cm;
 Right := \sometxt[taspresent:sometxt:right]{\folio} ysized 6cm;
 
 (notice the space before \folio in Left). MKIV does not like that. If I 
 remove the space, everything is fine.

... I had just figured that out myself. :-(

It seems we can fix that by redefining the definition of \sometxt.


Best wishes,
Taco

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


Re: [NTG-context] TeX-MP interaction in mkii and mkiv

2008-10-02 Thread Taco Hoekwater


Taco Hoekwater wrote:

 (notice the space before \folio in Left). MKIV does not like that. If I 
 remove the space, everything is fine.
 
 ... I had just figured that out myself. :-(
 
 It seems we can fix that by redefining the definition of \sometxt.

Sorry, make that \definetextext. The macro \sometxt has to be
expandable, which limits the amount of tricks we can do with it.

This patch works:

   \def\definetextext[#1]#2%
 {\setvalue{@@st@@[#1]}{#2}%
  \setvalue{@@st@@[#1] }{#2}% added
 }

Best wishes,
Taco
___
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
___


Re: [NTG-context] TeX-MP interaction in mkii and mkiv

2008-10-02 Thread Aditya Mahajan
On Thu, 2 Oct 2008, Taco Hoekwater wrote:



 Taco Hoekwater wrote:

 (notice the space before \folio in Left). MKIV does not like that. If I
 remove the space, everything is fine.

 ... I had just figured that out myself. :-(

Ha, I can now claim that I figured out one TeX problem faster than 
you :-) Of course, you also figured out a solution :-D

 It seems we can fix that by redefining the definition of \sometxt.

 Sorry, make that \definetextext. The macro \sometxt has to be
 expandable, which limits the amount of tricks we can do with it.

 This patch works:

   \def\definetextext[#1]#2%
 {\setvalue{@@st@@[#1]}{#2}%
  \setvalue{@@st@@[#1] }{#2}% added
 }

Thanks, works perfectly.

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
___