Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-25-2019, 05:59 AM   #1
blackrock36
Member
blackrock36 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
Compatibility of Sigil coding on different ebook apps

I am currently formating a large non-fiction book in Sigil 0.9.12. The styles and fonts are in the code as per the Word. .doc format. BUT in the Icecream ebook reader the layout is perfect (see attached) whereas the exact same .epub file renders differently in Sumatra PDF ebook reader (see attached) and is so much more difficult to read.

As a newbie to epub formatting I am mystified that the html code (see attached) has the correct defined styles and is perfect in the .doc format, but appears differently in two different ebook readers, one 100% correct, the other incorrectly in terms of line height, italic font style, line spacing etc.

Am I doing something wrong or is this just the way it is?

Frustrated,
Andy!
blackrock36 is offline   Reply With Quote
Old 02-25-2019, 08:03 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Different ebook apps/readers render differently. It's the nature of the beast. Neither one of those sound like industry-standard readers you should be using for testing work. Especially something that might be destined for commercial purposes.
DiapDealer is offline   Reply With Quote
Advert
Old 02-25-2019, 09:35 AM   #3
blackrock36
Member
blackrock36 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
Quote:
Originally Posted by DiapDealer View Post
Different ebook apps/readers render differently. It's the nature of the beast. Neither one of those sound like industry-standard readers you should be using for testing work. Especially something that might be destined for commercial purposes.
Thats an interesting answer. When I book view the code in Sigil, there is no formatting in it at all, thats why I looked at different epub readers to get an idea as to how it rendered in the epub format. Is there a particular epub package I should get? This is an important project to me and I don't want to fall at the final hurdle with a rubbish output.

Any info appreciated.
Andy
blackrock36 is offline   Reply With Quote
Old 02-25-2019, 10:46 AM   #4
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by blackrock36 View Post
Thats an interesting answer. When I book view the code in Sigil, there is no formatting in it at all, thats why I looked at different epub readers to get an idea as to how it rendered in the epub format. Is there a particular epub package I should get? This is an important project to me and I don't want to fall at the final hurdle with a rubbish output.

Any info appreciated.
Andy
Hi, Andy:

Unfortunately, there isn't "One ePUB reader to rule them all." One rule of thumb is, if you can get an ePUB looking pretty good on Adobe Digital Editions, it's likely--albeit not guaranteed--to look relatively good on most, not all, eReaders. Bear in mind that some devices and software allow the end user to basically override all your CSS; some allow them to change a variety of things (fonts, line-heights, margins), some render more strictly. It's not like making a print book, at ALL.

You didn't display the CSS for that paragraph class, Q (for quote, presumably). What is it? You may find that you need to use CSS that will work in most situations, changing what you have now.

So...what's the CSS for the Q class paragraphs?

Hitch
Hitch is offline   Reply With Quote
Old 02-25-2019, 11:09 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by blackrock36 View Post
When I book view the code in Sigil, there is no formatting in it at al
Not sure what you're saying there. If you're saying the code you entered in Code View (which is where you should enter/paste code) has no formatting at all when looked at in Book View, then as Hitch alluded to, that's probably down to not properly styling the html with css.
DiapDealer is offline   Reply With Quote
Advert
Old 02-25-2019, 11:42 AM   #6
blackrock36
Member
blackrock36 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
Quote:
Originally Posted by Hitch View Post
Hi, Andy:

Unfortunately, there isn't "One ePUB reader to rule them all." One rule of thumb is, if you can get an ePUB looking pretty good on Adobe Digital Editions, it's likely--albeit not guaranteed--to look relatively good on most, not all, eReaders. Bear in mind that some devices and software allow the end user to basically override all your CSS; some allow them to change a variety of things (fonts, line-heights, margins), some render more strictly. It's not like making a print book, at ALL.

You didn't display the CSS for that paragraph class, Q (for quote, presumably). What is it? You may find that you need to use CSS that will work in most situations, changing what you have now.

So...what's the CSS for the Q class paragraphs?

Hitch
Hitch,
Thanks for your comments. I have attached a file with the css code for the Q quote style and the book view of the chapter that I see with no formatting at all. This paragraph style is defined in the Style001.css section of Sigil. The book view looks to ignore all of the formatting in Sigil but Icecream ebook reader sees it.

Any thoughts?

Cheers,
Andy
Attached Files
File Type: pdf The CSS for the. style formatting.pdf (126.4 KB, 200 views)
blackrock36 is offline   Reply With Quote
Old 02-25-2019, 12:05 PM   #7
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
@blackrock36

1. Please do not post code examples as .pdf files. Copy and paste code/css into the message, highlight it and click the # sign in the toolbar to mark it as code.

