0 votes
204 views

I am creating PDFs for an Arabic-based orthography. I use digit mapping to convert the PT output Latin digits to Arabic digits. Large numbers in the Bible text, containing 4+ digits, are normally written in the Latin-based alphabet with a dot as the thousands separator. Thus 120000 is written 120.000. Because of the dot/period, PTXprint interprets this as two separate numbers, reversing the order of the elements, whereas Arabic number digits are written in the same order as in English, left to right. Thus the output looks like this: ٠٠٠.١٢٠ (i.e. 000.120), whereas it should read ١٢٠.٠٠٠. If in PT I use no thousands separator, or comma instead of dot, the order is correct. But comma is used preceding decimals; I need to use the customary dot in both Latin and Arabic output. 

So my question is, is there a way to correct this issue in PTXprint?  

PTXprint by (123 points) | 204 views

1 Answer

+1 vote

This seems to be a common problem! https://www.unicode.org/L2/L2017/17324-decimal-full-stop.pdf

My suggestion would be to place a changes.txt rule in the Arabic text project to change the dot/period to the proper Arabic Thousands Separator (\u066C) so that the entire string of digits an the punctuation are all the same script and all RTL. It should then render as expected. Here's a rule that should do the trick:

"(\d)\.(\d\d\d)" > "\1\u066C\2"

This says, find any digit followed by a period followed by 3 digits, and replace with the 1st match (the single digit) followed by the 066C separator followed by the 2nd match (the 3 digits found on the left side).

Someone else might be able to improve this Regex to also work with much longer numbers where there are 2 separators: 150.000.345.

Then in the window that appears, paste in the above rule shown on line 5. (Note that I commented out the reference to PrintDraftChanges.txt as that's probably not needed):

Let us know how it goes... 

Make sure you have also got the Fonts+Scripts settings set to do RTL and Arabic:

by (3.2k points)
edited by
Thanks, Mark, for that clear explanation. But it did not work for me. I copied the code above into changes.txt as directed. RTL Book Binding is checked. But the output is the same as it was. Note that in my PT the transliterated Ajami project also has the (Latin) digits in the wrong order: 000.120. Is the problem that the PT encoding converter doesn't account for such large numbers?
Update. I corrected an error in the Converter .map/.tec file so that the digits now appear in the correct order in the converted output in PT: ١٢٠.٠٠٠
I verified that the code you suggested is correct in changes.txt. Yet in the PTXprint output it is still in the wrong order, this time with the individual digits reversed as well:  ٠٠٠٬٠٢١ (this is how it pasted, but in the PDF the comma is raised). Note that the font and script are set correctly. Any other suggestions?
Thanks.

Related questions

0 votes
1 answer 124 views
When setting up an Arabic orthography document, it appears that I need to apply digit mapping to all applicable styles one- ... to the document globally, i.e. to all styles?
Kirk 123 asked Aug 28, 2024
0 votes
1 answer 181 views
page numbers and chapter numbers not lining up. how do i fix this (see attached)? page numbers and ch num not lined up1088×234 35.3 KB
anon441204 250 asked May 13, 2021
0 votes
2 answers 257 views
I am trying to print Ajami (Arabic font) Scripture. But all the consonants print individually rather than connected within ... looks like this: It should look like this: Thanks!
Kirk 123 asked Jul 12, 2024
0 votes
3 answers 666 views
When a new PT project or book is created, verse numbers are automatically provided as arabic numerals (1,2,3,4 ... system for verse numbers. Is this possible? Thanks. Dennis
anon835853 166 asked Aug 5, 2015
0 votes
5 answers 380 views
I have an Arabic script project which has 3 levels of quotes: These have the following Unicode ... Paratext, because down-the-road outputs will do the right thing?
jeffh 1.4k asked Jul 29, 2019
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
How good and pleasant it is when God’s people live together in unity!
Psalm 133:1
3,037 questions
5,995 answers
5,661 comments
2,022 users