* Html Export and Containers @ 2009-09-18 13:52 Ian Barton 2009-09-18 14:49 ` Carsten Dominik 0 siblings, 1 reply; 5+ messages in thread From: Ian Barton @ 2009-09-18 13:52 UTC (permalink / raw) To: emacs-orgmode 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:) Ian. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Html Export and Containers 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 0 siblings, 1 reply; 5+ messages in thread From: Carsten Dominik @ 2009-09-18 14:49 UTC (permalink / raw) To: lists; +Cc: emacs-orgmode 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..... Otherwise, I think that Sebastian Rose has the best overview over the HTML used by Org export. - Carsten ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Html Export and Containers 2009-09-18 14:49 ` Carsten Dominik @ 2009-09-18 17:45 ` Sebastian Rose 2009-09-18 18:50 ` Sebastian Rose 2009-09-19 6:46 ` Ian Barton 0 siblings, 2 replies; 5+ messages in thread From: Sebastian Rose @ 2009-09-18 17:45 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode [-- 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Html Export and Containers 2009-09-18 17:45 ` Sebastian Rose @ 2009-09-18 18:50 ` Sebastian Rose 2009-09-19 6:46 ` Ian Barton 1 sibling, 0 replies; 5+ messages in thread From: Sebastian Rose @ 2009-09-18 18:50 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1498 bytes --] Sebastian Rose <sebastian_rose@gmx.de> writes: > > 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: Hrrrmmhrm, second try, now as attachment... Sebastian [-- Attachment #2: org-export-structure.html --] [-- Type: text/html, Size: 6209 bytes --] [-- Attachment #3: 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Html Export and Containers 2009-09-18 17:45 ` Sebastian Rose 2009-09-18 18:50 ` Sebastian Rose @ 2009-09-19 6:46 ` Ian Barton 1 sibling, 0 replies; 5+ messages in thread From: Ian Barton @ 2009-09-19 6:46 UTC (permalink / raw) Cc: emacs-orgmode >> >>> 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: > > > > ------------------------------------------------------------------------ > > > example-org-export > > > Table of Contents > > * 1 One <#sec-1> > * 2 Two <#sec-2> > o 2.1 Example <#sec-2.1> > * 3 A task <#sec-3> > * 4 A done task <#sec-4> > > > 1 One vogonian > > ;; A code comment here. > > > > > 2 Two > > Content of `Two. > > > 2.1 Example > > This was done using begin_quote . > > > 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 <arthur_dent@hartofgold.cos> > <mailto:arthur_dent@hartofgold.cos> > > 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. > Thanks. I think I should also provide an example .emacs showing basic customization options. The layout I am hoping to achieve is a single column, with TOC at the top. Whilst not necessarily pretty this should be viewable without horizontal scrolling. I have re-used some php from MythTV's web interface that does a good job of detecting mobile browsers and serves up the page with approprriate style sheet. I am hoping that this will let people build a single site that works on both desktop and mobile devices. Ian. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-09-19 6:51 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2009-09-18 18:50 ` Sebastian Rose 2009-09-19 6:46 ` Ian Barton
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.