![]() |
#1 |
Member
![]() 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! |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
|
Quote:
Any info appreciated. Andy |
|
![]() |
![]() |
![]() |
#4 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
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 |
|
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
|
Quote:
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 |
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#8 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,937
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#9 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
|
Quote:
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 |
|
![]() |
![]() |
![]() |
#10 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
|
Quote:
Would open office give me cleaner html or will all word processors add unnecessary code when converting to html? Cheers Andy |
|
![]() |
![]() |
![]() |
#11 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#12 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
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 |
|
![]() |
![]() |
![]() |
#13 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
|
Quote:
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 |
|
![]() |
![]() |
![]() |
#14 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#15 | |
Member
![]() Posts: 14
Karma: 10
Join Date: Feb 2019
Device: None
|
Quote:
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 |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |