emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Html Export and Containers


From: Sebastian Rose
Subject: Re: [Orgmode] Html Export and Containers
Date: Fri, 18 Sep 2009 19:45:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Carsten Dominik <address@hidden> writes:

> On Sep 18, 2009, at 2:52 PM, Ian Barton wrote:
>
>> As part of my "Using org on Mobile Devices" worglet, I want to try and 
>> explain
>> how to use style sheets to present different formatting  depending on a 
>> mobile
>> device.
>>
>> However, I can't find any documentation about org's default export format, in
>> terms of how the html is contained in divs, etc. There  was a disussion a
>> while back at http://www.mail-archive.com/address@hidden/msg11661.html
>> , but I can find anything in the org manual.
>>
>> If the documentation doesn't exist and someone can point me at the relevant
>> bit of lisp code where it's defined, I promise to submit a  patch documenting
>> it:)
>
> Hi Ian,
>
> the lisp code is in org-html.el, but it may be hard to find the relevant 
> pieces.
>
> Maybe the easiest is to make a file with all elements you care
> about, export it and look at the resulting html.....


Yes, it's quite self-explanatory.


After removing all text content, you'll stay with the bare XHTML and
everything should be obvious.


This is the skeleton of a basic file without the information not needed
like styles, JavaScript. I indented the text for readability. But note,
that the contents of such a file vary a lot, depending on the export
options and the files contents:

example-org-export

Table of Contents

1 One    vogonian

;; A code comment here.
      
     

2 Two

Content of `Two.

2.1 Example

This was done using beginquote.

3 TODO A task

Content of `A task'.

4 DONE A done task

CLOSED: 2009-09-18 Fr 19:29

Content of a done task.

Author: Arthur Dent <address@hidden>

Date: 2009-09-18 19:33:45 CEST

HTML generated by org-mode 6.30trans in emacs 23





What is `stable' between several exports, is the nesting and the names
of the main containers (replace X with depth of the nesting and ID with
the section number):

  * body
  * content
  * title
  * div id="outline-container-ID" class="outline-X"
  * h1, h2 ...
  * div class="outline-text-ID" id="text-X"

Some containers might or might not exist. E.g. the
 
  * div id="postamble"
  * div id="table-of-contents" (could be placed virtually anywhere)
  * etc.




  Sebastian


reply via email to

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