Huseyin Özoguz schrieb am 03.12.18 um 20:45:
Probably something with your font/alignment switching.
Yes, probably, but this switching is necessary, look at your example: It gives wrong aligning of the arabic letters (left to right instead of right to left), so at some point one has to inject a \setupalign[r2l], but all my tries only gave this one as a correct result:
\define[2]\InterlinearText {\setupalign[r2l]\definedfont[file:arial*arabic at 16 pt] \ruby{{\setupalign[r2l]#1}}{\setupalign[l2r]\definedfont[name:arial at 10pt]#2}}
\defineruby [interlineartext] [style=\lefttoright\txx] \define[2]\InterlinearText {\ruby[interlineartext]{#1}{#2} }
But that as mentioned looses all other databse entries except the first. Some hints where to make the r2l-switch with getting the same result?
\starttext \setupalign[r2l] \processdatabasebuffer[interlineartext][sample] \stoptext or when you want to change the alignment only for a part of your document \starttext \startalignment[r2l] \processdatabasebuffer[interlineartext][sample] \stopalignment \stoptext
There is no command which changes the order of words in a sentence but this should be easy with a short Lua function. Thank you, if some day one is available, I will use it. Or wil learn Lua, right, should be a very basic function to implement.
You can find many Lua examples for this online. Wolfgang