forked from mirrors/org-mode
ox-latex: Surround option string with braces if it includes brackets
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
This commit is contained in:
parent
f4aac6090d
commit
54863e802f
|
@ -1494,7 +1494,10 @@ nil."
|
||||||
(pcase-let ((`(,keyword ,value) pair))
|
(pcase-let ((`(,keyword ,value) pair))
|
||||||
(concat keyword
|
(concat keyword
|
||||||
(and (> (length value) 0)
|
(and (> (length value) 0)
|
||||||
(concat "=" value)))))
|
(concat "="
|
||||||
|
(if (string-match-p (rx (any "[]")) value)
|
||||||
|
(format "{%s}" value)
|
||||||
|
value))))))
|
||||||
options
|
options
|
||||||
","))
|
","))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue