MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Calibre (https://www.mobileread.com/forums/forumdisplay.php?f=166)
-   -   LRF and wrap-around text (https://www.mobileread.com/forums/showthread.php?t=34352)

Seabound 12-20-2008 07:33 AM

LRF and wrap-around text
 
Experts, is it possible to wrap text around figures in the LRF format? I've tried to convert html with text wrapping around figures to LRF, and the LRF lost the wrapping. I just want to make sure I'm not missing a trick to make the wrapping possible.

kiklop74 12-20-2008 08:26 AM

Quote:

Originally Posted by Seabound (Post 310591)
Experts, is it possible to wrap text around figures in the LRF format? I've tried to convert html with text wrapping around figures to LRF, and the LRF lost the wrapping. I just want to make sure I'm not missing a trick to make the wrapping possible.

AFAIK no. I was newer able to get that effect.

Seabound 12-20-2008 08:28 AM

Quote:

Originally Posted by kiklop74 (Post 310600)
AFAIK no. I was newer able to get that effect.

Ah, thank you, kiklop. That's what I thought.

kovidgoyal 12-20-2008 02:18 PM

It is possible with hand written LRF but no automatic conversion tool does it as far as I know.

Seabound 12-20-2008 10:35 PM

Thanks for the info, Kovid. I wish LRF weren't so arcane.

llasram 12-22-2008 11:49 PM

Quote:

Originally Posted by Seabound (Post 310972)
Thanks for the info, Kovid. I wish LRF weren't so arcane.

Not to sound like a broken record, but why not use EPUB instead? AdobeDE definitely supports the CSS 'float' property.

Seabound 12-22-2008 11:52 PM

Quote:

Originally Posted by llasram (Post 312163)
Not to sound like a broken record, but why not use EPUB instead? AdobeDE definitely supports the CSS 'float' property.

I did try it. While the text did wrap around figures in ePub, the other html formatting disappeared, like tables and centering.

llasram 12-23-2008 12:24 AM

Quote:

Originally Posted by Seabound (Post 312166)
I did try it. While the text did wrap around figures in ePub, the other html formatting disappeared, like tables and centering.

Bizarre -- that shouldn't happen, as EPUB content *is* HTML content. Is the source document something you could post?

Seabound 12-23-2008 01:18 AM

Quote:

Originally Posted by llasram (Post 312173)
Bizarre -- that shouldn't happen, as EPUB content *is* HTML content. Is the source document something you could post?

I should point out that the formatting is lost in the Sony reader and in the Sony library viewer. The formatting remains intact in calibre's viewer. For example:

In CSS, one has

H1,H2,H3,H4,H5,H6 { text-align: center; }

In the body, one has

<H5>CHAPTER I</H5>

When I convert to ePub using calibre, "CHAPTER I" is centered when viewed with calibre. With the same ePub file viewed with the Sony library viewer and the Sony reader, "CHAPTER I" is left-justified. What appears perfectly in a browser and in LRF does not in an ePub conversion. I don't want to have another html file just for ePub conversion. I'm quite happy with the LRF conversion, despite no wrap-around text.

llasram 12-23-2008 06:48 AM

Quote:

Originally Posted by Seabound (Post 312186)
When I convert to ePub using calibre, "CHAPTER I" is centered when viewed with calibre. With the same ePub file viewed with the Sony library viewer and the Sony reader, "CHAPTER I" is left-justified.

The problem is that your XHTML+CSS is incorrect in a way that calibre is working around, but AdobeDE is not. The correct tag is not <H1>, but <h1> -- capitalization in XML is relevant and all XHTML tags are lower case. Given how many other buggy things AdobeDE accepts, it seems kind of strange they don't accept this, but if you correctly lowercase all your tags in your markup and CSS, it'll work.

Seabound 12-23-2008 07:11 AM

Quote:

Originally Posted by llasram (Post 312252)
The problem is that your XHTML+CSS is incorrect in a way that calibre is working around, but AdobeDE is not. The correct tag is not <H1>, but <h1> -- capitalization in XML is relevant and all XHTML tags are lower case. Given how many other buggy things AdobeDE accepts, it seems kind of strange they don't accept this, but if you correctly lowercase all your tags in your markup and CSS, it'll work.

Well, it seems AdobeDE accepts caps in the markups but not in CSS. :eek:

I don't think it's strange at all. It's AdobeDE, after all.

tompe 12-27-2008 05:19 PM

Quote:

Originally Posted by Seabound (Post 312257)
Well, it seems AdobeDE accepts caps in the markups but not in CSS. :eek:

I don't think it's strange at all. It's AdobeDE, after all.

I think XML should be treated stricter than HTML so this is not surprising. And tools should warn when they fix buggy code. If calibre did not warn then I think this is a bug that will lead to the problems you had.

llasram 12-28-2008 03:59 PM

Quote:

Originally Posted by tompe (Post 314661)
I think XML should be treated stricter than HTML so this is not surprising. And tools should warn when they fix buggy code. If calibre did not warn then I think this is a bug that will lead to the problems you had.

That's a good idea... Calibre is currently silently lower-casing the markup but not the CSS. When I created an EPUB with my own spit-and-bailing-wire pipeline mis-capitalization in either the XHTML or CSS would cause ADE not to style the content.

kovidgoyal 12-28-2008 04:30 PM

lower casing all tag names in the CSS should certainly be relatively easy to do.


All times are GMT -4. The time now is 08:03 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.