From d540ad65d228bfb31a672cc1f7a771504cb3f58c Mon Sep 17 00:00:00 2001 From: "Pedro A. Aranda" Date: Sun, 21 Jan 2024 18:06:19 +0100 Subject: [PATCH] org-manual: Add multi-language babel example org-manual.org: Add multi-language babel example * doc/org-manual.org: Add an example for the LaTeX header commands needed to export multi-language documents to pdflatex. In this case we need to use and configure the babel package appropriately. --- doc/org-manual.org | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/doc/org-manual.org b/doc/org-manual.org index acc6d07ff..71cc8b1a1 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -13925,6 +13925,10 @@ general options (see [[*Export Settings]]). '("AUTO" "polyglossia" t ("xelatex" "lualatex"))) #+end_src + The value used for =babel= or =polyglossia= is set in + ~org-export-default-language~. The default value is ~"en"~, which + means American English. + - =LATEX_CLASS= :: #+cindex: @samp{LATEX_CLASS}, keyword @@ -14079,6 +14083,37 @@ the =\babelprovide= command: ,#+LATEX_HEADER: \babelprovide[import, main]{AUTO} #+end_example +Another example using =pdflatex= and =babel= and mixing Latin and +Greek fonts in the document using the =\PassOptionsToPackage= command +from =babel= would be: + +#+begin_example +,#+latex_class_options: [greek,spanish,oneside] +,#+language: es +,#+latex_header: \PassOptionsToPackage{main=spanish}{babel} +,#+latex_header: \usepackage{alphabeta} % to support greek script +#+end_example + +Note that you can add more options to the ~latex_class_options~. +You need to include the language resulting from translating the +=#+language:= statement in the other commands in your LaTeX header. +In the previous example + +#+begin_example +,#+language: es +#+end_example + +is translated to + +#+begin_example +\usepackage[spanish]{babel} +#+end_example + +and =spanish= is used for the other header commands and in the +=#+latex_class_options=. + + + =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 -- 2.34.1