[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 54863e8 2/3: ox-latex: Surround option string with
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 54863e8 2/3: ox-latex: Surround option string with braces if it includes brackets |
Date: |
Sat, 29 May 2021 16:57:13 -0400 (EDT) |
branch: externals/org
commit 54863e802ff89778b28bab79fb418b03c9abd5a5
Author: Markus Huber <markus.huber@b-tu.de>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>
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
---
lisp/ox-latex.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 9e2e7be..9724b0d 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1494,7 +1494,10 @@ nil."
(pcase-let ((`(,keyword ,value) pair))
(concat keyword
(and (> (length value) 0)
- (concat "=" value)))))
+ (concat "="
+ (if (string-match-p (rx (any "[]"))
value)
+ (format "{%s}" value)
+ value))))))
options
","))