Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 08-05-2020, 11:56 AM   #16
etihwmot
Junior Member
etihwmot began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2020
Device: android
Quote:
Originally Posted by kovidgoyal View Post
calibre only inserts a class on html if there are some styles applied to html in the input document.
Ahh yes, I see it now. The root tag is included in the styles of the input document; just to set 0 margin/padding.

I removed 'html' from this styling, and the resulting EPUB validated perfectly.

Just in case others find this, I was using an html template created by Guido Henkel (a v. similar one is used by David Gaughran too). Both of those helpful humans wrote their guides before Apple opened up their publishing platform for PC users to upload directly -- so they probably would not have run into this.

Thanks!
etihwmot is offline   Reply With Quote
Old 08-05-2020, 12:11 PM   #17
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 59,475
Karma: 56078831
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
If you do use code from someone else, you need to see it for what it is and fix whatever it is that's not what you want or not correct. One thing I really dislike about Guido is his CSS formatting. It looks awful and it's harder to read.

Code:
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent; 1.2em;
}
looks so much better then...

Code:
p
{
margin-top: 0;
margin-bottom: 0;
text-indent; 1.2em;
}
JSWolf is online now   Reply With Quote
Old 08-05-2020, 12:23 PM   #18
etihwmot
Junior Member
etihwmot began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2020
Device: android
well, I won't let you look at my css/html/xml any time soon!

In his defence (not defending readability), as pointed out in the previous comments, the *html* is valid, it's just not loved by epub-validator or Apple.
etihwmot is offline   Reply With Quote
Old 08-05-2020, 12:56 PM   #19
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 25,537
Karma: 35353613
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
Please do not confuse forms of Valid code.
ebooks are a subset of the whole. What is valid for a WEB page, may not be valid for ebooks (and even valid code, may not work on devices. Ask Hitch about hoops to jump thru )
eg' a HR with a width of 50% is supposed to center
in reality I had to margin-left: 25% the above HR to get it in the center
(on old ADE )
theducks is offline   Reply With Quote
Old 08-05-2020, 01:06 PM   #20
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 8,372
Karma: 39048549
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by theducks View Post
Please do not confuse forms of Valid code.
ebooks are a subset of the whole. What is valid for a WEB page, may not be valid for ebooks (and even valid code, may not work on devices. Ask Hitch about hoops to jump thru )
eg' a HR with a width of 50% is supposed to center
in reality I had to margin-left: 25% the above HR to get it in the center
(on old ADE )
Are you referring to the old margins: auto not working bug?
DNSB is offline   Reply With Quote
Old 08-05-2020, 01:36 PM   #21
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 25,537
Karma: 35353613
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by DNSB View Post
Are you referring to the old margins: auto not working bug?
Not in this case, but that is just one of many that plague older devices.\even my Kobo (FW up to date) has issues where the code looks proper, but the kepub renders odd
ChapterOne The (standard ASCII) space is in the code, but it gets stripped on SOME (I suspect the CSS is affecting this somehow. haven't had the inspiration to further debug. BTW sending as the source EPUB is fine)
theducks is offline   Reply With Quote
Old 08-05-2020, 02:04 PM   #22
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 8,372
Karma: 39048549
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by theducks View Post
Not in this case, but that is just one of many that plague older devices.\even my Kobo (FW up to date) has issues where the code looks proper, but the kepub renders odd
ChapterOne The (standard ASCII) space is in the code, but it gets stripped on SOME (I suspect the CSS is affecting this somehow. haven't had the inspiration to further debug. BTW sending as the source EPUB is fine)
I was asking since as far as I recall, the <hr> tag was supposed to auto-center in HTML 4.01 while align was deprecated. I seem to remember that was rather unreliable so the workaround was setting margin left and right to auto which Adobe didn't support.
DNSB is offline   Reply With Quote
Old 08-05-2020, 02:27 PM   #23
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 25,537
Karma: 35353613
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by DNSB View Post
I was asking since as far as I recall, the <hr> tag was supposed to auto-center in HTML 4.01 while align was deprecated. I seem to remember that was rather unreliable so the workaround was setting margin left and right to auto which Adobe didn't support.
that was why I used 1/2 remaining space for the Left indent (HR was 50%) with no need to set the Right (assumes use was a normal view and not something obscure)
theducks is offline   Reply With Quote
Old 08-05-2020, 02:57 PM   #24
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 59,475
Karma: 56078831
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by DNSB View Post
I was asking since as far as I recall, the <hr> tag was supposed to auto-center in HTML 4.01 while align was deprecated. I seem to remember that was rather unreliable so the workaround was setting margin left and right to auto which Adobe didn't support.
The way to do an <hr> is...
Code:
hr {
  margin-right: 45%;
  margin-left: 45%;
}
That centers a 10% wide line.

Last edited by JSWolf; 08-05-2020 at 04:20 PM.
JSWolf is online now   Reply With Quote
Old 08-05-2020, 03:25 PM   #25
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 8,372
Karma: 39048549
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by JSWolf View Post
The way to do an <hr> is...
Code:
hr {
  margin-right: 45%;
  margin-left: 45%;
}
That centers a 5% wide line.
Where does the other 5% go? 45+45+5=95.

Last edited by DNSB; 08-05-2020 at 04:25 PM.
DNSB is offline   Reply With Quote
Old 08-05-2020, 04:20 PM   #26
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 59,475
Karma: 56078831
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by DNSB View Post
Where does the other 5% go? 45+45+5=95.
It was a mistake that's now corrected.
JSWolf is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html img tag versus svg wrapped image tag hobnail ePub 8 02-27-2020 03:16 AM
HTML to epub disable class change chittu Calibre 1 12-25-2013 01:33 PM
html to epub CLI conversion / html input m4mmon Conversion 2 05-05-2012 02:10 AM
Conversionproblems from HTML to ePub with the <pre>-Tag matthias2011 Conversion 16 07-29-2011 08:47 AM
Calibre Recipe HTML content differs from raw html of index.html. krunk Calibre 4 09-20-2010 09:48 PM


All times are GMT -4. The time now is 05:00 PM.


MobileRead.com is a privately owned, operated and funded community.