ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Math typesetting problems
@ 2013-01-27 11:52 Janne Junnila
  2013-01-27 12:09 ` Sietse Brouwer
  2013-01-27 15:13 ` Roland Thiers
  0 siblings, 2 replies; 15+ messages in thread
From: Janne Junnila @ 2013-01-27 11:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi all,

I've run into a couple of problems with math typesetting. (I'm using the
latest ConTeXt standalone beta.) The following doesn't print [x,x] at all:

\startformula
[x,x]_t = x
\stopformula

It can be fixed by using \left[x,x\right]_t, but I find the behaviour weird.

Another problem I have is related to the positioning of minus signs in
front of fractions. I would expect the minus sign to align with the
horizontal line of the fraction, as it does on LaTeX. Below is an example
formula to illustrate my point. The result seems to be independent of the
font in use.

\startformula
-\frac{e^{\frac{4}{5}}}{4}
\stopformula


Janne

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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Math typesetting problems
  2013-01-27 11:52 Math typesetting problems Janne Junnila
@ 2013-01-27 12:09 ` Sietse Brouwer
  2013-01-27 13:11   ` Janne Junnila
  2013-01-27 14:50   ` Rogers, Michael K
  2013-01-27 15:13 ` Roland Thiers
  1 sibling, 2 replies; 15+ messages in thread
From: Sietse Brouwer @ 2013-01-27 12:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Janne,

Janne wrote:
> I've run into a couple of problems with math typesetting. (I'm using the
> latest ConTeXt standalone beta.) The following doesn't print [x,x] at all:
>
> \startformula
> [x,x]_t = x
> \stopformula

This is because \startformula can take one optional argument in square
brackets, and [x,x] is interpreted as that argument. You can make
\startformula stop looking for [...] either by telling it to `\relax`,
or by giving it an empty `[]` of its own to chew on.

\startformula[]
[x,x]_t = x
\stopformula

\startformula\relax
[x,x]_t = x
\stopformula

I can't quite find at the moment what sort of options the [...] can
contain, sorry.

Cheers,
Sietse
___________________________________________________________________________________
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] 15+ messages in thread

* Re: Math typesetting problems
  2013-01-27 12:09 ` Sietse Brouwer
@ 2013-01-27 13:11   ` Janne Junnila
  2013-01-27 14:50   ` Rogers, Michael K
  1 sibling, 0 replies; 15+ messages in thread
From: Janne Junnila @ 2013-01-27 13:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Sietse,

Sietse wrote:
> This is because \startformula can take one optional argument in square
> brackets, and [x,x] is interpreted as that argument. You can make
> \startformula stop looking for [...] either by telling it to `\relax`,
> or by giving it an empty `[]` of its own to chew on.

Thanks for the explanation, this makes sense. Should have seen that myself. :)

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

* Re: Math typesetting problems
  2013-01-27 12:09 ` Sietse Brouwer
  2013-01-27 13:11   ` Janne Junnila
@ 2013-01-27 14:50   ` Rogers, Michael K
  1 sibling, 0 replies; 15+ messages in thread
From: Rogers, Michael K @ 2013-01-27 14:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Jan 27, 2013, at 7:09 AM, Sietse Brouwer <sbbrouwer@gmail.com>
 wrote:

> This is because \startformula can take one optional argument in square
> brackets, and [x,x] is interpreted as that argument. You can make
> \startformula stop looking for [...] either by telling it to `\relax`,
> or by giving it an empty `[]` of its own to chew on.
>
> ...
>
> I can't quite find at the moment what sort of options the [...] can
> contain, sorry.

It takes the same options as \switchtobodyfont

\starttext
\startformula[]
[x,x]_t = x
\stopformula
\startformula[small]
[x,x]_t = x
\stopformula
\startformula[24pt]
[x,x]_t = x
\stopformula
\stoptext



________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___________________________________________________________________________________
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] 15+ messages in thread

* Re: Math typesetting problems
  2013-01-27 11:52 Math typesetting problems Janne Junnila
  2013-01-27 12:09 ` Sietse Brouwer
@ 2013-01-27 15:13 ` Roland Thiers
  2013-01-28  9:11   ` Janne Junnila
  1 sibling, 1 reply; 15+ messages in thread
From: Roland Thiers @ 2013-01-27 15:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Le 27 janv. 13 à 12:52, Janne Junnila a écrit :

> Hi all,
>
>
>
> Another problem I have is related to the positioning of minus signs  
> in front of fractions. I would expect the minus sign to align with  
> the horizontal line of the fraction, as it does on LaTeX. Below is  
> an example formula to illustrate my point. The result seems to be  
> independent of the font in use.
>
> \startformula
> -\frac{e^{\frac{4}{5}}}{4}
> \stopformula
>
>
> Janne

Hi Janne,

With \dfrac it looks good.
With \fraction the minus sign is on the top of the fraction.
Best regards, Roland

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

* Re: Math typesetting problems
  2013-01-27 15:13 ` Roland Thiers
