Google Play Ebooks, centering issues, and added blank pages?
-
brighteyes70s
- Posts: 22
- Joined: Sun Feb 15, 2015 6:00 pm
Okay, see if you can get what you need from this one...If not I can resave it as as rtf file.
- Attachments
-
- sampleforatlantisforum.docx
- (722.83 KiB) Downloaded 1309 times
Could you please try uploading this modified version and see if it agrees with Google Play?
- Attachments
-
- sampleforatlantisforum(2).epub
- (641.01 KiB) Downloaded 974 times
-
brighteyes70s
- Posts: 22
- Joined: Sun Feb 15, 2015 6:00 pm
Nope! Well, somewhat. The title is centered, but the word by, author, and the copyright statement is left justified.
As I scroll through the submitted sample epub, the words License Notes, All Ebook Editions, and Author Note are all left justified *but* the paragraph right below each of those words IS centered.
None of the Table of Contents is centered.
The word Introduction is centered, and the accompanying text is fine (left justified with the .3 indent)
The same can be said for the title Aquaman as well as the text below it.
However, once you get to "Button World Aquaman Pin" and the text right below that, everything is left justified.
As I scroll through the submitted sample epub, the words License Notes, All Ebook Editions, and Author Note are all left justified *but* the paragraph right below each of those words IS centered.
None of the Table of Contents is centered.
The word Introduction is centered, and the accompanying text is fine (left justified with the .3 indent)
The same can be said for the title Aquaman as well as the text below it.
However, once you get to "Button World Aquaman Pin" and the text right below that, everything is left justified.
What about this EPUB file?
- Attachments
-
- sampleforatlantisforum(3).epub
- (641.01 KiB) Downloaded 958 times
-
brighteyes70s
- Posts: 22
- Joined: Sun Feb 15, 2015 6:00 pm
-
brighteyes70s
- Posts: 22
- Joined: Sun Feb 15, 2015 6:00 pm
The good thing about Google is that their updates happen fast. I just checked the second file you sent me and that fixed things perfectly. Every bit of text is aligned in the sample like it's supposed to be. What did you do? And is this something that needs to be fixed via my document, or is this some kind of coding/compatibility thing that will be remedied with the next Atlantis update?
Glad to hear that the test file displayed as you expected.
First, it must be said that the EPUB code produced by Atlantis is perfectly valid. Only Google Play has some fancy specifications of its own regarding CSS.
So I am not sure that the Atlantis developers will be prepared to change the way Atlantis codes the EPUB files, just to accommodate Google Play.
Anyway, in the meantime, you might want to tweak the EPUB code produced by Atlantis yourself.
For this, first read this help page:
Modifying EPUB files
After you have installed the <b>tweak_epub</b> utility on your system, here is what you need to do to placate the people at Google Play. Basically, you need to add code that says “center that paragraph on the page” to all the appropriate lines in the EPUB code.
Let’s take “sampleforatlantisforum.docx” as an example.
Open it in Atlantis, and save it as EPUB. You should get attached “sampleforatlantisforum.epub”.
Now execute "tweak_epub.exe", direct it to “sampleforatlantisforum.epub”, and open it in “Tweak EPUB”.
You should get this:

Select “002.html” and click “Edit File…”
Within the code of this file, you’ll see this:

The paragraphs that you want centered onscreen are associated either with the “.h11” or with the “.p4” CSS class.
Now, go back to the Tweak EPUB main window, select “style.css”, and click “Edit File…”
In “style.css”, the code associated with “.h11” is “.h11{text-indent:0;page-break-after:avoid}”; the code associated with “.p4” is “.p4{text-indent:0}”.
Normally, and this is the case with ADE and Kindle, the “.h11” and the “.p4” default properties are inherited from their “parent” style, i.e. “h1” and “p” respectively. If you look at the “h1” and “p” lines of code, you should notice that they both include “text-align:center;” in their properties. Accordingly, the eReaders should associate their derived styles (“.h11” and “.p4”) with “text-align:center;”. But the Google Play EPUB parser simply ignores this kind of inheritance. In other words, you need to include “text-align:center;” (without the quote marks) in the properties of all the style classes that are associated with paragraphs that you want centered. This is what I did in “sampleforatlantisforum(3).epub”. If you open it in Tweak EPUB, select its “style.css” file, and click “Edit File…”, you’ll see that all the classes associated with paragraphs that you want centered include “text-align:center;” in their properties:

