emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] define "just", preamble and postamble placement
@ 2010-10-07 21:03 Łukasz Stelmach
  2010-10-07 22:44 ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: Łukasz Stelmach @ 2010-10-07 21:03 UTC (permalink / raw)
  To: emacs-orgmode

Hello.

The docstrings for org-export-html-(pre|post)amble say

    (Pre|Post)amble, to be inserted just (after|befor) </?body>.

This means that they should go before and after (respectively) <div
id="content"> and its </div>. Am I right?

-- 
Miłego dnia,
Łukasz Stelmach

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG] define "just", preamble and postamble placement
  2010-10-07 21:03 [BUG] define "just", preamble and postamble placement Łukasz Stelmach
@ 2010-10-07 22:44 ` Nick Dokos
  2010-10-08  5:31   ` Łukasz Stelmach
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2010-10-07 22:44 UTC (permalink / raw)
  To: =?utf-8?Q?=C5=81ukasz?= Stelmach; +Cc: nicholas.dokos, emacs-orgmode

Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> wrote:


> The docstrings for org-export-html-(pre|post)amble say
> 
>     (Pre|Post)amble, to be inserted just (after|befor) </?body>.
> 
> This means that they should go before and after (respectively) <div
> id="content"> and its </div>. Am I right?
> 

Warning: I'm not an expert. I think the reason that they are inside the
<div id="content">.... </div> is so that they can get whatever style
the CSS gives this <div>. If they were outside, then you would have to
modify the CSS to get at them (maybe by defining a body style).

Does it matter? Is the placement inside the <div> causing you
difficulties? The preamble still comes before any "real" content
and similarly for the postamble.

Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG] define "just", preamble and postamble placement
  2010-10-07 22:44 ` Nick Dokos
@ 2010-10-08  5:31   ` Łukasz Stelmach
  2010-10-08  7:46     ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: Łukasz Stelmach @ 2010-10-08  5:31 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> writes:

> Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> wrote:
>
>
>> The docstrings for org-export-html-(pre|post)amble say
>> 
>>     (Pre|Post)amble, to be inserted just (after|befor) </?body>.
>> 
>> This means that they should go before and after (respectively) <div
>> id="content"> and its </div>. Am I right?
>> 
>
> Warning: I'm not an expert. I think the reason that they are inside the
> <div id="content">.... </div> is so that they can get whatever style
> the CSS gives this <div>. If they were outside, then you would have to
> modify the CSS to get at them (maybe by defining a body style).

This is feasible and quite common.

> Does it matter? Is the placement inside the <div> causing you
> difficulties? The preamble still comes before any "real" content
> and similarly for the postamble.

|-----------+-----|
| Preamble        |
|-----------+-----|
|           |     |
| Content   | TOC |
|           |     |
|-----------+-----|
| Postamble       |
|-----------+-----|

I'd like to have a layout like the above one, with (pre|post)ambles of
full width (or at least as wide a the content + TOC). With the present
layout preamble and postamble are siblings to TOC and the text and I
can't get the desired layout.

-- 
Miłego dnia,
Łukasz Stelmach

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: [BUG] define "just", preamble and postamble placement
  2010-10-08  5:31   ` Łukasz Stelmach
@ 2010-10-08  7:46     ` Nick Dokos
  2010-10-13 10:07       ` Łukasz Stelmach
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2010-10-08  7:46 UTC (permalink / raw)
  To: =?utf-8?Q?=C5=81ukasz?= Stelmach; +Cc: nicholas.dokos, emacs-orgmode

Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> wrote:


> |-----------+-----|
> | Preamble        |
> |-----------+-----|
> |           |     |
> | Content   | TOC |
> |           |     |
> |-----------+-----|
> | Postamble       |
> |-----------+-----|
> 
> I'd like to have a layout like the above one, with (pre|post)ambles of
> full width (or at least as wide a the content + TOC). With the present
> layout preamble and postamble are siblings to TOC and the text and I
> can't get the desired layout.
> 

I guess it depends on what you start with and how much you are willing
to do by hand (or by extra programming).  Are you trying to get this
layout by html-exporting an org file without any massaging of the
resulting HTML/CSS?  If so, I don't know how to do it - I don't know if
it's even possible with just the stock org-mode html export mechanism:
org has certain conventions about the HMTL it produces and although it
is possible to bend them (e.g. Sebastian Rose's org-info.js magic
transformation of standard HTML into info-like docs or folded outlines -
who'd have thunk it?), afaik it requires some surgery (e.g. in addition
to Sebaastian's JS script, one needs some machinery on the org-mode
side: org-jsinfo.el, that is very much tailored to Sebastian's script
and a line in the org file to get the whole thing moving).

If you are willing to write some CSS, I think it's quite possible to get
the layout you want (but you may need to add e.g. ids to various
elements in the HTML - I haven't looked at the HTML that org produces in
any detail to see what it puts in and what it leaves out).  In
particular, I don't think that the parent/sibling structure of the DOM
tree limits you in any way as far as the layout goes: the <div
id="content"> just gives you a different containing block element; if it
wasn't there, the <body> element would be the containing block element -
but does that really make much difference? And if the preamble/postamble
were outside the div, the tree structure would be different but so what?
Minor adjustments in the CSS would take care of it, I should think.

But as I said, I'm no expert and I may very well be mistaken.

Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG] define "just", preamble and postamble placement
  2010-10-08  7:46     ` Nick Dokos
@ 2010-10-13 10:07       ` Łukasz Stelmach
  0 siblings, 0 replies; 5+ messages in thread
From: Łukasz Stelmach @ 2010-10-13 10:07 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> writes:

> Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> wrote:
>
>
>> |-----------+-----|
>> | Preamble        |
>> |-----------+-----|
>> |           |     |
>> | Content   | TOC |
>> |           |     |
>> |-----------+-----|
>> | Postamble       |
>> |-----------+-----|
>> 
>> I'd like to have a layout like the above one, with (pre|post)ambles of
>> full width (or at least as wide a the content + TOC). With the present
>> layout preamble and postamble are siblings to TOC and the text and I
>> can't get the desired layout.
>> 
[...]
> If you are willing to write some CSS, I think it's quite possible to get
> the layout you want (but you may need to add e.g. ids to various
> elements in the HTML - I haven't looked at the HTML that org produces in
> any detail to see what it puts in and what it leaves out).  In
> particular, I don't think that the parent/sibling structure of the DOM
> tree limits you in any way as far as the layout goes: the <div
> id="content"> just gives you a different containing block element; if it
> wasn't there, the <body> element would be the containing block element -
> but does that really make much difference? And if the preamble/postamble
> were outside the div, the tree structure would be different but so what?
> Minor adjustments in the CSS would take care of it, I should think.
>
> But as I said, I'm no expert and I may very well be mistaken.

But it looks you're right. It seems like it's easier to tweak the CSS
than the HTML structure, while still getting the same visual results. At
least as far as such simple layouts as Ordinaire[1] are concerned.


[1] http://www.freecsstemplates.org/preview/ordinaire/

-- 
Miłego dnia,
Łukasz Stelmach

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-13 11:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-07 21:03 [BUG] define "just", preamble and postamble placement Łukasz Stelmach
2010-10-07 22:44 ` Nick Dokos
2010-10-08  5:31   ` Łukasz Stelmach
2010-10-08  7:46     ` Nick Dokos
2010-10-13 10:07       ` Łukasz Stelmach

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).