Prefer matching line beginnings in org-export-latex-special-chars
* lisp/org-latex.el (org-export-latex-special-chars): Fix regexp for `single' special characters and ellipsis. Repeated special characters are exported differently depending on their position in the buffer. A "&&" string at the start of a line is exported as "&\&" whereas in the middle of a line you get "\&\&". The former is incorrect. Fix this by matching the beginning of a line before a character. While we're at it, amalgamate the regexps for the different special characters.
This commit is contained in:
parent
f4ba6dc6ee
commit
0e8f873c88
|
@ -1686,13 +1686,7 @@ See the `org-export-latex.el' code for a complete conversion table."
|
|||
"\\(\\(\\\\?\\$\\)\\)"
|
||||
"\\([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][a-zA-Z0-9]*\\)\\)"
|
||||
"\\(.\\|^\\)\\(&\\)"
|
||||
"\\(.\\|^\\)\\(#\\)"
|
||||
"\\(.\\|^\\)\\(%\\)"
|
||||
"\\(.\\|^\\)\\({\\)"
|
||||
"\\(.\\|^\\)\\(}\\)"
|
||||
"\\(.\\|^\\)\\(~\\)"
|
||||
"\\(.\\|^\\)\\(\\.\\.\\.\\)"
|
||||
"\\(^\\|.\\)\\([&#%{}~]\\|\\.\\.\\.\\)"
|
||||
;; (?\< . "\\textless{}")
|
||||
;; (?\> . "\\textgreater{}")
|
||||
)))
|
||||
|
|
Loading…
Reference in New Issue