This site will go down shortly. If you need any help, then please subscribe to The Persian TeX discussion mailing list
ask now - it's free

Most popular questions within the last 3 days

Most active Members
this month:
    +1 vote
    43 views

    I want to write a number containing -, e.g. phone number, in natural numerical order (i.e. LTR), without changing language or font or etc. \LRE{text} and \LR{text} should work in this situation, but it seems they don't work correctly.

    E.g. see this example:

    \documentclass{article}
    \usepackage{xepersian}
    \settextfont{XBNiloofar}
    \begin{document}
    یک متن نمونهٔ فارسی {\LRE{۱۲۳-۴۵۶-۷۸۹}} یک متن نمونهٔ فارسی
    \end{document}
    

    and compare it with the output (attachment):

    یک متن نمونهٔ فارسی ۱۲۳-۴۵۶-۷۸۹ یک متن نمونهٔ فارسی

    It should be:

    یک متن نمونهٔ فارسی ۷۸۹-۴۵۶-۱۲۳ یک متن نمونهٔ فارسی

    Is there any solution to do this or this is a bug or sth in bidi package?

    Uploaded File:
    asked by (220 points)
    edited by

    1 Answer

    +2 votes
     
    Best answer

    You just need to change the script to latin (the command \setlatin does this); there is also no need for \LRE or \LR commands.

    \documentclass{article}
    \usepackage{xepersian}
    \settextfont{Yas}
    \begin{document}
    یک متن نمونهٔ فارسی
    {\setlatin ۱۲۳-۴۵۶-۷۸۹}
      یک متن نمونهٔ فارسی
    \end{document}
    

    Output

    answered by (3.1k points)
    selected by

    It worked properly. Thank you.

    ...