Re: [O] HTML Postamble is inside Content DIV
Not at all. Pierre Le 8 juil. 11 à 09:36, Sebastien Vauban a écrit : Hi Pierre, Any objection for applying this patch? Pierre de Buyl wrote: I checked and indeed "content" is working well. Pierre Le 1 juil. 11 à 16:06, Sebastien Vauban a écrit : Hi Pierre, Pierre de Buyl wrote: Le 28 juin 11 à 23:45, Sebastien Vauban a écrit : Here is thus my proposition for a better div-structured HTML. There are only four parts required in the HTML for all the magic to work with the CSS: - The first part is a container div ("content", by default) that surrounds everything. - Inside that are three more parts: + a preamble (in a div, if the user wants it), + a div "body" and + a postamble (in a div, if the user wants it). I think my regular use of the html export would be broken. We'll try to solve that, then. I add a in the preamble and a in the postamble. This allows me to make a "boxed" page (see http://homepages.ulb.ac.be/~pdebuyl/ ) which I like. If I cannot end my div in the postamble, I think it would break my setup. Here is my setup: :html-preamble " HERE, some static menu items. " :html-postamble " " Why are you adding a `wrapper' div in the already existing `content' div (that surrounds everything). I see no real difference between both. I tried without that extra div and I cannot reproduce my former layout. Would you apply your CSS rule onto `content', would that make a diff? Best regards, Seb -- Sebastien Vauban
Re: [O] HTML Postamble is inside Content DIV
Hi Pierre, Any objection for applying this patch? Pierre de Buyl wrote: > I checked and indeed "content" is working well. > > Pierre > > Le 1 juil. 11 à 16:06, Sebastien Vauban a écrit : > >> Hi Pierre, >> >> Pierre de Buyl wrote: >>> Le 28 juin 11 à 23:45, Sebastien Vauban a écrit : Here is thus my proposition for a better div-structured HTML. There are only four parts required in the HTML for all the magic to work with the CSS: - The first part is a container div ("content", by default) that surrounds everything. - Inside that are three more parts: + a preamble (in a div, if the user wants it), + a div "body" and + a postamble (in a div, if the user wants it). >>> >>> I think my regular use of the html export would be broken. >> >> We'll try to solve that, then. >> >>> I add a in the preamble and a in the postamble. >>> This allows me to make a "boxed" page (see >>> http://homepages.ulb.ac.be/~pdebuyl/ ) which I like. >>> >>> If I cannot end my div in the postamble, I think it would break my setup. >>> >>> Here is my setup: >>> :html-preamble " >>> >>> >>>HERE, some static menu items. >>> >>> " >>> :html-postamble " >>> >>> " >> >> Why are you adding a `wrapper' div in the already existing `content' div >> (that >> surrounds everything). I see no real difference between both. >> >>> I tried without that extra div and I cannot reproduce my former layout. >> >> Would you apply your CSS rule onto `content', would that make a diff? Best regards, Seb -- Sebastien Vauban
Re: [O] HTML Postamble is inside Content DIV
Hello, I checked and indeed "content" is working well. Pierre Le 1 juil. 11 à 16:06, Sebastien Vauban a écrit : Hi Pierre, Pierre de Buyl wrote: Le 28 juin 11 à 23:45, Sebastien Vauban a écrit : Here is thus my proposition for a better div-structured HTML. There are only four parts required in the HTML for all the magic to work with the CSS: - The first part is a container div ("content", by default) that surrounds everything. - Inside that are three more parts: + a preamble (in a div, if the user wants it), + a div "body" and + a postamble (in a div, if the user wants it). I think my regular use of the html export would be broken. We'll try to solve that, then. I add a in the preamble and a in the postamble. This allows me to make a "boxed" page (see http://homepages.ulb.ac.be/~pdebuyl/ ) which I like. If I cannot end my div in the postamble, I think it would break my setup. Here is my setup: :html-preamble " HERE, some static menu items. " :html-postamble " " Why are you adding a `wrapper' div in the already existing `content' div (that surrounds everything). I see no real difference between both. I tried without that extra div and I cannot reproduce my former layout. Would you apply your CSS rule onto `content', would that make a diff? Best regards, Seb -- Sebastien Vauban
Re: [O] HTML Postamble is inside Content DIV
Hi Pierre, Pierre de Buyl wrote: > Le 28 juin 11 à 23:45, Sebastien Vauban a écrit : >> Here is thus my proposition for a better div-structured HTML. >> >> There are only four parts required in the HTML for all the magic to work >> with the CSS: >> >> - The first part is a container div ("content", by default) that surrounds >> everything. >> >> - Inside that are three more parts: >> + a preamble (in a div, if the user wants it), >> + a div "body" and >> + a postamble (in a div, if the user wants it). > > I think my regular use of the html export would be broken. We'll try to solve that, then. > I add a in the preamble and a in the postamble. > This allows me to make a "boxed" page (see > http://homepages.ulb.ac.be/~pdebuyl/ ) which I like. > > If I cannot end my div in the postamble, I think it would break my setup. > > Here is my setup: >:html-preamble " > > >HERE, some static menu items. > > " >:html-postamble " > > " Why are you adding a `wrapper' div in the already existing `content' div (that surrounds everything). I see no real difference between both. > I tried without that extra div and I cannot reproduce my former layout. Would you apply your CSS rule onto `content', would that make a diff? Best regards, Seb -- Sebastien Vauban
Re: [O] HTML Postamble is inside Content DIV
Le 28 juin 11 à 23:45, Sebastien Vauban a écrit : "Sebastien Vauban" wrote: Sébastien Vauban wrote: Jonathan BISSON wrote: Sébastien Vauban writes: After a couple of tests, I've observed that the postamble is forced to be included *inside* the div "content". Proof on Line 1764... These are the ending tags of every HTML page: #+begin_src emacs-lisp (unless body-only (insert "\n\n\n\n")) #+end_src ... the closing referring to the opening of "content". Shouldn't it make sense to be able to insert something *out of* the "content" div? I think so (and the same for preamble)! I rewrote org-export-as-html and did a custom org-publish-org-to- html to call it, in order to get them out off the content div (you can look at a first test on my webpage http://www.bjonnh.net). It's easy to do it I can send you my file if you are interested. I think sharing the code here is always a good idea. However, I'd favor an approach commonly shared by others, ie by either: - moving the postamble out of the content DIV - adding an extra "environment" next to the content DIV, if the postamble must stay where it currently is -- for historical or compliance reasons? (same applies for preamble) I'm hijacking my own thread, as it received little support, and as the new question is quite related to that: - if we customize the preamble, our string will be inserted as is; - if we customize the postamble, our string will be inserted as is... between a wrapping div called "postamble". Shouldn't it be normal to apply the same reasoning for both cases: either impose a wrapper, either not? Any comment for others? Except for the reply of Jonathan, I received no answer on this. Here is thus my proposition for a better div-structured HTML. There are only four parts required in the HTML for all the magic to work with the CSS: - The first part is a container div ("content", by default) that surrounds everything. - Inside that are three more parts: + a preamble (in a div, if the user wants it), + a div "body" and + a postamble (in a div, if the user wants it). The patch is attached. Best regards, Seb Hello, I think my regular use of the html export would be broken. I add a in the preamble and a in the postamble. This allows me to make a "boxed" page (see http://homepages.ulb.ac.be/ ~pdebuyl/ ) which I like. If I cannot end my div in the postamble, I think it would break my setup. Here is my setup: :html-preamble " HERE, some static menu items. " :html-postamble " " I tried without that extra div and I cannot reproduce my former layout. Pierre
Re: [O] HTML Postamble is inside Content DIV
Hi, "Sebastien Vauban" wrote: > Sébastien Vauban wrote: >> Jonathan BISSON wrote: >>> Sébastien Vauban writes: After a couple of tests, I've observed that the postamble is forced to be included *inside* the div "content". Proof on Line 1764... These are the ending tags of every HTML page: #+begin_src emacs-lisp (unless body-only (insert "\n\n\n\n")) #+end_src ... the closing referring to the opening of "content". Shouldn't it make sense to be able to insert something *out of* the "content" div? >>> >>> I think so (and the same for preamble)! >>> >>> I rewrote org-export-as-html and did a custom org-publish-org-to-html to >>> call it, in order to get them out off the content div (you can look at a >>> first test on my webpage http://www.bjonnh.net). It's easy to do it I can >>> send you my file if you are interested. >> >> I think sharing the code here is always a good idea. >> >> However, I'd favor an approach commonly shared by others, ie by either: >> >> - moving the postamble out of the content DIV >> >> - adding an extra "environment" next to the content DIV, if the postamble >> must >> stay where it currently is -- for historical or compliance reasons? >> >> (same applies for preamble) > > I'm hijacking my own thread, as it received little support, and as the new > question is quite related to that: > > - if we customize the preamble, our string will be inserted as is; > > - if we customize the postamble, our string will be inserted as is... between > a wrapping div called "postamble". > > Shouldn't it be normal to apply the same reasoning for both cases: either > impose a wrapper, either not? > >> Any comment for others? Except for the reply of Jonathan, I received no answer on this. Here is thus my proposition for a better div-structured HTML. There are only four parts required in the HTML for all the magic to work with the CSS: - The first part is a container div ("content", by default) that surrounds everything. - Inside that are three more parts: + a preamble (in a div, if the user wants it), + a div "body" and + a postamble (in a div, if the user wants it). The patch is attached. Best regards, Seb -- Sebastien Vauban diff --git a/lisp/org-html.el b/lisp/org-html.el index f6108fc..daf61d2 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1325,7 +1325,10 @@ lang=\"%s\" xml:lang=\"%s\"> org-export-html-preamble-format)) (cadr (assoc "en" org-export-html-preamble-format))) `((?t . ,title) (?a . ,author) - (?d . ,date) (?e . ,email) + (?d . ,date) (?e . ,email + + ;; insert opening tag for body + (insert "\n\n")) (if (and org-export-with-toc (not body-only)) (progn @@ -1721,6 +1724,8 @@ lang=\"%s\" xml:lang=\"%s\"> ;; export html postamble (unless body-only + ;; insert closing tag for body + (insert "") (let ((html-post (plist-get opt-plist :html-postamble)) (email (mapconcat (lambda(e) @@ -1732,12 +1737,13 @@ lang=\"%s\" xml:lang=\"%s\"> (number-to-string emacs-major-version (when (plist-get opt-plist :html-postamble) (cond ((stringp html-post) - (insert "\n") + ;; (insert "\n") (insert (format-spec html-post `((?a . ,author) (?e . ,email) (?d . ,date) (?c . ,creator-info) (?v . ,html-validation-link - (insert "")) + ;; (insert "") + ) ((functionp html-post) (funcall html-post opt-plist)) ((eq html-post 'auto)
Re: [O] HTML Postamble is inside Content DIV
Hi, Sébastien Vauban wrote: > Jonathan BISSON wrote: >> Sébastien Vauban writes: >>> After a couple of tests, I've observed that the postamble is forced to be >>> included *inside* the div "content". >>> >>> Proof on Line 1764... These are the ending tags of every HTML page: >>> >>> #+begin_src emacs-lisp >>> (unless body-only (insert "\n\n\n\n")) >>> #+end_src >>> >>> ... the closing referring to the opening of "content". >>> >>> Shouldn't it make sense to be able to insert something *out of* the >>> "content" div? >> >> I think so (and the same for preamble)! >> >> I rewrote org-export-as-html and did a custom org-publish-org-to-html to >> call it, in order to get them out off the content div (you can look at a >> first test on my webpage http://www.bjonnh.net). >> It's easy to do it I can send you my file if you are interested. > > I think sharing the code here is always a good idea. > > However, I'd favor an approach commonly shared by others, ie by either: > > - moving the postamble out of the content DIV > > - adding an extra "environment" next to the content DIV, if the postamble must > stay where it currently is -- for historical or compliance reasons? > > (same applies for preamble) I'm hijacking my own thread, as it received little support, and as the new question is quite related to that: - if we customize the preamble, our string will be inserted as is; - if we customize the postamble, our string will be inserted as is... between a wrapping div called "postamble". Shouldn't it be normal to apply the same reasoning for both cases: either impose a wrapper, either not? > Any comment for others? Best regards, Seb -- Sebastien Vauban
Re: [O] HTML Postamble is inside Content DIV
Hi Jonathan, Jonathan BISSON wrote: > Sébastien Vauban writes: >> After a couple of tests, I've observed that the postamble is forced to be >> included *inside* the div "content". >> >> Proof on Line 1764... These are the ending tags of every HTML page: >> >> #+begin_src emacs-lisp >> (unless body-only (insert "\n\n\n\n")) >> #+end_src >> >> ... the closing referring to the opening of "content". >> >> Shouldn't it make sense to be able to insert something *out of* the >> "content" div? > > I think so (and the same for preamble)! > > I rewrote org-export-as-html and did a custom org-publish-org-to-html to > call it, in order to get them out off the content div (you can look at a > first test on my webpage http://www.bjonnh.net). > It's easy to do it I can send you my file if you are interested. I think sharing the code here is always a good idea. However, I'd favor an approach commonly shared by others, ie by either: - moving the postamble out of the content DIV - adding an extra "environment" next to the content DIV, if the postamble must stay where it currently is -- for historical or compliance reasons? (same applies for preamble) Any comment for others? Best regards, Seb -- Sébastien Vauban
Re: [O] HTML Postamble is inside Content DIV
Sébastien Vauban writes: > > Hello, > > After a couple of tests, I've observed that the postamble is forced to be > included *inside* the div "content". > > Proof on Line 1764... These are the ending tags of every HTML page: > > #+begin_src emacs-lisp > (unless body-only (insert "\n\n\n\n")) > #+end_src > > ... the closing referring to the opening of "content". > > Shouldn't it make sense to be able to insert something *out of* the "content" > div? > I think so (and the same for preamble)! I rewrote org-export-as-html and did a custom org-publish-org-to-html to call it, in order to get them out off the content div (you can look at a first test on my webpage http://www.bjonnh.net). It's easy to do it I can send you my file if you are interested. Cheers, J.
[O] HTML Postamble is inside Content DIV
Hello, After a couple of tests, I've observed that the postamble is forced to be included *inside* the div "content". Proof on Line 1764... These are the ending tags of every HTML page: #+begin_src emacs-lisp (unless body-only (insert "\n\n\n\n")) #+end_src ... the closing referring to the opening of "content". Shouldn't it make sense to be able to insert something *out of* the "content" div? Best regards, Seb -- Sébastien Vauban