ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Fraction with a fraction in the denominator
@ 2013-06-03 17:40 Sander Maijers
  2013-06-03 17:43 ` Sander Maijers
  0 siblings, 1 reply; 5+ messages in thread
From: Sander Maijers @ 2013-06-03 17:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

How can I make the subfraction in the denominator of a fraction appear 
smaller even though the nominator is very small? This gives basically 
three equally long division lines:

\startfomula
	\frac{\mu_{Z}}{\frac{\sqrt{\VAR{Z}}{\sqrt{N_{\text{segments}}}}}
\stopformula
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Fraction with a fraction in the denominator
  2013-06-03 17:40 Fraction with a fraction in the denominator Sander Maijers
@ 2013-06-03 17:43 ` Sander Maijers
  2013-06-04 13:04   ` Sietse Brouwer
  0 siblings, 1 reply; 5+ messages in thread
From: Sander Maijers @ 2013-06-03 17:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Sorry, I meant to write numerator. (In Dutch it is teller/noemer ;))


On 03-06-13 19:40, Sander Maijers wrote:
> Hi,
>
> How can I make the subfraction in the denominator of a fraction appear
> smaller even though the nominator is very small? This gives basically
> three equally long division lines:
>
> \startfomula
>      \frac{\mu_{Z}}{\frac{\sqrt{\VAR{Z}}{\sqrt{N_{\text{segments}}}}}
> \stopformula
> ___________________________________________________________________________________
>
> 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] 5+ messages in thread

* Re: Fraction with a fraction in the denominator
  2013-06-03 17:43 ` Sander Maijers
@ 2013-06-04 13:04   ` Sietse Brouwer
  2013-06-04 19:34     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Sietse Brouwer @ 2013-06-04 13:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hoi Sander,

Sander wrote:
> This gives basically three equally long division lines

The fraction line of a nested fractions is in fact shorter than that
of its parent fraction, but by a very small amout. This seems to be
the standard behaviour -- I tried the formula in LaTeX, and the
difference is just as small.

I agree with you that it would be nice if the difference were a bit
bigger in the case of continued fractions, but I suspect that would be
hard to automate. Anyway: below is a quick hack for manual adjustment.

(I've simplified your formula somewhat -- the one in your mail threw
some syntax errors to do with {} nesting, and the square roots made it
harder to make out the fraction line.)

Cheers,
Sietse

% Declare a new dimension variable
\newdimen\padwidth

% Set dimen
\padwidth=1em
% Define a command that adds a padwidth-sized kern
\define[0]\pad{\kern \padwidth}

% Needed for the formula
\def\VAR#1{\text{VAR}(#1)}

\startformula
    \frac{
        \mu_{Z}
    }{
        \pad\frac{
            \VAR{Z}
        }{
            N_{\text{segments}}
        }\pad
    }
\stopformula
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Fraction with a fraction in the denominator
  2013-06-04 13:04   ` Sietse Brouwer
@ 2013-06-04 19:34     ` Hans Hagen
  2013-06-05  7:32       ` Otared Kavian
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2013-06-04 19:34 UTC (permalink / raw)
  To: ntg-context

On 6/4/2013 3:04 PM, Sietse Brouwer wrote:
> Hoi Sander,
>
> Sander wrote:
>> This gives basically three equally long division lines
>
> The fraction line of a nested fractions is in fact shorter than that
> of its parent fraction, but by a very small amout. This seems to be
> the standard behaviour -- I tried the formula in LaTeX, and the
> difference is just as small.
>
> I agree with you that it would be nice if the difference were a bit
> bigger in the case of continued fractions, but I suspect that would be
> hard to automate. Anyway: below is a quick hack for manual adjustment.
>
> (I've simplified your formula somewhat -- the one in your mail threw
> some syntax errors to do with {} nesting, and the square roots made it
> harder to make out the fraction line.)
>
> Cheers,
> Sietse
>
> % Declare a new dimension variable
> \newdimen\padwidth
>
> % Set dimen
> \padwidth=1em
> % Define a command that adds a padwidth-sized kern
> \define[0]\pad{\kern \padwidth}
>
> % Needed for the formula
> \def\VAR#1{\text{VAR}(#1)}
>
> \startformula
>      \frac{
>          \mu_{Z}
>      }{
>          \pad\frac{
>              \VAR{Z}
>          }{
>              N_{\text{segments}}
>          }\pad
>      }
> \stopformula

ok, a new feature for SB:

\definemathfraction
   [wfrac]
   [margin=.25em]

\starttext

\startformula
     \wfrac {
         a
     } {
         \frac {
             b
         } {
             c
         }
     }
\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] 5+ messages in thread

* Re: Fraction with a fraction in the denominator
  2013-06-04 19:34     ` Hans Hagen
@ 2013-06-05  7:32       ` Otared Kavian
  0 siblings, 0 replies; 5+ messages in thread
From: Otared Kavian @ 2013-06-05  7:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


On 4 juin 2013, at 21:34, Hans Hagen <pragma@wxs.nl> wrote:
> […]
> ok, a new feature for SB:

Thanks hans! Very nice feature. Wikified in
	http://wiki.contextgarden.net/Command/fraction
but the output on the wiki is not correct since ConTeXt there is mkii.

Best regards: OK

> 
> \definemathfraction
>  [wfrac]
>  [margin=.25em]
> 
> \starttext
> 
> \startformula
>    \wfrac {
>        a
>    } {
>        \frac {
>            b
>        } {
>            c
>        }
>    }
> \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
> ___________________________________________________________________________________


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

end of thread, other threads:[~2013-06-05  7:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-03 17:40 Fraction with a fraction in the denominator Sander Maijers
2013-06-03 17:43 ` Sander Maijers
2013-06-04 13:04   ` Sietse Brouwer
2013-06-04 19:34     ` Hans Hagen
2013-06-05  7:32       ` Otared Kavian

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