@ 2013-01-28  9:11   ` Janne Junnila
  2013-01-28 17:34     ` Roland Thiers
  2013-01-28 20:56     ` Otared Kavian
  0 siblings, 2 replies; 15+ messages in thread
From: Janne Junnila @ 2013-01-28  9:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Indeed it seems like the alignment is good with \dfrac, but this does
not solve my problem, since I wish to also use fractions with
script-size or scriptscript-size (\xfrac, \xxfrac). The specific
formula I have is

\startformula
f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) +
U(t-s)) + \frac{(S(u-t) +
U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}}
\stopformula

Thanks,
Janne

Roland wrote:
> With \dfrac it looks good.
> With \fraction the minus sign is on the top of the fraction.
> Best regards, Roland
___________________________________________________________________________________
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] 15+ messages in thread

* Re: Math typesetting problems
  2013-01-28  9:11   ` Janne Junnila
@ 2013-01-28 17:34     ` Roland Thiers
  2013-01-28 19:41       ` Aditya Mahajan
  2013-01-28 20:56     ` Otared Kavian
  1 sibling, 1 reply; 15+ messages in thread
From: Roland Thiers @ 2013-01-28 17:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Le 28 janv. 13 à 10:11, Janne Junnila a écrit :

> Indeed it seems like the alignment is good with \dfrac, but this does
> not solve my problem, since I wish to also use fractions with
> script-size or scriptscript-size (\xfrac, \xxfrac). The specific
> formula I have is
>
> \startformula
> f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) +
> U(t-s)) + \frac{(S(u-t) +
> U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}}
> \stopformula
>
> Thanks,
> Janne
OK !
So you need an expert, I'm just a newbie :)
I would be  interested to know how to do that.
Best, Roland

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

* Re: Math typesetting problems
  2013-01-28 17:34     ` Roland Thiers
@ 2013-01-28 19:41       ` Aditya Mahajan
  2013-01-28 20:33         ` Wolfgang Schuster
  0 siblings, 1 reply; 15+ messages in thread
From: Aditya Mahajan @ 2013-01-28 19:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 889 bytes --]

On Mon, 28 Jan 2013, Roland Thiers wrote:

>
> Le 28 janv. 13 à 10:11, Janne Junnila a écrit :
>
>> Indeed it seems like the alignment is good with \dfrac, but this does
>> not solve my problem, since I wish to also use fractions with
>> script-size or scriptscript-size (\xfrac, \xxfrac). The specific
>> formula I have is
>> 
>> \startformula
>> f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) +
>> U(t-s)) + \frac{(S(u-t) +
>> U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}}
>> \stopformula
>> 
>> Thanks,
>> Janne
> OK !
> So you need an expert, I'm just a newbie :)
> I would be  interested to know how to do that.
> Best, Roland

I'll look into fractions later this week. All the fraction macros of 
ConTeXt were based on \genfrac macro from AMSTeX so, in principle, they 
should behave in the same manner.

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Math typesetting problems
  2013-01-28 19:41       ` Aditya Mahajan
@ 2013-01-28 20:33         ` Wolfgang Schuster
  2013-01-28 20:48           ` Aditya Mahajan
  2013-01-28 23:20           ` Khaled Hosny
  0 siblings, 2 replies; 15+ messages in thread
From: Wolfgang Schuster @ 2013-01-28 20:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 28.01.2013 um 20:41 schrieb Aditya Mahajan <adityam@umich.edu>:

> On Mon, 28 Jan 2013, Roland Thiers wrote:
> 
>> 
>> Le 28 janv. 13 à 10:11, Janne Junnila a écrit :
>> 
>>> Indeed it seems like the alignment is good with \dfrac, but this does
>>> not solve my problem, since I wish to also use fractions with
>>> script-size or scriptscript-size (\xfrac, \xxfrac). The specific
>>> formula I have is
>>> \startformula
>>> f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) +
>>> U(t-s)) + \frac{(S(u-t) +
>>> U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}}
>>> \stopformula
>>> Thanks,
>>> Janne
>> OK !
>> So you need an expert, I'm just a newbie :)
>> I would be  interested to know how to do that.
>> Best, Roland
> 
> I'll look into fractions later this week. All the fraction macros of ConTeXt were based on \genfrac macro from AMSTeX so, in principle, they should behave in the same manner.

The \frac command uses \vcenter for the content while \dfrac and \tfrac only set the mathstyle before placing the content with the \over primitive.

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

