[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] ox-latex.el/org-latex--make-option-string: Surround option strin
From: |
Markus Huber |
Subject: |
[PATCH] ox-latex.el/org-latex--make-option-string: Surround option string with braces if it includes brackets |
Date: |
Wed, 26 May 2021 12:06:18 +0200 |
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
- [PATCH] ox-latex.el/org-latex--make-option-string: Surround option string with braces if it includes brackets,
Markus Huber <=