ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem with '\ ' in math commands in current minimals
@ 2008-06-10  2:58 Morgan Brassel
  2008-06-10  3:51 ` Aditya Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Morgan Brassel @ 2008-06-10  2:58 UTC (permalink / raw)
  To: ntg-context

Hi everyone,

In the following example:

\define[1]\com{com\ #1}
\starttext
\com{1} $\com{1}$
\stoptext

the second call to \com (the one in math mode) seems to stop the 
compilation of the file. Is it a bug? It wasn't happening before. I'm 
using the latest minimals.

Best regards,
Morgan

___________________________________________________________________________________
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] 6+ messages in thread

* Re: Problem with '\ ' in math commands in current minimals
  2008-06-10  2:58 Problem with '\ ' in math commands in current minimals Morgan Brassel
@ 2008-06-10  3:51 ` Aditya Mahajan
  2008-06-10  8:17   ` Hans Hagen
  2008-06-10  8:53   ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Aditya Mahajan @ 2008-06-10  3:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 10 Jun 2008, Morgan Brassel wrote:

> Hi everyone,
>
> In the following example:
>
> \define[1]\com{com\ #1}
> \starttext
> \com{1} $\com{1}$
> \stoptext
>
> the second call to \com (the one in math mode) seems to stop the
> compilation of the file. Is it a bug? It wasn't happening before. I'm
> using the latest minimals.

Definitely a bug: the trace shows a recursive definition. \ is defined in 
terms of itself. Looking at core-spa.tex I cannot understand why this is 
happening.

This is the output of \loggingall


\com #1->com\ #1
#1<-1
{the letter c}
{the letter o}
{the letter m}

\ ->\mathortext \normalspaceprimitive {\dontleavehmode \space }

\mathortext ->\ifmmode \expandafter \firstoftwoarguments \else 
\expandafter \se
condoftwoarguments \fi
{\ifmmode: (level 1) entered on line 6}
{true}
{\expandafter}
{\else: \ifmmode (level 1) entered on line 6}
{\fi: \ifmmode (level 1) entered on line 6}

\firstoftwoarguments #1#2->#1
#1<-\normalspaceprimitive
#2<-\dontleavehmode \space

\normalspaceprimitive ->\

\ ->\mathortext \normalspaceprimitive {\dontleavehmode \space }


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] 6+ messages in thread

* Re: Problem with '\ ' in math commands in current minimals
  2008-06-10  3:51 ` Aditya Mahajan
@ 2008-06-10  8:17   ` Hans Hagen
  2008-06-10  8:53   ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2008-06-10  8:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:
> On Tue, 10 Jun 2008, Morgan Brassel wrote:
> 
>> Hi everyone,
>>
>> In the following example:
>>
>> \define[1]\com{com\ #1}
>> \starttext
>> \com{1} $\com{1}$
>> \stoptext
>>
>> the second call to \com (the one in math mode) seems to stop the
>> compilation of the file. Is it a bug? It wasn't happening before. I'm
>> using the latest minimals.
> 
> Definitely a bug: the trace shows a recursive definition. \ is defined in 
> terms of itself. Looking at core-spa.tex I cannot understand why this is 
> happening.

hm, i'll look into it; i changed some things in the process of writing 
the mkiv mathml(3) interpreter.

\ is a primitive in tex but with some properties that may not always be 
optimal

-----------------------------------------------------------------
                                           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] 6+ messages in thread

* Re: Problem with '\ ' in math commands in current minimals
  2008-06-10  3:51 ` Aditya Mahajan
  2008-06-10  8:17   ` Hans Hagen
@ 2008-06-10  8:53   ` Hans Hagen
  2008-06-10 11:55     ` Morgan Brassel
  2008-06-10 14:14     ` Aditya Mahajan
  1 sibling, 2 replies; 6+ messages in thread
