ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* parsing issue with \math{} inside natural table
@ 2010-07-09 20:12 Brian R. Landy
  2010-07-12 12:56 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Brian R. Landy @ 2010-07-09 20:12 UTC (permalink / raw)
  To: ntg-context

Hi, I ran into a case where a natural table has an issue when it 
contains inline math and an alignment character is used.  Here's a small 
example which triggers the problem:

\starttext<
\bTABLE<
\bTABLEbody<
\bTR<
\bTD[alignmentcharacter={.},aligncharacter=yes]{\le 4.0\math{-}}\eTD<
\eTR<
\eTABLEbody<
\eTABLE<
\stoptext<

However, if I replace \math{-} with $-$, the file works.  Am I correct 
that $-$ and \math{-} should be interchangeable?

Thanks,
Brian
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: parsing issue with \math{} inside natural table
  2010-07-09 20:12 parsing issue with \math{} inside natural table Brian R. Landy
@ 2010-07-12 12:56 ` Hans Hagen
  2010-07-12 21:33   ` Brian R. Landy
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2010-07-12 12:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Brian R. Landy

On 9-7-2010 10:12, Brian R. Landy wrote:
> Hi, I ran into a case where a natural table has an issue when it
> contains inline math and an alignment character is used. Here's a small
> example which triggers the problem:
>
> \starttext<
> \bTABLE<
> \bTABLEbody<
> \bTR<
> \bTD[alignmentcharacter={.},aligncharacter=yes]{\le 4.0\math{-}}\eTD<
> \eTR<
> \eTABLEbody<
> \eTABLE<
> \stoptext<
>
> However, if I replace \math{-} with $-$, the file works. Am I correct
> that $-$ and \math{-} should be interchangeable?

side effect of alignmentcharacter that triggers expansion of cell 
content, so just use $ here

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: parsing issue with \math{} inside natural table
  2010-07-12 12:56 ` Hans Hagen
@ 2010-07-12 21:33   ` Brian R. Landy
  2010-07-12 22:05     ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Brian R. Landy @ 2010-07-12 21:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanks for the reply.  I'm actually generating TeX from an application 
that interprets $ in it's own code and occasionally this causes me 
trouble in passing the $ through to TeX to use in math mode (I think 
they have a bug and am hoping I can get that fixed).  So I tend to use 
\math{}  to avoid complications with escaping $, but was stuck in this 
case because I couldn't use $ or \math{}.

Anyway, I just now solved my problem in the other application and am 
able pass through $ appropriately so it's no longer an issue for me.

Thanks,
Brian

On Mon, 12 Jul 2010, Hans Hagen wrote:

> On 9-7-2010 10:12, Brian R. Landy wrote:
>> Hi, I ran into a case where a natural table has an issue when it
>> contains inline math and an alignment character is used. Here's a 
>> small
>> example which triggers the problem:
>> 
>> \starttext<
>> \bTABLE<
>> \bTABLEbody<
>> \bTR<
>> \bTD[alignmentcharacter={.},aligncharacter=yes]{\le 4.0\math{-}}\eTD<
>> \eTR<
>> \eTABLEbody<
>> \eTABLE<
>> \stoptext<
>> 
>> However, if I replace \math{-} with $-$, the file works. Am I correct
>> that $-$ and \math{-} should be interchangeable?
>
> side effect of alignmentcharacter that triggers expansion of cell 
> content, so just use $ here
>
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>    tel: 038 477 53 69 | voip: 087 875 68 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  : http://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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: parsing issue with \math{} inside natural table
  2010-07-12 21:33   ` Brian R. Landy
@ 2010-07-12 22:05     ` Aditya Mahajan
  0 siblings, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2010-07-12 22:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 12 Jul 2010, Brian R. Landy wrote:

> Thanks for the reply.  I'm actually generating TeX from an application that 
> interprets $ in it's own code and occasionally this causes me trouble in 
> passing the $ through to TeX to use in math mode (I think they have a bug and 
> am hoping I can get that fixed).  So I tend to use \math{}  to avoid 
> complications with escaping $, but was stuck in this case because I couldn't 
> use $ or \math{}.

With expansion problems, sometimes using \noexpand\math{...} works.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2010-07-12 22:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-09 20:12 parsing issue with \math{} inside natural table Brian R. Landy
2010-07-12 12:56 ` Hans Hagen
2010-07-12 21:33   ` Brian R. Landy
2010-07-12 22:05     ` 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).