ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Math fractions
Date: Sun, 28 Feb 2016 11:22:31 -0500 (EST)	[thread overview]
Message-ID: <alpine.OSX.2.02.1602281107490.4623@nqv-znpobbx> (raw)

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
___________________________________________________________________________________

             reply	other threads:[~2016-02-28 16:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-28 16:22 Aditya Mahajan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-11-04 16:50 math fractions Alan BRASLAU
2015-11-04 17:13 ` Wolfgang Schuster
2015-11-04 17:34   ` Alan BRASLAU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.OSX.2.02.1602281107490.4623@nqv-znpobbx \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).