Changes

Jump to navigation Jump to search
323 bytes added ,  03:02, 18 August 2016
m
Persian \digits
\setupbodyfont[dejavu]
\starttext
$3+2=5 \quad \bf 3+2=5$\endgraf
\stoptext
</context>
<em>This works in the beta but not on the stable here.</em>
 
By (re)defining certain macros, we can use commands like {{cmd|digits}} to properly translate decimal points, thousand separators, etc. to their Arabic/Persian equivalents.
 
<texcode>
\def\digitsperiodsymbol{٫}
\digits{1.5}
</texcode>
== Structural elements ==
<em>The alignment of the second line is not right here but it works fine on my machine. Maybe the garden's CONTEXT version is old.</em>
Using {{code|1=alternative=left}} or {{code|1=alternative=right}} produces almost fine results in RTL but the placement of head text on the right-hand side adds some extra space. To avoid this, one can set {{code|1=width=fit}}. Using {{code|1=alternative=top}} places the head on the left-hand side even in RTL mode. This can be fixed via setting {{code|headalign}}(if the text is itself RTL).
In any case, the worst result comes from setting {{code|hang}} which places the hanging on the incorrect side (left for RTL) and pushes the head text into the margin on the correct side (right in RTL)!
25

edits

Navigation menu