%%% LANGUAGE AND FONTS
\mainlanguage[arabic]
\definefontfamily [mainface] [rm] [ALM Fixed][range=arabic,features=arabic]
\setupbodyfont[mainface,12pt]
%\setupdirections[bidi=global]
\setupalign[r2l]
%\righttoleft
%% HEADINGS
\setuphead[chapter,section][
conversion=myconversion,
% numbercommand=\lefttoright % <-- toggle
]
\setuplinenumbering[conversion=myconversion]
\setupnotations[footnote][numberconversion=myconversion]
\setupnotations[linenote][numberconversion=myconversion]
\setuppagenumber[numberconversion=myconversion]
\defineconversion
[myconversion]
[١,٢,٣,٤,٥,٦,٧,٨,٩,١٠,
١١,١٢,١٣,١٤,١٥,١٦,١٧,١٨,١٩,٢٠,
۲۱,۲۲,۲۳,۲٤,۲٥,۲٦,۲۷,۲۸,۲۹,۳۰,
٣١,٣٢,٣٣,٣٤,٣٥,٣٦,٣٧,٣٨,٣٩,٤٠,
٤١,٤٢,٤٣,٤٤,٤٥,٤٦,٤٧,٤٨,٤٩,٥٠,
٥١,٥٢,٥٣,٥٤,٥٥,٥٦,٥٧,٥٨,٥٩,٦٠,
٦١,٦٢,٦٣,٦٤,٦٥,٦٦,٦٧,٦٨,٦٩,٧٠,
٧١,٧٢,٧٣,٧٤,٧٥,٧٦,٧٧,٧٨,٧٩,٨٠,
٨١,٨٢,٨٣,٨٤,٨٥,٨٦,٨٧,٨٨,٨٩,٩٠,
٩١,٩٢,٩٣,٩٤,٩٥,٩٦,٩٧,٩٨,٩٩,١٠٠,
١٠١,١٠٢,١٠٣,١٠٤,١٠٥,١٠٦,١٠٧,١٠٨,١٠٩,١١٠,
١١١,١١٢,١١٣,١١٤,١١٥,١١٦,١١٧,١١٨,١١٩,١٢٠,
١٢١,١٢٢,١٢٣,١٢٤,١٢٥,١٢٦,١٢٧,١٢٨,١٢٩,١٣٠,
١٣١,١٣٢,١٣٣,١٣٤,١٣٥,١٣٦,١٣٧,١٣٨,١٣٩,١١٣٠,
١٤١,١٤٢,١٤٣,١٤٤,١٤٥,١٤٦,١٤٧,١٤٨,١٤٩,١٥٠,
١٥١,١٥٢,١٥٣,١٥٤,١٥٥,١٥٦,١٥٧,١٥٨,١٥٩,١٦٠,
١٦١,١٦٢,١٦٣,١٦٤,١٦٥,١٦٦,١٦٧,١٦٨,١٦٩,١٧٠,
١٧١,١٧٢,١٧٣,١٧٤,١٧٥,١٧٦,١٧٧,١٧٨,١٧٩,١٨٠,
١٨١,١٨٢,١٨٣,١٨٤,١٨٥,١٨٦,١٨٧,١٨٨,١٨٩,١٩٠,
١٩١,١٩٢,١٩٣,١٩٤,١٩٥,١٩٦,١٩٧,١٩٨,١٩٩,٢٠٠,
٢٠١,٢٠٢,٢٠٣,٢٠٤,٢٠٥,٢٠٦,٢٠٧,٢٠٨,٢٠٩,٢١٠,
٢١١,٢١٢,٢١٣,٢١٤,٢١٥,٢١٦,٢١٧,٢١٨,٢١٩,٢٢٠,
٢٢١,٢٢٢,٢٢٣,٢٢٤,٢٢٥,٢٢٦,٢٢٧,٢٢٨,٢٢٩,٢٣٠,
٢٣١,٢٣٢,٢٣٣,٢٣٤,٢٣٥,٢٣٦,٢٣٧,٢٣٨,٢٣٩,٢٢٣٠,
٢٤١,٢٤٢,٢٤٣,٢٤٤,٢٤٥,٢٤٦,٢٤٧,٢٤٨,٢٤٩,٢٥٠,
٢٥١,٢٥٢,٢٥٣,٢٥٤,٢٥٥,٢٥٦,٢٥٧,٢٥٨,٢٥٩,٢٦٠,
٢٦١,٢٦٢,٢٦٣,٢٦٤,٢٦٥,٢٦٦,٢٦٧,٢٦٨,٢٦٩,٢٧٠,
٢٧١,٢٧٢,٢٧٣,٢٧٤,٢٧٥,٢٧٦,٢٧٧,٢٧٨,٢٧٩,٢٨٠,
٢٨١,٢٨٢,٢٨٣,٢٨٤,٢٨٥,٢٨٦,٢٨٧,٢٨٨,٢٨٩,٢٩٠,
٢٩١,٢٩٢,٢٩٣,٢٩٤,٢٩٥,٢٩٦,٢٩٧,٢٩٨,٢٩٩,٣٠٠,
]
%%% DOCUMENT
\starttext \showframe
\section{section one}
\startlinenumbering
\input tufte
\input tufte
\stoplinenumbering
\dorecurse{20}{
\section{محمد الجمل (١٨٧٢—١٩٢٣)}
مرحباً باعالم . ١٢٣٤٥٦٧٨٩٠ مرحباً بالعالم. ولد عام١٩٣٤.
\footnote{تعليقة لطيفة.}
\pagebreak
}
\stoptext