* Re: Math typesetting problems
  2013-01-28 20:33         ` Wolfgang Schuster
@ 2013-01-28 20:48           ` Aditya Mahajan
  2013-01-28 20:59             ` Wolfgang Schuster
  2013-01-28 23:20           ` Khaled Hosny
  1 sibling, 1 reply; 15+ messages in thread
From: Aditya Mahajan @ 2013-01-28 20:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 28 Jan 2013, Wolfgang Schuster wrote:

>> I'll look into fractions later this week. All the fraction macros of ConTeXt were based on \genfrac macro from AMSTeX so, in principle, they should behave in the same manner.
>
> The \frac command uses \vcenter for the content while \dfrac and \tfrac 
> only set the mathstyle before placing the content with the \over 
> primitive.

Then something has been lost in the MkII -> MkIV transition. I am pretty 
sure (cannot check right now), that the code in MkII used \genfrac (which 
is a fancy wrapper around \over \ovewithdelim etc)

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

* Re: Math typesetting problems
  2013-01-28  9:11   ` Janne Junnila
  2013-01-28 17:34     ` Roland Thiers
@ 2013-01-28 20:56     ` Otared Kavian
  2013-01-28 21:09       ` Aditya Mahajan
  1 sibling, 1 reply; 15+ messages in thread
From: Otared Kavian @ 2013-01-28 20:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Janne,

Personnally I prefer to use the Plain TeX alternative \over (which works fine in ConTeXt), that is
	${a \over b}$
instead of 
	$\frac{a}{b}$
Compare the following two outputs in the example you want to typeset: I think the second is more or less what you want

\starttext
Using \type{\frac} gives:
\startformula
f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) +
U(t-s)) + \frac{(S(u-t) +
U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}}
\stopformula
\blank
Using \type{\over} gives:
\startformula
f_{B_t | B_s = S, B_u = U}(x) = {
e^{-{(u-s)x^2 - 2x(S(u-t) + U(t-s)) + 
{(S(u-t) + U(t-s))^2 \over (u-s)} \over 2(t-s)(u-t)}} \over 
\sqrt{2\pi {(t-s)(u-t) \over u-s}}}
\stopformula

\stoptext

Best regards: OK



On 28 janv. 2013, at 10:11, Janne Junnila <janne.junnila@gmail.com> wrote:

> Indeed it seems like the alignment is good with \dfrac, but this does
> not solve my problem, since I wish to also use fractions with
> script-size or scriptscript-size (\xfrac, \xxfrac). The specific
> formula I have is
> 
> \startformula
> f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) +
> U(t-s)) + \frac{(S(u-t) +
> U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}}
> \stopformula
> 
> Thanks,
> Janne
> 
> Roland wrote:
>> With \dfrac it looks good.
>> With \fraction the minus sign is on the top of the fraction.
>> Best regards, Roland
> ___________________________________________________________________________________
> 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] 15+ messages in thread

* Re: Math typesetting problems
  2013-01-28 20:48           ` Aditya Mahajan
@ 2013-01-28 20:59             ` Wolfgang Schuster
  0 siblings, 0 replies; 15+ messages in thread
From: Wolfgang Schuster @ 2013-01-28 20:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 28.01.2013 um 21:48 schrieb Aditya Mahajan <adityam@umich.edu>:

> On Mon, 28 Jan 2013, Wolfgang Schuster wrote:
> 
>>> I'll look into fractions later this week. All the fraction macros of ConTeXt were based on \genfrac macro from AMSTeX so, in principle, they should behave in the same manner.
>> 
>> The \frac command uses \vcenter for the content while \dfrac and \tfrac only set the mathstyle before placing the content with the \over primitive.
> 
> Then something has been lost in the MkII -> MkIV transition. I am pretty sure (cannot check right now), that the code in MkII used \genfrac (which is a fancy wrapper around \over \ovewithdelim etc)

Yes, MkII uses \genfrac but in MkIV the command is no longer available and all fraction commands have been rewritten.

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

* Re: Math typesetting problems
  2013-01-28 20:56     ` Otared Kavian
@ 2013-01-28 21:09       ` Aditya Mahajan
  0 siblings, 0 replies; 15+ messages in thread
From: Aditya Mahajan @ 2013-01-28 21:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 28 Jan 2013, Otared Kavian wrote:

> Hi Janne,
>
> Personnally I prefer to use the Plain TeX alternative \over (which works fine in ConTeXt), that is
> 	${a \over b}$
> instead of
> 	$\frac{a}{b}$
>
> Compare the following two outputs in the example you want to typeset: I think the second is more or less what you want
>
> \starttext
> Using \type{\frac} gives:
> \startformula
> f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) +
> U(t-s)) + \frac{(S(u-t) +
> U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}}
> \stopformula

Formatting and temporary macros (I usually use \1 \2 etc) make a huge difference
in readability:

