ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \mathop inside \sometxt in MKIV
@ 2008-09-11 20:36 Aditya Mahajan
  2008-09-12  7:41 ` Taco Hoekwater
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2008-09-11 20:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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: \mathop inside \sometxt in MKIV
  2008-09-11 20:36 \mathop inside \sometxt in MKIV Aditya Mahajan
@ 2008-09-12  7:41 ` Taco Hoekwater
  2008-09-12  9:30   ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Taco Hoekwater @ 2008-09-12  7:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users



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
___________________________________________________________________________________
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: \mathop inside \sometxt in MKIV
  2008-09-12  7:41 ` Taco Hoekwater
@ 2008-09-12  9:30   ` Hans Hagen
  2008-09-12 14:44     ` Mojca Miklavec
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2008-09-12  9:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: \mathop inside \sometxt in MKIV
  2008-09-12  9:30   ` Hans Hagen
@ 2008-09-12 14:44     ` Mojca Miklavec
  0 siblings, 0 replies; 4+ messages in thread
From: Mojca Miklavec @ 2008-09-12 14:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Sep 12, 2008 at 11:30 AM, Hans Hagen <pragma@wxs.nl> wrote:
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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:[~2008-09-12 14:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-11 20:36 \mathop inside \sometxt in MKIV Aditya Mahajan
2008-09-12  7:41 ` Taco Hoekwater
2008-09-12  9:30   ` Hans Hagen
2008-09-12 14:44     ` Mojca Miklavec

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).