Compiling to EPUB Book Flipping Direction

Welcome to the forum, and thanks for giving Scrivener a try!

  1. Hmm, yes it does look like the ebook export code is not setting the direction properties in the Mac version—that’s probably a bug or an oversight that I’ll get written up to be fixed.

    There isn’t a really good workaround for this. At first I thought we could fix it with a basic CSS setting on all content, using the direction:rtl attribute on something high level html { direction: rtl; }, but this is generally discouraged and is supposed to be something encoded into the semantics of the document—the HTML itself.

    For example if you load your ebook into an editor like Calibre or Sigil, and take a look at any of the bodyN.xhtml pages, what you would want to see toward the very top is a line like this:

    <html xml:lang="ar" lang="ar" dir="rtl" ...>

    Although you can set the ISO language code in the Metadata tab of the compile pane, this won’t have any impact on the direction itself.

    There is no way to change that in your compile settings, which means at the moment the best fix is to indeed use Sigil or Calibre’s global search and replace to look for <html and replace it with <html dir="rtl".

    There is also the CSS, which could be put into the CSS pane when editing the compile format, and maybe that would be safe to do, but you would definitely want to test it on as many devices or simulators as possible (and in fact upon further reading it might even break the book with some ePub validators as the specification prohibits it).

  2. Have a look at this post, which contains a sample project attached to the bottom. In fact the longer post I wrote a bit above that one contains the description, but the sample project given there is based on a misunderstanding of what what wanted (a margin box instead of a call-out box). The implementation for either is identical, save for the type of CSS used.

  3. Look up the section named “Styles”, in the Interactive Tutorial, found in the Help menu, for a brief introduction to the types of styles you can use. Scrivener indeed supports character styles, those that can be applied to any length of text within or even across paragraphs. The default style set even has an example of one, called “Emphasis”.