\startformula
   \def\1
       {\frac{
                (u-s)x^2
                - 2x(S(u-t)
                + U(t-s))
                + \frac{(S(u-t) + U(t-s))^2}
                       {(u-s)}
             }{
                2(t-s)(u-t)}
             }
   %
   f_{B_t | B_s = S, B_u = U}(x) =
       \frac { e^{\1} }
             { \sqrt{2\pi\frac{(t-s)(u-t)}{u-s}} }
\stopformula

> \blank
> Using \type{\over} gives:
> \startformula
> f_{B_t | B_s = S, B_u = U}(x) = {
> e^{-{(u-s)x^2 - 2x(S(u-t) + U(t-s)) +
> {(S(u-t) + U(t-s))^2 \over (u-s)} \over 2(t-s)(u-t)}} \over
> \sqrt{2\pi {(t-s)(u-t) \over u-s}}}
> \stopformula
>
> \stoptext

At some stage, we also need to look at nath's automatic conversion of display
fractions to inline fractions (e.g., in the numberator \frac{ (S(u-t) +
U(t-s))^2 } { (u-s) } should be typeset as (S(u-t) + U(t-s))^2/(u-s) because it
is being typeset in \scriptstyle.

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

* Re: Math typesetting problems
  2013-01-28 20:33         ` Wolfgang Schuster
  2013-01-28 20:48           ` Aditya Mahajan
@ 2013-01-28 23:20           ` Khaled Hosny
  2013-04-06 21:35             ` Hans Hagen
  1 sibling, 1 reply; 15+ messages in thread
From: Khaled Hosny @ 2013-01-28 23:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Jan 28, 2013 at 09:33:52PM +0100, Wolfgang Schuster wrote:
> 
> The \frac command uses \vcenter for the content while \dfrac and
> \tfrac only set the mathstyle before placing the content with the
> \over primitive.

The use of \vcenter seems odd here as it means the fraction rule will no
longer guranteed to be centered around the math axis:
\starttext
\math{-\frac{a^{2^{2^2}}}{a} {a^{2^{2^2}}\over a}}
\stoptext

Also, why \frac is forcing text style fractions even in display mode?
\starttext
\startformula
-\frac{a^{2^{2^2}}}{a} {a^{2^{2^2}}\over a}
\stopformula
\stoptext

Both behaviours are different from MkII.

Regards,
Khaled
___________________________________________________________________________________
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] 15+ messages in thread

* Re: Math typesetting problems
  2013-01-28 23:20           ` Khaled Hosny
@ 2013-04-06 21:35             ` Hans Hagen
  0 siblings, 0 replies; 15+ messages in thread
From: Hans Hagen @ 2013-04-06 21:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 1/29/2013 12:20 AM, Khaled Hosny wrote:
> On Mon, Jan 28, 2013 at 09:33:52PM +0100, Wolfgang Schuster wrote:
>>
>> The \frac command uses \vcenter for the content while \dfrac and
>> \tfrac only set the mathstyle before placing the content with the
>> \over primitive.
>
> The use of \vcenter seems odd here as it means the fraction rule will no
> longer guranteed to be centered around the math axis:
> \starttext
> \math{-\frac{a^{2^{2^2}}}{a} {a^{2^{2^2}}\over a}}
> \stoptext
>
> Also, why \frac is forcing text style fractions even in display mode?
> \starttext
> \startformula
> -\frac{a^{2^{2^2}}}{a} {a^{2^{2^2}}\over a}
> \stopformula
> \stoptext
>
> Both behaviours are different from MkII.

I redid the mkiv code ... configurable, defineable, inheritable ... the 
whole lot

\starttext

\definemathfraction[myfrac] [mathstyle=script]
\definemathfraction[myfracx][mathstyle=script,alternative=outer]

\startformula
{a^{2^{2^2}}\over a}
\frac{a^{2^{2^2}}}{a}
\frac{a^{2}}{b}
\myfrac{a^{2}}{b}
\myfracx{a^{2}}{b}
\stopformula

\stoptext


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

end of thread, other threads:[~2013-04-06 21:35 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-27 11:52 Math typesetting problems Janne Junnila
2013-01-27 12:09 ` Sietse Brouwer
2013-01-27 13:11   ` Janne Junnila
2013-01-27 14:50   ` Rogers, Michael K
2013-01-27 15:13 ` Roland Thiers
2013-01-28  9:11   ` Janne Junnila
2013-01-28 17:34     ` Roland Thiers
2013-01-28 19:41       ` Aditya Mahajan
2013-01-28 20:33         ` Wolfgang Schuster
2013-01-28 20:48           ` Aditya Mahajan
2013-01-28 20:59             ` Wolfgang Schuster
2013-01-28 23:20           ` Khaled Hosny
2013-04-06 21:35             ` Hans Hagen
2013-01-28 20:56     ` Otared Kavian
2013-01-28 21:09       ` 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).