ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* math fractions
@ 2015-11-04 16:50 Alan BRASLAU
  2015-11-04 17:13 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Alan BRASLAU @ 2015-11-04 16:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

Does anyone have a suggestion to generate a better result
for the symmetry specification:

\starttext
${2\over a}{2\over b}{2\over m}$
\stoptext

I tried:

\starttext
${2\over \vphantom{b}a}{2\over \vphantom{b}b}{2\over \vphantom{b}m}$
\stoptext

but this leaves too much vertical space - compare it to:

\starttext
${2\over \vphantom{b}a}{2\over b}{2\over \vphantom{b}m}$
\stoptext

Can this be a bug in ConTeXt math spacing?

Alan
___________________________________________________________________________________
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: math fractions
  2015-11-04 16:50 math fractions Alan BRASLAU
@ 2015-11-04 17:13 ` Wolfgang Schuster
  2015-11-04 17:34   ` Alan BRASLAU
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2015-11-04 17:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Alan BRASLAU <mailto:alan.braslau@cea.fr>
> 4. November 2015 um 17:50
> Hi,
>
> Does anyone have a suggestion to generate a better result
> for the symmetry specification:
>
> \starttext
> ${2\over a}{2\over b}{2\over m}$
> \stoptext
>
> I tried:
>
> \starttext
> ${2\over \vphantom{b}a}{2\over \vphantom{b}b}{2\over \vphantom{b}m}$
> \stoptext
>
> but this leaves too much vertical space - compare it to:
>
> \starttext
> ${2\over \vphantom{b}a}{2\over b}{2\over \vphantom{b}m}$
> \stoptext
>
> Can this be a bug in ConTeXt math spacing?
Use the \frac command.

\starttext
$\frac{2}{a}\frac{2}{b}\frac{2}{m}$
\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 1644 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] 4+ messages in thread

* Re: math fractions
  2015-11-04 17:13 ` Wolfgang Schuster
@ 2015-11-04 17:34   ` Alan BRASLAU
  0 siblings, 0 replies; 4+ messages in thread
From: Alan BRASLAU @ 2015-11-04 17:34 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

Thank you, Wolfgang.

I had stopped using the \frac command a while ago
as it was *seriously broken*, previously.

Why, however, does the TeX construction {a\over b}
not work correctly, and more precisely, why does the TeX
command \vphantom{b} not give the desired result?

Alan 


On Wed, 4 Nov 2015 18:13:33 +0100
Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

> $\frac{2}{a}\frac{2}{b}\frac{2}{m}$

___________________________________________________________________________________
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

* Math fractions
@ 2016-02-28 16:22 Aditya Mahajan
  0 siblings, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2016-02-28 16:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Something is wrong in the current implmentation of \tfrac.

If we take away all the bells and whistles provided by 
\definemathfraction,

* \tfrac#1#2 should be equal to {\textstyle #2 \over #1}
* \dfrac#1#2 should be equal to {\displaystyle #2 \over #1}
* \frac should be equal to \tfrac in inline math and \dfrac in display 
math.

In the current implmentation \frac works correctly, but \tfrac does not. 
For example:

\startbuffer
   \frac 12 \tfrac 12 \dfrac 12
\stopbuffer

\starttext
$\getbuffer$
\startformula  \getbuffer \stopformula
\stoptext

The output of \frac and \dfrac is correct in both inline and display mode.

The output of \tfrac is wrong in both modes. In both modes, \tfrac should 
equal the current output of \frac in inline mode.

Although I don't completely understand the code, my guess is that there is 
a bug in how mathstyle=text is implemented (really, mathstyle=text should 
be equivalent to mathstyle=empty in inline math mode).

Thanks,
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:[~2016-02-28 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-04 16:50 math fractions Alan BRASLAU
2015-11-04 17:13 ` Wolfgang Schuster
2015-11-04 17:34   ` Alan BRASLAU
2016-02-28 16:22 Math fractions 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).