Changes

Jump to navigation Jump to search
855 bytes added ,  15:37, 1 May 2016
Indic math digits
\setuppagenumber[numberconversion=persiandecimals]
</texcode>
 
=== Indic numerals in math mode ===
In Persian (and perhaps Arabic and Hebrew) we often want to have Indic numerals in math formulas. We can use a fallback mechanism to substitute all Latin digits by the Indic ones.
 
<context source=yes mode=mkiv text="This produces:">
\resetfontfallback [mathdigits]
% use arabicindic for standard Arabic (Indic) digits
\definefontfallback [mathdigits] [dejavusansmono] [digitsextendedarabicindic] [check=yes,force=yes,offset=digitsnormal]
\definefontfallback [mathdigits] [dejavusansmonobold] [digitsextendedarabicindic] [check=yes,force=yes,offset=digitsbold]
\definefontsynonym[MathRoman][file:xits-math.otf][features=math\mathsizesuffix,goodies=xits-math,fallbacks=mathdigits]
\setupbodyfont[dejavu]
\starttext
$3+2=5 \quad \bf 3+2=5$
\stoptext
</context>
 
<em>This works in the beta but on the stable here.</em>
== Structural elements ==
25

edits

Navigation menu