emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: [RFC] LaTeX - automatically configure encoding when exporting non-Latin languages
Date: Fri, 02 Feb 2024 16:00:01 +0000	[thread overview]
Message-ID: <87il36yhz2.fsf@localhost> (raw)
In-Reply-To: <CAO48Bk-ema=eUaXS8P-nXFpmrhbTy78Nsw6=xL8W-Lz68P0wNA@mail.gmail.com>

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> some days ago I sent a proof-of-concept for customising the coding for the
> fontenc package. Before continuing with this, I'd like to know what other
> people think and/or need.
>
> The simplest approach was in the PoC: a custom variable you can set in your
> document/workspace/emacs configuration. AN alternative approach would be to
> derive it from language.
>
> What would be the best way to go forward?

Let me provide some context for this.

Org mode export to PDF should ideally work for any document language,
once it is specified:

#+title: چون عهده نمی‌شود کسی فردا را
#+LATEX_COMPILER: lualatex
#+LANGUAGE: fa

However, it is not entirely the case yet.

We do load correct punctuation rules, but the output pdf encoding and
fonts have to be configured manually, as discussed in
https://list.orgmode.org/orgmode/87h6z7jq4o.fsf@localhost/

Pedro is proposing a step towards full automatic language configuration
- selecting the correct pdf output encoding:

https://list.orgmode.org/orgmode/CAO48Bk9Eo9zrgU7i7jMDcEAY120VZSHF70PdXOXKFCuKZGKGcg@mail.gmail.com/

The following should be enough to (1) load punctuation rules; (2) set
the correct pdf encoding.

#+title: چون عهده نمی‌شود کسی فردا را
#+LATEX_COMPILER: lualatex
#+LANGUAGE: fa
#+LaTeX_Header: \usepackage[AUTO]{polyglossia}
#+latex_header: \usepackage[AUTO]{fontspec}

(setting the correct font is still not done - it is tricky since we
don't easily know which fonts are installed locally)

Pedro, correct me if I misunderstood something.

-- 
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>


  parent reply	other threads:[~2024-02-02 15:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01  7:07 RFI: LaTeX - AUTO for \usepackage{inputenc} Pedro Andres Aranda Gutierrez
2024-02-01 16:35 ` Ihor Radchenko
2024-02-01 16:33   ` Pedro Andres Aranda Gutierrez
2024-02-02 16:00 ` Ihor Radchenko [this message]
2024-02-02 16:18   ` [RFC] LaTeX - automatically configure encoding when exporting non-Latin languages Juan Manuel Macías
2024-02-02 16:41     ` Pedro Andres Aranda Gutierrez

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=87il36yhz2.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=paaguti@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).