forked from mirrors/org-mode
Fix backslash and other special characters in verbatim snippets
Jeff Kowalczyk writes: > Is there a way to escape backslashes (\) in code and verbatim that > will export to LaTeX correctly? > > When writing =\\host\share= or =C:\path\to=, pdftolatex output is > incorrect.
This commit is contained in:
parent
38f82c430b
commit
c950e4b3ac
|
@ -1,3 +1,8 @@
|
|||
2009-09-24 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-latex.el (org-export-latex-emph-format): Use better commands
|
||||
to insert special characters in verbatim snippets.
|
||||
|
||||
2009-09-22 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-faces.el (org-copy-face): New function. Use it to create
|
||||
|
|
|
@ -1479,9 +1479,9 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
|||
"%s" (substring ll i (1+ i))))
|
||||
(throw 'exit nil))))))
|
||||
(let ((start 0)
|
||||
(trans '(("\\" . "\\backslash")
|
||||
("~" . "\\ensuremath{\\sim}")
|
||||
("^" . "\\ensuremath{\\wedge}")))
|
||||
(trans '(("\\" . "\\textbackslash{}")
|
||||
("~" . "\\textasciitilde{}")
|
||||
("^" . "\\textasciicircum{}")))
|
||||
(rtn "") char)
|
||||
(while (string-match "[\\{}$%&_#~^]" string)
|
||||
(setq char (match-string 0 string))
|
||||
|
|
Loading…
Reference in New Issue