Juan Manuel Macías <maciasch...@posteo.net> writes: > Ihor Radchenko writes: > >> However, the PDF (see the attached) is erroneous: >> 1. Title "Temp" is written RTL >> 2. Year and date (numbers!) are written RTL >> 3. The python code is written RTL!! >> >> Just the equation is rendered LTR as expected and the ordinary Hebrew >> text is rendered RTL. > > I'd say that's expected behavior. Note that if you declare Hebrew as the > main language, the LaTeX classes (in this case article.cls) will put > whatever is necessary in Hebrew and use the Hebrew (and RTL) typographic > rules where necessary, and that includes the title, the date, and the > various literal strings as the table of contents, figure counters, > captions, etc.
I agree about year, title, and date. However, not the code. I'd expect code snippets to use LTR by default. Maybe with an export flag to switch to RTL. > To use Hebrew in another context, it would have to be declared as a > secondary language. The latest versions of Babel allow you to associate > languages to scripts when it comes to non-Latin alphabets (Cyrillic, > Greek, Arabic, etc.), and also to associate fonts. In this way it would > not be necessary to indicate the language explicitly by means of a > \selectlanguage{} or \foreignlanguage{}{}. For example, suppose that my > document has Spanish as its main language, but I also add parts in > Hebrew, which would be automatically recognized by Babel, by putting > this: > > #+LaTeX_Header: \usepackage{fontspec} > #+LaTeX_Header: \setmainfont{FreeSerif} > #+LaTeX_Header: \usepackage[AUTO,bidi=basic]{babel} > #+LaTeX_Header: \babelprovide[onchar=ids,import]{hebrew} > #+language: es Should we allow #+language to have multiple values like #+language: es en ru uk with first value defining primary language and the rest being secondary? Also, what does bidi=basic do? Finally, may it be useful to provide a syntax (affiliated keyword) that will set a language for specific paragraph? > Perhaps a FONTS item could be added in "LaTeX specific export settings"? Do we have #+FONTS setting? I'd say that it is worth adding. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>