Re: [O] Rework org-export-html-preamble/postamble (again)
Hi Jason, Jason Dunsmore emacs-orgm...@dunsmor.com writes: Set :html-preamble to: div class=\menu\ \ a href=\index.html\index/a :: \ a href=\changelog.html\changelog/a :: \ a href=\sitemap.html\sitemap/a \ /div When I export as HTML with this config, I don't see an h1title/h1. Do you? I don't -- and this is on purpose. Previously, :html-preamble could be set to a format string without h1%t/h1 and h1title/h1 would still be exported. Previously, we had two variables controlling preamble(s): `org-export-html-preamble' `org-export-html-auto-preamble' the first one defaulted to nil, the last one to h1title/h1. So setting `org-export-html-preamble' in any fashing would add a preamble to the default one (controlled by :auto-preamble in a publishing project). You need to set :html-preamble to this: , | h1 class=\title\%t/h1 | | div class=\menu\ \ | a href=\index.html\index/a :: \ | a href=\changelog.html\changelog/a :: \ | a href=\sitemap.html\sitemap/a \ | /div ` HTH, -- Bastien
Re: [O] Rework org-export-html-preamble/postamble (again)
Jason Dunsmore emacs-orgm...@dunsmor.com writes: Applying the attached patch above the previous one should do. Let me know, thanks! This patch fixed that export error, FYI, I applied the two patches I sent. Best, -- Bastien
Re: [O] Rework org-export-html-preamble/postamble (again)
Bastien b...@altern.org writes: Hi Jason, Jason Dunsmore emacs-orgm...@dunsmor.com writes: This patch fixed that export error, but I'm still seeing the problems with exporting #+TITLE: in an h1 heading described at: http://article.gmane.org/gmane.emacs.orgmode/39100 You mean that, without any :html-preamble and with ̀org-export-html-preamble' set to `t' (as it is by default in these patches), you don't see any h1title/h1 ? If :html-preamble isn't set, I see an h1title/h1. If it is set, but without explicitly defining h1 class=\title\%t/h1 in the :html-preamble string, there is no h1title/h1. This is not how it worked before the recent changes to html exporting (ie. previously it wasn't necessary to explicitly define h1%t/h1 in the :html-preamble string). The previous behavior seems more consistent. This is with the latest git version (commit b6b7057467b6b). `org-export-html-preamble' is set to `t' in all my testing. Regards, Jason
Re: [O] Rework org-export-html-preamble/postamble (again)
Hi Jason, Jason Dunsmore emacs-orgm...@dunsmor.com writes: You mean that, without any :html-preamble and with ̀org-export-html-preamble' set to `t' (as it is by default in these patches), you don't see any h1title/h1 ? If :html-preamble isn't set, I see an h1title/h1. When :html-preamble in a publishing project, it falls back on org-export-html-preamble, which defaults to `t'. You need to set :html-preamble to nil so that the HTML export doesn't insert h1title/h1. If it is set, (to what?) but without explicitly defining h1 class=\title\%t/h1 in the :html-preamble string, there is no h1title/h1. When :html-preamble is set to `t' in a publishing project, and org-export-html-preamble-format hasn't been modified, it should insert h1 class=\title\%t/h1 -- it does here. Can you give an example I can test? This is not how it worked before the recent changes to html exporting (ie. previously it wasn't necessary to explicitly define h1%t/h1 in the :html-preamble string). It is not -- just check that org-export-html-preamble is `t' and that should be all right. In th recent changes, I tried to make sure that the defaults produce the same HTML output than defaults in 7.4. The previous behavior seems more consistent. This is with the latest git version (commit b6b7057467b6b). `org-export-html-preamble' is set to `t' in all my testing. Thanks for this report again... -- Bastien
Re: [O] Rework org-export-html-preamble/postamble (again)
Bastien b...@altern.org writes: Hi Jason, Jason Dunsmore emacs-orgm...@dunsmor.com writes: You mean that, without any :html-preamble and with ̀org-export-html-preamble' set to `t' (as it is by default in these patches), you don't see any h1title/h1 ? If :html-preamble isn't set, I see an h1title/h1. When :html-preamble in a publishing project, it falls back on org-export-html-preamble, which defaults to `t'. You need to set :html-preamble to nil so that the HTML export doesn't insert h1title/h1. If it is set, (to what?) but without explicitly defining h1 class=\title\%t/h1 in the :html-preamble string, there is no h1title/h1. When :html-preamble is set to `t' in a publishing project, and org-export-html-preamble-format hasn't been modified, it should insert h1 class=\title\%t/h1 -- it does here. Yes, the same happens for me. The case I'm referring to is when :html-preamble is set to a string. Can you give an example I can test? Set :html-preamble to: --8---cut here---start-8--- div class=\menu\ \ a href=\index.html\index/a :: \ a href=\changelog.html\changelog/a :: \ a href=\sitemap.html\sitemap/a \ /div --8---cut here---end---8--- When I export as HTML with this config, I don't see an h1title/h1. Do you? Previously, :html-preamble could be set to a format string without h1%t/h1 and h1title/h1 would still be exported. Regards, Jason
Re: [O] Rework org-export-html-preamble/postamble (again)
Hi Jason, Jason Dunsmore emacs-orgm...@dunsmor.com writes: Bastien b...@altern.org writes: Hopefully this patch will solve a few issues that have just been raised about the new behavior of org-export-html-preamble/postamble. With this patch, I get the following error when exporting to HTML: list: Symbol's value as variable is void: creator-info Applying the attached patch above the previous one should do. Let me know, thanks! From 368ff7ba090a663e77cb90af2d89206af9201644 Mon Sep 17 00:00:00 2001 From: Bastien Guerry b...@altern.org Date: Thu, 10 Mar 2011 10:26:37 +0100 Subject: [PATCH 2/2] * org-html.el: Bugfix: define email and creator-info before using them. * org-html.el (org-export-as-html): Bugfix: define email and creator-info before using them. Thanks to Jason Dunsmore for catching this. --- lisp/org-html.el | 37 ++--- 1 files changed, 18 insertions(+), 19 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index d5ea1a3..1661085 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1704,7 +1704,15 @@ lang=\%s\ xml:lang=\%s\ ;; Export html postamble (unless body-only - (let ((html-post (plist-get opt-plist :html-postamble))) + (let ((html-post (plist-get opt-plist :html-postamble)) + ((email + (mapconcat (lambda(e) + (format a href=\mailto:%s\%s/a 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 div id=\postamble\\n) @@ -1717,25 +1725,16 @@ lang=\%s\ xml:lang=\%s\ (funcall html-post opt-plist)) ((eq html-post 'auto) ;; fall back on default postamble - (let - ((email - (mapconcat (lambda(e) - (format a href=\mailto:%s\%s/a e e)) -(split-string email ,+ *) -, )) - (creator-info - (concat Org version org-version with Emacs version - (number-to-string emacs-major-version - (insert div id=\postamble\\n) - (when (and (plist-get opt-plist :author-info) author) + (insert div id=\postamble\\n) + (when (and (plist-get opt-plist :author-info) author) (insert p class=\author\ (nth 1 lang-words) : author /p\n)) - (when (and (plist-get opt-plist :email-info) email) - (insert p class=\mailto: email \lt; email gt;/p\n)) - (when (plist-get opt-plist :creator-info) - (insert p class=\creator\ - (concat Org version org-version with Emacs version - (number-to-string emacs-major-version) /p\n))) - (insert html-validation-link \n/div))) + (when (and (plist-get opt-plist :email-info) email) + (insert p class=\mailto: email \lt; email gt;/p\n)) + (when (plist-get opt-plist :creator-info) + (insert p class=\creator\ + (concat Org version org-version with Emacs version + (number-to-string emacs-major-version) /p\n))) + (insert html-validation-link \n/div)) (t (insert div id=\postamble\\n) (insert (format-spec -- 1.7.4.1 -- Bastien
Re: [O] Rework org-export-html-preamble/postamble (again)
Bastien b...@altern.org writes: Hi Jason, Jason Dunsmore emacs-orgm...@dunsmor.com writes: Bastien b...@altern.org writes: Hopefully this patch will solve a few issues that have just been raised about the new behavior of org-export-html-preamble/postamble. With this patch, I get the following error when exporting to HTML: list: Symbol's value as variable is void: creator-info Applying the attached patch above the previous one should do. Let me know, thanks! This patch fixed that export error, but I'm still seeing the problems with exporting #+TITLE: in an h1 heading described at: http://article.gmane.org/gmane.emacs.orgmode/39100
Re: [O] Rework org-export-html-preamble/postamble (again)
Hi Jason, Jason Dunsmore emacs-orgm...@dunsmor.com writes: This patch fixed that export error, but I'm still seeing the problems with exporting #+TITLE: in an h1 heading described at: http://article.gmane.org/gmane.emacs.orgmode/39100 You mean that, without any :html-preamble and with ̀org-export-html-preamble' set to `t' (as it is by default in these patches), you don't see any h1title/h1 ? If so there is problem but I cannot reproduce it. Otherwise, I'm not sure I completely understand. Best, -- Bastien
Re: [O] Rework org-export-html-preamble/postamble (again)
Bastien b...@altern.org writes: Hopefully this patch will solve a few issues that have just been raised about the new behavior of org-export-html-preamble/postamble. With this patch, I get the following error when exporting to HTML: list: Symbol's value as variable is void: creator-info