summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2013-04-17 20:56:32 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2013-04-17 20:59:41 +0200
commit99f88219951ca73bfea95e433211f566b354fedc (patch)
treef218f8b91935d17e30abef5d44f058e1ed0cc175
parentd57b9e84e16b7a9434c5ef0f0728f82c8cb6a9d8 (diff)
downloadorg-mode-99f88219951ca73bfea95e433211f566b354fedc.tar.gz
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.
-rw-r--r--lisp/org.el2
-rw-r--r--lisp/ox-latex.el7
2 files changed, 3 insertions, 6 deletions
diff --git a/lisp/org.el b/lisp/org.el
index a7570dd..1ceeda2 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 dd8f774..c6fb9a0 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