Browse Source

More fixes

Carsten Dominik 15 years ago
parent
commit
aa220a1e6a
3 changed files with 9 additions and 5 deletions
  1. 1 1
      lisp/org-entities.el
  2. 1 1
      lisp/org-html.el
  3. 7 3
      lisp/org-latex.el

+ 1 - 1
lisp/org-entities.el

@@ -93,7 +93,7 @@ utf-8 replacement    Use special character available in utf-8."
     ("plusmn" "\\textpm" nil "±" "+-" "±" "±")
     ("sup2" "\\texttwosuperior" nil "²" "^2" "²" "²")
     ("sup3" "\\textthreesuperior" nil "³" "^3" "³" "³")
-    ("acute x" "\\acute x" t "&acute x;" "'x" "'x" "𝑥́")
+    ("acutex" "\\acute x" t "&acute x;" "'x" "'x" "𝑥́")
     ("micro" "\\textmu" nil "µ" "micro" "µ" "µ")
     ("para" "\\P" nil "¶" "[pilcrow]" "¶" "¶")
     ("middot" "\\textperiodcentered" nil "·" "." "·" "·")

+ 1 - 1
lisp/org-html.el

@@ -1912,7 +1912,7 @@ If there are links in the string, don't modify these."
       (setq s (org-export-html-convert-sub-super s)))
   (if org-export-with-TeX-macros
       (let ((start 0) wd rep)
-	(while (setq start (string-match "\\\\\\([a-zA-Z]+\\)\\({}\\)?"
+	(while (setq start (string-match "\\\\\\([a-zA-Z]+[0-9]*\\)\\({}\\)?"
 					 s start))
 	  (if (get-text-property (match-beginning 0) 'org-protected s)
 	      (setq start (match-end 0))

+ 7 - 3
lisp/org-latex.el

@@ -1441,7 +1441,8 @@ See the `org-export-latex.el' code for a complete conversion table."
 					    (org-export-latex-treat-backslash-char
 					     (match-string 1)
 					     (or (match-string 3) "")))
-					  "") t t))
+					  "") t t)
+		       (backward-char 1))
 		      ((member (match-string 2) '("_" "^"))
 		       (replace-match (or (save-match-data
 					    (org-export-latex-treat-sub-super-char
@@ -1508,8 +1509,11 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
   (let  ((ass (org-entity-get string-after)))
     (cond
      (ass (if (nth 2 ass)
-	      (concat string-before "$" (nth 1 ass) "$")
-	    (concat "\\" string-after)))
+	      (concat string-before 
+		      (org-export-latex-protect-string
+		       (concat "$" (nth 1 ass) "$")))
+	    (concat string-before (org-export-latex-protect-string
+				   (nth 1 ass)))))
      ((and (not (string-match "^[ \n\t]" string-after))
 	   (not (string-match "[ \t]\\'\\|^" string-before)))
       ;; backslash is inside a word