Re: [Zim-wiki] Export to html: No top level in left Index
Will commit fix in next revision. -- Jaap On Thu, May 14, 2015 at 10:55 AM, Agustin Lobo wrote: > When I export the current page + subpages to html, > the left index does not feature the top level page, thus if > I navigate (in html) to the lower levels there is no obvious way to > go back to the higher level page. > Any trick besides using the arrows of the browser? > > -- > Agustin Lobo > aloboa...@gmail.com > > ___ > Mailing list: https://launchpad.net/~zim-wiki > Post to : zim-wiki@lists.launchpad.net > Unsubscribe : https://launchpad.net/~zim-wiki > More help : https://help.launchpad.net/ListHelp > ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
OK, now pushed revision 710 to the repository. Default behavior is back to as released in 0.61, using elements. However the default templates have CSS to remove margins so it renders the same as in the editor: WYSIWYG. When you don't line the default behavior you can use the template option "empty_lines" to switch them off. Also there is an option "line_breaks" to switch the elements at the end of line within a paragraph. See the manual page on templates for the syntax etc. Hope this makes everybody happy :) Regards, Jaap On Fri, Aug 22, 2014 at 7:42 PM, Syv Ritch wrote: > On Fri, 22 Aug 2014 19:06:11 +0200 > Jaap Karssenberg wrote: > > > Well, for those that expect WYSIWYG behavior, this BR is crucial to > > achieve the same result as in the wiki page. > > Hi, > > I'm sorry to butt in, especially that it's possible that "I'm > completely out to lunch". > > Zim uses the same syntax as Dokuwiki, and Dokuwiki does the > rendering "properly". > > How does Dokuwiki do it? and what about doing something similar in > python? > > sknahT > > vyS > > -- > Thanks > http://www.foto-biz.com > The Business Of Being A Photographer -- Lightroom Q&A > ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
On Fri, 22 Aug 2014 19:06:11 +0200 Jaap Karssenberg wrote: > Well, for those that expect WYSIWYG behavior, this BR is crucial to > achieve the same result as in the wiki page. Hi, I'm sorry to butt in, especially that it's possible that "I'm completely out to lunch". Zim uses the same syntax as Dokuwiki, and Dokuwiki does the rendering "properly". How does Dokuwiki do it? and what about doing something similar in python? sknahT vyS -- Thanks http://www.foto-biz.com The Business Of Being A Photographer -- Lightroom Q&A ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
On Fri, Aug 22, 2014 at 6:56 PM, Paulo van Breugel wrote: > You wrote: "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." > --> This is just the default space after headers. As you mention below, > this can be easily handled using CSS. > > You wrote: "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." > --> I don't see why the BR is crucial in that case. > Well, for those that expect WYSIWYG behavior, this BR is crucial to achieve the same result as in the wiki page. > You wrote: "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." > --> It seems setting the height of the BR, and that doesn't seem to be > easy: > http://stackoverflow.com/questions/1409649/how-to-change-the-height-of-a-br > That is not what I meant. By making it a template option, you would allow to choose in the template whether or not the BR are inserted at all. Similar there can be an option to add BR at the end of line in a paragraph or not. This would be in the zim output code, so independent of what you can do with CSS on top of that. > I think the situation is that in Zim, being text based (and given that the > text files should remain human readible), spaces between headers and text > can only be created by adding empty lines. In HTML such spaces should not > be done by adding breaks, but by using CSS. For this reason, the way empty > lines are handled in revision 706 is the correction one I think and the > changes should not be rolled back i.m.o. > > I am not sure if I understand the last option, but if that means the user > has the option to determine how empty lines are handled by the export > (being replaced by brakes or ignored), that would be a very nice feature. > Yep, that's what I meant :) Sounds like there is need for both options. Regards, Jaap ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
Sounds like a useful feature, providing maximum flexibility. Brilliant! On 22 August 2014 19:06:11 CEST, Jaap Karssenberg wrote: >On Fri, Aug 22, 2014 at 6:56 PM, Paulo van Breugel > >wrote: > >> You wrote: "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." >> --> This is just the default space after headers. As you mention >below, >> this can be easily handled using CSS. >> >> You wrote: "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." >> --> I don't see why the BR is crucial in that case. >> > > >Well, for those that expect WYSIWYG behavior, this BR is crucial to >achieve >the same result as in the wiki page. > > > >> You wrote: "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." >> --> It seems setting the height of the BR, and that doesn't seem to >be >> easy: >> >http://stackoverflow.com/questions/1409649/how-to-change-the-height-of-a-br >> > >That is not what I meant. By making it a template option, you would >allow >to choose in the template whether or not the BR are inserted at all. > >Similar there can be an option to add BR at the end of line in a >paragraph >or not. > >This would be in the zim output code, so independent of what you can do >with CSS on top of that. > > > >> I think the situation is that in Zim, being text based (and given >that the >> text files should remain human readible), spaces between headers and >text >> can only be created by adding empty lines. In HTML such spaces should >not >> be done by adding breaks, but by using CSS. For this reason, the way >empty >> lines are handled in revision 706 is the correction one I think and >the >> changes should not be rolled back i.m.o. >> >> I am not sure if I understand the last option, but if that means the >user >> has the option to determine how empty lines are handled by the export >> (being replaced by brakes or ignored), that would be a very nice >feature. >> > >Yep, that's what I meant :) > >Sounds like there is need for both options. > >Regards, > >Jaap -- Sent from my Android device with K-9 Mail. Please excuse my brevity.___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
I think there is a consensus here not to use :-). On Friday, August 22, 2014 6:29 PM, Colin Tedford wrote: It seems like common practice on the web is to use CSS to add some space under headers > Sorry, or to manage the space under the headers, I guess we're not adding here. Colin colintedford.com ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
You wrote: "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." --> This is just the default space after headers. As you mention below, this can be easily handled using CSS. You wrote: "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." --> I don't see why the BR is crucial in that case. You wrote: "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." --> It seems setting the height of the BR, and that doesn't seem to be easy: http://stackoverflow.com/questions/1409649/how-to-change-the-height-of-a-br I think the situation is that in Zim, being text based (and given that the text files should remain human readible), spaces between headers and text can only be created by adding empty lines. In HTML such spaces should not be done by adding breaks, but by using CSS. For this reason, the way empty lines are handled in revision 706 is the correction one I think and the changes should not be rolled back i.m.o. I am not sure if I understand the last option, but if that means the user has the option to determine how empty lines are handled by the export (being replaced by brakes or ignored), that would be a very nice feature. Cheers, Paulo On Friday, August 22, 2014 5:38 PM, Jaap Karssenberg wrote: On Fri, Aug 22, 2014 at 1:43 PM, Paulo van Breugel wrote: Well, perhaps it is an idea to have the export replace two empty lines by one (and three empty lines by two , 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 Head 1 bla bla bla Head 2 bla bla bla ... 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___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
2014-08-22 12:38 GMT-03:00 Jaap Karssenberg : > 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. > Personally I'd prefer a clean HTML output by default. I don't like the BR tags, and I don't think that the HTML export should try to replicate any arbitrary spacing in the wiki text. The HTML would easily turn into a mess. Most wiki engines and markdown processors ignore whitespace when rendering, and have a specific tag/syntax for explicitly adding a blank line. Maybe that's the way to go. -- Mariano ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
> > It seems like common practice on the web is to use CSS to add some space > under headers > Sorry, or to manage the space under the headers, I guess we're not adding here. Colin colintedford.com ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
> > 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. > > Jaap > It seems like common practice on the web is to use CSS to add some space under headers so your thought sounds sensible to me, but I haven't tinkered with the templates -- is it common to render without CSS? Colin colintedford.com ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
On Fri, Aug 22, 2014 at 1:43 PM, Paulo van Breugel wrote: > Well, perhaps it is an idea to have the export replace two empty lines by > one (and three empty lines by two , 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 Head 1 bla bla bla Head 2 bla bla bla ... 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 ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
Hi Jaap, I tested with rev705, guess was too early with updating.. I tested again with rev706 and it works perfect this time, great! So no need to roll back i.m.o. Well, perhaps it is an idea to have the export replace two empty lines by one (and three empty lines by two , 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. On Friday, August 22, 2014 1:01 PM, Jaap Karssenberg wrote: PLease make sure you have rev706 when testing. Maybe I should roll back partly and put the CSS solution in our HTML templates? Regards, Jaap On Fri, Aug 22, 2014 at 9:54 AM, Paulo van Breugel wrote: Hi Jaap, > >A blank line in between the two headers is still replaced by a . From below I am not sure I understand whether that is the intended behaviour or not? > > > >TOC & web links Collaboration > Another option would be to replace empty lines by ? Html pages generated that way resemble more the way the text looks in Zim (tested in Firefox and Chrome), which is because these browsers seem to ignore empty paragraphs. > >Another option is to follow the same rule as for paragraphs. As far as I can see, empty line between two paragraphs are not exported. Two empty lines between paragraphs are exported as one break. I think that would be the best option in terms of how easy it is to regulate the appearance of the html page through CSS). > > > > > > > >On 21-08-14 12:20, Jaap Karssenberg wrote: > >Committed new revision where I changed the whitespace handling in the HTML >export. Basically removed all "" elements outside of paragraphs. Downside >is that some rendering may look different than in the source page if you have >additional blank lines, but best I can do with the HTML assumptions for line >spacing. >> >> -- Jaap >> >> >> >> >> >>On Wed, Aug 20, 2014 at 7:48 PM, Paulo van Breugel >>wrote: >> >>When exporting to html, the export places a break between two consecutive >>headers as in the example below. Is there a way to prevent this? >>> >>> >>> >>>= TOC & web links = >>> Collaboration >>>* test >>> >>> >>>Becomes: >>> >>> >>>TOC & web links Collaboration >>>test >>> >> >___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
PLease make sure you have rev706 when testing. Maybe I should roll back partly and put the CSS solution in our HTML templates? Regards, Jaap On Fri, Aug 22, 2014 at 9:54 AM, Paulo van Breugel wrote: > Hi Jaap, > > A blank line in between the two headers is still replaced by a . From > below I am not sure I understand whether that is the intended behaviour or > not? > > > TOC & web linksCollaboration > > > Another option would be to replace empty lines by ? Html pages > generated that way resemble more the way the text looks in Zim (tested in > Firefox and Chrome), which is because these browsers seem to ignore empty > paragraphs. > > Another option is to follow the same rule as for paragraphs. As far as I > can see, empty line between two paragraphs are not exported. Two empty > lines between paragraphs are exported as one break. I think that would be > the best option in terms of how easy it is to regulate the appearance of > the html page through CSS). > > > > > > > > On 21-08-14 12:20, Jaap Karssenberg wrote: > > Committed new revision where I changed the whitespace handling in the > HTML export. Basically removed all "" elements outside of paragraphs. > Downside is that some rendering may look different than in the source page > if you have additional blank lines, but best I can do with the HTML > assumptions for line spacing. > > -- Jaap > > > > On Wed, Aug 20, 2014 at 7:48 PM, Paulo van Breugel > wrote: > >> When exporting to html, the export places a break between two >> consecutive headers as in the example below. Is there a way to prevent >> this? >> >> >> = TOC & web links = >> >> >> Collaboration >> >> * test >> >> >> >> >> Becomes: >> >> TOC & web >> linksCollaborationtest >> >> >> > > ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
Hi Jaap, A blank line in between the two headers is still replaced by a . From below I am not sure I understand whether that is the intended behaviour or not? TOC& web links Collaboration Another option would be to replace empty lines by ? Html pages generated that way resemble more the way the text looks in Zim (tested in Firefox and Chrome), which is because these browsers seem to ignore empty paragraphs. Another option is to follow the same rule as for paragraphs. As far as I can see, empty line between two paragraphs are not exported. Two empty lines between paragraphs are exported as one break. I think that would be the best option in terms of how easy it is to regulate the appearance of the html page through CSS). On 21-08-14 12:20, Jaap Karssenberg wrote: Committed new revision where I changed the whitespace handling in the HTML export. Basically removed all "" elements outside of paragraphs. Downside is that some rendering may look different than in the source page if you have additional blank lines, but best I can do with the HTML assumptions for line spacing. -- Jaap On Wed, Aug 20, 2014 at 7:48 PM, Paulo van Breugel mailto:p_vanbreu...@yahoo.com>> wrote: When exporting to html, the export places a break between two consecutive headers as in the example below. Is there a way to prevent this? = TOC & web links = Collaboration * test Becomes: TOC& web links Collaboration test ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
Great, I'll give it a try On Thursday, August 21, 2014 12:20 PM, Jaap Karssenberg wrote: Committed new revision where I changed the whitespace handling in the HTML export. Basically removed all "" elements outside of paragraphs. Downside is that some rendering may look different than in the source page if you have additional blank lines, but best I can do with the HTML assumptions for line spacing. -- Jaap On Wed, Aug 20, 2014 at 7:48 PM, Paulo van Breugel wrote: When exporting to html, the export places a break between two consecutive headers as in the example below. Is there a way to prevent this? > > > >= TOC & web links = > Collaboration >* test > > >Becomes: > > >TOC & web links Collaboration >test >___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Export to html
Committed new revision where I changed the whitespace handling in the HTML export. Basically removed all "" elements outside of paragraphs. Downside is that some rendering may look different than in the source page if you have additional blank lines, but best I can do with the HTML assumptions for line spacing. -- Jaap On Wed, Aug 20, 2014 at 7:48 PM, Paulo van Breugel wrote: > When exporting to html, the export places a break between two consecutive > headers as in the example below. Is there a way to prevent this? > > > = TOC & web links = > > > Collaboration > > * test > > > > > Becomes: > > TOC & web > linksCollaborationtest > > > ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp