lisp/ox-latex.el (`org-latex--make-option-string'): If `value' of a `pair' from `options' contains a bracket
the whole `value' is surrounded by braces.
In case of LaTeX export using listings the dialect of a language (e.g. [LaTeX]TeX) is surrounded by brackets. For inline
source blocks all options end as optional argument to \lstinline between brackets which breaks the LaTeX parser.
TINYCHANGE
---
lisp/ox-latex.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index b9ecf070a..2f7bbdf15 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1486,7 +1486,7 @@ nil."
(pcase-let ((`(,keyword ,value) pair))
(concat keyword
(and (> (length value) 0)
- (concat "=" value)))))
+ (concat "=" (if (string-match-p "\\[\\|\\]" value) (format "{%s}" value) value))))))
options
","))
--
2.31.1