04-29-2010, 06:55 PM | #1 |
Evangelist
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
|
HTML to EPUB: list indent disappears
I searched but couldn't find anything on the subject, so forgive me if it has been asked before. I had the following HTML:
Code:
<style> ul.circle {list-style-type:circle} ul.square {list-style-type:square} ol.decimal {list-style-type:decimal} ol.upper-roman {list-style-type:upper-roman} ol.lower-alpha {list-style-type:lower-alpha} </style> ..... <ul class="circle"> <li>Bullet</li> <li>Another bullet</li> <li> Nested points <ul class="square"> <li>Point</li> <li>Another point</li> </ul> </li> </ul> <ol class="decimal"> <li>First item</li> <li>Second item</li> <li> More details <ol class="upper-roman"> <li>First detail</li> <li>Second detail</li> </ol> </li> <li> A different angle <ol class="lower-alpha"> <li>First angle</li> <li>Another angle</li> </ol> </li> </ol> Code:
circle { display: block; list-style-type: circle; margin-bottom: 1em; margin-left: 0; margin-right: 0; margin-top: 1em } .decimal { display: block; list-style-type: decimal; margin-bottom: 1em; margin-left: 0; margin-right: 0; margin-top: 1em } .lower-alpha { display: block; list-style-type: lower-alpha; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0 } .square { display: block; list-style-type: square; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0 } .upper-roman { display: block; list-style-type: upper-roman; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0 } |
04-29-2010, 09:25 PM | #2 |
creator of calibre
Posts: 44,551
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Sounds like a bug, open a ticket and I'll look at it when I have a minute.
|
Advert | |
|
04-29-2010, 09:33 PM | #3 |
Evangelist
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
|
Thanks Kovid!
Created ticket #5415. Last edited by dmapr; 04-29-2010 at 09:45 PM. Reason: Added ticket number. |
04-29-2010, 10:44 PM | #4 |
What the Dog Saw
Posts: 311
Karma: 981684
Join Date: Jul 2008
Location: Dunn Loring
Device: Sony PRS-650, Surface3
|
|
04-30-2010, 01:18 AM | #5 |
Evangelist
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
|
I've also noticed it in some FB2 conversions where it flattens the embedded TOC — but it's quite possible that this is actually an ADE display bug. Sigil displays the file correctly as does Calibre ebook viewer.
|
Advert | |
|
04-30-2010, 01:35 PM | #6 |
Evangelist
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
|
Just wanted to apologize to Kovid for really screwing up in filing the ticket. I did not make it clear that the problem was only visible in ADE (reader & PC software). Should there be a next time I'll be a lot more diligent in choosing the right components and describing the problem correctly.
Kovid, thanks for Calibre and thanks for the fix! Looking forward to the next release. Once again, sorry for the mess |
04-30-2010, 01:40 PM | #7 |
creator of calibre
Posts: 44,551
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No problem Thanks to that ticket I discovered yet another bug in ADE
|
04-30-2010, 06:16 PM | #8 | |
Evangelist
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
|
Quote:
BTW, I downloaded the 0.6.50 and converting that same HTML file I get an error: Code:
C:\TEMP>"c:\Program Files\Calibre2\ebook-convert.exe" lists.html lists-calibre.epub 1% Converting input to HTML... InputFormatPlugin: HTML Input running on C:\TEMP\lists.html Language not specified Creator not specified Building file list... Forcing lists.html into XHTML namespace 34% Running transforms on ebook... Merging user specified metadata... Detecting structure... Auto generated TOC with 0 entries. Flattening CSS and remapping font sizes... Source base font size is 12.00000pt Cleaning up manifest... Trimming unused files from manifest... Creating EPUB Output... 67% Creating EPUB Output Python function terminated unexpectedly 'CSSRuleList' object has no attribute 'rulesOfType' (Error Code: 1) Traceback (most recent call last): File "site.py", line 103, in main File "site.py", line 85, in run_entry_point File "site-packages\calibre\ebooks\conversion\cli.py", line 254, in main File "site-packages\calibre\ebooks\conversion\plumber.py", line 905, in run File "site-packages\calibre\ebooks\epub\output.py", line 159, in convert File "site-packages\calibre\ebooks\epub\output.py", line 474, in workaround_ade_quirks AttributeError: 'CSSRuleList' object has no attribute 'rulesOfType' Code:
<html> <head> <title>List tests</title> <style> ul.circle {list-style-type:circle} ul.square {list-style-type:square} ol.decimal {list-style-type:decimal} ol.upper-roman {list-style-type:upper-roman} ol.lower-alpha {list-style-type:lower-alpha} </style> </head> <body> <ul class="circle"> <li>Bullet</li> <li>Another bullet</li> <li> Subpoints <ul class="square"> <li>Subpoint</li> <li>Another subpoint</li> </ul> </li> </ul> <ol class="decimal"> <li>First item</li> <li>Second item</li> <li> More details <ol class="upper-roman"> <li>First detail</li> <li>Second detail</li> </ol> </li> <li> A different angle <ol class="lower-alpha"> <li>First angle</li> <li>Another angle</li> </ol> </li> </ol> </body> </html> |
|
04-30-2010, 07:31 PM | #9 |
creator of calibre
Posts: 44,551
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No that's a bug (I forgot to update cssutils in the binary builds) I'll be releasing 0.6.51 in a bit
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TOC disappears when converting from .prc to epub | baselworld | Calibre | 3 | 09-06-2010 03:10 AM |
Calibre Indent Issue When Removing Blank Lines (Converting From HTML to MOBI or EPUB) | David Derrico | Calibre | 5 | 08-04-2010 01:13 AM |
HTML Book + non HTML TOC to epub | aarcane | Calibre | 4 | 03-02-2010 03:58 AM |
Why ePub rather than HTML? | Robotech_Master | Workshop | 20 | 03-30-2009 04:53 PM |
Ignore initial indent in HTML files? | The Old Man | Sony Reader Dev Corner | 2 | 06-21-2008 09:38 PM |