0 votes

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 (116 points)

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 (2.5k 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
3 answers
0 votes
5 answers
Paratext Jul 29, 2019 asked by jeffh (1.3k points)
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
So Peter was kept in prison, but the church was earnestly praying to God for him.
Acts 12:5
2,560 questions
5,287 answers
4,998 comments
1,372 users