[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] HTML Postamble is inside Content DIV

From: Pierre de Buyl
Subject: Re: [O] HTML Postamble is inside Content DIV
Date: Wed, 29 Jun 2011 15:26:56 +0200

Le 28 juin 11 à 23:45, Sebastien Vauban a écrit :
"Sebastien Vauban" wrote:
Sébastien Vauban wrote:
Jonathan BISSON wrote:
Sébastien Vauban <address@hidden> 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</div>\n</body>\n</html>\n"))

... the closing </div> 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

- 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,


I think my regular use of the html export would be broken.

I add a <div id="wrapper"> in the preamble and a </div> 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 "
   <div id=\"wrapper\">
   <div id=\"menu\">
   HERE, some static menu items.
         :html-postamble "

I tried without that extra div and I cannot reproduce my former layout.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]