LaTeX export: Fix another protection bug, this time the char before a "\"
This commit is contained in:
parent
2f2f9441d4
commit
8fd14ae648
|
@ -1,3 +1,8 @@
|
||||||
|
2010-01-15 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org-latex.el (org-export-latex-treat-backslash-char): Do not by
|
||||||
|
accident protect a character that is before a backslash.
|
||||||
|
|
||||||
2010-01-14 Carsten Dominik <carsten.dominik@gmail.com>
|
2010-01-14 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
* org-agenda.el (org-diary-class): Use
|
* org-agenda.el (org-diary-class): Use
|
||||||
|
|
|
@ -1441,14 +1441,15 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
||||||
((and (not (string-match "^[ \n\t]" string-after))
|
((and (not (string-match "^[ \n\t]" string-after))
|
||||||
(not (string-match "[ \t]\\'\\|^" string-before)))
|
(not (string-match "[ \t]\\'\\|^" string-before)))
|
||||||
;; backslash is inside a word
|
;; backslash is inside a word
|
||||||
(org-export-latex-protect-string
|
(concat string-before
|
||||||
(concat string-before "\\textbackslash{}" string-after)))
|
(org-export-latex-protect-string
|
||||||
|
(concat "\\textbackslash{}" string-after))))
|
||||||
((not (or (equal string-after "")
|
((not (or (equal string-after "")
|
||||||
(string-match "^[ \t\n]" string-after)))
|
(string-match "^[ \t\n]" string-after)))
|
||||||
;; backslash might escape a character (like \#) or a user TeX
|
;; backslash might escape a character (like \#) or a user TeX
|
||||||
;; macro (like \setcounter)
|
;; macro (like \setcounter)
|
||||||
(org-export-latex-protect-string
|
(concat string-before
|
||||||
(concat string-before "\\" string-after)))
|
(org-export-latex-protect-string (concat "\\" string-after))))
|
||||||
((and (string-match "^[ \t\n]" string-after)
|
((and (string-match "^[ \t\n]" string-after)
|
||||||
(string-match "[ \t\n]\\'" string-before))
|
(string-match "[ \t\n]\\'" string-before))
|
||||||
;; backslash is alone, convert it to $\backslash$
|
;; backslash is alone, convert it to $\backslash$
|
||||||
|
|
Loading…
Reference in New Issue