From 99f88219951ca73bfea95e433211f566b354fedc Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 17 Apr 2013 20:56:32 +0200 Subject: [PATCH] ox-latex: Use \text command for subscript and superscript * lisp/ox-latex.el (org-latex--script-size): Use \text command for subscript and superscript. This is far superior to \mathrm, but it requires "amstext" package. In particular, accented characters are now allowed within sub/superscript. * lisp/org.el (org-latex-default-packages-alist): Add "amstext" package. --- lisp/org.el | 2 ++ lisp/ox-latex.el | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index a7570dd4f..1ceeda21c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -3810,6 +3810,7 @@ header, or they will be appended." ("" "wasysym" t) ("" "latexsym" t) ("" "amssymb" t) + ("" "amstext" nil) ("" "hyperref" nil) "\\tolerance=1000") "Alist of default packages to be inserted in the header. @@ -3821,6 +3822,7 @@ The packages in this list are needed by one part or another of Org mode to function properly: - inputenc, fontenc: for basic font and character selection +- amstext: for subscript and superscript - textcomp, marvosymb, wasysym, latexsym, amssym: for various symbols used for interpreting the entities in `org-entities'. You can skip some of these packages if you don't use any of the diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index dd8f77421..c6fb9a0fe 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2232,12 +2232,7 @@ channel." (and blank (> blank 0) "\\ ")))))) (plain-text (setq output - (format "%s\\mathrm{%s}" - output - ;; \mathrm command doesn't handle spaces, so - ;; we have to enforce them. - (replace-regexp-in-string - " " "\\\\ " (org-export-data obj info))))) + (format "%s\\text{%s}" output (org-export-data obj info)))) (otherwise (setq output (concat output -- 2.11.4.GIT