emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: org-mode <emacs-orgmode@gnu.org>,
	Richard Riley <rileyrgdev@googlemail.com>
Subject: Re: export and containers
Date: Mon, 02 Mar 2009 19:54:57 +0100	[thread overview]
Message-ID: <87hc2boiv2.fsf@kassiopeya.MSHEIMNETZ> (raw)
In-Reply-To: <8296CDBB-B545-4819-99A5-58EDD20DC7DC@uva.nl> (Carsten Dominik's message of "Mon, 2 Mar 2009 18:03:47 +0100")



Carsten Dominik <dominik@science.uva.nl> writes:
> On Mar 2, 2009, at 5:00 PM, Sebastian Rose wrote:
>
>>
>> OK - I failed badly :-(
>>
>> I think we can skip the extra <div> element around the TOC.
>>
>> Here's why:
>>
>>  As it looks now, the problem with the fixed TOC does not go away. My
>>  old trick seems to work only for HTML doctype and/or tables...  Should
>>  have tested that one before...
>>
>>  So until now it's not getting any better - but more complicated.
>>
>>  And all those stlyes in the stylesheet become confusing :-/
>>
>>  The main problem is the height of the TOC on orgmode.org. The <div>
>>  element grows and shrinks in height when we resize the window.
>>  Unfortunately, we can't set the height property to 100% because of the
>>  unicorn. Instead I set it to 60% to support Netbooks - but 60% will be
>>  too high if the window is resized to be under a certain height. And
>>  60% is low, if the window fills a bigger screen (> 17')
>>
>>  Seems I can't solve that by adding structural elements. The only
>>  element I could think of would be a table with height=100% and the
>>  unicorn in the first row (fixed height), TOC in the second row (no
>>  height property).
>>
>>
>> Most of this seems to be true for the other containers I thought of.
>>
>>
>> Just one around everything and one around the all the sections and
>> footnotes seems to make sense so far.
>
>
> So one that wraps everything in body.  OK, let's call it "content".
>
> And then one that does contains the sections and footnotes, but
> not the title, preamble, and postamble?  Am I understanding this
> correctly?


Just the outer one then. As long as noone uses an container we shouldn't
add it.

Even the inner one with all the sections is merely a matter of taste.

What do you think about the hook idea in my previous mail? Was that to
weired? It thought that would make complex layouts possible without
poluting the *.org sources with things like

  @<div>....

and would keep org-exp.el simple too.


Best,

  Sebastian


> - Carsten
>
>
>
>
>>
>>
>>
>>
>>
>> Maybe someone finds another way of `skinning' the XHTML output in the
>> future.
>>
>>
>>
>> How about adding custom HTML before and after writing the main
>> containers?
>>
>> Can't we something like this here ? :
>>
>>   (defun my-export-add-custom-html(when, which)
>>      "when is either 'before' or 'after', which is one of:
>>        - 'body'
>>        - 'title'
>>        - 'toc'
>>        - 'contents'
>>        - 'lot'
>>       ..."
>>     (when (string= "body" which)
>>        (if (string= "before" when)
>>          "<div id="\"wrap\">")
>>          "</div>")
>>   )
>>
>>
>> In org-publish-project-alist:
>>
>>   :custom-html-funcion   my-export-add-custom-html
>>
>> and perhaps:
>>
>>   :org-export-html-sequence '("title" "toc" "content" "footnotes")
>>   ;; getting wild and offtopic:
>>   :custom-id-function   my-org-id-was-found
>>
>>
>> That way the output would win flexibility and get closer to an generic
>> export. One could implement a table based layout, or reuse containers
>> from the CMS the pages should be used in.  Not to forget `<?php
>> ..... ?>' or similar.
>>
>> We would lose the guaranty that anything validates or org-info.js works
>> with the resulting structure though. But we could provide different
>> `themes' on Worg which are guarantied to work (and enhanced by the
>> comunity).
>>
>>
>> Or is all this completely weired?
>>
>>
>>
>>
>> Best,
>>
>>  Sebastian
>>
>>
>>
>> Carsten Dominik <dominik@science.uva.nl> writes:
>>> OK, so I will wait with making changes until you have
>>> done some experimentation, maybe put that up somewhere,
>>> so that others can have a look?
>>
>>
>>
>>>
>>> - Carsten
>>>
>>> On Mar 2, 2009, at 12:58 PM, Sebastian Rose wrote:
>>>
>>>> Carsten Dominik <dominik@science.uva.nl> writes:
>>>>> Hi Sebastian,
>>>>>
>>>>>
>>>>> On Mar 2, 2009, at 10:29 AM, Sebastian Rose wrote:
>>>>>>
>>>>>> * Suggestions for names
>>>>>>
>>>>>> `wrap' is, what they use in typolight and some other CMSs. But
>>>>>> `content' sounds good to me too.
>>>>>>
>>>>>> <div id="center">
>>>>>>  <div id="wrap"><!-- or `content' -->
>>>>>>
>>>>>>    <div id="box-1">
>>>>>>      <div id="table-of-contents">
>>>>>>       ...
>>>>>>      </div>
>>>>>>    </div><!-- end of box-1 -->
>>>>>>
>>>>>>    <div id="box-2">
>>>>>>      <div id="outline-container-2" class="outline-2">
>>>>>>        <h2 id="sec-1"><span class="section-number-2">2</span>
>>>>>> Konfiguration
>>>>>> </h2>
>>>>>>        <div class="outline-text-2" id="text-2">
>>>>>>         ...
>>>>>>        </div>
>>>>>>      </div>
>>>>>>      ... more sections, footnotes ...
>>>>>>    </div><!-- end of box-2 -->
>>>>>>
>>>>>>    <div id="postamble">
>>>>>>      postamble
>>>>>>    </div>
>>>>>>
>>>>>>
>>>>>>  </div><!-- end of wrap -->
>>>>>> </div><!-- end of center -->
>>>>>
>>>>>
>>>>> How about these names for additional divs
>>>>>
>>>>> content-wrap
>>>>> content         ;; I think we should just have one around the entire
>>>>> content.
>>>>>               ;; should this also contain the <h1> with the page title?
>>>>>               ;; I think yes
>>>>
>>>> OK, one might be enough. There's a cross-browser CSS to center the contents
>>>> vertically with only one container:
>>>>
>>>> #content-wrap
>>>> {
>>>> ...
>>>> margin-top:auto;
>>>> margin-bottom:auto;
>>>> vertical-align:middle;
>>>> ...
>>>> }
>>>>
>>>> And yes,  the title should be inside `content-wrap'
>>>>
>>>>> table-of-contents-wrap
>>>>>
>>>>> footnote-wrap
>>>>> bibliography-wrap
>>>>> postamble-wrap
>>>>>
>>>>> So we put all the stuff into specific "wrap" containers.
>>>>> I don't so much like "column-1", because that looks fine
>>>>> if you use it for columns, but it looks confusing if you
>>>>> use it for something else...
>>>>
>>>>
>>>> Agreed.
>>>>
>>>> How about `org(-container ?) for the outer most container? Think of
>>>> exporting the content only for inclusion into some framework. In that
>>>> case `org' seems a natural name.
>>>>
>>>> Anyway, for sake of the TOC on the left, we should also wrap all the rest
>>>> of the contents in one <div> with postamble being the only exception.
>>>>
>>>> The tree would simply be:
>>>>
>>>> org
>>>>   title
>>>>   table-of-contents-wrap
>>>>      table-of-contents
>>>>   content-wrap
>>>>      sec-1...    - unchanged
>>>>      footnotes   - unchanged
>>>>      bibliography
>>>>   postamble    // already there
>>>>
>>>> The reason for the container around everything excluding title, TOC and
>>>> postamble is, that I don't want the TOC to live in the left margin of
>>>> the <body>, the way it does now.
>>>>
>>>> `float:left' for the TOC will cause the page to look funny in the most
>>>> cases:
>>>>
>>>> +-----+--------------+
>>>> | TOC |  TITLE       |
>>>> +-----+  SEC-1       |
>>>> |  SEC2              |
>>>> |  SEC2              |
>>>> |  FOOTNOTES         |
>>>> +--------------------+
>>>> |     POSTAMBLE      |
>>>> +--------------------+
>>>>
>>>> Better:
>>>>
>>>> +-----+--------------+
>>>> | TOC |  TITLE       |
>>>> |     |  SEC-1       |
>>>> |     |  SEC2        |
>>>> |     |  SEC3        |
>>>> |     |  FOOTNOTES   |
>>>> +--------------------+
>>>> |     POSTAMBLE      |
>>>> +--------------------+
>>>>
>>>>
>>>> And this one here would be nice (all navigational elements visible on
>>>> load):
>>>>
>>>> +-----+--------------+-----+
>>>> | TOC |  TITLE       | LOT |
>>>> |     |  SEC-1       +-----+
>>>> |     |  SEC2        | LOF |
>>>> |     |  SEC3        +-----+
>>>> |     |  FOOTNOTES   | BIB |
>>>> +-----+--------------+-----+
>>>> |        POSTAMBLE         |
>>>> +--------------------------+
>>>>
>>>> Some people (see drupal) put the postamble into the right/center column
>>>> for two and three column layout respectively. I don't like that very
>>>> much.
>>>>
>>>>
>>>>
>>>>
>>>> What we should do before we change anything, is to experiment with one
>>>> simple document and different stylesheets, to ensure everything works
>>>> the way we want it to.
>>>>
>>>> I'll set up some with the different aproaches and try to add different
>>>> CSS stylesheets. Our aim must be to make many different layouts possible
>>>> (we will never make _all_ possible layouts feasable though).
>>>>
>>>>
>>>>
>>>> Important layouts are:
>>>>
>>>> | Name                    | example          |
>>>> |-------------------------+------------------|
>>>> | Fixed TOC               | orgmode.org      |
>>>> | Floating TOC            | orgmode.org/worg |
>>>> | Please add more here...                    |
>>>>
>>>> The usual page-flow will always stay what it is as long as no special
>>>> styles are added.
>>>>
>>>>
>>>> Best,
>>>>
>>>>  Sebastian
>>>>
>>>>
>>>>> - Carsten
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>>    <div id="column-1">       -- Help with fixed TOC
>>>>>>>>      <div id="table-of-contents">
>>>>>>>>        the toc
>>>>>>>>      </div>
>>>>>>>>    </div>
>>>>>>>>
>>>>>>>>    <div id="column-2">       -- Help with fixed TOC
>>>>>>>>      All the rest of the content goes here
>>>>>>>>    </div>
>>>>>>>>
>>>>>>>>    <div id="postamble">
>>>>>>>>      postamble
>>>>>>>>    </div>
>>>>>>>>
>>>>>>>>  </div>
>>>>>>>> </div>
>>>>>>>> </body>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Having two boxes for the TOC would make the fixed TOC work in IE. In
>>>>>>>> general, I prefere to use two kinds of Boxes:
>>>>>>>>
>>>>>>>> - one for positioning, floating and so on. This one should have _no_
>>>>>>>>  padding or margin at all!
>>>>>>>
>>>>>>> Can one not simply use .body for that?
>>>>>>>
>>>>>>>> - one for margin, padding, styling.
>>>>>>>>
>>>>>>>> I found, this is the only way to reliably enforce a layout across
>>>>>>>> browsers.
>>>>>>>>
>>>>>>>>
>>>>>>>> column-1 and column-2 are for that very reason. All we can do to put the
>>>>>>>> TOC to the left or right is, to add margins to the body or the level 1
>>>>>>>> contents, and place it there. This is, what causes the problems with the
>>>>>>>> fixed TOC in IE. `column-1' and `column-2' (and `postamble') make it
>>>>>>>> possible, to adjust the layout in various common ways.
>>>>>>>>
>>>>>>>> The `percent-50' (oh what a name) and `wrap' are just there, to be able
>>>>>>>> to center the whole page horizontally _and_ veritcally.
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Best,


--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Http:  www.emma-stil.de

  parent reply	other threads:[~2009-03-02 18:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-28 10:29 export and containers Richard Riley
2009-02-28 11:37 ` Sebastian Rose
2009-02-28 19:23   ` Carsten Dominik
2009-02-28 21:09     ` Sebastian Rose
2009-03-02  8:03   ` Richard Riley
2009-03-02  9:29     ` Sebastian Rose
2009-03-02 11:11       ` Carsten Dominik
2009-03-02 11:58         ` Sebastian Rose
2009-03-02 13:10           ` Carsten Dominik
2009-03-02 16:00             ` Sebastian Rose
2009-03-02 17:03               ` Carsten Dominik
2009-03-02 18:12                 ` Richard Riley
2009-03-02 18:56                   ` Sebastian Rose
2009-03-02 20:22                     ` Richard Riley
2009-03-03  0:52                       ` Sebastian Rose
2009-03-03  1:16                         ` Richard Riley
2009-03-03 10:02                           ` Carsten Dominik
2009-03-03 10:14                             ` Sebastian Rose
2009-03-03 10:50                               ` Carsten Dominik
2009-03-03 10:57                             ` Sebastian Rose
2009-03-02 19:03                   ` Sebastian Rose
2009-03-02 18:54                 ` Sebastian Rose [this message]
2009-03-02 19:06                   ` Sebastian Rose
2009-03-02 14:38       ` Richard Riley
2009-03-02 16:50         ` Sebastian Rose

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=87hc2boiv2.fsf@kassiopeya.MSHEIMNETZ \
    --to=sebastian_rose@gmx.de \
    --cc=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=rileyrgdev@googlemail.com \
    /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).