emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* About multilingual documents
@ 2021-05-02 20:20 Juan Manuel Macías
  2021-05-03  6:58 ` Aleksandar Dimitrov
  0 siblings, 1 reply; 17+ messages in thread
From: Juan Manuel Macías @ 2021-05-02 20:20 UTC (permalink / raw)
  To: orgmode

[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]

Hi all,

I'm curious to see how other Org users deal with multilingual documents,
that is, those documents (for example, philology or linguistics texts)
that contain a significant number of online quotes in other languages.
Naturally, this makes more sense in the LaTeX backend, since it is
convenient to enclose these quotes in a \foreignlanguage command to
ensure that LaTeX at least apply the correct hyphenation patterns for
words in other languages.

Luckily, in the latest versions of Babel (the Babel of LaTeX) you don't
need to do this when it comes to languages whose script is different
from Latin (e.g. Greek, languages with Cyrillic, Arabic, Hindi, etc.).
We can, for example, define Russian and Greek as:

#+begin_src latex
\babelprovide[onchar=ids fonts,hyphenrules=russian]{russian}
\babelprovide[onchar=ids fonts,hyphenrules=ancientgreek]{greek}
#+end_src

And also the fonts for both languages:

#+begin_src latex
\babelfont[russian]{rm}{Linux Libertine O}
\babelfont[greek]{rm}]{Free Serif}
#+end_src

For Latin-based scripts it is still necessary enclose the text in the
\foreignlanguage command. And now comes the question: how do Org users
who work in multilingual documents to obtain this command when exporting
to Latex?

I usually use macros, which always tend to work fine. But lately I have
been testing an alternative markup system using an export filter. The
idea would be something like:

%(lang) lorem ipsum dolor %()

I start from a list of the most used languages:

#+begin_src emacs-lisp
(langs '(("en" "english")
	 ("fr" "french")
	 ("de" "german")
	 ("it" "italian")
	 ("pt" "portuguese")))
#+end_src

And other possible languages that Babel supports can be indicated
explicitly, by prepending "--":

%(fr) ... %()

%(--esperanto) ... %()

(If someone wants to try it, I attach a small Org document).

Best regards,

Juan Manuel


[-- Attachment #2: test-langs.org --]
[-- Type: application/vnd.lotus-organizer, Size: 2263 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-05-06 16:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-02 20:20 About multilingual documents Juan Manuel Macías
2021-05-03  6:58 ` Aleksandar Dimitrov
2021-05-03 17:47   ` Greg Minshall
2021-05-04  7:30     ` Aleksandar Dimitrov
2021-05-04 17:09       ` Maxim Nikulin
2021-05-04 18:55         ` Aleksandar Dimitrov
2021-05-06 16:22           ` Maxim Nikulin
2021-05-04  8:19     ` Eric S Fraga
2021-05-04  8:29       ` Input methods [was: Re: About multilingual documents] Joost Kremers
2021-05-04  9:36         ` Eric S Fraga
2021-05-03 18:48   ` About multilingual documents Joost Kremers
2021-05-04  8:00     ` Aleksandar Dimitrov
2021-05-03 20:33   ` Juan Manuel Macías
2021-05-04  1:00     ` Tom Gillespie
2021-05-04  8:13       ` Aleksandar Dimitrov
2021-05-04  8:44     ` Aleksandar Dimitrov
2021-05-06 11:11       ` Juan Manuel Macías

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