emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Juan Manuel Macías" <maciaschain@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] LaTeX export in non-English language [9.6-pre (release_9.5.5-1087-g620a96.dirty @ /home/yantar92/.emacs.d/straight/build/org/)]
Date: Tue, 15 Nov 2022 02:46:47 +0000	[thread overview]
Message-ID: <875yfhdje0.fsf@localhost> (raw)
In-Reply-To: <87sfil897q.fsf@posteo.net>

Juan Manuel Macías <maciaschain@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>

      reply	other threads:[~2022-11-15  2:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10  6:11 [BUG] LaTeX export in non-English language [9.6-pre (release_9.5.5-1087-g620a96.dirty @ /home/yantar92/.emacs.d/straight/build/org/)] Ihor Radchenko
2022-11-10 12:40 ` Juan Manuel Macías
2022-11-11  2:04   ` Ihor Radchenko
2022-11-11 15:08     ` Juan Manuel Macías
2022-11-13  4:09       ` Ihor Radchenko
2022-11-13 13:27         ` Juan Manuel Macías
2022-11-14  2:38           ` Ihor Radchenko
2022-11-14 22:25             ` Juan Manuel Macías
2022-11-15  2:46               ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yfhdje0.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=maciaschain@posteo.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).