diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-03-29 07:30:00 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-03-29 07:30:00 +0200 |
commit | 313f01d297ccfe7a07e10cd05d726d6805c945eb (patch) | |
tree | a5c636dc0d2a381b50cc4c13d933277f8aa3cb35 | |
parent | 84e8434337ea86cd242bac6227232fa6e1f5fb6f (diff) | |
download | org-mode-313f01d297ccfe7a07e10cd05d726d6805c945eb.tar.gz |
Do some formatting of table and figure captions
Table and figure captions are not fully processed. Now we at least do
basic formatting, but links and footnotes still do not work.
-rwxr-xr-x | lisp/ChangeLog | 11 | ||||
-rw-r--r-- | lisp/org-docbook.el | 1 | ||||
-rw-r--r-- | lisp/org-html.el | 2 | ||||
-rw-r--r-- | lisp/org-latex.el | 2 |
4 files changed, 16 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c787f1b..417faa0 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2010-03-29 Carsten Dominik <carsten.dominik@gmail.com> + + * org-docbook.el (org-export-docbook-format-image): Do some + formatting on captions. + + * org-latex.el (org-export-latex-tables, org-export-latex-links): + Do some formatting on captions. + + * org-html.el (org-export-html-format-image) + (org-format-org-table-html): Do some formatting on captions. + 2010-03-28 Dan Davison <davison@stats.ox.ac.uk> * org.el (org-hidden-keywords): New customizable variable. This is diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el index 3301762..1449f55 100644 --- a/lisp/org-docbook.el +++ b/lisp/org-docbook.el @@ -1325,6 +1325,7 @@ string, don't modify these." (label (org-find-text-property-in-string 'org-label src)) (default-attr org-export-docbook-default-image-attributes) tmp) + (setq caption (and caption (org-html-do-expand caption))) (while (setq tmp (pop default-attr)) (if (not (string-match (concat (car tmp) "=") attr)) (setq attr (concat attr " " (car tmp) "=" (cdr tmp))))) diff --git a/lisp/org-html.el b/lisp/org-html.el index d75d8f5..47f5c33 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1524,6 +1524,7 @@ lang=\"%s\" xml:lang=\"%s\"> (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))) + (setq caption (and caption (org-html-do-expand caption))) (concat (if caption (format "%s<div %sclass=\"figure\"> @@ -1618,6 +1619,7 @@ lang=\"%s\" xml:lang=\"%s\"> (nline 0) fnum i tbopen line fields html gr colgropen rowstart rowend) + (setq caption (and caption (org-html-do-expand caption))) (if splice (setq head nil)) (unless splice (push (if head "<thead>" "<tbody>") html)) (setq tbopen t) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 3f0e3d7..03c30a6 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1588,6 +1588,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (string-match "\\<align=\\([^ \t\n\r,]+\\)" attr) (match-string 1 attr)) floatp (or caption label)) + (setq caption (and caption (org-export-latex-content caption))) (setq lines (org-split-string raw-table "\n")) (apply 'delete-region (list beg end)) (when org-export-table-remove-special-lines @@ -1844,6 +1845,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." raw-path)))))))) ;; process with link inserting (apply 'delete-region remove) + (setq caption (and caption (org-export-latex-content caption))) (cond ((and imgp (plist-get org-export-latex-options-plist :inline-images)) ;; OK, we need to inline an image |