...
."
(let* ((id (if (not label) ""
(format " id=\"%s\"" (org-export-solidify-link-text label))))
(attr (concat attr
(cond
((string-match "\\" nil t)
(setq cnt (+ cnt (if (string= (match-string 0) "
") (forward-char 1))
(setq bib (buffer-substring beg (point)))
(delete-region beg (point))
(throw 'exit bib))))
nil))))
;;;; Table
(defun org-html-splice-attributes (tag attributes)
"Return a HTML TAG edited wrt ATTRIBUTES."
(if (not attributes)
tag
(let (oldatt newatt)
(setq oldatt (org-extract-attributes-from-string tag)
tag (pop oldatt)
newatt (cdr (org-extract-attributes-from-string attributes)))
(while newatt
(setq oldatt (plist-put oldatt (pop newatt) (pop newatt))))
(if (string-match ">" tag)
(setq tag
(replace-match (concat (org-attributes-to-string oldatt) ">")
t t tag)))
tag)))
(defun org-export-splice-style (style extra)
"Return STYLE updated wrt EXTRA."
(if (and (stringp extra)
(string-match "\\S-" extra)
(string-match "" style))
(concat (substring style 0 (match-beginning 0))
"\n" extra "\n"
(substring style (match-beginning 0)))
style))
(defun org-html-htmlize-region-for-paste (beg end)
"Convert the region between BEG and END to HTML, using htmlize.el.
This is much like `htmlize-region-for-paste', only that it uses
the settings define in the org-... variables."
(let* ((htmlize-output-type org-html-htmlize-output-type)
(htmlize-css-name-prefix org-html-htmlize-font-prefix)
(htmlbuf (htmlize-region beg end)))
(unwind-protect
(with-current-buffer htmlbuf
(buffer-substring (plist-get htmlize-buffer-places 'content-start)
(plist-get htmlize-buffer-places 'content-end)))
(kill-buffer htmlbuf))))
;;;###autoload
(defun org-html-htmlize-generate-css ()
"Create the CSS for all font definitions in the current Emacs session.
Use this to create face definitions in your CSS style file that can then
be used by code snippets transformed by htmlize.
This command just produces a buffer that contains class definitions for all
faces used in the current Emacs session. You can copy and paste the ones you
need into your CSS file.
If you then set `org-html-htmlize-output-type' to `css', calls
to the function `org-html-htmlize-region-for-paste' will
produce code that uses these same face definitions."
(interactive)
(require 'htmlize)
(and (get-buffer "*html*") (kill-buffer "*html*"))
(with-temp-buffer
(let ((fl (face-list))
(htmlize-css-name-prefix "org-")
(htmlize-output-type 'css)
f i)
(while (setq f (pop fl)
i (and f (face-attribute f :inherit)))
(when (and (symbolp f) (or (not i) (not (listp i))))
(insert (org-add-props (copy-sequence "1") nil 'face f))))
(htmlize-region (point-min) (point-max))))
(org-pop-to-buffer-same-window "*html*")
(goto-char (point-min))
(if (re-search-forward "