Export: Fix bugs with LaTeX export.
1. Export hangs during LaTeX export. That was a bug using an empty regular expression that was defined only locally in Org files, but not in the buffer used by the LaTeX exporter. 2. Underscores in links can get special treatment by the LaTeX exporter. Now the link is protected from this.
This commit is contained in:
parent
a66c6a40cc
commit
e3eac575bf
|
@ -1,3 +1,4 @@
|
|||
|
||||
2009-01-06 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* Makefile (LISPF): Add org-footnote.el
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
2009-01-08 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-exp.el (org-export-normalize-links): Protect the main link,
|
||||
to avoid special character processing.
|
||||
|
||||
* org-export-latex.el (org-export-latex-special-keyword-regexp):
|
||||
New variable.
|
||||
(org-export-latex-special-string-regexps): Variable removed.
|
||||
(org-export-latex-keywords): Use the new regexp.
|
||||
|
||||
* org-exp.el (org-export-handle-include-files): Fetch switches and
|
||||
put them into the BEGIN statement.
|
||||
|
||||
|
|
|
@ -2051,7 +2051,9 @@ When it is nil, all comments will be removed."
|
|||
(org-translate-link
|
||||
(org-link-expand-abbrev (match-string 1)))))
|
||||
(s (concat
|
||||
"[[" xx "]"
|
||||
"[[" (org-add-props (copy-sequence xx)
|
||||
nil 'org-protected t)
|
||||
"]"
|
||||
(if (match-end 3)
|
||||
(match-string 2)
|
||||
(concat "[" (org-add-props
|
||||
|
|
|
@ -62,12 +62,11 @@
|
|||
(defvar org-export-latex-add-level 0)
|
||||
(defvar org-export-latex-sectioning "")
|
||||
(defvar org-export-latex-sectioning-depth 0)
|
||||
(defvar org-export-latex-special-string-regexps
|
||||
'(org-ts-regexp
|
||||
org-scheduled-string
|
||||
org-deadline-string
|
||||
org-clock-string)
|
||||
"A list of regexps to convert as special keywords.")
|
||||
(defvar org-export-latex-special-keyword-regexp
|
||||
(concat "\\<\\(" org-scheduled-string "\\|"
|
||||
org-deadline-string "\\|"
|
||||
org-closed-string"\\)")
|
||||
"Regexp matching special time planning keywords plus the time after it.")
|
||||
|
||||
(defvar latexp) ; dynamically scoped from org.el
|
||||
(defvar re-quote) ; dynamically scoped from org.el
|
||||
|
@ -1012,11 +1011,11 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
|||
(concat string-before "\\textbackslash{}" string-after)))))
|
||||
|
||||
(defun org-export-latex-keywords ()
|
||||
"Convert special keywords to LaTeX.
|
||||
Regexps are those from `org-export-latex-special-string-regexps'.
|
||||
If TIMESTAMPS, convert timestamps, otherwise delete them."
|
||||
"Convert special keywords to LaTeX."
|
||||
(goto-char (point-min))
|
||||
(let ((re (concat org-maybe-keyword-time-regexp ".*")))
|
||||
(let ((re (concat org-export-latex-special-keyword-regexp
|
||||
".*" ; including the time stamp....
|
||||
)))
|
||||
(while (re-search-forward re nil t)
|
||||
(replace-match (format "\\\\texttt{%s}" (match-string 0)) t))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue