Open main menu

Changes

{\getbuffer[frac]}
{\getbuffer[frac]}}}
</context>
 
== Formatting with {{cmd|definemathfraction}} ==
 
Just an example from [https://www.mail-archive.com/ntg-context@ntg.nl/msg69987.html mailing list]
 
<context source="yes">
\startformula \frac {a} { \frac{b}{c} } \stopformula
 
\definemathfraction
[wfrac]
[margin=.25em]
 
\startformula \wfrac {a} { \frac{b}{c} } \stopformula
</context>
{{cmd|setupmathfractions}}.
The default look of the binomial coefficients look good in several fonts, but for example not perfect in Latin Modern. You can play with {{cmd|setupmathfractions}}, and in particular, you can try
<texcode>\setupmathfractions[Below we show some of the often used fonts, together with the default setting and the one just suggested. The default look of the binomial][fences=parenthesiscoefficients look good in several fonts,%threshold=1but for example not perfect in Latin Modern. You may want to play with {{cmd|definemathfraction}}.5,]</texcode>
Below we show some of the often used fonts, together with the default setting and the one just suggested. You can also play with the
threshold key.
<context source="yes">
\setuphead[subsection][style=\it]
\framedsetuplayout[frametopspace=off1in,alignbottomspace=normal]{% <1in,header=0pt,footer=0pt,backspace=1in,margin=0pt,width=fit,height= just to improve wiki renderingfit,]
\starttabulate[|l|l|]startbuffer\NC \type{\binom{n}{k}} \NC : $\binom{n}{k}$ \NC\NRpar\NC \type{\tbinom{n}{k}} \NC : $\tbinom{n}{k}$ \NC\NRpar\NC \type{\dbinom{n}{k}} \NC : $\dbinom{n}{k}$ \NC\NR\stoptabulatepar
\stopbuffer
 
\starttext
\title{Binomial coefficients}
\startcolumns[n=2,separator=rule]
\subject{\bfa Default settings}
\subsubject{\it Latin Modern} \getbuffer \switchtobodyfont[pagella] \subsubject{\it Pagella} \getbuffer \switchtobodyfont[stixtwo] \subsubject{\it STIX Two} \getbuffer %\switchtobodyfont[lucidaot] %\subsubject{Lucida} %\getbuffer
\column[yes]
\setupmathfractionsdefinemathfraction[binomial] [binom] [fences=parenthesis,rule=no]\definemathfraction[tbinomial] [binomial] [mathstyle=text]\definemathfraction[dbinomial] [binomial] [mathstyle=display\startbuffer\type{\binomial{n}{k}}: $\binomial{n}{k}$\par\type{\tbinomial{n}{k}}: $\tbinomial{n}{k}$\par\type{\dbinomial{n}{k}}: $\dbinomial{n}{k}$\par\stopbuffer
\switchtobodyfont[modern]
\subject{\bfa With fences=parenthesistex{definemathfraction}}\subsubject{Latin Modern}\getbuffer
{\it Latin Modern} \getbuffer\switchtobodyfont[pagella] \subsubject{\it Pagella} \getbuffer \switchtobodyfont[stixtwo] \subsubject{\it STIX Two} \getbuffer %\switchtobodyfont[lucidaot] %\subsubject{Lucida} %\getbuffer \stopcolumns\stoptext
\stopcolumns}
</context>
[[File:binomialcoefficients.png|700px]]
 
[[Category:Math]]
1,031

edits