Hi Ihor,
look at the code and the examples in different fora. The examples for RTL
docs I have found are pure text documents (sorry).
Using \LR{} in an RTL document or \textRL{} in an LTR document.
You can always complain at the polyglossia or the listings people...
Best, /PA
On Thu, 20 Nov 2025 at 21:22, Ihor Radchenko <[email protected]> wrote:
> Pedro Andres Aranda Gutierrez <[email protected]> writes:
>
> > Attached is your MWE in a better shape. The font config section at the
> > bottom is to make the process more readable. At the end, the font
> > configuration should be in the .dir-locals.el or in the emacs init code.
> >
> > The main thing in an RTL document using polyglossia is that you need to
> > somehow mark the LRT parts (see for a different context:
> >
> https://github.com/reutenauer/polyglossia/blob/master/doc/example-arabic.tex
> > )
> > So, I inserted the Latex \LR{} command for the title and enclosing the
> > listing.
> >
> > This is not org or ox-latex specific but rather a LaTeX (polyglossia)
> quirk.
>
> I still believe that it is not expected that *code blocks* are
> inheriting RTL. What about marking them as
> \begin{english}...\end{english} or \foreignlanguage... when we use
> non-english environment?
>
> --
> Ihor Radchenko // yantar92,
> Org mode maintainer,
> 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>
>
--
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler
"Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE!
Year 1 of the New Koprocracy