\mathop inside \sometxt in MKIV
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
Hi, I am using ConTeXt ver: 2008.09.10 14:01 MKIV fmt: 2008.9.11 and the following file \starttext \startMPcode label.bot(\sometxt{$\mathop{}$}, origin) ; \stopMPcode \stoptext gives ! Missing number, treated as zero. <to be read again> ## \purenumber ...firstofoneargument \@EA {\number #1 } \PDFobjref #1->\purenumber {#1} 0 R l.46 \def\PDFobjref# 1{\purenumber{#1} 0 R} ? ! Missing number, treated as zero. <to be read again> ## It runs correctly with MKII. Any ideas? Aditya
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Aditya Mahajan wrote:
Hi,
I am using ConTeXt ver: 2008.09.10 14:01 MKIV fmt: 2008.9.11 and the following file
\starttext \startMPcode label.bot(\sometxt{$\mathop{}$}, origin) ; \stopMPcode
The problem is that everything within \startMPcode ... \stopMPcode is expanded, but \mathop's (re)definition has \let commands in it. This works as a workaround: \startMPcode label.bot(\sometxt{$\noexpand\mathop{}$}, origin) ; \stopMPcode But actually the definition of \mathop in font-ini.tex needs to be changed so that it won't be expandable any more. The current definition would give problems in the support files (tuo,tuc) as well. Best wishes, Taco
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Taco Hoekwater wrote:
Aditya Mahajan wrote:
Hi,
I am using ConTeXt ver: 2008.09.10 14:01 MKIV fmt: 2008.9.11 and the following file
\starttext \startMPcode label.bot(\sometxt{$\mathop{}$}, origin) ; \stopMPcode
The problem is that everything within \startMPcode ... \stopMPcode is expanded, but \mathop's (re)definition has \let commands in it.
This works as a workaround:
\startMPcode label.bot(\sometxt{$\noexpand\mathop{}$}, origin) ; \stopMPcode
or \detokenise{a whole bunch of tricky tex}
But actually the definition of \mathop in font-ini.tex needs to be changed so that it won't be expandable any more. The current definition would give problems in the support files (tuo,tuc) as well.
indeed; i already did that, but more math commands might need that treatment Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/6114858d84b0f40cf715f12237ab67a1.jpg?s=120&d=mm&r=g)
On Fri, Sep 12, 2008 at 11:30 AM, Hans Hagen
Taco Hoekwater wrote:
Aditya Mahajan wrote:
Hi,
I am using ConTeXt ver: 2008.09.10 14:01 MKIV fmt: 2008.9.11 and the following file
\starttext \startMPcode label.bot(\sometxt{$\mathop{}$}, origin) ; \stopMPcode
The problem is that everything within \startMPcode ... \stopMPcode is expanded, but \mathop's (re)definition has \let commands in it.
This works as a workaround:
\startMPcode label.bot(\sometxt{$\noexpand\mathop{}$}, origin) ; \stopMPcode
or \detokenise{a whole bunch of tricky tex}
But actually the definition of \mathop in font-ini.tex needs to be changed so that it won't be expandable any more. The current definition would give problems in the support files (tuo,tuc) as well.
indeed; i already did that, but more math commands might need that treatment
Hans
----------------------------------------------------------------- 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 ___________________________________________________________________________________
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
Mojca Miklavec
-
Taco Hoekwater