From: Hans Hagen @ 2008-06-10  8:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:
> On Tue, 10 Jun 2008, Morgan Brassel wrote:
> 
>> Hi everyone,
>>
>> In the following example:
>>
>> \define[1]\com{com\ #1}
>> \starttext
>> \com{1} $\com{1}$
>> \stoptext
>>
>> the second call to \com (the one in math mode) seems to stop the
>> compilation of the file. Is it a bug? It wasn't happening before. I'm
>> using the latest minimals.
> 
> Definitely a bug: the trace shows a recursive definition. \ is defined in 
> terms of itself. Looking at core-spa.tex I cannot understand why this is 
> happening.

in core-spa.tex change this line:

\let\normalspaceprimitive=\ % space-comment is really needed

if you want to be puzzled ... try

\show\
\show\ %



-----------------------------------------------------------------
                                           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] 6+ messages in thread

* Re: Problem with '\ ' in math commands in current minimals
  2008-06-10  8:53   ` Hans Hagen
@ 2008-06-10 11:55     ` Morgan Brassel
  2008-06-10 14:14     ` Aditya Mahajan
  1 sibling, 0 replies; 6+ messages in thread
From: Morgan Brassel @ 2008-06-10 11:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Tue, 10 Jun 2008, Hans Hagen wrote:

> Aditya Mahajan wrote:
>> On Tue, 10 Jun 2008, Morgan Brassel wrote:
>>
>>> Hi everyone,
>>>
>>> In the following example:
>>>
>>> \define[1]\com{com\ #1}
>>> \starttext
>>> \com{1} $\com{1}$
>>> \stoptext
>>>
>>> the second call to \com (the one in math mode) seems to stop the
>>> compilation of the file. Is it a bug? It wasn't happening before. I'm
>>> using the latest minimals.
>>
>> Definitely a bug: the trace shows a recursive definition. \ is defined in
>> terms of itself. Looking at core-spa.tex I cannot understand why this is
>> happening.
>
> in core-spa.tex change this line:
>
> \let\normalspaceprimitive=\ % space-comment is really needed
>
> if you want to be puzzled ... try
>
> \show\
> \show\ %

Thank you for this fast correction, Hans. By the way, I have a small 
question about updating the minimals tree: which command must be used 
preferably?

* ctxtools --contextupdate

or

* first-setup.sh another time as suggested on
http://wiki.contextgarden.net/ConTeXt_Minimals

Many thanks,
Morgan

___________________________________________________________________________________
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] 6+ messages in thread

* Re: Problem with '\ ' in math commands in current minimals
  2008-06-10  8:53   ` Hans Hagen
  2008-06-10 11:55     ` Morgan Brassel
@ 2008-06-10 14:14     ` Aditya Mahajan
  1 sibling, 0 replies; 6+ messages in thread
From: Aditya Mahajan @ 2008-06-10 14:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 10 Jun 2008, Hans Hagen wrote:

> Aditya Mahajan wrote:
>> On Tue, 10 Jun 2008, Morgan Brassel wrote:
>>
>>> Hi everyone,
>>>
>>> In the following example:
>>>
>>> \define[1]\com{com\ #1}
>>> \starttext
>>> \com{1} $\com{1}$
>>> \stoptext
>>>
>>> the second call to \com (the one in math mode) seems to stop the
>>> compilation of the file. Is it a bug? It wasn't happening before. I'm
>>> using the latest minimals.
>>
>> Definitely a bug: the trace shows a recursive definition. \ is defined in
>> terms of itself. Looking at core-spa.tex I cannot understand why this is
>> happening.
>
> in core-spa.tex change this line:
>
> \let\normalspaceprimitive=\ % space-comment is really needed
>
> if you want to be puzzled ... try
>
> \show\
> \show\ %

Ah, interesting. I did not know that \^^M was a macro. On hindsight, 
it makes sense.

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] 6+ messages in thread

end of thread, other threads:[~2008-06-10 14:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-10  2:58 Problem with '\ ' in math commands in current minimals Morgan Brassel
2008-06-10  3:51 ` Aditya Mahajan
2008-06-10  8:17   ` Hans Hagen
2008-06-10  8:53   ` Hans Hagen
2008-06-10 11:55     ` Morgan Brassel
2008-06-10 14:14     ` 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).