\n
%s%s\n
\n"
- suffix level (if extra-class (concat " " extra-class) "")
- level href
- extra-targets
- title level level suffix))
- (org-open-par)))))
-
(defun org-export-html-get-tag-class-name (tag)
"Turn tag into a valid class name.
Replaces invalid characters with \"_\" and then prepends a prefix."
@@ -2427,13 +1984,6 @@ Replaces invalid characters with \"_\" and then prep=
ends a prefix."
(setq kwd (replace-match "_" t t kwd))))
(concat org-export-html-todo-kwd-class-prefix kwd))
=20
-(defun org-html-level-close (level max-outline-level)
- "Terminate one level in HTML export."
- (if (<=3D level max-outline-level)
- (insert "
\n")
- (org-close-li)
- (insert "\n")))
-
(defun org-html-export-list-line (line pos struct prevs)
"Insert list syntax in export buffer. Return LINE, maybe modified.
=20
@@ -2470,13 +2020,13 @@ the alist of previous items."
(let* ((lastp (=3D (org-list-get-last-item e struct prevs) e))
(first-item (org-list-get-list-begin e struct prevs))
(type (funcall get-type first-item struct prevs)))
- (org-close-par-maybe)
+ (org-parse-end-paragraph)
;; Ending for every item
(org-close-li type)
;; We're ending last item of the list: end list.
(when lastp
- (insert (format "%sl>\n" type))
- (org-open-par))))
+ (org-parse-end 'LIST type)
+ (org-parse-begin-paragraph))))
(funcall get-closings pos))
(cond
;; At an item: insert appropriate tags in export buffer.
@@ -2503,22 +2053,28 @@ the alist of previous items."
((string-match "[0-9]+" count-tmp)
count-tmp)))))
(when firstp
- (org-close-par-maybe)
- (insert (format "<%sl>\n" type)))
- (insert (cond
- ((equal type "d")
- (format "
%s" desc-tag))
- ((and (equal type "o") counter)
- (format "" counter))
- (t "")))
+ (org-parse-end-paragraph)
+ (org-parse-begin 'LIST type))
+
+ (let ((arg (cond ((equal type "d") desc-tag)
+ ((equal type "o") counter))))
+ (org-parse-begin 'LIST-ITEM type arg))
+
;; If line had a checkbox, some additional modification is required.
(when checkbox
(setq body
(concat
- (cond
- ((string-match "X" checkbox) "[X]
")
- ((string-match " " checkbox) "[ ]
")
- (t "[-]
"))
+ (org-parse-format
+ 'FONTIFY (concat
+ "["
+ (cond
+ ((string-match "X" checkbox) "X")
+ ((string-match " " checkbox)
+ (org-parse-format 'SPACES 1))
+ (t "-"))
+ "]")
+ 'code)
+ " "
body)))
;; Return modified line
body))
@@ -2527,6 +2083,1132 @@ the alist of previous items."
;; Not at an item: return line unchanged (side-effects only).
(t line))))
=20
+;; miscellaneous
+
+(defun org-html-bind-local-variables (opt-plist)
+ (mapc (lambda (x)
+ (set (make-local-variable (nth 2 x))
+ (plist-get opt-plist (car x))))
+ org-export-plist-vars))
+
+
+;; This replaces org-emphasis-alist
+(defvar org-table-rowgroup-open)
+(defvar org-table-current-rowgroup-is-header)
+(defvar org-html-footnote-number)
+(defvar org-html-footnote-definitions)
+(defvar org-html-footnote-buffer)
+(defvar org-html-output-buffer)
+
+
+(defun org-html-end-export ()
+ ;; insert the table of contents
+ (when (and org-export-with-toc (not body-only))
+ (org-html-insert-toc org-parse-table-of-contents))
+
+ ;; remove empty paragraphs
+ (goto-char (point-min))
+ (while (re-search-forward "[ \r\n\t]*
" nil t)
+ (replace-match ""))
+
+ ;; Convert whitespace place holders
+ (goto-char (point-min))
+ (let (beg end n)
+ (while (setq beg (next-single-property-change (point) 'org-whitespace))
+ (setq n (get-text-property beg 'org-whitespace)
+ end (next-single-property-change beg 'org-whitespace))
+ (goto-char beg)
+ (delete-region beg end)
+ (insert (format "%s"
+ (make-string n ?x)))))
+
+ ;; Remove empty lines at the beginning of the file.
+ (goto-char (point-min))
+ (when (looking-at "\\s-+\n") (replace-match ""))
+
+ ;; Remove display properties
+ (remove-text-properties (point-min) (point-max) '(display t))
+
+ ;; kill temporary buffers
+ (when org-html-footnote-buffer
+ (kill-buffer org-html-footnote-buffer))
+
+ ;; Run the hook
+ (run-hooks 'org-export-html-final-hook))
+
+
+;;;_ org-parse.el
+;;;_. preamble
+;;;_ , user-specific
+;;;_ . custom-settings
+(defcustom org-parse-debug nil
+ ""
+ :group 'org-parse
+ :type 'boolean)
+
+
+
+
+;;;_ , callbacks
+;;;_ . control callbacks
+;;;_ , generic
+(defun org-parse-begin (entity &rest args)
+ (when (and (member org-parse-debug '(t control))
+ (not (eq entity 'DOCUMENT-CONTENT)))
+ (insert (org-parse-format 'COMMENT "%s BEGIN %S" entity args)))
+
+ (let ((f (cadr (assoc entity org-parse-entity-control-callbacks-alist))))
+ (unless f (error "Unknown entity: %s" entity))
+ (apply f args)))
+
+(defun org-parse-end (entity &rest args)
+ (when (and (member org-parse-debug '(t control))
+ (not (eq entity 'DOCUMENT-CONTENT)))
+ (insert (org-parse-format 'COMMENT "%s END %S" entity args)))
+
+ (let ((f (caddr (assoc entity org-parse-entity-control-callbacks-alist))=
))
+ (unless f (error "Unknown entity: %s" entity))
+ (apply f args)))
+
+
+;;;_ , paragraph
+(defun org-parse-begin-paragraph (&optional style)
+ "Insert , but first close previous paragraph if any."
+ (org-parse-end-paragraph)
+ (org-parse-begin 'PARAGRAPH style)
+ (setq org-par-open t))
+
+(defun org-parse-end-paragraph ()
+ "Close paragraph if there is one open."
+ (when org-par-open
+ (org-parse-end 'PARAGRAPH)
+ (setq org-par-open nil)))
+
+;;;_ , list
+(defun org-close-li (&optional type)
+ "Close
if necessary."
+ (org-parse-end-paragraph)
+ (org-parse-end 'LIST-ITEM (or type "u")))
+
+
+;;;_ , environment
+(defvar org-parse-dyn-current-environment nil)
+(defun org-parse-begin-environment (style)
+ (assert (not org-parse-dyn-current-environment) t)
+ (setq org-parse-dyn-current-environment style)
+ (org-parse-begin 'ENVIRONMENT style))
+
+(defun org-parse-end-environment (style)
+ (org-parse-end 'ENVIRONMENT style)
+
+ (assert (eq org-parse-dyn-current-environment style) t)
+ (setq org-parse-dyn-current-environment nil))
+
+(defun org-parse-current-environment-p (style)
+ (eq org-parse-dyn-current-environment style))
+
+
+;;;_ , footnote definition
+(defun org-parse-begin-footnote-definition (n)
+ (unless org-html-footnote-buffer
+ (setq org-html-footnote-buffer
+ (get-buffer-create "*Org HTML Export Footnotes*")))
+ (set-buffer org-html-footnote-buffer)
+ (erase-buffer)
+ (org-parse-begin 'FOOTNOTE-DEFINITION n))
+
+(defun org-parse-end-footnote-definition (n)
+ (org-parse-end 'FOOTNOTE-DEFINITION n)
+ (push (cons n (buffer-string)) org-html-footnote-definitions)
+ (set-buffer org-html-output-buffer))
+
+
+
+
+;;;_ . format callbacks
+;;;_ , generic
+(defun org-parse-format (entity &rest args)
+ (when (and (member org-parse-debug '(t format))
+ (not (equal entity 'COMMENT)))
+ (insert (org-parse-format 'COMMENT "%s: %S" entity args)))
+ (cond
+ ((consp entity)
+ (let ((text (pop args)))
+ (apply 'org-parse-format 'TAGS entity text args)))
+ (t
+ (let ((f (cdr (assoc entity org-parse-entity-format-callbacks-alist))))
+ (unless f (error "Unknown entity: %s" entity))
+ (apply f args)))))
+
+
+;;;_ , toc (rename these routines)
+(defun org-html-format-toc-entry (snumber todo headline tags href)
+ (setq headline (concat
+ (and org-export-with-section-numbers
+ (concat snumber " "))
+ headline
+ (and tags
+ (concat
+ (org-parse-format 'SPACES 3)
+ (org-parse-format 'FONTIFY tags "tag")))))
+ (when todo
+ (setq headline (org-parse-format 'FONTIFY headline "todo")))
+ (org-parse-format 'LINK headline (concat "#" href)))
+
+(defun org-html-format-toc-item (toc-entry level org-last-level)
+ (when (> level org-last-level)
+ (let ((cnt (- level org-last-level)))
+ (while (>=3D (setq cnt (1- cnt)) 0)
+ (org-parse-begin 'LIST 'unordered)
+ (org-parse-begin 'LIST-ITEM 'unordered))))
+ (when (< level org-last-level)
+ (let ((cnt (- org-last-level level)))
+ (while (>=3D (setq cnt (1- cnt)) 0)
+ (org-close-li)
+ (org-parse-end 'LIST 'unordered))))
+
+ (org-close-li)
+ (org-parse-begin 'LIST-ITEM 'unordered)
+ (insert toc-entry))
+
+(defun org-html-prepare-toc (lines level-offset opt-plist umax-toc)
+ (let* ((org-min-level (org-get-min-level lines level-offset))
+ (org-last-level org-min-level)
+ level)
+ (with-temp-buffer
+ (org-html-bind-local-variables opt-plist)
+ (erase-buffer)
+ (org-parse-begin 'SECTION "table-of-contents")
+ (insert
+ (org-parse-format 'HEADING
+ (nth 3 (plist-get opt-plist :lang-words))
+ org-export-html-toplevel-hlevel))
+ (org-parse-begin 'SECTION "text-table-of-contents")
+ (org-parse-begin 'LIST 'unordered)
+ (org-parse-begin 'LIST-ITEM 'unordered)
+ (setq
+ lines
+ (mapcar
+ '(lambda (line)
+ (when (and (string-match org-todo-line-regexp line)
+ (not (get-text-property 0 'org-protected line))
+ (<=3D (setq level (org-tr-level
+ (- (match-end 1) (match-beginning 1)
+ level-offset)))
+ umax-toc))
+ (let ((txt (save-match-data
+ (org-html-expand
+ (org-export-cleanup-toc-line
+ (match-string 3 line)))))
+ (todo (and
+ org-export-mark-todo-in-toc
+ (or (and (match-beginning 2)
+ (not (member (match-string 2 line)
+ org-done-keywords)))
+ (and (=3D level umax-toc)
+ (org-search-todo-below
+ line lines level)))))
+ tags)
+ ;; Check for targets
+ (while (string-match org-any-target-regexp line)
+ (setq line
+ (replace-match
+ (let ((org-html-protect t))
+ (org-parse-format 'FONTIFY
+ (match-string 1 line) "target"))
+ t t line)))
+ (when (string-match
+ (org-re "[ \t]+:\\([[:alnum:]_@:]+\\):[ \t]*$") txt)
+ (setq txt (replace-match "" t nil txt)
+ tags (match-string 1 txt)))
+ (when (string-match quote-re0 txt)
+ (setq txt (replace-match "" t t txt)))
+ (while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt)
+ (setq txt (replace-match "" t t txt)))
+ (org-parse-format
+ 'TOC-ITEM
+ (let* ((snumber (org-section-number level))
+ (href (replace-regexp-in-string
+ "\\." "_" (format "sec-%s" snumber)))
+ (href
+ (or
+ (cdr (assoc
+ href org-export-preferred-target-alist))
+ href))
+ (href (org-solidify-link-text href)))
+ (org-parse-format 'TOC-ENTRY snumber todo txt tags href))
+ level org-last-level)
+ (setq org-last-level level)))
+ line)
+ lines))
+ (while (> org-last-level (1- org-min-level))
+ (setq org-last-level (1- org-last-level))
+ (org-close-li)
+ (org-parse-end 'LIST 'unordered))
+ (org-parse-end 'SECTION)
+ (org-parse-end 'SECTION)
+ ;; cleanup empty list items in toc
+ (while (re-search-backward "[ \r\n\t]*\n?" (point-min) t)
+ (replace-match ""))
+ (setq org-parse-table-of-contents (buffer-string))))
+ lines)
+
+
+;;;_ , table row
+(defun org-parse-format-table-row (fields &optional text-for-empty-fields)
+ (unless org-table-ncols
+ ;; first row of the table
+ (setq org-table-ncols (length fields))
+ (when org-table-is-styled
+ (setq org-table-num-numeric-items-per-column (make-vector org-table-=
ncols 0))
+ (setq org-table-colalign-vector (make-vector org-table-ncols nil))
+ (let ((c -1))
+ (while (< (incf c) org-table-ncols)
+ (let ((cookie (cdr (assoc (1+ c) org-table-colalign-info))))
+ (setf (aref org-table-colalign-vector c)
+ (cond
+ ((string=3D cookie "l") "left")
+ ((string=3D cookie "r") "right")
+ ((string=3D cookie "c") "center")
+ (t nil))))))))
+ (incf org-table-rownum)
+ (setq i -1)
+ (org-parse-format
+ 'TABLE-ROW
+ (mapconcat
+ (lambda (x)
+ (when (string=3D x "")
+ (setq x text-for-empty-fields))
+ (incf i)
+ (and org-table-is-styled
+ (< i org-table-ncols)
+ (string-match org-table-number-regexp x)
+ (incf (aref org-table-num-numeric-items-per-column i)))
+ (org-parse-format 'TABLE-CELL x org-table-rownum i))
+ fields "\n")))
+
+;;;_ . get callback
+(defun org-parse-get (what &optional opt-plist)
+ (funcall org-parse-get-callback what opt-plist))
+
+;;;_. postamble
+
+
+;;;_ org-newhtml.el
+;;;_. preamble
+;;;_. obsolete
+;;;_. maybe
+;;;_. hacks (to be documented)
+(defconst org-html-emphasis-alist
+ `(("*" bold)
+ ("/" emphasis)
+ ("_" underline)
+ ("=3D" code)
+ ("~" verbatim)
+ ("+" strike)))
+
+
+;;;_. user-specific
+;;;_ , custom settings
+;;;_ . potential custom settings
+;;;_ , interactive commands
+;;;_. parser
+;;;_ , initialization
+(defvar org-html-entity-control-callbacks-alist
+ `((EXPORT
+ . (org-html-begin-export org-html-end-export))
+ (DOCUMENT-CONTENT
+ . (org-html-begin-document-content org-html-end-document-content))
+ (DOCUMENT-BODY
+ . (org-html-begin-document-body org-html-end-document-body))
+ (ENVIRONMENT
+ . (org-html-begin-environment org-html-end-environment))
+ (LEVEL
+ . (org-html-begin-level org-html-end-level))
+ (FOOTNOTE-DEFINITION
+ . (org-html-begin-footnote-definition org-html-end-footnote-definitio=
n))
+ (TABLE
+ . (org-html-begin-table org-html-end-table))
+ (TABLE-ROWGROUP
+ . (org-html-begin-table-rowgroup org-html-end-table-rowgroup))
+ (LIST
+ . (org-html-begin-list org-html-end-list))
+ (LIST-ITEM
+ . (org-html-begin-list-item org-html-end-list-item))
+ (SECTION
+ . (org-html-begin-section org-html-end-section))
+ (PARAGRAPH
+ . (org-html-begin-paragraph org-html-end-paragraph)))
+ "")
+
+(defvar org-html-entity-format-callbacks-alist
+ `((EXTRA-TARGETS . org-html-format-extra-targets)
+ (ORG-TAGS . org-html-format-org-tags)
+ (SECTION-NUMBER . org-html-format-section-number)
+ (HEADLINE . org-html-format-headline)
+ (TOC-ENTRY . org-html-format-toc-entry)
+ (TOC-ITEM . org-html-format-toc-item)
+ (TAGS . org-html-format-tags)
+ (SPACES . org-html-format-spaces)
+ (TABS . org-html-format-tabs)
+ (LINE-BREAK . org-html-format-line-break)
+ (FONTIFY . org-html-format-fontify)
+ (TODO . org-html-format-todo)
+ (ORG-LINK . org-html-format-org-link)
+ (LINK . org-html-format-link)
+ (INLINE-IMAGE . org-html-format-inline-image)
+ (HEADING . org-html-format-heading)
+ (ANCHOR . org-html-format-anchor)
+ (TABLE-ROW . org-html-format-table-row)
+ (TABLE-CELL . org-html-format-table-cell)
+ (FOOTNOTES-SECTION . org-html-format-footnotes-section)
+ (FOOTNOTE-REFERENCE . org-html-format-footnote-reference)
+ (HORIZONTAL-LINE . org-html-format-horizontal-line)
+ (PLAIN . org-html-format-plain)
+ (COMMENT . org-html-format-comment))
+ "")
+
+
+
+;;;_ , callbacks
+;;;_ . control callbacks
+;;;_ , generic
+(defvar org-html-insert-tag-with-newlines 'both)
+
+(defun org-html-insert-tag (tag &rest args)
+ (when (member org-html-insert-tag-with-newlines '(lead both))
+ (insert "\n"))
+ (insert (apply 'format tag args))
+ (when (member org-html-insert-tag-with-newlines '(trail both))
+ (insert "\n")))
+
+;;;_ , document body
+(defun org-html-begin-document-body (opt-plist)
+ (let ((link-up (and (plist-get opt-plist :link-up)
+ (string-match "\\S-" (plist-get opt-plist :link-up))
+ (plist-get opt-plist :link-up)))
+ (link-home (and (plist-get opt-plist :link-home)
+ (string-match "\\S-" (plist-get opt-plist :link-home))
+ (plist-get opt-plist :link-home))))
+ (insert "\n")
+ (org-parse-begin 'SECTION "content")
+ (insert "\n"
+ (or (and (or link-up link-home)
+ (format org-export-html-home/up-format
+ (or link-up link-home)
+ (or link-home link-up))) "")
+ "\n"))
+ (org-html-insert-preamble opt-plist))
+
+(defun org-html-end-document-body (opt-plist)
+ (org-html-insert-postamble opt-plist)
+ (unless body-only
+ (org-parse-end 'SECTION)
+ (insert "\n")))
+
+
+;;;_ , document content
+(defun org-html-begin-document-content (opt-plist)
+ (let* ((language (plist-get opt-plist :language))
+ (charset (or (and coding-system-for-write
+ (fboundp 'coding-system-get)
+ (coding-system-get coding-system-for-write
+ 'mime-charset))
+ "iso-8859-1"))
+ (style (concat (if (plist-get opt-plist :style-include-default)
+ org-export-html-style-default)
+ (plist-get opt-plist :style)
+ (plist-get opt-plist :style-extra)
+ "\n"
+ (if (plist-get opt-plist :style-include-scripts)
+ org-export-html-scripts)))
+ (mathjax
+ (if (or (eq (plist-get opt-plist :LaTeX-fragments) 'mathjax)
+ (and org-export-have-math
+ (eq (plist-get opt-plist :LaTeX-fragments) t)))
+
+ (org-export-html-mathjax-config
+ org-export-html-mathjax-template
+ org-export-html-mathjax-options
+ (or (plist-get opt-plist :mathjax) "")) "")))
+ (insert (format
+ "%s
+
+
+
+%s
+
+
+
+
+
+
+%s
+%s
+
+"
+ (format
+ (or (and (stringp org-export-html-xml-declaration)
+ org-export-html-xml-declaration)
+ (cdr (assoc (plist-get opt-plist :html-extension)
+ org-export-html-xml-declaration))
+ (cdr (assoc "html" org-export-html-xml-declaration))
+
+ "")
+ charset)
+ language language
+ (plist-get opt-plist :title)
+ charset
+ (plist-get opt-plist :effective-date)
+ (plist-get opt-plist :author)
+ (plist-get opt-plist :description)
+ (plist-get opt-plist :keywords)
+ style
+ mathjax))))
+
+(defun org-html-end-document-content ()
+ (insert "\n\n"))
+
+
+;;;_ , level
+(defun org-html-begin-level (level title umax with-toc head-count)
+ "Insert a new level in HTML export.
+When TITLE is nil, just close all open levels."
+ (org-parse-end 'LEVEL level umax)
+ (unless title (error "Why is heading nil"))
+ (let* ((target (org-get-text-property-any 0 'target title))
+ (extra-targets (and target
+ (assoc target org-export-target-aliases)))
+ (extra-class (org-get-text-property-any 0 'html-container-class title))
+ (preferred (and target
+ (cdr (assoc target org-export-preferred-target-alist))))
+ snumber snu href suffix tags level1)
+ (setq extra-targets (remove (or preferred target) extra-targets))
+ (when (string-match (org-re "\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$") title)
+ (setq tags (and org-export-with-tags (match-string 1 title)))
+ (setq title (replace-match "" t t title)))
+ (if (> level umax)
+ (progn
+ (if (aref org-levels-open (1- level))
+ (org-close-li)
+ (aset org-levels-open (1- level) t)
+ (org-parse-end-paragraph)
+ (org-parse-begin 'LIST 'unordered))
+ (org-parse-begin
+ 'LIST-ITEM 'unordered (and target (org-solidify-link-text
+ (or preferred target))))
+
+ (insert
+ (org-parse-format 'HEADLINE title extra-targets tags))
+ (insert "
\n"))
+ (aset org-levels-open (1- level) t)
+ (setq snumber (org-section-number level)
+ snu (replace-regexp-in-string "\\." "_" snumber))
+ (setq level1 (+ level org-export-html-toplevel-hlevel -1))
+ (unless (=3D head-count 1)
+ (org-parse-end 'SECTION))
+ (setq href (cdr (assoc (concat "sec-" snu)
+ org-export-preferred-target-alist)))
+ (setq suffix (org-solidify-link-text (or href snu)))
+ (setq href (org-solidify-link-text (or href (concat "sec-" snu))))
+ (let ((id (format "outline-container-%s" suffix))
+ (class (format "outline-%d%s" level1
+ (if extra-class (concat " " extra-class) ""))))
+ (org-parse-begin 'SECTION id class))
+ (insert
+ (org-parse-format 'HEADING
+ (org-parse-format
+ 'HEADLINE title extra-targets tags snumber level1)
+ level1 href))
+ (let ((id (format "text-%s" suffix))
+ (class (format "outline-text-%d" level1)))
+ (org-parse-begin 'SECTION id class))
+
+ (org-parse-begin-paragraph))))
+
+(defun org-html-end-level (level umax)
+ (org-parse-end-paragraph)
+ (let* ((l org-level-max))
+ (while (>=3D l level)
+ (if (aref org-levels-open (1- l))
+ (progn
+ ;; Terminate one level in HTML export
+ (if (<=3D l umax)
+ (org-parse-end 'SECTION)
+ (org-close-li)
+ (org-parse-end 'LIST 'unordered))
+ (aset org-levels-open (1- l) nil)))
+ (setq l (1- l)))))
+
+
+;;;_ , section
+(defun org-html-begin-section (&optional id class)
+ (let ((extra (concat (when id (format " id=3D\"%s\"" id))
+ (when class (format " class=3D\"%s\"" class)))))
+ (org-html-insert-tag "" extra)))
+
+(defun org-html-end-section ()
+ (org-html-insert-tag "
"))
+
+
+
+;;;_ , paragraph
+(defun org-html-begin-paragraph (&optional style)
+ (let* ((class (cdr (assoc style '((footnote . "footnote")
+ (verse . nil)))))
+ (extra (if class (format " class=3D\"%s\"" class) "")))
+ (org-html-insert-tag "" extra)))
+
+(defun org-html-end-paragraph ()
+ (insert "
"))
+
+
+;;;_ , environment
+(defun org-html-format-environment (style beg-end)
+ (assert (memq style '(blockquote center verse fixedwidth quote)) t)
+ (case style
+ (blockquote
+ (case beg-end
+ (BEGIN
+ (org-parse-end-paragraph)
+ (insert "\n")
+ (org-parse-begin-paragraph))
+ (END
+ (org-parse-end-paragraph)
+ (insert "\n
\n")
+ (org-parse-begin-paragraph))))
+ (verse
+ (case beg-end
+ (BEGIN
+ (org-parse-end-paragraph)
+ (insert "\n\n")
+ (setq org-par-open t))
+ (END
+ (insert "
\n")
+ (setq org-par-open nil)
+ (org-parse-begin-paragraph))))
+ (center
+ (case beg-end
+ (BEGIN
+ (org-parse-end-paragraph)
+ (insert "\n")
+ (org-parse-begin-paragraph))
+ (END
+ (org-parse-end-paragraph)
+ (insert "\n
")
+ (org-parse-begin-paragraph))))
+ (fixedwidth
+ (case beg-end
+ (BEGIN
+ (org-parse-end-paragraph)
+ (insert "\n"))
+ (END
+ (insert "
\n")
+ (org-parse-begin-paragraph))))
+ (quote
+ (case beg-end
+ (BEGIN
+ (org-parse-end-paragraph)
+ (insert ""))
+ (END
+ (insert "
\n")
+ (org-parse-begin-paragraph))))
+ (t (error "Unknown environment %s" style))))
+
+
+(defun org-html-begin-environment (style)
+ (org-html-format-environment style 'BEGIN))
+
+(defun org-html-end-environment (style)
+ (org-html-format-environment style 'END))
+
+
+;;;_ , list
+(defun org-html-html-list-type-to-canonical-list-type (ltype)
+ (cdr (assoc ltype '(("o" . ordered)
+ ("u" . unordered)
+ ("d" . description)))))
+
+(defun org-html-begin-list (ltype &optional arg1)
+ (setq ltype (or (org-html-html-list-type-to-canonical-list-type ltype)
+ ltype))
+
+ (case ltype
+ (ordered (let ((extra (if arg1 (format " start=3D\"%d\"" arg1) "")))
+ (org-html-insert-tag "" extra)))
+ (unordered (org-html-insert-tag ""))
+ (description (org-html-insert-tag ""))
+ (t (error "Unknown list type: %s" ltype))))
+
+(defun org-html-end-list (ltype)
+ (setq ltype (or (org-html-html-list-type-to-canonical-list-type ltype)
+ ltype))
+
+ (org-html-insert-tag
+ (case ltype
+ (ordered "
")
+ (unordered "")
+ (description "")
+ (t (error "Unknown list type: %s" ltype)))))
+
+(defun org-html-begin-list-item (ltype &optional arg)
+ (setq ltype (or (org-html-html-list-type-to-canonical-list-type ltype)
+ ltype))
+ (case ltype
+ (ordered
+ (let* ((counter arg)
+ (extra (if counter (format " value=3D\"%s\"" counter) "")))
+ (org-html-insert-tag "" extra)))
+ (unordered
+ (let* ((id arg)
+ (extra (if id (format " id=3D\"%s\"" id) "")))
+ (org-html-insert-tag "" extra)))
+ (description
+ (let* ((desc-tag (or arg "(no term)")))
+ (insert
+ (org-html-format-tags '("" . "") desc-tag))
+ (org-html-insert-tag "")))
+ (t (error "Unknown list type"))))
+
+(defun org-html-end-list-item (ltype)
+ (setq ltype (or (org-html-html-list-type-to-canonical-list-type ltype)
+ ltype))
+ (case ltype
+ (ordered (org-html-insert-tag ""))
+ (unordered (org-html-insert-tag ""))
+ (description (org-html-insert-tag ""))
+ (t (error "Unknown list type"))))
+
+
+;;;_ , table
+
+(defvar org-table-rowgroup-info)
+(defun org-parse-begin-table-rowgroup (&optional is-header-row)
+ (push (cons (1+ org-table-rownum) :start) org-table-rowgroup-info)
+ (org-parse-begin 'TABLE-ROWGROUP is-header-row))
+
+(defun org-html-begin-table-rowgroup (&optional is-header-row)
+ (when org-table-rowgroup-open
+ (org-parse-end 'TABLE-ROWGROUP))
+ (org-html-insert-tag (if is-header-row "
" ""))
+ (setq org-table-rowgroup-open t)
+ (setq org-table-current-rowgroup-is-header is-header-row))
+
+(defun org-html-end-table-rowgroup ()
+ (when org-table-rowgroup-open
+ (setq org-table-rowgroup-open nil)
+ (org-html-insert-tag
+ (if org-table-current-rowgroup-is-header "" ""))))
+
+(defun org-html-begin-table (caption label attributes)
+ (let ((html-table-tag
+ (org-export-splice-attributes html-table-tag attributes)))
+ (when label
+ (setq html-table-tag
+ (org-export-splice-attributes
+ html-table-tag
+ (format "id=3D\"%s\"" (org-solidify-link-text label)))))
+ (org-html-insert-tag html-table-tag))
+
+ ;; Since the output of HTML table formatter can also be used in
+ ;; DocBook document, we want to always include the caption to make
+ ;; DocBook XML file valid.
+ (insert (format "
%s" (or caption "")) "\n"))
+
+(defun org-parse-end-table ()
+ (when org-table-is-styled
+ ;; column groups
+ (unless (car org-table-colgroup-info)
+ (setq org-table-colgroup-info
+ (cons :start (cdr org-table-colgroup-info))))
+
+ ;; column alignment
+ (let ((c -1))
+ (mapc
+ (lambda (x)
+ (incf c)
+ (setf (aref org-table-colalign-vector c)
+ (or (aref org-table-colalign-vector c)
+ (if (> (/ (float x) (1+ org-table-rownum))
+ org-table-number-fraction)
+ "right" "left"))))
+ org-table-num-numeric-items-per-column)))
+ (org-parse-end 'TABLE))
+
+(defun org-html-end-table ()
+ (when org-table-is-styled
+ (goto-char org-table-begin-marker)
+ (setq org-table-begin-marker nil)
+
+ (let ((c -1) gr colgropen)
+ (insert
+ (mapconcat
+ (lambda (x)
+ (incf c)
+ (setq gr (pop org-table-colgroup-info))
+
+ (concat
+ (if (memq gr '(:start :startend))
+ (prog1
+ (if colgropen
+ "\n
"
+ "")
+ (setq colgropen t))
+ "")
+
+ (let* ((align (aref org-table-colalign-vector c))
+ (alignspec (if no-css " align=3D\"%s\"" " class=3D\"%s\""))
+ (extra (format alignspec align)))
+ (format "" extra))
+
+ (if (memq gr '(:end :startend))
+ (progn (setq colgropen nil) "")
+ "")))
+ org-table-num-numeric-items-per-column ""))
+
+ (if colgropen (insert "")))
+
+ ;; fill style attributes for table cells
+ (while (re-search-forward "@@class\\([0-9]+\\)@@" nil t)
+ (let ((c (string-to-number (match-string 1))))
+ (replace-match
+ (if org-export-html-table-align-individual-fields
+ (format (if no-css " align=3D\"%s\"" " class=3D\"%s\"")
+ (or (aref org-table-colalign-vector c) "left")) "")
+ t t)))
+ (goto-char (point-max)))
+ (org-html-insert-tag "\n"))
+
+(defun org-html-format-table-row (row)
+ (org-html-format-tags
+ (cons (eval (car org-export-table-row-tags))
+ (eval (cdr org-export-table-row-tags))) row))
+
+(defun org-html-format-table-cell (text r c)
+ (let ((cell-style-cookie (or (and org-table-is-styled
+ (format "@@class%03d@@" c)) "")))
+ (cond
+ (org-table-current-rowgroup-is-header
+ (org-html-format-tags
+ org-export-table-header-tags x "col" cell-style-cookie))
+ ((and (=3D c 0) org-export-html-table-use-header-tags-for-first-colum=
n)
+ (org-html-format-tags
+ org-export-table-header-tags x "row" cell-style-cookie))
+ (t
+ (org-html-format-tags
+ org-export-table-data-tags x cell-style-cookie)))))
+
+
+;;;_ , footnote definition
+(defun org-html-begin-footnote-definition (n)
+ (org-parse-begin-paragraph 'footnote)
+ (insert
+ (format
+ (format org-export-html-footnote-format
+ "")
+ n n n)))
+
+(defun org-html-end-footnote-definition (n)
+ (org-parse-end-paragraph))
+
+
+
+;;;_ . format callbacks
+
+(defvar org-html-protect nil)
+;;;_ , spaces
+(defun org-html-format-spaces (n)
+ (let ((space (or (and org-html-protect "\\nbsp") " ")) out)
+ (while (> n 0)
+ (setq out (concat out space))
+ (setq n (1- n))) out))
+
+;;;_ , tabs
+(defun org-html-format-tabs (&optional n)
+ (ignore))
+
+;;;_ , line break
+(defun org-html-format-line-break ()
+ (org-html-format-tags '("
" . "") ""))
+
+;;;_ , horizontal line
+(defun org-html-format-horizontal-line ()
+ (concat "\n" "
" "\n"))
+
+;;;_ , line
+
+(defun org-html-format-plain (line)
+ (case org-parse-dyn-current-environment
+ ((quote fixedwidth) (concat (org-html-protect line) "\n"))
+ (t (concat line "\n"))))
+
+(defun org-html-format-comment (fmt &rest args)
+ (let ((comment (apply 'format fmt args)))
+ (format "\n\n" comment)))
+
+
+;;;_ , character styles
+(defun org-html-format-fontify (text style &optional id)
+ (let (class extra how)
+ (cond
+ ((eq style 'underline)
+ (setq extra " style=3D\"text-decoration:underline;\"" ))
+ ((setq how (cdr (assoc style
+ '((bold . ("
" . ""))
+ (emphasis . ("
" . ""))
+ (code . ("
" . "
"))
+ (verbatim . ("
" . "
"))
+ (strike . ("
" . ""))
+ (subscript . ("
" . ""))
+ (superscript . ("
" . "")))))))
+ ((listp style)
+ (setq class (mapconcat 'identity style " ")))
+ ((stringp style)
+ (setq class style))
+ (t (error "Unknown style %S" style)))
+
+ (setq extra (concat (when class (format " class=3D\"%s\"" class))
+ (when id (format " id=3D\"%s\"" id))
+ extra))
+ (org-html-format-tags
+ (or how '("
" . "")) text extra)))
+
+;;;_ , link
+(defun org-html-format-link (text href &optional extra)
+ (let* ((extra (concat (format " href=3D\"%s\"" href) extra)))
+ (org-html-format-tags '("
" . "") text extra)))
+
+;;;_ , heading
+(defun org-html-format-heading (text level &optional id class)
+ (let* ((extra (concat
+ (when id (format " id=3D\"%s\"" id))
+ (when class (format " class=3D\"%s\"" class)))))
+ ;; (org-html-format-tags
+ ;; text '("
" . "") level extra)
+
+ ;; Also look at org-export-html-preamble-format
+ (concat
+ (format "
" level extra) text (format "" level))))
+
+;;;_ , headline
+(defun org-html-format-headline (title extra-targets tags
+ &optional snumber level)
+ (concat
+ (org-parse-format 'EXTRA-TARGETS extra-targets)
+ (concat (org-parse-format 'SECTION-NUMBER snumber level) " ")
+ title
+ (and tags (concat (org-parse-format 'SPACES 3)
+ (org-parse-format 'ORG-TAGS tags)))))
+
+;;;_ , anchor
+(defun org-html-format-anchor (text name &optional class)
+ (let* ((id name)
+ (extra (concat
+ (when name (format " name=3D\"%s\"" name))
+ (when id (format " id=3D\"%s\"" id))
+ (when class (format " class=3D\"%s\"" class)))))
+ (org-html-format-tags '("
" . "") text extra)))
+
+
+
+;;;_ , target
+;;;_ , footnote reference
+(defun org-html-format-footnote-reference (n def refcnt)
+ (let ((extra (if (=3D refcnt 1) "" (format ".%d" refcnt))))
+ (format org-export-html-footnote-format
+ (format
+ ""
+ n extra n n))))
+
+
+
+;;;_ , footnotes section
+(defun org-html-format-footnotes-section (section-name definitions)
+ (if (not definitions) ""
+ (format org-export-html-footnotes-section section-name definitions)))
+
+
+;;;_ , image
+;;;_ , generic
+(defun org-html-format-tags (tag text &rest args)
+ (let ((prefix (when org-html-protect "@"))
+ (suffix (when org-html-protect "@")))
+ (concat prefix (apply 'format (car tag) args)
+ text
+ suffix (format (cdr tag)))))
+
+
+;;;_ . maintenance callbacks
+;;;_ , init method
+;;;_ , save method
+;;;_ , cleanup method
+;;;_ . get callback
+(defun org-html-get (what &optional opt-plist)
+ (case what
+ (BACKEND 'html)
+ (INIT-METHOD nil)
+ (SAVE-METHOD nil)
+ (CLEANUP-METHOD nil)
+ (EXPORT-DIR (org-export-directory :html opt-plist))
+ (FILE-NAME-EXTENSION (plist-get opt-plist :html-extension))
+ (EXPORT-BUFFER-NAME "*Org HTML Export*")
+ (ENTITY-CONTROL org-html-entity-control-callbacks-alist)
+ (ENTITY-FORMAT org-html-entity-format-callbacks-alist)
+ (t (error "Unknown property: %s" what))))
+
+
+;;;_ , coding system
+(defun org-html-get-coding-system-for-write ()
+ (or org-export-html-coding-system
+ (and (boundp 'buffer-file-coding-system) buffer-file-coding-system)))
+
+(defun org-html-get-coding-system-for-save ()
+ (or org-export-html-coding-system
+ (and (boundp 'buffer-file-coding-system) buffer-file-coding-system)))
+
+
+;;;_. newhtml (non-parser & misc)
+(defun org-html-insert-toc (toc)
+ ;; locate where toc needs to be inserted
+ (goto-char (point-min))
+ (if (or (re-search-forward
+ "
\\s-*\\[TABLE-OF-CONTENTS\\]\\s-*
" nil t)
+ (re-search-forward
+ "\\[TABLE-OF-CONTENTS\\]" nil t))
+ (progn
+ (goto-char (match-beginning 0))
+ (replace-match ""))
+ (goto-char org-html-dyn-first-heading-pos)
+ (when (looking-at "\\s-*")
+ (goto-char (match-end 0))
+ (insert "\n")))
+ (insert toc))
+
+(defun org-html-insert-preamble (opt-plist)
+ (when (plist-get opt-plist :html-preamble)
+ (let ((html-pre (plist-get opt-plist :html-preamble))
+ (title (plist-get opt-plist :title))
+ (date (plist-get opt-plist :effective-date))
+ (author (plist-get opt-plist :author))
+ (lang-words (plist-get opt-plist :lang-words))
+ (email (plist-get opt-plist :email)))
+ (cond ((stringp html-pre)
+ (insert
+ (format-spec html-pre `((?t . ,title) (?a . ,author)
+ (?d . ,date) (?e . ,email)))))
+ ((functionp html-pre)
+ (funcall html-pre opt-plist))
+ (t
+ (insert
+ (format-spec
+ (or (cadr (assoc (nth 0 lang-words)
+ org-export-html-preamble-format))
+ (cadr (assoc "en" org-export-html-preamble-format)))
+ `((?t . ,title) (?a . ,author)
+ (?d . ,date) (?e . ,email)))))))))
+
+(defun org-html-insert-postamble (opt-plist)
+ (when org-html-footnote-definitions
+ (insert
+ (org-parse-format
+ 'FOOTNOTES-SECTION (nth 4 (plist-get opt-plist :lang-words))
+ (mapconcat (lambda (x) (cdr x))
+ (nreverse org-html-footnote-definitions) "\n"))))
+ (let ((bib (org-export-html-get-bibliography)))
+ (when bib
+ (insert "\n" bib "\n")))
+
+ ;; export html postamble
+ (unless body-only
+ (let* ((html-post (plist-get opt-plist :html-postamble))
+ (date (plist-get opt-plist :effective-date))
+ (author (plist-get opt-plist :author))
+ (email (plist-get opt-plist :email))
+ (lang-words (plist-get opt-plist :lang-words))
+ (html-validation-link (or org-export-html-validation-link ""))
+ (email
+ (mapconcat (lambda(e)
+ (format "
%s" e e))
+ (split-string email ",+ *")
+ ", "))
+ (creator-info
+ (concat "Org version " org-version " with Emacs version "
+ (number-to-string emacs-major-version))))
+ (when (plist-get opt-plist :html-postamble)
+ (cond ((stringp html-post)
+ (insert "
\n")
+ (insert (format-spec html-post
+ `((?a . ,author) (?e . ,email)
+ (?d . ,date) (?c . ,creator-info)
+ (?v . ,html-validation-link))))
+ (insert "
"))
+ ((functionp html-post)
+ (funcall html-post opt-plist))
+ ((eq html-post 'auto)
+ ;; fall back on default postamble
+ (insert "
\n")
+ (when (plist-get opt-plist :time-stamp-file)
+ (insert "
" (nth 2 lang-words) ": " date "
\n"))
+ (when (and (plist-get opt-plist :author-info) author)
+ (insert "
" (nth 1 lang-words) ": " author "
\n=
"))
+ (when (and (plist-get opt-plist :email-info) email)
+ (insert "
" email "
\n"))
+ (when (plist-get opt-plist :creator-info)
+ (insert "
"
+ (concat "Org version " org-version " with Emacs version "
+ (number-to-string emacs-major-version) "
\n")))
+ (insert html-validation-link "\n
"))
+ (t
+ (insert "
\n")
+ (insert (format-spec
+ (or (cadr (assoc (nth 0 lang-words)
+ org-export-html-postamble-format))
+ (cadr (assoc "en" org-export-html-postamble-format)))
+ `((?a . ,author) (?e . ,email)
+ (?d . ,date) (?c . ,creator-info)
+ (?v . ,html-validation-link))))
+ (insert "
"))))))
+
+ (if org-export-html-with-timestamp
+ (insert org-export-html-html-helper-timestamp)))
+
+
+(defun org-html-format-todo (todo)
+ (org-parse-format 'FONTIFY
+ (org-export-html-get-todo-kwd-class-name todo)
+ (list (if (member todo org-done-keywords) "done" "todo")
+ todo)))
+
+
+
+(defun org-html-format-extra-targets (extra-targets)
+ (if (not extra-targets) ""
+ (mapconcat (lambda (x)
+ (setq x (org-solidify-link-text
+ (if (org-uuidgen-p x) (concat "ID-" x) x)))
+ (org-parse-format 'ANCHOR "" x))
+ extra-targets "")))
+
+(defun org-html-format-org-tags (tags)
+ (if (not tags) ""
+ (org-parse-format
+ 'FONTIFY (mapconcat
+ (lambda (x)
+ (org-parse-format
+ 'FONTIFY x (org-export-html-get-tag-class-name x)))
+ (org-split-string tags ":")
+ (org-parse-format 'SPACES 1)) "tag")))
+
+(defun org-html-format-section-number (&optional snumber level)
+ (and org-export-with-section-numbers
+ (not body-only) snumber level
+ (org-parse-format 'FONTIFY snumber (format "section-number-%d" leve=
l))))
+
+;;;_. preprocessor
+;;;_. postamble
+
(provide 'org-html)
=20
;; arch-tag: 8109d84d-eb8f-460b-b1a8-f45f3a6c7ea1
diff --git a/lisp/org.el b/lisp/org.el
index 27a3949..a119c09 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8711,7 +8711,7 @@ If optional argument MERGE is set, merge TABLE into
=20
(defun org-link-unescape (str)
"Unhex hexified unicode strings as returned from the JavaScript function
-encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `=F6'."
+encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `=C3=B6'."
(unless (and (null str) (string=3D "" str))
(let ((pos 0) (case-fold-search t) unhexed)
(while (setq pos (string-match "\\(%[0-9a-f][0-9a-f]\\)+" str pos))
@@ -8721,9 +8721,9 @@ encodeURIComponent. E.g. `%C3%B6' is the german Umlau=
t `=F6'."
str)
=20
(defun org-link-unescape-compound (hex)
- "Unhexify unicode hex-chars. E.g. `%C3%B6' is the German Umlaut `=F6'.
+ "Unhexify unicode hex-chars. E.g. `%C3%B6' is the German Umlaut `=C3=B6'.
Note: this function also decodes single byte encodings like
-`%E1' (\"=E1\") if not followed by another `%[A-F0-9]{2}' group."
+`%E1' (\"=C3=A1\") if not followed by another `%[A-F0-9]{2}' group."
(save-match-data
(let* ((bytes (cdr (split-string hex "%")))
(ret "")
@@ -10749,6 +10749,7 @@ This function can be used in a hook."
"
?")
("a" "#+begin_ascii\n?\n#+end_ascii")
("A" "#+ascii: ")
+ ("o" "#+begin_odt\n?\n#+end_odt")
("i" "#+include %file ?"
"
")
)
--=20
1.7.2.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment; filename=test.org
Content-Description: test.org
#+TITLE: Testfile for OpenDocumentText Exporter
#+AUTHOR: Jambunathan K
#+EMAIL: kjambunathan@gmail.com
#+DATE: 2010-10-26 Sat
#+LANGUAGE: en
#+OPTIONS: H:3 num:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: LaTeX:dvipng
#+STARTUP: inlineimages overview
* Character Styles
** Bold
*This is bold text*
** Italic
/This is an italicized text/
** Underline
_This is an underlined text_
** Code
=This is a code text=
** Verbatim
~This is a verbatim text~
** Strikethrough
+This is a strikethorugh text+
** Super and Subscripts
Y = a_{0}X^{2}+a_{1}X^{1}+a_{2}
* Miscellaneous
Here is a ndash --, a mdash ---, an ellipsis ....
and a horizontal line
---------------------
* Paragraph Styles
** Quotation
*** Style1
#+BEGIN_QUOTE
Everything should be made as simple as possible,
but not any simpler -- Albert Einstein
#+END_QUOTE
*** QUOTE Style2
Everything should be made as simple as possible,
but not any simpler -- Albert Einstein
** Verse
#+BEGIN_VERSE
Great clouds overhead
Tiny black birds rise and fall
Snow covers Emacs
-- AlexSchroeder
#+END_VERSE
** Centered
#+BEGIN_CENTER
This is a centered paragraph.
#+END_CENTER
** Example
*** Example Style 1
#+begin_example
First line of the example.
Second line of the example.
#+end_example
*** Example Style 2
: First line of the example.
: Second line of the example.
** Source Block
*** Emacs Lisp Block
#+begin_src emacs-lisp
(defun helloworld ()
""
(message "hello world"))
#+end_src
*** Org Source Block
#+begin_src org
,* Some Appointment
, SCHEDULED: <2010-11-17 Wed>
#+end_src
* Embedded ODT
** Handcrafted Para
#+begin_html
This is a handwritten html para
#+end_html
#+begin_odt
This is a handwritten odt para
#+end_odt
** An Equation as Embeded MathML
A trigonometric equation embedded in *MathML*
#+begin_odt
#+end_odt
* Lists
** Simple Lists
*** Numbered List
This is a numbered list.
1. L1N1
2. L1N2
3. L1N3
*** Bulleted List
This is a bulleted list.
- L1B1
- L1B2
- L1B3
*** Description List
There is a nested description list down below
- Term-1 :: This is a definition for Term-1 which wraps around to
the next line
- Term-2 :: This is a definition for Term-2 which wraps around to
the next line
- Term-2.1 :: Definition for Term-2.1
- Term-2.2 :: Definition for Term-2.2
*** A Complex List
1. L1N1
1. L2N2
2. L2N3
2. L1N4
* L2B1
* L2B2
- L3B3
First paragraph.
Second paragraph.
- L3B4
3. L1N5
1. L2N6
1. L3N7
** A Very Complex List
*** Lord of the Rings
My favorite scenes are (in this order)
1. The attack of the Rohirrim
2. Eowyn's fight with the witch king
+ this was already my favorite scene in the book
+ I really like Miranda Otto.
- Definition-1 :: Description-1
- Definition-2 :: Description-2
3. Peter Jackson being shot by Legolas
He makes a really funny face when it happens.
- on DVD only
But in the end, no individual scenes matter but the film as a whole.
Important actors in this film are:
- Elijah Wood :: He plays Frodo
- Sean Austin :: He plays Sam, Frodo's friend. I still remember
him very well from his role as Mikey Walsh in
The Goonies
- Embedded Definition 1 :: Embedded Description 1
- Embedded Definition 2 :: Embedded Description 2
* Images
** Image URLs
See the You can see the official logo of Orgmode here:
[[http://orgmode.org/img/org-mode-unicorn.png]]
** Inlined Images
*** A simple inlined image
[[./org-mode-unicorn.png]]
*** A simple image with caption and label
#+CAPTION: Unicorn Logo
#+LABEL: fig:1024
[[./org-mode-unicorn.png]]
*** An image that is explicitly sized
#+CAPTION: Unicorn Logo
#+LABEL: fig:1025
#+ATTR_ODT: (:width 10 :height 10)
[[./org-mode-unicorn.png]]
*** An image that is scaled
#+ATTR_ODT: (:scale 0.5)
[[./org-mode-unicorn.png]]
** Thumbnails
This is a clickable image [[http://orgmode.org][./org-mode-unicorn.png]]
** Reference to an Image
Please refer to \ref{fig:1024} for further information.
** LaTeX Fragments
*** LaTeX Fragment1
# See org-format-latex-options
There is a equation down below.
\begin{equation}
e = \frac{1}{2}mv^2
\end{equation}
*** LaTeX Fragment2
\begin{equation}
x=\sqrt{b}
\end{equation}
If $a^2=b$ and \( b=2 \), then the solution must be either $$
a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].
* File URLs
** Relative URL
[[../../lisp/org-html.el][This is a relative link to org-html.el]]
** Absolute URL
[[file:~/src/orgmode.org/contrib/odt/OrgOdtStyles.xml][This is an absolute link to styles file]]
* Links
** Targets
*** Fuzzy Target
*** Target with CUSTOMID
:PROPERTIES:
:CUSTOM_ID: aabbccddeeff
:END:
*** Dedicated Target Style1
# <>
*** Dedicated Target Style2
There is a dedicated target at the end of this sentence -
<>.
*** <<>>
** References
*** References to Fuzzy Target
This is a link to [[Fuzzy Target]].
*** References to CUSTOMID links
This is a link to [[#aabbccddeeff][Target with CUSTOMID]]. This is nodesc link to [[#aabbccddeeff]].
*** References to Dedicated Target
There is a link to nodesc [[Dedicated Target]] here. There is a link
to [[Dedicated%20Target][Jump to Dedicated Target]] here.
There is a link to [[Dedicated%20Target1][Dedicated Target1]] here.
*** References to Radioed Links
This section has references to Radioed Target. One more reference
to Radioed Target.
* Tables
** A simple Orgmode Table
| EST | New York | -5:00 |
| IST | Madras | +5:30 |
| AST | Bahrain | +3:00 |
** A formatted Orgmode Table
#+CAPTION: An Example Table
#+LABEL: table:10
| Labels | C1 | C2 | C3 |
|------------+-------------+---------------+--------------|
| / | < | > | <> |
| | | | |
| R1 (Right) | R1C1 (Left) | R1C2 (Center) | R1C3 (Right) |
| R2 | R2C1 | R2C2 | R2C3 |
|------------+-------------+---------------+--------------|
| R3 | R3C1 | R3C2 | R3C3 |
|------------+-------------+---------------+--------------|
| R5 | R5C1 | R5C2 | R5C3 |
| R6 | R6C1 | R6C2 | R6C3 |
|------------+-------------+---------------+--------------|
** Table.el Table with no Spanning
+---------------+---------------+
|Term |Percentage |
+---------------+---------------+
|Quarter |25% |
|One-Fourth | |
+---------------+---------------+
|Half |50% |
|One-by-Two | |
+---------------+---------------+
|Three-Quarters |75% |
|Three-Fourths | |
+---------------+---------------+
|Full |100% |
|Whole | |
+---------------+---------------+
** COMMENT Table.el Table with Spanning
+----------+---------------------+----------+
|Name |cmd calls |Percentage|
+----------+ +----------+
|rgb |93 534 |46% |
+----------+ +----------+
|Xah |82 090 |40% |
+----------+ +----------+
|total |203 118 |100% |
+----------+---------------------+----------+
** COMMENT Another Table.el Table with Spanning
+----------+----------+
| Header 1 | Header 2 |
+----------+----------+
| R1 C1-2 |
+----------+----------+
| R2 C1 | R2-3 C2 |
+ +----------+
| | |
+----------+----------+
* Table Referenced
Please refer to \ref{table:10} for further information.
* Footnote Definitions (Part 1)
[fn:XYZ] There is a link to [[http://Orgmode.org][Orgmode.org]].
* Footnote Usage
** Plain Footnotes
Footnote [1]. One more reference to footnote [1].
** Named Footnotes
Footnote named XYZ [fn:XYZ].
** Inlined Footnote
Inlined footnote [fn:: inline definition]
** Named and Inlined Footnote
Named and Inlined footnote [fn:name: named definition]
# Footnote Definitions (Part 2)
[1] Quick brown fox jumps over the lazy dog. Quick brown fox jumps ove
the lazy dog.
* About Orgmode
Org is a mode for keeping notes, maintaining TODO lists, and doing
project planning with a fast and effective plain-text system.
Org develops organizational tasks around NOTES files that contain
lists or information about projects as plain text. Org is
implemented on top of Outline mode, which makes it possible to keep
the content of large files well structured. Visibility cycling and
structure editing help to work with the tree. Tables are easily
created with a built-in table editor. Org supports TODO items,
deadlines, timestamps, and scheduling. It dynamically compiles
entries into an agenda that utilizes and smoothly integrates much of
the Emacs calendar and diary. Plain text URL-like links connect to
websites, emails, Usenet messages, BBDB entries, and any files
related to the projects. For printing and sharing of notes, an Org
file can be exported as a structured ASCII file, as HTML, or (TODO
and agenda items only) as an iCalendar file. It can also serve as a
publishing tool for a set of linked web pages.
As a project planning environment, Org works by adding metadata to
outline nodes. Based on this data, specific entries can be extracted
in queries and create dynamic agenda views.
Org mode contains the Org Babel environment which allows you to work
with embedded source code blocks in a file, to facilitate code
evaluation, documentation, and tangling.
Org's automatic, context-sensitive table editor with spreadsheet
capabilities can be integrated into any major mode by activating the
minor Orgtbl mode. Using a translation step, it can be used to
maintain tables in arbitrary file types, for example in LaTeX. The
structure editing and list creation capabilities can be used outside
Org with the minor Orgstruct mode.
Org keeps simple things simple. When first fired up, it should feel
like a straightforward, easy to use outliner. Complexity is not
imposed, but a large amount of functionality is available when you
need it. Org is a toolbox and can be used in different ways and for
different ends, for example:
- an outline extension with visibility cycling and structure editing
- an ASCII system and table editor for taking structured notes
- a TODO list editor
- a full agenda and planner with deadlines and work scheduling
- an environment in which to implement David Allen's GTD system
- a simple hypertext system, with HTML and LaTeX export
- a publishing tool to create a set of interlinked webpages
- an environment for literate programming
There is a website for Org which provides links to the newest
version of Org, as well as additional information, frequently asked
questions (FAQ), links to tutorials, etc. This page is located at
http://orgmode.org.
--=-=-=
Content-Type: text/html
Content-Disposition: attachment; filename=test.html
Content-Description: test.html
Testfile for OpenDocumentText Exporter
Testfile for OpenDocumentText Exporter
1 Character Styles
1.2 Italic
This is an italicized text
1.3 Underline
This is an underlined text
1.6 Strikethrough
This is a strikethorugh text
2 Miscellaneous
Here is a ndash –, a mdash —, an ellipsis ….
and a horizontal line
3 Paragraph Styles
3.1 Quotation
3.1.1 Style1
Everything should be made as simple as possible,
but not any simpler – Albert Einstein
3.1.2 Style2
Everything should be made as simple as possible,
but not any simpler -- Albert Einstein
3.2 Verse
Great clouds overhead
Tiny black birds rise and fall
Snow covers Emacs
– AlexSchroeder
3.3 Centered
This is a centered paragraph.
3.4 Example
3.4.1 Example Style 1
First line of the example.
Second line of the example.
3.4.2 Example Style 2
First line of the example.
Second line of the example.
3.5 Source Block
3.5.1 Emacs Lisp Block
(defun helloworld ()
""
(message "hello world"))
3.5.2 Org Source Block
* Some Appointment
SCHEDULED: <2010-11-17 Wed>
4 Embedded ODT
4.1 Handcrafted Para
This is a handwritten html para
4.2 An Equation as Embeded MathML
A trigonometric equation embedded in MathML
5 Lists
5.1 Simple Lists
5.1.1 Numbered List
This is a numbered list.
-
L1N1
-
L1N2
-
L1N3
5.1.3 Description List
There is a nested description list down below
- Term-1
-
This is a definition for Term-1 which wraps around to
the next line
- Term-2
-
This is a definition for Term-2 which wraps around to
the next line
- Term-2.1
-
Definition for Term-2.1
- Term-2.2
-
Definition for Term-2.2
5.1.4 A Complex List
-
L1N1
-
L2N2
-
L2N3
-
L1N4
-
L2B1
-
L2B2
-
L3B3
First paragraph.
Second paragraph.
-
L3B4
-
L1N5
-
L2N6
-
L3N7
5.2 A Very Complex List
5.2.1 Lord of the Rings
My favorite scenes are (in this order)
-
The attack of the Rohirrim
-
Eowyn's fight with the witch king
-
this was already my favorite scene in the book
-
I really like Miranda Otto.
- Definition-1
-
Description-1
- Definition-2
-
Description-2
-
Peter Jackson being shot by Legolas
He makes a really funny face when it happens.
But in the end, no individual scenes matter but the film as a whole.
Important actors in this film are:
- Elijah Wood
-
He plays Frodo
- Sean Austin
-
He plays Sam, Frodo's friend. I still remember
him very well from his role as Mikey Walsh in
The Goonies
- Embedded Definition 1
-
Embedded Description 1
- Embedded Definition 2
-
Embedded Description 2
6 Images
6.1 Image URLs
See the You can see the official logo of Orgmode here:
6.2 Inlined Images
6.2.1 A simple inlined image
6.2.2 A simple image with caption and label
6.2.3 An image that is explicitly sized
6.2.4 An image that is scaled
6.3 Thumbnails
This is a clickable image
6.4 Reference to an Image
Please refer to 1024 for further information.
6.5 LaTeX Fragments
6.5.1 LaTeX Fragment1
There is a equation down below.
8 Links
8.1 Targets
8.1.2 Target with CUSTOMID
8.1.3 Dedicated Target Style1
8.1.4 Dedicated Target Style2
There is a dedicated target at the end of this sentence -
Dedicated Target1 .
8.2 References
8.2.1 References to Fuzzy Target
This is a link to Fuzzy Target.
9 Tables
9.1 A simple Orgmode Table
EST |
New York |
-5:00 |
IST |
Madras |
+5:30 |
AST |
Bahrain |
+3:00 |
9.2 A formatted Orgmode Table
An Example Table
Labels |
C1 |
C2 |
C3 |
R1 (Right) |
R1C1 (Left) |
R1C2 (Center) |
R1C3 (Right) |
R2 |
R2C1 |
R2C2 |
R2C3 |
R3 |
R3C1 |
R3C2 |
R3C3 |
R5 |
R5C1 |
R5C2 |
R5C3 |
R6 |
R6C1 |
R6C2 |
R6C3 |
9.3 Table.el Table with no Spanning
Term |
Percentage |
---|
Quarter One-Fourth |
25%
|
Half One-by-Two |
50%
|
Three-Quarters Three-Fourths |
75%
|
Full Whole |
100%
|
10 Table Referenced
Please refer to 10 for further information.
11 Footnote Definitions (Part 1)
12 Footnote Usage
12.1 Plain Footnotes
Footnote. One more reference to footnote.
12.4 Named and Inlined Footnote
Named and Inlined footnote
13 About Orgmode
Org is a mode for keeping notes, maintaining TODO lists, and doing
project planning with a fast and effective plain-text system.
Org develops organizational tasks around NOTES files that contain
lists or information about projects as plain text. Org is
implemented on top of Outline mode, which makes it possible to keep
the content of large files well structured. Visibility cycling and
structure editing help to work with the tree. Tables are easily
created with a built-in table editor. Org supports TODO items,
deadlines, timestamps, and scheduling. It dynamically compiles
entries into an agenda that utilizes and smoothly integrates much of
the Emacs calendar and diary. Plain text URL-like links connect to
websites, emails, Usenet messages, BBDB entries, and any files
related to the projects. For printing and sharing of notes, an Org
file can be exported as a structured ASCII file, as HTML, or (TODO
and agenda items only) as an iCalendar file. It can also serve as a
publishing tool for a set of linked web pages.
As a project planning environment, Org works by adding metadata to
outline nodes. Based on this data, specific entries can be extracted
in queries and create dynamic agenda views.
Org mode contains the Org Babel environment which allows you to work
with embedded source code blocks in a file, to facilitate code
evaluation, documentation, and tangling.
Org's automatic, context-sensitive table editor with spreadsheet
capabilities can be integrated into any major mode by activating the
minor Orgtbl mode. Using a translation step, it can be used to
maintain tables in arbitrary file types, for example in LaTeX. The
structure editing and list creation capabilities can be used outside
Org with the minor Orgstruct mode.
Org keeps simple things simple. When first fired up, it should feel
like a straightforward, easy to use outliner. Complexity is not
imposed, but a large amount of functionality is available when you
need it. Org is a toolbox and can be used in different ways and for
different ends, for example:
-
an outline extension with visibility cycling and structure editing
-
an ASCII system and table editor for taking structured notes
-
a TODO list editor
-
a full agenda and planner with deadlines and work scheduling
-
an environment in which to implement David Allen's GTD system
-
a simple hypertext system, with HTML and LaTeX export
-
a publishing tool to create a set of interlinked webpages
-
an environment for literate programming
There is a website for Org which provides links to the newest
version of Org, as well as additional information, frequently asked
questions (FAQ), links to tutorials, etc. This page is located at
http://orgmode.org.
Date: 2010-10-26 Sat
Author: Jambunathan K
Org version 7.5 with Emacs version 24
Validate XHTML 1.0
--=-=-=
Content-Type: text/plain
Jambunathan K.
--
--=-=-=--