Difference between revisions of "Command/fraction"

From Wiki
Jump to navigation Jump to search
m (Text replace - "\[\[cmd:(.*)\|(.*)\]\]" to "{{cmd|$1}}")
Line 21: Line 21:
  
 
== Description ==  
 
== Description ==  
Displays a fraction. In first bracket pair the numerator is set, in the second the denominator.
+
Displays a fraction. In first bracket pair the numerator is set, in the second the denominator. It is the same as
 
+
<texcode>
 +
\frac
 +
</texcode>
 
== Example ==
 
== Example ==
 
<texcode>
 
<texcode>
Line 30: Line 32:
 
<context>
 
<context>
 
$\fraction{x^2}{k+1}$
 
$\fraction{x^2}{k+1}$
 +
</context>
 +
 +
You can define also a wide version of the fraction bar, in case the numerator or denominator contain a fraction:
 +
 +
<texcode>
 +
\definemathfraction
 +
[widefrac]
 +
[margin=.25em]
 +
</texcode>
 +
 +
and then use it as in
 +
 +
<texcode>
 +
\widefrac{a}{\fraction{b}{c}}
 +
</texcode>
 +
 +
which gives
 +
 +
<context>
 +
\widefrac{a}{\fraction{b}{c}}
 
</context>
 
</context>
  

Revision as of 07:31, 5 June 2013

\fraction

Syntax

\fraction{...}{...}
{...} text
{...} text


Description

Displays a fraction. In first bracket pair the numerator is set, in the second the denominator. It is the same as

\frac

Example

$\fraction{x^2}{k+1}$

You can define also a wide version of the fraction bar, in case the numerator or denominator contain a fraction:

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

and then use it as in

\widefrac{a}{\fraction{b}{c}}

which gives

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: