From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: orgmode <emacs-orgmode@gnu.org>
Subject: [PATCH] Documentation and NEWS for ` org-latex-language-alist'
Date: Mon, 08 Aug 2022 14:39:12 +0000 [thread overview]
Message-ID: <87iln2dckv.fsf@posteo.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 347 bytes --]
Hi,
I am attaching a patch with the documentation of the new variable in the
Manual and the updated NEWS.
Best regards,
Juan Manuel
--
--
------------------------------------------------------
Juan Manuel Macías
https://juanmanuelmacias.com
https://lunotipia.juanmanuelmacias.com
https://gnutas.juanmanuelmacias.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-doc-org-manual.org-documentation-for-org-latex-langu.patch --]
[-- Type: text/x-patch, Size: 4540 bytes --]
From 2ec740e4b2f691f619878a7b86e4874fa05d3a82 Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias <maciaschain@posteo.net>
Date: Mon, 8 Aug 2022 16:30:01 +0200
Subject: [PATCH] doc/org-manual.org: documentation for
`org-latex-language-alist'
* etc/ORG-NEWS: update the news with the new variable.
---
doc/org-manual.org | 57 ++++++++++++++++++++++++++++++++++++++++++++--
etc/ORG-NEWS | 13 +++++++++++
2 files changed, 68 insertions(+), 2 deletions(-)
diff --git a/doc/org-manual.org b/doc/org-manual.org
index 466718e6e..5d0283bf2 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13370,19 +13370,72 @@ general options (see [[*Export Settings]]).
- =LANGUAGE= ::
#+cindex: @samp{LANGUAGE}, keyword
#+vindex: org-latex-packages-alist
+ #+vindex: org-latex-language-alist
+ #+vindex: org-export-default-language
+
+ The list of languages supported by Org is stored in the variable
+ ~org-latex-language-alist~.
+
In order to be effective, the =babel= or =polyglossia=
packages---according to the LaTeX compiler used---must be loaded
with the appropriate language as argument. This can be accomplished
by modifying the ~org-latex-packages-alist~ variable, e.g., with the
- following snippet:
+ following snippet (note that =polyglossia= does not work with
+ pdfLaTeX):
#+begin_src emacs-lisp
(add-to-list 'org-latex-packages-alist
- '("AUTO" "babel" t ("pdflatex")))
+ '("AUTO" "babel" t ("pdflatex" "xelatex" "lualatex")))
(add-to-list 'org-latex-packages-alist
'("AUTO" "polyglossia" t ("xelatex" "lualatex")))
#+end_src
+ LaTeX packages =babel= or =polyglossia= can also be loaded in a
+ document. The "AUTO" string will be replaced in both cases by the
+ appropiate value for the =LANGUAGE= keyword, if present in the
+ document, or by the value of ~org-export-default-language~. Let's
+ see some examples in one or another case.
+
+ =Babel= accepts the classic syntax and (in addition) the new syntax
+ with the =\babelprovide= command to load the languages using the new
+ =INI= files procedure. Keep in mind that there are a number of
+ languages that are only served in babel using =INI= files, so they
+ cannot be declared using the classic syntax, but only using the
+ =\babelprovide= command (see
+ http://mirrors.ctan.org/macros/latex/required/babel/base/babel.pdf).
+ Valid usage examples could be:
+
+ #+begin_example
+ ,#+LATEX_HEADER: \usepackage[french,italian,AUTO]{babel}
+ #+end_example
+
+ where "AUTO" is the main language. But it can also be loaded using
+ the =\babelprovide= command:
+
+ #+begin_example
+ ,#+LATEX_HEADER: \usepackage[french,italian]{babel}
+ ,#+LATEX_HEADER: \babelprovide[import, main]{AUTO}
+ #+end_example
+
+ =Polyglossia=, for this procedure to be effective, must be loaded
+ using the same =babel= classic syntax (but note that /this is not/
+ the actual polyglossia syntax). For example, suppose a document
+ declares Polytonic Greek as the primary language, and French as the
+ secondary language. In this case, it would be expressed as:
+
+ #+begin_example
+ ,#+LANGUAGE: el-polyton
+ ,#+LATEX_HEADER: \usepackage[french,AUTO]{polyglossia}
+ #+end_example
+
+ This would produce in LaTeX (with the actual =polyglossia= syntax):
+
+ #+begin_example
+ \usepackage{polyglossia}
+ \setmainlanguage[variant=polytonic]{greek}
+ \setotherlanguage{french}
+ #+end_example
+
- =LATEX_CLASS= ::
#+cindex: @samp{LATEX_CLASS}, keyword
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 00fe101dc..fc9ac688a 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -431,6 +431,19 @@ prompting for a link description. It can be a string (used as-is) or
a function (called with the same arguments as
~org-make-link-description-function~ to return a string to use).
+*** New list of languages for LaTeX export: ~org-latex-language-alist~
+
+~org-latex-language-alist~ unifies into a single list the old language
+lists for the =babel= and =polyglossia= LaTeX packages:
+~org-latex-babel-language-alist~ and
+~org-latex-polyglossia-language-alist~, respectively, which are
+declared obsolete.
+
+This new list captures the current state of art regarding language
+support in LaTeX. The new =babel= syntax for loading languages via
+=ini= files and the new command =\babelprovide= (see:
+http://mirrors.ctan.org/macros/latex/required/babel/base/babel.pdf)
+are also supported.
* Version 9.5
** Important announcements and breaking changes
--
2.37.1
next reply other threads:[~2022-08-08 14:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-08 14:39 Juan Manuel Macías [this message]
2022-08-09 11:43 ` [PATCH] Documentation and NEWS for ` org-latex-language-alist' Ihor Radchenko
2022-08-16 14:16 ` Juan Manuel Macías
2022-08-18 15:39 ` Max Nikulin
2022-08-20 5:51 ` Ihor Radchenko
2022-08-20 7:17 ` http: links in the manual Max Nikulin
2022-08-21 9:55 ` Juan Manuel Macías
2022-08-22 2:46 ` Auto-checking dead links in the manual (was: http: links in the manual) Ihor Radchenko
2022-08-22 15:29 ` Max Nikulin
2022-08-22 21:58 ` Hendursaga
2022-08-23 2:53 ` Ihor Radchenko
2022-08-09 15:39 ` [PATCH] Documentation and NEWS for ` org-latex-language-alist' Max Nikulin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iln2dckv.fsf@posteo.net \
--to=maciaschain@posteo.net \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.