emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] export and containers


From: Richard Riley
Subject: Re: [Orgmode] export and containers
Date: Mon, 02 Mar 2009 15:38:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

Sebastian Rose <address@hidden> writes:

> Richard Riley <address@hidden> writes:
>> Sebastian Rose <address@hidden> writes:
>>
>>> Richard Riley <address@hidden> writes:
>>>> It's been a while since I've looked at my org set up. One thing that
>>>> always struck me as a bit hacky was my use of
>>>>
>>>> :preamble "<div id='content'>
>>>>
>>>> and the corresponding postamble to enclose the exported web pages into a
>>>> "container" div. Is there a better way to do this? I would think it
>>>> would be a common enough need that by default or via an option all html
>>>> should be enclosed in a "webcontainer" ID.
>>>
>>> While one container around everything makes it possible to center the
>>> page horizontally, two containers make it possible to center the page
>>> vertically as well.
>>>
>>> If we would go and change the structure once again, I'd even suggest the
>>> following:
>>>
>>> <body>
>>>   <div id="percent-50">         -- center the page if desired
>>>     <div id="wrap">             -- center the page if desired
>>
>> Why always IDs as opposed to classes?
>
>
> `percent-50' and `wrap' are there for a special purpose and unique in
> that concern. `wrap' is the `content' you originally requested. I did
> not use my brain and called it `wrap' without any annotation.

"content" or "org-container". Wrap made no sense to me. It suggests word
wrap in the context. wrapper would be better. Purely vocabulary issue.

>
>>>> :preamble "<div id='content'>
>
> I'd say they should have an ID assigned.

Just an academic question : Why not a class?

>
>
>
>> Can css selectors select based on a part of a name? If not then there is
>> no link between column-1 and column-2. e.g in this convention how does
>> one create a common style for all columns or all "sec-" objects?
>
> Aaah, OK, sorry for being unclear - a misunderstanding.
>
> I did *not* mean to _change_ the structure of the XHTML in it's
> current

FYI I have abandoned xhtml in the smalle bit of web UI I touch.. It is
not cross platform/browser. Common concensus says make it html 4.01
strict compliant.


> form, but simply _add_ additional containers to partition the whole
> thing (just as you suggested) and thus make it possible to move certain
> groups of content around through CSS.
>
> All the "sec-" objects should go into `column-2'.

I dont know/understand what you mean with "columns".

Columns suggest layout in columns. It should simply be a "wrapper". That
wrapper may or may not be CSSd to a column. It might be a float or a
fixed position or .....

> All the `sec-' objects share classes via the containers they live in:
>
>     <div id="outline-container-2" class="outline-2">
>     <div id="outline-container-2.1" class="outline-3">
>
> etc.

Yes. Thats what I was suggesting but see later on regarding css descendants.

>
> That's already the case, and I think we don't need to change that.
>

There is still this difference between ID and class name. I'm not sure I
see why.

>
> * 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">

where is the "base" class for box-2? 

The issue I see is that theres no way using this method to change all
"sec-" entries in an outline container for example since you cant use
css descendants since all have *unique* class names and IDs.

>         <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">

and another div here is what?


,----
| >           <div class="outline-text-2" id="text-3">
`----

?


>            ...
>           </div>
>         </div>
>         ... more sections, footnotes ...
>       </div><!-- end of box-2 -->
>
>       <div id="postamble">
>         postamble
>       </div>
>
>
>     </div><!-- end of wrap -->
>   </div><!-- end of center -->

I'm not sure I understand the need for the container container. Maybe I
need to Google up centering vertically. 

>
>
>
>>>
>>>       <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
>>>
>
> --
> 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
> Email: address@hidden, address@hidden
> Http:  www.emma-stil.de
>

-- 
 important and urgent problems of the technology of today are no longer the 
satisfactions of the primary needs or of archetypal wishes, but the reparation 
of the evils and damages by the technology of yesterday.  ~Dennis Gabor, 
Innovations:  Scientific, Technological and Social, 1970




reply via email to

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