ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Nested $$ in inline math
@ 2021-12-13 15:15 Jack Hill via ntg-context
  2021-12-13 15:35 ` Taco Hoekwater via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Jack Hill via ntg-context @ 2021-12-13 15:15 UTC (permalink / raw)
  To: ntg-context; +Cc: Jack Hill


[-- Attachment #1.1: Type: text/plain, Size: 422 bytes --]

Dear list,

I was playing around and found that nesting $$s inside of \m blocks
typesets the code as text.
I can't find anything about this on the wiki or in the math-mkiv manual, so
I'm asking whether this is supported behaviour or just a bug?

Jack

\starttext
% All the same
\mathematics{math $text here$ math} \\
\math{math $text here$ math} \\
\m{math $text here$ math} \\
\m{math \text{text here} math} \\
\stoptext

[-- Attachment #1.2: Type: text/html, Size: 1011 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Nested $$ in inline math
  2021-12-13 15:15 Nested $$ in inline math Jack Hill via ntg-context
@ 2021-12-13 15:35 ` Taco Hoekwater via ntg-context
  2021-12-13 16:48   ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater via ntg-context @ 2021-12-13 15:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater, Jack Hill



> On 13 Dec 2021, at 16:15, Jack Hill via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Dear list,
> 
> I was playing around and found that nesting $$s inside of \m blocks typesets the code as text.
> I can't find anything about this on the wiki or in the math-mkiv manual, so I'm asking whether this is supported behaviour or just a bug?

I would say that this is unsupported expected behaviour ;) 

It is better not to use $ at all (except when using it as a dollar sign when \asciimode is active).

> 
> \starttext
> % All the same
> \mathematics{math $text here$ math} \\
> \math{math $text here$ math} \\
> \m{math $text here$ math} \\
> \m{math \text{text here} math} \\

A bit over-precise maybe, but while the first three are the same, the last line is 
actually very subtly different. 

The first three lines are essentially this in TeX82 :

  $math $text here$ math\hfill\break

while that last line is 

  $math \hbox{text here} math\hfill\break

Best wishes,
Taco

— 
Taco Hoekwater              E: taco@bittext.nl
genderfluid (all pronouns)



___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Nested $$ in inline math
  2021-12-13 15:35 ` Taco Hoekwater via ntg-context
@ 2021-12-13 16:48   ` Hans Hagen via ntg-context
  2021-12-13 17:57     ` Aditya Mahajan via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen via ntg-context @ 2021-12-13 16:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen, Jack Hill, Taco Hoekwater

On 12/13/2021 4:35 PM, Taco Hoekwater via ntg-context wrote:
> 
> 
>> On 13 Dec 2021, at 16:15, Jack Hill via ntg-context <ntg-context@ntg.nl> wrote:
>>
>> Dear list,
>>
>> I was playing around and found that nesting $$s inside of \m blocks typesets the code as text.
>> I can't find anything about this on the wiki or in the math-mkiv manual, so I'm asking whether this is supported behaviour or just a bug?
> 
> I would say that this is unsupported expected behaviour ;)
> 
> It is better not to use $ at all (except when using it as a dollar sign when \asciimode is active).
> 
>>
>> \starttext
>> % All the same
>> \mathematics{math $text here$ math} \\
>> \math{math $text here$ math} \\
>> \m{math $text here$ math} \\
>> \m{math \text{text here} math} \\
> 
> A bit over-precise maybe, but while the first three are the same, the last line is
> actually very subtly different.
> 
> The first three lines are essentially this in TeX82 :
> 
>    $math $text here$ math\hfill\break
> 
> while that last line is
> 
>    $math \hbox{text here} math\hfill\break
which indeed makes

\starttext
     \mathematics{$text$}
\stoptext

a puzzle

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Nested $$ in inline math
  2021-12-13 16:48   ` Hans Hagen via ntg-context
@ 2021-12-13 17:57     ` Aditya Mahajan via ntg-context
  2021-12-13 19:07       ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan via ntg-context @ 2021-12-13 17:57 UTC (permalink / raw)
  To: Hans Hagen via ntg-context; +Cc: Aditya Mahajan

On Mon, 13 Dec 2021, Hans Hagen via ntg-context wrote:
> which indeed makes
> 
> \starttext
>      \mathematics{$text$}
> \stoptext
> 
> a puzzle

Isn't that effectively:

$\relax$text$\relax$

which prevents the $$ lookup. 

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Nested $$ in inline math
  2021-12-13 17:57     ` Aditya Mahajan via ntg-context
@ 2021-12-13 19:07       ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen via ntg-context @ 2021-12-13 19:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

On 12/13/2021 6:57 PM, Aditya Mahajan via ntg-context wrote:
> On Mon, 13 Dec 2021, Hans Hagen via ntg-context wrote:
>> which indeed makes
>>
>> \starttext
>>       \mathematics{$text$}
>> \stoptext
>>
>> a puzzle
> 
> Isn't that effectively:
> 
> $\relax$text$\relax$
> 
> which prevents the $$ lookup.
Indeed, you solved it.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2021-12-13 19:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 15:15 Nested $$ in inline math Jack Hill via ntg-context
2021-12-13 15:35 ` Taco Hoekwater via ntg-context
2021-12-13 16:48   ` Hans Hagen via ntg-context
2021-12-13 17:57     ` Aditya Mahajan via ntg-context
2021-12-13 19:07       ` Hans Hagen via ntg-context

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