I have added this “text-align:center;” property myself manually with the help of Tweak EPUB and Notepad++.
But we should not have to do this. The Google Play EPUB parser is nonstandard in this respect.
Note that the Algerian and Brittannic Bold fonts are most likely unsupported by the current eReaders. Unless you embed these fonts in the EPUB file, they will be substituted with other fonts with unpredictable results.
HTH.
Cheers,
Robert
First, it must be said that the EPUB code produced by Atlantis is perfectly valid. Only Google Play has some fancy specifications of its own regarding CSS.
So I am not sure that the Atlantis developers will be prepared to change the way Atlantis codes the EPUB files, just to accommodate Google Play.
Anyway, in the meantime, you might want to tweak the EPUB code produced by Atlantis yourself.
For this, first read this help page:
Modifying EPUB files
After you have installed the <b>tweak_epub</b> utility on your system, here is what you need to do to placate the people at Google Play. Basically, you need to add code that says “center that paragraph on the page” to all the appropriate lines in the EPUB code.
Let’s take “sampleforatlantisforum.docx” as an example.
Open it in Atlantis, and save it as EPUB. You should get attached “sampleforatlantisforum.epub”.
Now execute "tweak_epub.exe", direct it to “sampleforatlantisforum.epub”, and open it in “Tweak EPUB”.
You should get this:

Select “002.html” and click “Edit File…”
Within the code of this file, you’ll see this:

The paragraphs that you want centered onscreen are associated either with the “.h11” or with the “.p4” CSS class.
Now, go back to the Tweak EPUB main window, select “style.css”, and click “Edit File…”
In “style.css”, the code associated with “.h11” is “.h11{text-indent:0;page-break-after:avoid}”; the code associated with “.p4” is “.p4{text-indent:0}”.
Normally, and this is the case with ADE and Kindle, the “.h11” and the “.p4” default properties are inherited from their “parent” style, i.e. “h1” and “p” respectively. If you look at the “h1” and “p” lines of code, you should notice that they both include “text-align:center;” in their properties. Accordingly, the eReaders should associate their derived styles (“.h11” and “.p4”) with “text-align:center;”. But the Google Play EPUB parser simply ignores this kind of inheritance. In other words, you need to include “text-align:center;” (without the quote marks) in the properties of all the style classes that are associated with paragraphs that you want centered. This is what I did in “sampleforatlantisforum(3).epub”. If you open it in Tweak EPUB, select its “style.css” file, and click “Edit File…”, you’ll see that all the classes associated with paragraphs that you want centered include “text-align:center;” in their properties:

