mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-02-06 21:29:25 +00:00
The the problem of partial name matches with LaTeX entities.
This commit is contained in:
parent
25b227e5ca
commit
79e0ca32d2
@ -1,3 +1,7 @@
|
||||
2008-10-18 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* org-export-latex.el (org-latex-entities-regexp): New constant.
|
||||
|
||||
2008-10-17 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* org-export-latex.el (org-export-latex-treat-sub-super-char):
|
||||
|
@ -1206,7 +1206,7 @@ If TIMESTAMPS, convert timestamps, otherwise delete them."
|
||||
|
||||
;; Protect LaTeX entities
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward (regexp-opt org-latex-entities) nil t)
|
||||
(while (re-search-forward org-latex-entities-regexp nil t)
|
||||
(add-text-properties (match-beginning 0) (match-end 0)
|
||||
'(org-protected t)))
|
||||
|
||||
@ -1451,6 +1451,15 @@ If TIMESTAMPS, convert timestamps, otherwise delete them."
|
||||
"\\vspace")
|
||||
"A list of LaTeX commands to be protected when performing conversion.")
|
||||
|
||||
(defconst org-latex-entities-regexp
|
||||
(let (names rest)
|
||||
(dolist (x org-latex-entities)
|
||||
(if (string-match "[a-z][A-Z]$" x)
|
||||
(push x names)
|
||||
(push x rest)))
|
||||
(concat "\\(" (regexp-opt (nreverse names)) "\\>\\)"
|
||||
"\\|\\(" (regexp-opt (nreverse rest)) "\\)")))
|
||||
|
||||
(provide 'org-export-latex)
|
||||
|
||||
;; arch-tag: 23c2b87d-da04-4c2d-ad2d-1eb6487bc3ad
|
||||
|
Loading…
x
Reference in New Issue
Block a user