@@ -13373,15 +13373,23 @@ general options (see [[*Export Settings]]).
1337313373- =LANGUAGE= ::
1337413374 #+cindex: @samp{LANGUAGE}, keyword
1337513375 #+vindex: org-latex-packages-alist
13376+ #+vindex: org-latex-language-alist
13377+
13378+ Language code of the primary document language.
13379+
13380+ The list of language codes supported by Org is stored in the
13381+ variable ~org-latex-language-alist~.
13382+
1337613383 In order to be effective, the =babel= or =polyglossia=
1337713384 packages---according to the LaTeX compiler used---must be loaded
1337813385 with the appropriate language as argument. This can be accomplished
1337913386 by modifying the ~org-latex-packages-alist~ variable, e.g., with the
13380- following snippet:
13387+ following snippet (note that =polyglossia= does not work with
13388+ pdfLaTeX):
1338113389
1338213390 #+begin_src emacs-lisp
1338313391 (add-to-list 'org-latex-packages-alist
13384- '("AUTO" "babel" t ("pdflatex")))
13392+ '("AUTO" "babel" t ("pdflatex" "xelatex" "lualatex" )))
1338513393 (add-to-list 'org-latex-packages-alist
1338613394 '("AUTO" "polyglossia" t ("xelatex" "lualatex")))
1338713395 #+end_src
@@ -13511,6 +13519,54 @@ A sample Org file with the above headers:
1351113519 some more text
1351213520#+end_example
1351313521
13522+ #+cindex: @samp{LANGUAGE}, keyword
13523+ #+vindex: org-export-default-language
13524+ LaTeX packages =babel= or =polyglossia= can also be loaded in a
13525+ document. The "AUTO" string will be replaced in both cases by the
13526+ appropiate value for the =LANGUAGE= keyword, if present in the
13527+ document, or by the value of ~org-export-default-language~. Let's see
13528+ some examples in one or another case.
13529+
13530+ =Babel= accepts the classic syntax and (in addition) the new syntax
13531+ with the =\babelprovide= command to load the languages using the new
13532+ =INI= files procedure. Keep in mind that there are a number of
13533+ languages that are only served in babel using =INI= files, so they
13534+ cannot be declared using the classic syntax, but only using the
13535+ =\babelprovide= command (see
13536+ https://mirrors.ctan.org/macros/latex/required/babel/base/babel.pdf).
13537+ Valid usage examples could be:
13538+
13539+ #+begin_example
13540+ ,#+LATEX_HEADER: \usepackage[french,italian,AUTO]{babel}
13541+ #+end_example
13542+
13543+ where "AUTO" is the main language. But it can also be loaded using
13544+ the =\babelprovide= command:
13545+
13546+ #+begin_example
13547+ ,#+LATEX_HEADER: \usepackage[french,italian]{babel}
13548+ ,#+LATEX_HEADER: \babelprovide[import, main]{AUTO}
13549+ #+end_example
13550+
13551+ =Polyglossia=, for this procedure to be effective, must be loaded
13552+ using the same =babel= classic syntax (but note that /this is not/
13553+ the actual polyglossia syntax). For example, suppose a document
13554+ declares Polytonic Greek as the primary language, and French as the
13555+ secondary language. In this case, it would be expressed as:
13556+
13557+ #+begin_example
13558+ ,#+LANGUAGE: el-polyton
13559+ ,#+LATEX_HEADER: \usepackage[french,AUTO]{polyglossia}
13560+ #+end_example
13561+
13562+ This would produce in LaTeX (with the actual =polyglossia= syntax):
13563+
13564+ #+begin_example
13565+ \usepackage{polyglossia}
13566+ \setmainlanguage[variant=polytonic]{greek}
13567+ \setotherlanguage{french}
13568+ #+end_example
13569+
1351413570*** Quoting LaTeX code
1351513571:PROPERTIES:
1351613572:DESCRIPTION: Incorporating literal @LaTeX{} code.
0 commit comments