comparison lisp/org/org-exp.el @ 101757:6d71fc980cde

2009-02-02 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-mode): Make dependence stuff work more reliably. (org-update-parent-todo-statistics): Fix bug with updating statistics cookie. (org-yank-adjusted-subtrees, org-return-follows-link) (org-use-fast-todo-selection, org-tags-column): New default setting for variables. * org-export-latex.el (org-export-latex-emphasis-alist): Use = and ~ as verbatim delimiters, to avoid table bug. (org-export-latex-classes): Remove the a4paper option from the default styles. * org-exp.el (org-export-html-format-image): New argument PAR-OPEN, to fix XHTM validation bug. (org-export-as-html): Pass par-open to `org-export-html-format-image'. (org-export-html-footnotes-section): Use a more consistent id for footnotes. * org-agenda.el (org-agenda-sorting-strategy) (org-agenda-tags-column): New default setting for variables, based on a poll what typical uses use. (org-agenda-dim-blocked-tasks): Keep dimming blocked entries from setting the blocked tag.
author Carsten Dominik <dominik@science.uva.nl>
date Mon, 02 Feb 2009 20:57:14 +0000
parents b7a685cd1bc0
children 97ed2489367d
comparison
equal deleted inserted replaced
101756:5f840f1a34d4 101757:6d71fc980cde
4 ;; Free Software Foundation, Inc. 4 ;; Free Software Foundation, Inc.
5 5
6 ;; Author: Carsten Dominik <carsten at orgmode dot org> 6 ;; Author: Carsten Dominik <carsten at orgmode dot org>
7 ;; Keywords: outlines, hypermedia, calendar, wp 7 ;; Keywords: outlines, hypermedia, calendar, wp
8 ;; Homepage: http://orgmode.org 8 ;; Homepage: http://orgmode.org
9 ;; Version: 6.20h 9 ;; Version: 6.21b
10 ;; 10 ;;
11 ;; This file is part of GNU Emacs. 11 ;; This file is part of GNU Emacs.
12 ;; 12 ;;
13 ;; GNU Emacs is free software: you can redistribute it and/or modify 13 ;; GNU Emacs is free software: you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by 14 ;; it under the terms of the GNU General Public License as published by
3623 (if (and (or (eq t org-export-html-inline-images) 3623 (if (and (or (eq t org-export-html-inline-images)
3624 (and org-export-html-inline-images (not descp))) 3624 (and org-export-html-inline-images (not descp)))
3625 (org-file-image-p 3625 (org-file-image-p
3626 path org-export-html-inline-image-extensions)) 3626 path org-export-html-inline-image-extensions))
3627 (setq rpl (org-export-html-format-image 3627 (setq rpl (org-export-html-format-image
3628 (concat type ":" path))) 3628 (concat type ":" path) org-par-open))
3629 (setq link (concat type ":" path)) 3629 (setq link (concat type ":" path))
3630 (setq rpl (concat "<a href=\"" 3630 (setq rpl (concat "<a href=\""
3631 (org-export-html-format-href link) 3631 (org-export-html-format-href link)
3632 "\"" attr ">" 3632 "\"" attr ">"
3633 (org-export-html-format-desc desc) 3633 (org-export-html-format-desc desc)
3690 (setq desc (replace-match "" t t desc)))))) 3690 (setq desc (replace-match "" t t desc))))))
3691 (setq rpl (if (and file-is-image-p 3691 (setq rpl (if (and file-is-image-p
3692 (or (eq t org-export-html-inline-images) 3692 (or (eq t org-export-html-inline-images)
3693 (and org-export-html-inline-images 3693 (and org-export-html-inline-images
3694 (not descp)))) 3694 (not descp))))
3695 (org-export-html-format-image thefile) 3695 (progn
3696 (message "image %s %s" thefile org-par-open)
3697 (org-export-html-format-image thefile org-par-open))
3696 (concat "<a href=\"" thefile "\"" attr ">" 3698 (concat "<a href=\"" thefile "\"" attr ">"
3697 (org-export-html-format-desc desc) 3699 (org-export-html-format-desc desc)
3698 "</a>"))) 3700 "</a>")))
3699 (if (not valid) (setq rpl desc)))) 3701 (if (not valid) (setq rpl desc))))
3700 3702
4017 (if (and s (not (get-text-property 1 'org-protected s))) 4019 (if (and s (not (get-text-property 1 'org-protected s)))
4018 (save-match-data 4020 (save-match-data
4019 (org-html-do-expand s)) 4021 (org-html-do-expand s))
4020 s)) 4022 s))
4021 4023
4022 (defun org-export-html-format-image (src) 4024 (defun org-export-html-format-image (src par-open)
4023 "Create image tag with source and attributes." 4025 "Create image tag with source and attributes."
4024 (save-match-data 4026 (save-match-data
4025 (if (string-match "^ltxpng/" src) 4027 (if (string-match "^ltxpng/" src)
4026 (format "<img src=\"%s\"/>" src) 4028 (format "<img src=\"%s\"/>" src)
4027 (let* ((caption (org-find-text-property-in-string 'org-caption src)) 4029 (let* ((caption (org-find-text-property-in-string 'org-caption src))
4028 (attr (org-find-text-property-in-string 'org-attributes src)) 4030 (attr (org-find-text-property-in-string 'org-attributes src))
4029 (label (org-find-text-property-in-string 'org-label src))) 4031 (label (org-find-text-property-in-string 'org-label src)))
4030 (format "<div %sclass=\"figure\"> 4032 (format "%s<div %sclass=\"figure\">
4031 <p><img src=\"%s\"%s /></p>%s 4033 <p><img src=\"%s\"%s /></p>%s
4032 </div>" 4034 </div>%s"
4035 (if org-par-open "</p>\n" "")
4033 (if label (format "id=\"%s\" " label) "") 4036 (if label (format "id=\"%s\" " label) "")
4034 src 4037 src
4035 (if (string-match "\\<alt=" (or attr "")) 4038 (if (string-match "\\<alt=" (or attr ""))
4036 (concat " " attr ) 4039 (concat " " attr )
4037 (concat " " attr " alt=\"" src "\"")) 4040 (concat " " attr " alt=\"" src "\""))
4038 (if caption (concat "\n<p>" caption "</p>") "")))))) 4041 (if caption (concat "\n<p>" caption "</p>") "")
4042 (if org-par-open "\n<p>" ""))))))
4043
4039 4044
4040 (defvar org-table-colgroup-info nil) 4045 (defvar org-table-colgroup-info nil)
4041 (defun org-format-table-ascii (lines) 4046 (defun org-format-table-ascii (lines)
4042 "Format a table for ascii export." 4047 "Format a table for ascii export."
4043 (if (stringp lines) 4048 (if (stringp lines)