2. Your HTML code contains inline styles and your stylesheets contain MS Word specific attributes, which can cause all kinds of problems. You might want to rethink your workflow. For example, you could use Toxaris's MS Word Add-in or save your book as a .docx file and convert it to an epub file with Calibre.
Doitsu is offline   Reply With Quote
Old 02-25-2019, 12:24 PM   #8
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 73,937
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Quote:
Originally Posted by blackrock36 View Post
The styles and fonts are in the code as per the Word. .doc format
This is rarely/never a good idea. Word puts in loads of redundant styling, uses absolute values, and generally mess things up from an EPUB point of view.

The Q CSS you posted had margins in points, two bottom margins, and at least three fonts specified. When all you really want in Q is to set the font style to italic, and set a left indent of (looking at the print) about 3em.
pdurrant is offline   Reply With Quote
Old 02-25-2019, 02:13 PM   #9
blackrock36
Member
blackrock36 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
Quote:
Originally Posted by Doitsu View Post
@blackrock36

1. Please do not post code examples as .pdf files. Copy and paste code/css into the message, highlight it and click the # sign in the toolbar to mark it as code.

2. Your HTML code contains inline styles and your stylesheets contain MS Word specific attributes, which can cause all kinds of problems. You might want to rethink your workflow. For example, you could use Toxaris's MS Word Add-in or save your book as a .docx file and convert it to an epub file with Calibre.
Doitsu,
Thanks for the CSS code correction, will do as you advise in the future.

The document started life as a .doc and was saved as an .HTML to import in Sigil. I have tried Calibre before but may have to revisit. I guess the consensus is that the HTML file I am using is polluted by MS code from the Word 'save as' and that is my fundamental issue. I will try the Toxaris link but never thought this conversion process would be so niggly.

Advice much appreciated.

Thanks
Andy
blackrock36 is offline   Reply With Quote
Old 02-25-2019, 02:18 PM   #10
blackrock36
Member
blackrock36 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
Quote:
Originally Posted by pdurrant View Post
This is rarely/never a good idea. Word puts in loads of redundant styling, uses absolute values, and generally mess things up from an EPUB point of view.

The Q CSS you posted had margins in points, two bottom margins, and at least three fonts specified. When all you really want in Q is to set the font style to italic, and set a left indent of (looking at the print) about 3em.
Pdurrant,
Would open office give me cleaner html or will all word processors add unnecessary code when converting to html?

Cheers
Andy
blackrock36 is offline   Reply With Quote
Old 02-25-2019, 04:37 PM   #11
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,720
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@blackrock36 - I find calibre converts DOCX to EPUB better than filtered HTML, no matter whether it comes from Word or Writer. Even better is the DOCX Import (Mammoth wrapper) plugin for Sigil, but you have to put in the effort to map your word processing Styles to CCS entries.

But most crucial of all is to use the word processors Styles rather than inline formatting, and to remove superfluous newlines, tabs, and unused Styles before saving.

BR
BetterRed is online now   Reply With Quote
Old 02-25-2019, 06:44 PM   #12
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by blackrock36 View Post
Doitsu,
Thanks for the CSS code correction, will do as you advise in the future.

The document started life as a .doc and was saved as an .HTML to import in Sigil. I have tried Calibre before but may have to revisit. I guess the consensus is that the HTML file I am using is polluted by MS code from the Word 'save as' and that is my fundamental issue. I will try the Toxaris link but never thought this conversion process would be so niggly.

Advice much appreciated.

Thanks
Andy
"Niggly?" That's because this Word file is patently not styled. It looks to my eyes that it's been done with ad hoc styles, with manual settings for each paragraph, etc. That's the only explanation for finding TWO different font settings in the same exported "style" and don't get me started about some of the rest.

Making ebooks, like making print books, is not a "take some text I typed and magically it's a book" process. I blame Amazon for part of this idea, floating around out there that it's insta-magic, no-effort-required, but I also blame Microsoft, for promulgating the idea that a word-processor is a simple one-size-fits-all magic software that can do all things and be all things to all people, from a simple word-processor to layout software to whatever.

I'm not saying that's how you think, but it's definitely how a lot of first-time author-"converters" think.

eBooks are HTML. Just like webpages. But, unlike webpages, they have a limited set of HTML that makes them "go" successfully. To make that happen, you either need to accept that the outcome will not be exactly as you wish, or you learn some html, and CSS, and how to do the job correctly--or at least, enough to fix what goes wrong.

If you don't think that you can take your Word file, push a button and have a working website, well, that doesn't work for an eBook, either.

IF--repeat, IF-you know and understand and use Word's Styles and headings, you can make a relatively decent book with very little understanding of HTML, because you put in all the work upfront--by using the styles. :-) If you didn't use those, and don't put in that work upfront, then you are doomed to do that work and heavy lifting in HTML.

