ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "talazem@fastmail.fm" <talazem@fastmail.fm>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Arabic/Hindi numerals in layout structures (headers, page numbers, etc.)
Date: Mon, 3 Aug 2015 02:53:03 +0100	[thread overview]
Message-ID: <6D6C17F1-C54F-41F3-9417-CC5810A65BC4@fastmail.fm> (raw)
In-Reply-To: <92A0BD0E-6BBF-4EE9-85BA-5B4F2EB3BBFF@fastmail.fm>


[-- Attachment #1.1: Type: text/plain, Size: 2357 bytes --]

Never mind. After more word combinations when searching the archives, I came across Wolfgang’s answer here: gmane.comp.tex.context/85673 <http://article.gmane.org/gmane.comp.tex.context/85673>, in which he says to use the \defineconversion command. E.g.:

\defineconversion
  [myconversion]
  [۱,۲,۳,۴,۵,۶,۷,۸,۹,۱۰,
   ۱۱,۱۲,۱۳,۱۴,۱۵,۱۶,۱۷,۱۸,۱۹,۲۰,
   ۲۱,۲۲,۲۳,۲۴,۲۵,۲۶,۲۷,۲۸,۲۹,۳۰]

\setuppagenumber[numberconversion=myconversion]

Of course, one can add the same to setups for the other matters as well:

\setuphead[chapter,title,section,subject][conversion=myconversion]
\setuplinenumbering[conversion=myconversion]
\setupnotations[footnote][numberconversion=myconversion]
\setupnotations[linenote][numberconversion=myconversion]
etc.

This actually provides lots of flexibility, as you can fine-tune various footnote streams by assigning different scripts, etc.

Talal


> On 3 Aug 2015, at 00:32, talazem@fastmail.fm wrote:
> 
> Dear all,
> 
> When typesetting in Arabic (or, for that matter, other non-Latin scripts), how does one get numerals to appear ‘natively’ in layout structures such as headers, page numbers, line-numbering, and footnote numbers? In the case of Arabic, this means using the so-called “mashriqi”, or “Arabic-Indic”/“Arabic-Hindi” numerals. Is there some option when defining the font family? (I would have thought that using “\mainlanguage[arabic]” would have done it.) Of course, I am using a font that contains the numbers of that script.
> 
> Mind you, if I manually type such numbers into the body of my text, they appear correctly. MWE below.
> 
> Best wishes,
> Talal
> 
> =====
> \setuppapersize[A6]
> \mainlanguage[arabic]
> \definefontfamily[mainface][serif][ALMFixed][features=arabic,range=arabic,]
> \setupbodyfont [mainface,10pt]
> 
> \starttext \showframe
> \righttoleft
> 
> %\setupdirections[bidi=global,method=two]
> 
> \section{section one}
> \startlinenumbering
> \input ward 
> \stoplinenumbering
> \footnote{I would like the footnote number — like the page number, section number, and linenumbers — to be in the so-called Arabic-Indic script.}
> 
> \section{section two}
> مرحباً بالعالم. ١٢٣٤٥٦٧٨٩٠ مرحباً بالعالم.
> \stoptext
> =====


[-- Attachment #1.2: Type: text/html, Size: 3646 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2015-08-03  1:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-02 23:32 talazem
2015-08-03  1:53 ` talazem [this message]
2015-08-03  2:04 ` Idris Samawi Hamid ادريس سماوي حامد
2015-08-03  2:24   ` talazem
2015-08-03 12:02     ` Idris Samawi Hamid ادريس سماوي حامد

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6D6C17F1-C54F-41F3-9417-CC5810A65BC4@fastmail.fm \
    --to=talazem@fastmail.fm \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).