Hi, I have found a problem in the order of content when using \write in RTL mode. http://tex.stackexchange.com/q/333365/7712 David Carlisle wrote a workaround, but it is not very satisfactory. Maybe it is possible to solve this issue directly on XeTeX engine? Thank anyway for this wonderful tool. Maïeul