1

I am new to ConTeXt and would like to know how to show the eastern numerals or Hindi numerals in ConTeXt document in terms of page numbers, footnote, and itemize environment. Please consider the MWE below:

MWE

\definefontfeature
  [arabic]
  [mode=node,language=dflt,script=arab,
   init=yes,medi=yes,fina=yes,isol=yes,
   liga=yes,dlig=yes,rlig=yes,clig=yes,
   mark=yes,mkmk=yes,kern=yes,curs=yes]

  \starttypescript [serif] [myfont]
    \definefontsynonym [Serif]  [file:/usr/share/fonts/opentype/scheherazade/Scheherazade-Regular.ttf] [features=arabic]
  \stoptypescript

  \starttypescript [myfont]
    \definetypeface [\typescriptone] [rm] [serif] [myfont]  [default]
    \definetypeface [\typescriptone] [ss] [sans]  [modern] [default]
    \definetypeface [\typescriptone] [tt] [mono]  [modern] [default]
    \definetypeface [\typescriptone] [mm] [math]  [modern] [default]
  \stoptypescript

\setuppapersize [A4]
\mainlanguage[arabic]
\setupdirections[bidi=global]


\setupbodyfont[myfont,14pt]

\setupalign[r2l]
\setupheads[number=no]

% \setuplayout
%   [grid=min]

% \showgrid

\starttext
هذا نص باللغة العربية وهذه ارقام عربية شرقية ١، ٢، ٣، ٤ ، ٥
\startitemize[n]
\item الجملة الاولى
\item الجملة الثانية
\item الجملة الثالثة
\stopitemize


This text is in Arabic\footnote{هذه هي الارقام العربية اما الارقام العربية الشرقية او الهندي فتراها في السطر الاول من الصفحة} and these are eastern numbers 1, 2, 3, 4, 5.


\stoptext
%%% Local Variables:
%%% mode: context
%%% TeX-master: t
%%% TeX-engine: luatex
%%% End:

Output

enter image description here

enter image description here

Desired Output

Is to show eastern numerals as those appearing in the first line of the compiled document in the following locations:

  1. page number (in the header) and hopefully will be so in TOC.
  2. Itemize numbers
  3. Footnote numbering (in the footer)

How to make that change globally as well as locally in the document?

The first five numbers in Hindi or eastern numerals are:

enter image description here

In Microsoft's parlance they are referred to as Hindi numerals.

In polyglossia's parlance they are referred to as mashriq numerals:

% in LaTeX
\usepackage{polyglossia}
\setmainlanguage[numerals=mashriq]{arabic} 

In ConTeXt's parlance they are referred to as Indic numerals see Wiki

Note

ConTeXt ver: 2017.05.15 21:48 MKIV beta fmt: 2017.6.30

Update @Aditya

When I try \startitemize[arabicnumerals] it shows Arabic letters, not numerals which is not the desired outcome for this post. However, this was an illuminating effect to me and would definitely use it when I want letters instead of numbers. This option should read [arabicletters] and not [arabicnumerals] in my humble opinion, otherwise it would be very confusing to show letters in the output when you mean numerals in your code!

enter image description here

When I use the second option \startitemize[devanagarinumerals] it shows lowercase English letters as follows: enter image description here

So neither one gave the desired output.

2
  • Does \startitemize[arabicnumerals] or \startitemize[devanagarinumerals] give you the numbers that you want? If so, you need to set the conversion of all numbers to arabicnumerals.
    – Aditya
    Feb 10, 2018 at 14:00
  • 1
    @Aditya, I updated the post based on your kind comment.
    – doctorate
    Feb 10, 2018 at 19:16

1 Answer 1

2

I found the solution in the CG wiki. So \startitemize[arabicdecimals] is what I was looking for in enumerated lists.

\definefontfeature
  [arabic]
  [mode=node,language=dflt,script=arab,
   init=yes,medi=yes,fina=yes,isol=yes,
   liga=yes,dlig=yes,rlig=yes,clig=yes,
   mark=yes,mkmk=yes,kern=yes,curs=yes]

  \starttypescript [serif] [myfont]
    \definefontsynonym [Serif]  [file:/usr/share/fonts/opentype/scheherazade/Scheherazade-Regular.ttf] [features=arabic]
  \stoptypescript

  \starttypescript [myfont]
    \definetypeface [\typescriptone] [rm] [serif] [myfont]  [default]
    \definetypeface [\typescriptone] [ss] [sans]  [modern] [default]
    \definetypeface [\typescriptone] [tt] [mono]  [modern] [default]
    \definetypeface [\typescriptone] [mm] [math]  [modern] [default]
  \stoptypescript

\setuppapersize [A4]
\mainlanguage[arabic]
\setupdirections[bidi=global]


\setupbodyfont[myfont,14pt]

\setupalign[r2l]
\setupheads[number=no]

% \setuplayout
%   [grid=min]

% \showgrid

\setuppagenumber[numberconversion=arabicdecimals] %worked
\setupfootnotes[rule=paragraph]        %conversion=arabicdecimals; not working here, hence next
\setupnotation[footnote][numberconversion=arabicdecimals]

\starttext
هذا نص باللغة العربية وهذه ارقام عربية شرقية ١، ٢، ٣، ٤ ، ٥
\startitemize[arabicdecimals]
\item الجملة الاولى
\item الجملة الثانية
\item الجملة الثالثة
\stopitemize


This text is in Arabic\footnote{هذه هي الارقام العربية اما الارقام العربية الشرقية او الهندي فتراها في السطر الاول من الصفحة} and these are eastern numbers 1, 2, 3, 4, 5.

\stoptext
%%% Local Variables:
%%% mode: context
%%% TeX-master: t
%%% TeX-engine: luatex
%%% End:

Output

enter image description here

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .