;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
-;; Version: 6.30c
+;; Version: 6.33x
;;
;; This file is part of GNU Emacs.
;;
:type 'string)
(defcustom org-export-html-home/up-format
- "<div style=\"text-align:right;font-size:70%%;white-space:nowrap;\">
+ "<div id=\"org-div-home-and-up\" style=\"text-align:right;font-size:70%%;white-space:nowrap;\">
<a accesskey=\"h\" href=\"%s\"> UP </a>
|
<a accesskey=\"H\" href=\"%s\"> HOME </a>
(defvar org-export-html-after-blockquotes-hook nil
"Hook run during HTML export, after blockquote, verse, center are done.")
+(defvar org-export-html-final-hook nil
+ "Hook run during HTML export, after blockquote, verse, center are done.")
+
;;; HTML export
(defun org-export-html-preprocess (parameters)
(setq buffer "*Org HTML Export*"))
(let ((transient-mark-mode t) (zmacs-regions t)
ext-plist rtn)
- (setq ext-plist (plist-put ext-plist :ignore-subree-p t))
+ (setq ext-plist (plist-put ext-plist :ignore-subtree-p t))
(goto-char end)
(set-mark (point)) ;; to activate the region
(goto-char beg)
(org-set-local 'buffer-file-name
(with-current-buffer (buffer-base-buffer)
buffer-file-name))
- (error "Need a file name to be able to export.")))
+ (error "Need a file name to be able to export")))
(message "Exporting...")
(setq-default org-todo-line-regexp org-todo-line-regexp)
(rbeg (and region-p (region-beginning)))
(rend (and region-p (region-end)))
(subtree-p
- (if (plist-get opt-plist :ignore-subree-p)
+ (if (plist-get opt-plist :ignore-subtree-p)
nil
(when region-p
(save-excursion
<html xmlns=\"http://www.w3.org/1999/xhtml\"
lang=\"%s\" xml:lang=\"%s\">
<head>
-%s
<title>%s</title>
<meta http-equiv=\"Content-Type\" content=\"text/html;charset=%s\"/>
<meta name=\"generator\" content=\"Org-mode\"/>
</head>
<body>
<div id=\"content\">
+%s
"
(format
(or (and (stringp org-export-html-xml-declaration)
"")
(or charset "iso-8859-1"))
language language
+ (org-html-expand title)
+ (or charset "iso-8859-1")
+ date author description keywords
+ style
(if (or link-up link-home)
(concat
(format org-export-html-home/up-format
(or link-up link-home)
(or link-home link-up))
"\n")
- "")
- (org-html-expand title)
- (or charset "iso-8859-1")
- date author description keywords
- style))
+ "")))
(org-export-html-insert-plist-item opt-plist :preamble opt-plist)
(setq line (concat line "\\\\")))))
;; make targets to anchors
+ (setq start 0)
(while (string-match
- "<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[ \t]*\n?" line)
+ "<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[ \t]*\n?" line start)
(cond
+ ((get-text-property (match-beginning 1) 'org-protected line)
+ (setq start (match-end 1)))
((match-end 2)
(setq line (replace-match
(format
((and org-export-with-toc (equal (string-to-char line) ?*))
;; FIXME: NOT DEPENDENT on TOC?????????????????????
(setq line (replace-match
- (concat "@<span class=\"target\">" (match-string 1 line) "@</span> ")
-; (concat "@<i>" (match-string 1 line) "@</i> ")
+ (concat "@<span class=\"target\">"
+ (match-string 1 line) "@</span> ")
+ ;; (concat "@<i>" (match-string 1 line) "@</i> ")
t t line)))
(t
(setq line (replace-match
(concat "@<a name=\""
(org-solidify-link-text (match-string 1 line))
- "\" class=\"target\">" (match-string 1 line) "@</a> ")
+ "\" class=\"target\">" (match-string 1 line)
+ "@</a> ")
t t line)))))
-
+
(setq line (org-html-handle-time-stamps line))
;; replace "&" by "&", "<" and ">" by "<" and ">"
(delete-region beg end)
(insert (format "<span style=\"visibility:hidden;\">%s</span>"
(make-string n ?x)))))
+ (run-hooks 'org-export-html-final-hook)
(or to-buffer (save-buffer))
(goto-char (point-min))
(or (org-export-push-to-kill-ring "HTML")
(let* ((caption (org-find-text-property-in-string 'org-caption src))
(attr (org-find-text-property-in-string 'org-attributes src))
(label (org-find-text-property-in-string 'org-label src)))
- (format "%s<div %sclass=\"figure\">
-<p><img src=\"%s\"%s /></p>%s
-</div>%s"
- (if org-par-open "</p>\n" "")
- (if label (format "id=\"%s\" " label) "")
+ (concat
+ (if caption
+ (format "%s<div %sclass=\"figure\">
+<p>"
+ (if org-par-open "</p>\n" "")
+ (if label (format "id=\"%s\" " label) "")))
+ (format "<img src=\"%s\"%s />"
src
(if (string-match "\\<alt=" (or attr ""))
(concat " " attr )
- (concat " " attr " alt=\"" src "\""))
- (if caption (concat "\n<p>" caption "</p>") "")
- (if org-par-open "\n<p>" ""))))))
+ (concat " " attr " alt=\"" src "\"")))
+ (if caption
+ (format "</p>%s
+</div>%s"
+ (concat "\n<p>" caption "</p>")
+ (if org-par-open "\n<p>" ""))))))))
(defun org-export-html-get-bibliography ()
"Find bibliography, cut it out and return it."
(unless splice (push "</table>\n" html))
(setq html (nreverse html))
(unless splice
- ;; Put in col tags with the alignment (unfortuntely often ignored...)
+ ;; Put in col tags with the alignment (unfortunately often ignored...)
(unless (car org-table-colgroup-info)
(setq org-table-colgroup-info
(cons :start (cdr org-table-colgroup-info))))