← Back to team overview

zim-wiki team mailing list archive

Re: Export to html

 

On Fri, Aug 22, 2014 at 1:43 PM, Paulo van Breugel <p_vanbreugel@xxxxxxxxx>
wrote:

> Well, perhaps it is an idea to have the export replace two empty lines by
> one <br> (and three empty lines by two <br>, etc... but leave the rule
> that one empty line is ignored). That would allow people to insert a larger
> break (more white space) between paragraphs or headings in the Zim notebook
> which would then also be reflected in the exported html pages.
>

That's actually what I had in the version before 707, but it was not fine
tuned for this case. Just realized that you would need to use CSS for the
heading margin anyway to fully get things like they look in zim.

Say I have this wiki text:

====== Head 1 ======
bla bla bla

===== head 2 =====

bla bla bal
....

Current release (<706) results in following html

<h1>Head 1</h1>
<p>bla bla bla
</p>

<h2>Head 2</h2>
<br>
<p>bla bla bla
</p>
...

Now as you commented correctly this results in a lot of whitespace below
the H2. But there is also space below the H1 that is not in the wiki text.

If I use CSS to remove the padding/margin between heading and paragraph it
looks again same as the source text. But in that case the BR is crucial.

Current snapshot (>=706) I removed all these BR, so no difference between
the two headings in this example.


My feeling is that I should roll back and put CSS snippet in the template
to get more accurate HTML version of the wiki page. However that makes the
HTML rendering without CSS ugly.

Compromise would be to make the newline handling an option you can control
from the template. This could help to make "vanilla" HTML export look
decent while templates with CSS can set the BR how they want it.

Any thoughts?

Jaap

Follow ups

References