EPUB and tweaking

Request new features or suggest modifications to existing features of Atlantis.
Post Reply
rstroud
Posts: 251
Joined: Sun Mar 04, 2012 3:07 pm
Location: Tennessee
Contact:

EPUB and tweaking

Post by rstroud »

I am a devoted Atlantean. I have a request, not a complaint.

Please, please change the way that Atlantis handles paragraph code when it creates the epub.

Here is what happens now.

The CSS has a nice, clean bit of code like this to establish the basic paragraph style:

p{text-indent:0;margin-left:0;margin-right:0;margin-top:.17em;margin-bottom:0;font-family:"Gentium Book Basic";font-size:109%}

Other paragraph code is different if it needs to be. Consequently, the CSS may have paragraph style code like:

.p2{margin-left:3em;text-align:justify;margin-top:1em}
.p3{text-align:center;margin-top:1em}

The problem is that the Nook (and the Kindle, too, if you convert the epub to Kindle format) does not follow the original basic paragraph style that includes text-indent:0. The Nook indents the first line if the CSS does not have specific code that tells it to use a text-indent of 0.

Consequently, I always have to tweak the paragraph styles. For example, to make the p2 and p3 styles above work correctly, without first-line indents, I have to tweak the code by adding the text-indent code:

.p2{text-indent:0;margin-left:3em;text-align:justify;margin-top:1em}
.p3{text-indent:0;text-align:center;margin-top:1em}

Could you not just repeat the text-indent code for each paragraph style, instead of assuming that each paragraph will inherit any attribute that is not changed? I say this because the Nook and the Kindle screw things up badly by indenting the first line. You end up with "centered" titles that are too far to the right, and with a first line indent that is not supposed to be there.

Please think about making this change.

Roland
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi,
Which version of Atlantis are you using? Have you tried using the latest beta version as available from http://www.atlantiswordprocessor.com/en/beta/?

If I use this latest beta version, I am not getting any of the indent problems you have with either the Nook for PC or the Kindle Previewer, or any other previewer like ADE.

If you are using the latest beta version and still getting unintended indenting in the previewers, could you please send a problem EPUB file with source document to support@AtlantisWordProcessor.com?
Thanks.

Cheers,
Robert
User avatar
admin
Site Admin
Posts: 2926
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

Yes, could you please email your tweaked EPUB file to support@AtlantisWordProcessor.com?
rstroud
Posts: 251
Joined: Sun Mar 04, 2012 3:07 pm
Location: Tennessee
Contact:

Tweaking

Post by rstroud »

Yes, I will do so later today or this evening. I will create a good example of what I am talking about, and send it to you.

By the way, you are quite right that the PC readers do not exhibit this behavior. I think that the epub readers (even for the Nook) follow the epub specification, whereas the Nook itself does not. I sometimes use KindleGen to create Kindle-format files, and I have not observed the phenomenon within the Kindle previewer.

