Open main menu

Changes

347 bytes added ,  15:14, 8 June 2020
m
no edit summary
\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)!
For more information, you can look at [http://github.com/bateni/dabeer Dabeer] that is a sample set of macros (ongoing work) for typesetting Persian documents using ConTeXt.
 
[[Category:Languages]]