Browse Source

LaTeX export: Fix export of &&

Lukasz Stelman writes:

I've create some presentation on programming (some more to do) and to my
surprise I've discovered that if org-mode escapes one "&" properly it
doesn't do its job in case of "&&" (and a single "^" too). I get "\&&"
in latex file which of course is wrong.
Carsten Dominik 15 years ago
parent
commit
1c87de51fc
2 changed files with 7 additions and 1 deletions
  1. 5 0
      lisp/ChangeLog
  2. 2 1
      lisp/org-latex.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2010-03-03  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-latex.el (org-export-latex-special-chars): Find subsequent
+	occurrences of special characters.
+
 2010-03-01  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-list.el (org-toggle-checkbox): No errors when updating

+ 2 - 1
lisp/org-latex.el

@@ -1388,7 +1388,8 @@ See the `org-export-latex.el' code for a complete conversion table."
 		     (if (equal (match-string 1) "\\")
 			 (replace-match (match-string 2) t t)
 		       (replace-match (concat (match-string 1) "\\"
-					      (match-string 2)) t t)))
+					      (match-string 2)) t t)
+		       (backward-char 1)))
 		    ((equal (match-string 2) "...")
 		     (replace-match
 		      (concat (match-string 1)