For the Kindle itself, though, the problem is a well-known one. Information about the automatic indent of the first line of a paragraph is discussed widely on the internet in regard to the Kindle. The usual workaround (which I find unacceptable) is to define a very tiny first-line indent (0.01") in all paragraphs that you intend to have "0" indent of the first line.

For the Nook, it is harder to find information on the internet about this problem, probably because the Nook is just one of various readers that use the epub format and maybe the other readers do not show this behavior. However, I have dealt with the issue for over a year and have been routinely having to fix the problem by editing the CSS in Sigil or Tweak. Just an FYI, I have been a hobbyist programmer for twenty years in C, Pascal/Delphi, and HTML.

As I said, I will send you an example later. Let me create a short and simple one.

In the meantime, you might check these links:

http://www.newselfpublishing.com/WordKindle.html

http://bookclubs.barnesandnoble.com/t5/ ... -p/1328983

Roland
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Have you tried using the following code:

Code: Select all

indent: inherit !important;
And/Or

Code: Select all

text-align: inherit !important;
for the "descendent" paragraphs that you intend to have "0" indent of the first line?
How does the Nook behave then?
rstroud
Posts: 251
Joined: Sun Mar 04, 2012 3:07 pm
Location: Tennessee
Contact:

Post by rstroud »

Robert,

Thanks for the suggestion. I will try it, out of curiosity, just to see if makes any difference. My gut tells me that it will not. The Nook (and the Kindle also) apparently has a built-in default behavior to indent the first line unless the style that governs that paragraph has a specific value for the first-line indent (text-indent:0).

I have just sent a six-page document to admin in which I demonstrate in detail the behavior in question.

My method of tweaking so far has been to create a 'p' style like <p class="p7"> for any paragraph that is not supposed to have a first-line indent. Then I define .p7 in the CSS with a 'text-indent:0' specification.

I should note, for any who do not know, that the various PC viewers like Calibre, Nook for PC, and Sigil do not show the same behavior as the Nook itself.
User avatar
admin
Site Admin
Posts: 2926
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

Thanks for the VERY detailed report (I hope you do not mind making it public for everyone following this topic).

This issue has been addressed in the latest build of the current Atlantis beta version.

Please choose the "Help | Check for Updates..." menu command of your Atlantis beta to upgrade.

Thanks a lot, Roland.
rstroud
Posts: 251
Joined: Sun Mar 04, 2012 3:07 pm
Location: Tennessee
Contact:

Problem solved!

Post by rstroud »

Wow, that was fast! You guys are really impressive. When I posted the issue a few days ago, I never thought that you would address it so fast.

Yes, the beta that you have made available today (1.6.5.10 beta b3) takes care of the problem. I have not tried the generated ebook on the Nook, but I know that you have corrected the problem, because I have checked the CSS code that this latest beta generates. The code is identical to what I know works.

And I have no problem with making my detailed report available to anyone who wants to look at it. In fact, I feel gratified that you have done this.

Roland
User avatar
admin
Site Admin
Posts: 2926
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

Robert has discovered a bug in the b3 build of the Atlantis beta. First line indents were not saved correctly if a source document contained "many paragraphs" with a non-nil first line indent. There is a newer build with a fix - b4. You can upgrade through the "Help | Check for Updates..." menu command of Atlantis.
rstroud
Posts: 251
Joined: Sun Mar 04, 2012 3:07 pm
Location: Tennessee
Contact:

Interesting

Post by rstroud »

Thanks to Robert for finding this.

Interestingly, I think the code that Atlantis (1.6.5.10 beta b4) now produces is identical to what I had been doing when I manually tweaked everything.

Mostly out of my ignorance, I just left the basic <p> code alone (I left text-indent:0 in it) and then:

(1) I added text-indent:0 wherever it was needed;
(2) I did not use <p> for any paragraph styles

and it worked.

That appears to be what 1.6.5.10 beta b4 now does.

Again, I commend Atlantis for its attention to this issue.

By the way, you might want to look at my review (favorable!) of Atlantis on a screenwriting board where I am a member.
User avatar
admin
Site Admin
Posts: 2926
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

Thanks for your review, Roland!
User avatar
admin
Site Admin
Posts: 2926
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

By the way, a note regarding one of the comments on your review. Atlantis Word Processor has nothing to do with Microsoft RichEdit.
rstroud
Posts: 251
Joined: Sun Mar 04, 2012 3:07 pm
Location: Tennessee
Contact:

Atlantis and Microsoft RTF

Post by rstroud »

Admin,

Thanks for clarifying that Atlantis has nothing to do with Microsoft RichEdit.

I did not dispute the claim of the person over on the Done Deal Pro screenwriting board, when he said that Atlantis uses the Microsoft RichEdit component, because I really did not know.

However, I will point that out in the thread on the screenwriting board, and I will do it today.

Roland
rolandraystroud@gmail.com
Post Reply