Jump to content
Storyist Forums

Styles not coming across to exported Kindle or ePub export files


cyberdave

Recommended Posts

I have a problem, that when I have multiple styles set, so for example, I have a heading, then I have a style for an intro quote, and then a first paragraph style with no indent, and then a body text style with indent for remaining paragraphs until next header is encountered, but when I export I only get the body text style with all paragraphs indented in the resulting .mobi or epub formats. When I look in Storyist though, the styling is correct. So there is something wrong with the export I think. This kind of a major issue as I have a deadline approaching and do not know how to solve this problem.

 

If anyone have a suggestion, please let me know, I am desperate. Cheers, David

Link to comment
Share on other sites

Hi, Dave, and welcome to the forums.

 

This issue has come up before. The problem is that ePub and MOBI files are very primitive, so other than basic text and chapter headings with bold and italic, most fancy formatting doesn't survive the export process. But you can edit the exported file using Sigil or another HTML editor.

 

Steve has posted instructions somewhere in the forums, but offhand, I don't know where they are. Try sending him a personal message (user name Steve), since you are on deadline, and he will point you in the right direction.

 

Helsinki is a beautiful place!

Best,

Marguerite

Link to comment
Share on other sites

Hi cyberdave,

 

Storyist exports .epub and .mobi files with the goal of displaying properly on the widest range of devices, some of which are quite primitive. One of the ways it accomplishes this is to use the device's default formatting where possible.

 

Storyist does a great job of marking up your exported HTML and CSS though, so if you're willing to test on the devices you're interest in supporting, you can edit the intermediate HTML and CSS files and style the text to your liking.

 

You'll find some information about that in the ePub and Kindle screencasts, and on the forums here.

 

If you're interested in targeting Kindle devices, check out Amazon's Kindle Publishing Guidelines. For example:

 

3.1.1 Text Guideline #1: Body Text Must Use Defaults

 

The body text in a reflowable Kindle book must be all defaults. Amazon encourages content creators to use creative styles for headings, special paragraphs, footnotes, tables of contents, etc., but not for body text. The reason for this is that any styling on body text in the HTML will override the user’s preferred default reading settings. Users report such behavior as a poor reading experience. Here are the most important points:

  • Body text must not have a forced alignment (such as left aligned or justified).
  • Body text must use the default font size. Body text should not use the tag or its equivalent in CSS.
  • Body text should not be bold or italicized. Selected parts of the text can be bold or italicized. This guideline only prohibits a book that would be entirely bold, for example.
  • Body text should not have an imposed font color.
  • Body text must not have a white font color. Customers report this as a bad user experience.
  • Body text must not have a black background color. Customers report this as a bad user experience.

 

 

If you're interested in targeting some of the original Kindles, check out Joshua Talent's "Kindle Formatting: The Complete Guide."

 

-Steve

Link to comment
Share on other sites

Hi cyberdave,

 

Storyist exports .epub and .mobi files with the goal of displaying properly on the widest range of devices, some of which are quite primitive. One of the ways it accomplishes this is to use the device's default formatting where possible.

 

Storyist does a great job of marking up your exported HTML and CSS though, so if you're willing to test on the devices you're interest in supporting, you can edit the intermediate HTML and CSS files and style the text to your liking.

 

You'll find some information about that in the ePub and Kindle screencasts, and on the forums here.

 

If you're interested in targeting Kindle devices, check out Amazon's Kindle Publishing Guidelines. For example:

 

 

 

 

If you're interested in targeting some of the original Kindles, check out Joshua Talent's "Kindle Formatting: The Complete Guide."

 

-Steve

 

Hi, ok thanks for the information... I checked the guidelines you sent, and the specific item that I needed was mentioned:

 

 

3.1.3 Text Guideline #3: Formatting Paragraphs

KindleGen automatically indents the first line of every paragraph by default. To change this behavior, use

the text-indent style on the <p> tag. For example:

• <p style=”text-indent:0"> - no indentation of the first line

 

So I take it that when Storyist is formatting the paragraphs which have no indentation to first line, then this special tag is not used by storyist? <p style=”text-indent:0"> - no indentation of the first line // and then this has to be done manually... At least that seems to be the case... Otherwise, there is no point at all to ever do changes to indentation of the Indent to First line of paragraph style setting, if the default indentation cannot be overidden by storyist during export.

 

Cheers, David

Link to comment
Share on other sites

Hi Dave,

 

maybe I am misunderstanding something, but sounds like you are telling me that Storyist exports ok to html & CSS, but kindlegen is not allowing the styles due to some built in validator they are using to automatically change the styles in the html files to some format they approve of. Is that the case?

 

Not quite.

 

When creating a Kindle edition, Storyist doesn't export HTML and CSS to create a WYSIWYG version of your manuscript; it exports a simplified version that complies with Amazon's content authoring guidelines and displays properly on a wide range of devices.

 

There are hooks in the generated HTML markup for customizing the formatting however, and I'd be happy to make some suggestions on how to address specific formatting situations.

 

For example, if you wanted to create a block quote style in your eBook, you would

  1. Create a style named something like "Block Quote" in Storyist for Mac and apply it to the quotes in your manuscript.
  2. Export a Kindle edition. When you do so, check the checkbox that creates the intermediate HTML and CSS files. The generated HTML markup will reference a CSS rule named "blockQuote."
  3. Open the intermedia CSS file named "main.css" and create a CSS rule named "blockQuote."
  4. Specify your desired formatting.
  5. Run kindlegen on the edited intermediate files to create your Kindle edition.

-Steve

Link to comment
Share on other sites

  • 1 month later...

Sorry to dig this one up again, but it saves setting the context again. I'm currently having the same problem, but with an ePub file rather than a Kindle file. I see, as you say, that the HTML does have my block quote text marked up with the correct class, but that class definition is missing from the CSS. I don't have any problem with adding it to the CSS and then re-zipping the file, but I was just wondering what the effect is of Storyist doing this for me.

 

I can understand that the author has a certain responsibility to be aware of the limitations of the devices that the book may be viewed on and any style guides relating to the two formats, but it would be handy if there was a checkbox in Storyist to say, "Yes, I understand the risks, please include my custom styles in the CSS" My BlockQuote style currently just has italics and a bit of "space after". I presume this is all kosher.

 

Thanks, and loving the app,

Stuart

Link to comment
Share on other sites

So I was having a bit of a play around today and solution I've started using to cyberdave's first paragraph problem is to change the CSS for the epub version to have the following:

 

 

h1+p {

text-indent: 0;

text-align: justify;

margin-top: 0px;

margin-bottom: 0.25em;

}

 

p {

text-indent: 0.25in;

text-align: justify;

margin-top: 0px;

margin-bottom: 0.25em;

}

 

All this says is that paragraphs that directly follow chapter titles shouldn't be indented, while all the others should be. Testing on my iPhone shows this seems to work perfectly. I also start some chapters with a BlockQuote so that would need to be handled as well I guess.

 

Stuart

Link to comment
Share on other sites

Hi Stuart,

 

I can understand that the author has a certain responsibility to be aware of the limitations of the devices that the book may be viewed on and any style guides relating to the two formats, but it would be handy if there was a checkbox in Storyist to say, "Yes, I understand the risks, please include my custom styles in the CSS" My BlockQuote style currently just has italics and a bit of "space after". I presume this is all kosher.

 

It would indeed be handy for advanced users, especially now that the major platforms have matured somewhat. This is actually on my list after getting the iPhone version out and addressing some of the other feature requests.

 

Thanks, and loving the app, Stuart

 

Thanks Stuart. Welcome to the forums!

 

-Steve

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...