emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Html Export and Containers
Date: Fri, 18 Sep 2009 19:45:10 +0200	[thread overview]
Message-ID: <87my4sf8pl.fsf@gmx.de> (raw)
In-Reply-To: <D842C417-5DD1-4498-AF41-3DA63E8ACCC9@gmail.com> (Carsten Dominik's message of "Fri, 18 Sep 2009 15:49:11 +0100")

[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

Carsten Dominik <carsten.dominik@gmail.com> 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/emacs-orgmode@gnu.org/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:


[-- Attachment #2: Type: text/html, Size: 3104 bytes --]

[-- Attachment #3: Type: text/plain, Size: 483 bytes --]






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


[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2009-09-18 17:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-18 13:52 Html Export and Containers Ian Barton
2009-09-18 14:49 ` Carsten Dominik
2009-09-18 17:45   ` Sebastian Rose [this message]
2009-09-18 18:50     ` Sebastian Rose
2009-09-19  6:46     ` Ian Barton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87my4sf8pl.fsf@gmx.de \
    --to=sebastian_rose@gmx.de \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).