[NB] "Body Text" style and compiling to html -- with a workaround

I have a need to add

tags to every paragraph during compile. In researching this, I found one of Amber’s excellent posts here: https://forum.literatureandlatte.com/t/compile-to-html-custom-css/40976/1 which applies to the Mac version.

“Body Text” doesn’t seem to be an option in the Windows beta, which I’ve been assuming is because it just isn’t implemented yet. But it occurred to me that maybe I should post about this in case it is a bug, and also to offer others the workaround I’ve been using.

The workaround is very simple. I’ve created a style named “

” and set “next style” as

as well, and when I’m setting up a document to compile to html, I simply start with that style and return to it if I use another. Then I set up the style in compile to add the

tags. If "Body Text ever becomes available, it will be a simple matter to remove the

style from the project.

I hope that’s useful to someone.

“Body Text” isn’t a style for a good reason. In Scrivener, it’s “No Style” as set in the Options, or under Project > Project Settings… > Formatting, because then different parameters in terms of font, size, etc. can be set during compile. I presume—because it’s not something I’ve had to do, your

markers will be added to “body text” when you compile to one of the HTML based formats, “Web Page”, eBook, etc.



First, compiling to HTML automatically puts

in the text. It also adds the

. You get correct xhtml with matching tags, even.

Second, “body text” doesn’t exist. It’s “No Style.” This is intentional. Not a bug. Left out deliberately.
No Style acts a lot like a style (with some major exceptions). You can set what it is for every Scrivener project you write. Even different ones for different projects (though it takes a few more keystrokes for each such different project).

To set No Style to the text you want to be your default for everything, type F12 (unless you’ve changed the keystroke for it), click the Editing tab, click the Formatting tab, and set your new text style. Once you’ve done this, everything you type will be in that format unless you click into a document that’s already formatted.

And, if you change No Style to something else, all your former typing will not change; you have to go in there specifically and change them all to No Style. So do it once to create style with a fontface and settings you like, and forget it.

If you need to change a project’s “No Style”, in the top menu choose “Project.” On the menu, pick “Project settings.” In the dialog box, choose formatting (about the 4th item down the left side), click the box that says “Use different formatting…”, and choose a different font and other settings.

Now, that said, you can create your own style called “body text.” If you absolutely must. You can even use it. It’s not advised by L&L’s team (if I ever knew why, I don’t now, but still, it’s not advised).

However, I do suggest giving “No Style” a chance. “Body Text” was dropped in favor of simply defaulting to a default formatting (not a style. It’s a default format).

Here’s some out put from HTML compile:

[code]<?xml version="1.0" encoding="utf-8"?>

Mary had a little lamb,

little lamb,

Little lamb.

[/code] And as you can see, the


are already there. (decorated with spans and other stuff, but they're there).