Hitch
Hitch is offline   Reply With Quote
Old 02-25-2019, 07:07 PM   #13
blackrock36
Member
blackrock36 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
Quote:
Originally Posted by Hitch View Post
"Niggly?" That's because this Word file is patently not styled. It looks to my eyes that it's been done with ad hoc styles, with manual settings for each paragraph, etc. That's the only explanation for finding TWO different font settings in the same exported "style" and don't get me started about some of the rest.

Making ebooks, like making print books, is not a "take some text I typed and magically it's a book" process. I blame Amazon for part of this idea, floating around out there that it's insta-magic, no-effort-required, but I also blame Microsoft, for promulgating the idea that a word-processor is a simple one-size-fits-all magic software that can do all things and be all things to all people, from a simple word-processor to layout software to whatever.

I'm not saying that's how you think, but it's definitely how a lot of first-time author-"converters" think.

eBooks are HTML. Just like webpages. But, unlike webpages, they have a limited set of HTML that makes them "go" successfully. To make that happen, you either need to accept that the outcome will not be exactly as you wish, or you learn some html, and CSS, and how to do the job correctly--or at least, enough to fix what goes wrong.

If you don't think that you can take your Word file, push a button and have a working website, well, that doesn't work for an eBook, either.

IF--repeat, IF-you know and understand and use Word's Styles and headings, you can make a relatively decent book with very little understanding of HTML, because you put in all the work upfront--by using the styles. :-) If you didn't use those, and don't put in that work upfront, then you are doomed to do that work and heavy lifting in HTML.

Hitch
Hitch,
I based the original document format on the Smashwords style guide where all extraneous formatting in Word is recommended to be removed and the 4 or 5 dedicated styles used were made in Word for quotes, bullet points and the Word defaults were ignored. So the original book document, of which the reproduced text is a sample chapter from the book accurately reflects the Word output including the styles I created as I am familiar with Word. I can assure you that at over 400 A4 pages, I put in a lot of work on formatting the Word document as required with no added stuff so it would render as well as possible. For the book, the Smashwords online reader reproduces the book exactly as formatted as looks great but their epub rendering does not.

However, it seems that I have not learnt enough and I can see from your own and others helpful comments that I still have some way to go on this! I will retry Calibre using a docx format straight to epub and check it out and perhaps acknowledge that I have to educate myself on html too. I also write quiz books under a pseudonym so this whole process will serve me well into the future.

Cheers,
Andy
blackrock36 is offline   Reply With Quote
Old 02-25-2019, 07:12 PM   #14
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Your Q style looks like it contains alot of unnecessary bloat. It contains alot of mso-style- attributes which cannot be interpreted by most readers and could cause problems. You really need to clean out that html file in Sigil.

You could try running CustomCleanerPlus Sigil plugin which will get rid of all mso-style- bloated code(and do much more) from the stylesheet and html code. This plugin cleans out both epubs and Word html as well as html docs from other sources. Just click the link below to download the zip file for Sigil install. All instructions are in the release notes. See link below:

CustomCleanerPlus Sigil Plugin

Last edited by slowsmile; 02-25-2019 at 07:24 PM.
slowsmile is offline   Reply With Quote
Old 02-25-2019, 07:22 PM   #15
blackrock36
Member
blackrock36 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
Quote:
Originally Posted by slowsmile View Post
Your Q style looks like it contans alot of unnecessary bloat. It contains alot of mso-style- attributes which cannot be interpreted by most readers and could cause problems. You really need to clean out that html file in Sigil.

You could try running CustomCleanerPlus Sigil plugin which will get rid of all mso-style- bloated code(and do much more) from the stylesheet and html code. This plugin cleans out both epubs and Word html as well as html docs from other sources. Just click the link below to download the zip file for install. All instructions are in the release notes. See link below:
https://www.mobileread.com/forums/sh...d.php?t=288294
Slowsmile,
I'll check that out thanks, I had no idea that Word put all of that BS into the html code which the other contributors have also pointed out. I just want to write and not work on html code but I guess that Microsoft don't agree!

Thanks,
Andy
blackrock36 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil compatibility (a wish) roger64 Editor 3 02-15-2018 04:16 AM
eBook & App device Compatibility webcast AnemicOak Writers' Corner 0 08-14-2012 09:21 AM
ebook Mall compatibility? krazy4katz Amazon Kindle 5 02-08-2012 01:36 AM
Linux compatibility question and online ebook stores? ePingus General Discussions 21 12-14-2011 03:54 PM


All times are GMT -4. The time now is 09:23 PM.


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