Compile as HTML

Please, do not get me wrong, I love the application, but why the HTML code it outputs when I try to compile as HTML/XHTML is so horrid? Why use extraneous and redundant inline CSS in near EVERY tag? Why wrap everything inside

into s? I am posting this in Windows forum, but I am reasonably sure, Mac version does the same thing as well.
I just spend an hour trying to clean up the code in sample chapters, which I am uploading on my site, so I would not be ashamed if someone opens an inspector and sees the HTML from 1995.

We don’t produce HTML output ourselves, the text engine is responsible for doing that along with most other conversions to different formats. If you want clean HTML output though, I wouldn’t consider using any kind of rich text environment’s tools as the starting point. The two systems are dissimilar enough to make some of what we consider code clutter a practical necessity. If you want good output, it’s better to use a system that more closely maps to HTML/CSS, such as Markdown for the writing (or MultiMarkdown, which Scrivener supports directly).

You don’t have to output CSS…



Thanks, I’ll check on the Mac, when I get home. On Windows the options are very different:

Could you elaborate on that? Which text engine?

On macOS it is just that, macOS itself handles the basics of text editing and conversion (we use a different library to handle the word processor formats). You’ll get very similar results if you copy and paste your text into TextEdit and then choose to Save As HTML.

You can usually tell what engine is responsible for building HTML by looking at the header information for the “Generator” meta-data field.

<meta name="Generator" content="Cocoa HTML Writer" /> <meta name="CocoaVersion" content="1504.6" />

On Windows it is the programming toolkit used to create the software, Qt4.