I have added this “text-align:center;” property myself manually with the help of Tweak EPUB and Notepad++.
But we should not have to do this. The Google Play EPUB parser is nonstandard in this respect.
Note that the Algerian and Brittannic Bold fonts are most likely unsupported by the current eReaders. Unless you embed these fonts in the EPUB file, they will be substituted with other fonts with unpredictable results.
HTH.
Cheers,
Robert
Last edited by Robert on Tue Mar 10, 2015 2:57 am, edited 1 time in total.
Sorry. I forgot to attach “sampleforatlantisforum.epub”. Here it is.
- Attachments
-
- sampleforatlantisforum.epub
- (641 KiB) Downloaded 1027 times
-
brighteyes70s
- Posts: 22
- Joined: Sun Feb 15, 2015 6:00 pm
Yowza. I didn't realize that much would be involved. I have other books with multiple spacing differences on Google Play that I created with Calibre and they don't seem to have those spacing issues. If the Atlantis developers *did* decide to include this additional code for Google Play, would it adversely affect spacing issues from other distributors such as Amazon, Nook, etc.?
Let’s take a silly example to illustrate this.
Suppose that you have the following sentence on a poster at the entrance of a library:
“All our books are hardbound.”
Would you ask the librarian “is your copy of Moby Dick hardbound?” You wouldn’t, would you?
Things are similar in CSS, and in RTF or DOCX documents for that matter. All style sheets are “cascading” style sheets. This means that there are parent and derived (child) styles. The child styles inherit the properties of their parent style(s), unless otherwise specified. This is automatic. This is by default design. And this is completely ignored by the Google Play parser. The Google Play parser wants EPUB code where the paragraph alignment is specified for each new paragraph. Especially for centered alignments, or so it seems.
Now if the Atlantis developers *did* decide to include such additional code for Google Play, it would clutter that code needlessly. But it should not have any negative impact on the way such EPUB files would display in Amazon, Nook, etc.
If the eBooks you created in Calibre don’t have any issues with the way the paragraph alignment is coded, could you please post such a sample eBook? We could examine how Calibre codes the paragraph alignments.
Suppose that you have the following sentence on a poster at the entrance of a library:
“All our books are hardbound.”
Would you ask the librarian “is your copy of Moby Dick hardbound?” You wouldn’t, would you?
Things are similar in CSS, and in RTF or DOCX documents for that matter. All style sheets are “cascading” style sheets. This means that there are parent and derived (child) styles. The child styles inherit the properties of their parent style(s), unless otherwise specified. This is automatic. This is by default design. And this is completely ignored by the Google Play parser. The Google Play parser wants EPUB code where the paragraph alignment is specified for each new paragraph. Especially for centered alignments, or so it seems.
Now if the Atlantis developers *did* decide to include such additional code for Google Play, it would clutter that code needlessly. But it should not have any negative impact on the way such EPUB files would display in Amazon, Nook, etc.
If the eBooks you created in Calibre don’t have any issues with the way the paragraph alignment is coded, could you please post such a sample eBook? We could examine how Calibre codes the paragraph alignments.
-
brighteyes70s
- Posts: 22
- Joined: Sun Feb 15, 2015 6:00 pm
I tried to upload a sample epub that I created from one of my toy book volumes. I didn't have as many page breaks in this volume, but I still had different spacing throughout and Google Play seemed to pick it up. I'm pretty sure I did this with Calibre since it is dated January 2014 in the file properties and back then I hadn't even heard of Atlantis yet. Back then all I used was Word (Using .doc save files in the Word 97-2003 format), and then when I made Epubs all I fooled around with were Calibre and Sigil. Anyway, is there another way I can get this to you? Because it's a little over the allowed file size extension due to the included pictures. Not by much, but a little, so it's not allowing me to add it as an attachment.
Try uploading your sample EPUB file to File Dropper, and share the link with us.
-
brighteyes70s
- Posts: 22
- Joined: Sun Feb 15, 2015 6:00 pm
The code in “VolumeIIIGOODREADSSAMPLEONLY.epub” completely ignores the CSS classes and uses direct markup throughout. This is really substandard and it is also a good way to bloat code!
Styling information that is applied to multiple objects in a document should be done through CSS classes.
Maybe the Atlantis developers will put in a word about this later on.
Styling information that is applied to multiple objects in a document should be done through CSS classes.
Maybe the Atlantis developers will put in a word about this later on.
-
brighteyes70s
- Posts: 22
- Joined: Sun Feb 15, 2015 6:00 pm
Okay. Well, on my end I've contacted GooglePlay. The cst. service rep. I was working with gave me the information from the developers, and I've given him a few suggestions made by you to pass on. Hopefully they'll get on the ball and do things in a more standardized way. If not, then maybe Atlantis will make a few exceptions one day, or maybe even allow a singular save feature as a "special" option to create a specialized Google Play epub or something that lies outside of the typical coding boundaries.