Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
This commit is contained in:
commit
02494667c7
|
@ -2320,10 +2320,9 @@ When TITLE is nil, just close all open levels."
|
||||||
(extra-class (and title (org-get-text-property-any 0 'html-container-class title)))
|
(extra-class (and title (org-get-text-property-any 0 'html-container-class title)))
|
||||||
(preferred (and target
|
(preferred (and target
|
||||||
(cdr (assoc target org-export-preferred-target-alist))))
|
(cdr (assoc target org-export-preferred-target-alist))))
|
||||||
(remove (or preferred target))
|
|
||||||
(l org-level-max)
|
(l org-level-max)
|
||||||
snumber snu href suffix)
|
snumber snu href suffix)
|
||||||
(setq extra-targets (remove remove extra-targets))
|
(setq extra-targets (remove (or preferred target) extra-targets))
|
||||||
(setq extra-targets
|
(setq extra-targets
|
||||||
(mapconcat (lambda (x)
|
(mapconcat (lambda (x)
|
||||||
(if (org-uuidgen-p x) (setq x (concat "ID-" x)))
|
(if (org-uuidgen-p x) (setq x (concat "ID-" x)))
|
||||||
|
@ -2362,12 +2361,13 @@ When TITLE is nil, just close all open levels."
|
||||||
(progn
|
(progn
|
||||||
(org-close-li)
|
(org-close-li)
|
||||||
(if target
|
(if target
|
||||||
(insert (format "<li id=\"%s\">" target) extra-targets title "<br/>\n")
|
(insert (format "<li id=\"%s\">" (or preferred target))
|
||||||
|
extra-targets title "<br/>\n")
|
||||||
(insert "<li>" title "<br/>\n")))
|
(insert "<li>" title "<br/>\n")))
|
||||||
(aset org-levels-open (1- level) t)
|
(aset org-levels-open (1- level) t)
|
||||||
(org-close-par-maybe)
|
(org-close-par-maybe)
|
||||||
(if target
|
(if target
|
||||||
(insert (format "<ul>\n<li id=\"%s\">" target)
|
(insert (format "<ul>\n<li id=\"%s\">" (or preferred target))
|
||||||
extra-targets title "<br/>\n")
|
extra-targets title "<br/>\n")
|
||||||
(insert "<ul>\n<li>" title "<br/>\n"))))
|
(insert "<ul>\n<li>" title "<br/>\n"))))
|
||||||
(aset org-levels-open (1- level) t)
|
(aset org-levels-open (1- level) t)
|
||||||
|
|
|
@ -1285,8 +1285,7 @@ OPT-PLIST is the options plist for current buffer."
|
||||||
(format
|
(format
|
||||||
"\n\n\\title{%s}\n"
|
"\n\n\\title{%s}\n"
|
||||||
;; convert the title
|
;; convert the title
|
||||||
(org-export-latex-content
|
(org-export-latex-fontify-headline title))
|
||||||
title '(lists tables fixed-width keywords)))
|
|
||||||
;; insert author info
|
;; insert author info
|
||||||
(if (plist-get opt-plist :author-info)
|
(if (plist-get opt-plist :author-info)
|
||||||
(format "\\author{%s}\n"
|
(format "\\author{%s}\n"
|
||||||
|
@ -1453,6 +1452,33 @@ links, keywords, lists, tables, fixed-width"
|
||||||
;; FIXME: org-inside-LaTeX-fragment-p doesn't work when the $...$ is at
|
;; FIXME: org-inside-LaTeX-fragment-p doesn't work when the $...$ is at
|
||||||
;; the beginning of the buffer - inserting "\n" is safe here though.
|
;; the beginning of the buffer - inserting "\n" is safe here though.
|
||||||
(insert "\n" string)
|
(insert "\n" string)
|
||||||
|
|
||||||
|
;; Preserve math snippets
|
||||||
|
|
||||||
|
(let* ((matchers (plist-get org-format-latex-options :matchers))
|
||||||
|
(re-list org-latex-regexps)
|
||||||
|
beg end re e m n block off)
|
||||||
|
;; Check the different regular expressions
|
||||||
|
(while (setq e (pop re-list))
|
||||||
|
(setq m (car e) re (nth 1 e) n (nth 2 e)
|
||||||
|
block (if (nth 3 e) "\n\n" ""))
|
||||||
|
(setq off (if (member m '("$" "$1")) 1 0))
|
||||||
|
(when (and (member m matchers) (not (equal m "begin")))
|
||||||
|
(goto-char (point-min))
|
||||||
|
(while (re-search-forward re nil t)
|
||||||
|
(setq beg (+ (match-beginning 0) off) end (- (match-end 0) 0))
|
||||||
|
(add-text-properties beg end
|
||||||
|
'(org-protected t org-latex-math t))))))
|
||||||
|
|
||||||
|
;; Convert LaTeX to \LaTeX{} and TeX to \TeX{}
|
||||||
|
(goto-char (point-min))
|
||||||
|
(let ((case-fold-search nil))
|
||||||
|
(while (re-search-forward "\\<\\(\\(La\\)?TeX\\)\\>" nil t)
|
||||||
|
(unless (eq (char-before (match-beginning 1)) ?\\)
|
||||||
|
(org-if-unprotected-1
|
||||||
|
(replace-match (org-export-latex-protect-string
|
||||||
|
(concat "\\" (match-string 1)
|
||||||
|
"{}")) t t)))))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(let ((re (concat "\\\\\\([a-zA-Z]+\\)"
|
(let ((re (concat "\\\\\\([a-zA-Z]+\\)"
|
||||||
"\\(?:<[^<>\n]*>\\)*"
|
"\\(?:<[^<>\n]*>\\)*"
|
||||||
|
|
Loading…
Reference in New Issue