|
@@ -1399,10 +1399,12 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
|
|
|
|
|
;; Preserve latex environments
|
|
|
(goto-char (point-min))
|
|
|
- (while (re-search-forward "^[ \t]*\\\\begin{\\([a-zA-Z]+\\)}" nil t)
|
|
|
+ (while (re-search-forward "^[ \t]*\\\\begin{\\([a-zA-Z]+\\*?\\)}" nil t)
|
|
|
(let* ((start (progn (beginning-of-line) (point)))
|
|
|
(end (or (and (re-search-forward
|
|
|
- (concat "^[ \t]*\\\\end{" (match-string 1) "}") nil t)
|
|
|
+ (concat "^[ \t]*\\\\end{"
|
|
|
+ (regexp-quote (match-string 1))
|
|
|
+ "}") nil t)
|
|
|
(point-at-eol))
|
|
|
(point-max))))
|
|
|
(add-text-properties start end '(org-protected t))))
|