Compiling to EPUB Book Flipping Direction

I am a new user. still testing before I decide to buy. So far I like everything about Scrivener but I am facing two issues.

  1. I write in Arabic (right to left), When I compile the file to EPUB book, I get the book flipping direction from left to right!! How can I fix that? I need the epub book flipping direction to be from right to left since I am writing with right to left language “Arabic”
  2. Is there a way to put a text inside a box with a different background color? i.e. box outline color orange, box background is light grey and the text inside is black
  3. I noticed that styling options are for paragraphs! Is there any styling styles for words or sentences that I choose instead of full paragraphs?

Thank you so much in advance and I really hope I can find answers, I really want to buy this app because I really like it but resolving those issues are very important for my work.

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”.