diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-12-13 09:10:54 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-12-13 09:13:22 +0100 |
commit | e491ab31c63661860730bd11a397e12a056d914e (patch) | |
tree | 1fa35766c2d609f3e6c6666e2e66ff325f57aa86 | |
parent | f747ee43bd369f46c39363072f25e9842d783ece (diff) | |
download | org-mode-e491ab31c63661860730bd11a397e12a056d914e.tar.gz |
ox-latex: Fix nested sub/super-scripts
* lisp/ox-latex.el (org-latex--wrap-latex-math-block): Prevent merging
multiple sub/super-scripts at the same level. Nested scripts are
allowed.
-rw-r--r-- | lisp/ox-latex.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 5830f3c..94d8573 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2707,7 +2707,8 @@ containing export options. Modify DATA by side-effect and return it." (or (string-prefix-p "\\(" value) (string-match-p "\\`\\$[^$]" value)))) ((and type (or `subscript `superscript)) - (not (org-element-map b type #'identity info t))))))) + (not (memq type (mapcar #'org-element-type + (org-element-contents b))))))))) (org-element-map data '(entity latex-fragment subscript superscript) (lambda (object) ;; Skip objects already wrapped. |