emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Re: Html export suggestion (use of <div>)


From: William Henney
Subject: Re: [Orgmode] Re: Html export suggestion (use of <div>)
Date: Mon, 8 Oct 2007 16:04:40 -0500

On 10/6/07, address@hidden <address@hidden> wrote:
> Mike Newman <address@hidden> writes:
>
> > I had wondered if there was any value in wrapping the html export in
> > <div> </div> sections to match the structure of the org file.
> >

[ snip ]

> I have not yet used this feature, but I am working with html/css all
> day, so here is my opinion:
>
> 1. You shouldn't use more divs than you need to, and you don't need
> them.
>

The trouble is, it is currently not possible to wrap a section in a
<div> when you _do_ need it. At least, I tried to do this with @<div>
... @</div> and it produces incorrectly nested tags for the case when
an org heading is mapped onto an html list item (e.g., <div
class="foo"><li>Contents of org section</div></li>). This is because
the closing </div> is interpreted as being inside the section, rather
than outside it.

> 2. You shouldn't use divs for presentation's sake. Why not make each
> subsection a different class or sumthin.
>

How would that work without divs? The problem is (I think) that
sometimes an org section is represented in html as a header plus
following text:

<h3>HEADER TEXT</h3>
<p>BODY TEXT</p>
<p>MORE BODY TEXT</p>

whereas sometimes it is represented as a list item:

<li>HEADER TEXT<br>BODY TEXT</li>.

So, in the first case one cannot apply a class to the whole section,
since there is no enclosing HTML element. In the second place, you
don't have that problem, but now it is impossible to apply a class to
just the header.

What would be nice would be if there was an option for (some) tags to
be applied as classes in the exported html.

Cheers

Will

-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia




reply via email to

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