Thank you for new Style & Compile system

User avatar
Posts: 95
Joined: Thu Jun 02, 2011 2:54 am
Platform: Mac
Location: Virginia, USA

Fri Dec 08, 2017 12:16 pm Post

I just finished spending bits and pieces of the past week tinkering with the new style system and creating new custom formats. I abandoned Scriv2 in part because the lack of styles made editing a bit of a PITA, and for a while wrote in Markdown, compiled to LaTeX or ePub on my own. When I saw Scriv3 released I promised myself to give it a go.

The current style system appears to be a game changer. It is a bit clunky when mapping to the ePUB/MOBI layouts, but that only took a few minutes to figure out by decompressing the ePUB to HTML and inspecting in Chrome. I would like to be able to set the HTML tags (not just the styles) for accessibility reasons, and wish it were HTML5 than XHTML; but I assume there are limitations using the ePUB format that would undermine my nits. :)

All this to say: thank you for styles. It is a marked improvement over Scriv2. Thank you for the new compile system; another marked improvement over Scriv2.

User avatar
Site Admin
Posts: 20762
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall

Fri Dec 08, 2017 2:37 pm Post

Thanks for the kind words, glad you're liking it!

The ePub HTML is HTML5 - ePub requires HTML5 XTHML. (All the text has to go through MultiMarkdown as an intermediary to achieve this, given hat there are no good rich text > HTML5 converters out there for Apple's text system.)

What do you mean about being able to set HTML tags, by the way? There is quite a lot of control over this. You can add named <div> sections around section layouts, for instance.

All the best,
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

User avatar
Posts: 1243
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Fri Dec 08, 2017 3:22 pm Post

If you want to add HTML tags the easiest is to use styles with prefix/suffix, for example you can create an "Info Box" paragraph style in the editor, then in compile format make a style with the same name and add the <div class="infobox"> and </div>
Screen Shot 2017-12-08 at 23.00.16_SML.png
Screen Shot 2017-12-08 at 23.00.16_SML.png (7.91 KiB) Viewed 1682 times

Then add this CSS:

Code: Select all

.infobox {float:right; width: 25%; padding: 20px; border: 1px solid #EEE;background:#DDD;}
.infobox::before {content: "INFORMATION: ";}

And you will get a floating information box in your EPUB:
Screen Shot 2017-12-08 at 23.25.26.png
Screen Shot 2017-12-08 at 23.25.26.png (159.92 KiB) Viewed 1679 times