From 15ec1c56ad61add0bbcc14508ba94fae9e7df3fd Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 24 Mar 2010 12:26:50 +0100 Subject: [PATCH] LaTeX export: Allow parenthesis before exponent of subscript Keith writes: > I noticed something strange and I think it's might be a bug converting > to tex file. I've been trying to put a special symbol inside a > bracket, e.g. > > air temperature (degree Celsius) > > and the symbol should look like ^{\circ}C in org file. It works well > if it is standalone. However, when I put the brackets out of it, say > (^{\circ}C), the pdf output looks bizarre. I have checked the tex > output and the converting results from orgmode file are > > ^{\circ}C --> $^{\circ}$C > (^{\circ}C) --> (^\{\circ}C) --- lisp/ChangeLog | 5 +++++ lisp/org-latex.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 54102cdcd..52aa978ea 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-03-24 Carsten Dominik + + * org-latex.el (org-export-latex-special-chars): Allow a + parenthesis before an exponent or subscript. + 2010-03-23 Dan Davison * org-src.el (org-edit-src-exit): When returning from code edit diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 582a58dce..dc9c12eba 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1431,7 +1431,7 @@ See the `org-export-latex.el' code for a complete conversion table." (backward-char 1))))))) '(;"^\\([^\n$]*?\\|^\\)\\(\\\\?\\$\\)\\([^\n$]*\\)$" "\\(\\(\\\\?\\$\\)\\)" - "\\([a-za-z0-9]+\\|[ \t\n]\\|\\b\\|\\\\\\)\\(_\\|\\^\\)\\({[^{}]+}\\|[a-za-z0-9]+\\|[ \t\n]\\|[:punct:]\\|)\\|{[a-za-z0-9]+}\\|([a-za-z0-9]+)\\)" + "\\([a-za-z0-9()]+\\|[ \t\n]\\|\\b\\|\\\\\\)\\(_\\|\\^\\)\\({[^{}]+}\\|[a-za-z0-9]+\\|[ \t\n]\\|[:punct:]\\|)\\|{[a-za-z0-9]+}\\|([a-za-z0-9]+)\\)" "\\(.\\|^\\)\\(\\\\\\)\\([ \t\n]\\|[a-zA-Z&#%{}\"]+\\)" "\\(.\\|^\\)\\(&\\)" "\\(.\\|^\\)\\(#\\)"