![]() |
#391 |
Member
![]() Posts: 17
Karma: 10
Join Date: Aug 2007
Device: Sony eReader 500
|
Well, I tried it in Firefox and it renders with two spaces. IE is wrong when it comes to rendering HTML properly. Anyway, I tried it in IE and it does incorrectly render with 1 space.
So, which do you go with? Standards compliant Firefox or non-standards compliant IE. Either way, you could just as easily remove any whitespace at the beginning of a non-pre tag and that will fix said issue. If the tag has CSS that says it is white-space:pre; then you can check that before removing the space at the beginning of a tag and determine if you need to remove it or not. hmm I forgot what started this conversation anyway... heh |
![]() |
![]() |
![]() |
#392 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
firefox and konqueror in linux render it with one space. I suspect firefox on windows is broken. Certainly redering it with one space is logically correct. No you cant blindly remove leading space, consider the following situation
Code:
<p>One,<span> two |
![]() |
![]() |
Advert | |
|
![]() |
#393 |
Member
![]() Posts: 17
Karma: 10
Join Date: Aug 2007
Device: Sony eReader 500
|
Well, it "looks" like one space but it is 2 spaces in source... I guess it does collapse it in the browser window then...
True enough. |
![]() |
![]() |
![]() |
#394 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Released v0.3.98 with support for white-space. This required a complete rewrite of html2lrf's whitespace handling mechanism, so keep an eye out for whitespace related problems. The new code is actually simpler than the old, but not tested nearly as much ;-)
Also fixed the lit2lrf, any2lrf bugs on windows. |
![]() |
![]() |
![]() |
#395 |
Member
![]() Posts: 22
Karma: 10
Join Date: Mar 2007
Location: France
Device: Sony Reader
|
kovidgoyal>here's an attached .lrf, with an example of line-centered text.
It's an article from the New York Time, taken as an html page, and converted with html2lrf. If you go on the last page, you can see a list of items, centered. If I understood well, what you want (and others on the forum too) is centered text on the reader. Centered text like that pops in nearly all my lrf files, because a lot, if not all of them comes from saved web pages, poorly stripped of their screen-waste content. So I suppose that when I get centered text, it's because, even if I cut "with an axe" through the html code, css definition still (badly) applies to what's left... |
![]() |
![]() |
Advert | |
|
![]() |
#396 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
Last edited by kovidgoyal; 08-17-2007 at 06:26 PM. |
|
![]() |
![]() |
![]() |
#397 |
Enthusiast
![]() ![]() Posts: 33
Karma: 108
Join Date: Jul 2007
Device: Sony Reader
|
|
![]() |
![]() |
![]() |
#398 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
upgrade to the latest version and put the <pre> tags back and you should have both links and line breaks.
|
![]() |
![]() |
![]() |
#399 |
Enthusiast
![]() ![]() Posts: 33
Karma: 108
Join Date: Jul 2007
Device: Sony Reader
|
|
![]() |
![]() |
![]() |
#400 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#401 |
Member
![]() Posts: 22
Karma: 10
Join Date: Mar 2007
Location: France
Device: Sony Reader
|
kovidgoyal>OK, it seems I misunderstood. Excuse-me for any false hope.
|
![]() |
![]() |
![]() |
#402 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
So any idea when the next version is going to be released? The one that fixes html2lrf.
|
![]() |
![]() |
![]() |
#403 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Later today.
|
![]() |
![]() |
![]() |
#404 |
Connoisseur
![]() Posts: 57
Karma: 50
Join Date: Jun 2007
Device: Sony Reader PRS-500
|
I'm having a small problem.
I have a sentence that is coded like this : <p class="first">G<em>ram called at five in the morning. She never remembered</em> which looks like this Gram called at five in the morning. She never remembered the time difference. I don't like the fact that the first letter is not italics. It looks funny. I also wanted the first letter to be a drop cap. So I changed the code to this : <p class="first"><em><big class='libprs500_dropcaps'>G</big>ram called at five in the morning. She never remembered</em> The result looks fine in a browser, but doesn't convert well. The result is the first letter is in italics and drop-capped, but the rest of the sentence looses the italics. It looks like this G ram called at five in the morning. |
![]() |
![]() |
![]() |
#405 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I tried that. For me, the the entire statement is italicized, as would be expected from the HTML
Code:
<em><big class='libprs500_dropcaps'>G</big>ram called at five in the morning. She never remembered</em> Last edited by kovidgoyal; 08-18-2007 at 01:07 PM. |
![]() |
![]() |
![]() |
Tags |
html2lrf, libprs500 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change font of header for LRF Output on PRS 505 | duckbill | Calibre | 3 | 05-15-2010 11:07 AM |
Pissed off with LRF formatting: LRF/LRS clean tool? | grimborg | LRF | 8 | 02-15-2010 01:14 PM |
Fonts for LRF output | krischik | Calibre | 1 | 10-03-2009 05:01 AM |
CBZ > LRF (LRF>HTML/MOBI????) | sideburnt | Calibre | 4 | 09-15-2009 06:44 AM |
libprs500 Issues Converting .LIT to .LRF - .LRF crashes everything | vasbinde | Calibre | 6 | 02-14-2008 12:16 PM |