forked from mirrors/org-mode
lisp/ox-latex.el: fix `org-latex-guess-babel-language'
* (org-latex-guess-babel-language): If the user puts a string other than AUTO as an argument to `\babelprovide', it gives an error when exporting. For example: `#+LaTeX_Header: \babelprovide[onchar=ids,import]{hebrew}'
This commit is contained in:
parent
9e62aaf5e4
commit
fcf63fb31e
|
@ -1669,12 +1669,13 @@ Return the new header."
|
||||||
(if (not (string-match "\\\\babelprovide\\[.*\\]{\\(.+\\)}" header))
|
(if (not (string-match "\\\\babelprovide\\[.*\\]{\\(.+\\)}" header))
|
||||||
header
|
header
|
||||||
(let ((prov (match-string 1 header)))
|
(let ((prov (match-string 1 header)))
|
||||||
(when (equal "AUTO" prov)
|
(if (equal "AUTO" prov)
|
||||||
(replace-regexp-in-string (format
|
(replace-regexp-in-string (format
|
||||||
"\\(\\\\babelprovide\\[.*\\]\\)\\({\\)%s}" prov)
|
"\\(\\\\babelprovide\\[.*\\]\\)\\({\\)%s}" prov)
|
||||||
(format "\\1\\2%s}"
|
(format "\\1\\2%s}"
|
||||||
(or language language-ini-only))
|
(or language language-ini-only))
|
||||||
header t))))))
|
header t)
|
||||||
|
header)))))
|
||||||
|
|
||||||
(defun org-latex-guess-polyglossia-language (header info)
|
(defun org-latex-guess-polyglossia-language (header info)
|
||||||
"Set the Polyglossia language according to the LANGUAGE keyword.
|
"Set the Polyglossia language according to the LANGUAGE keyword.
|
||||||
|
|
Loading…
Reference in New Issue