Chapter titles lacking in .odt and .rtf output

I’ve used Scrivener to write The Novel Which Is Sure To Be A Bestseller, now it’s time to send the draft to my editor. I’ve used the Contents pane and the Formatting pane to give each document (each document is a chapter) a title. I’ve used the little formatting box in the bottom half of the Formatting pane to assign an appropriate size, and centering, to titles.

Then I compiled the novel to .rtf and .odt formats. The result is pretty output in Kingsoft Writer (for .rtf) and LibreOffice (for .odt), with each chapter starting on a new page, and each chapter beginning with a nice, big, bold, centered title.

Unfortunately, the titles are tagged as “Default Style” for .odt format in LibreOffice, the same as all the other text. Similarly, the titles are tagged as “Normal” for .rtf format in Kingsoft Writer. :frowning:

As a result, the Table of Contents generators in these programs can’t find the chapter titles, so the Table of Contents they produce is empty. :frowning:

What should happen is that titles should be tagged in the .odt and .rtf as “Header 1” (and, presumably, deeper documents as “Header 2”, etc.) so that the Table of Contents generators in these applications can find the chapter titles, section titles, etc. Furthermore, having properly tagged output would allow us to modify the formatting of chapter titles, etc., in LibreOffice or whatever program we want to use to post-process our masterpiece.

:question: If there is an easy way to produce properly tagged output in .rtf and .odt format, please point me to the relevant instructions. If not, please let me know, and I’ll submit a bug report.

Thank you,

  • Peyton

More information:

I just tried .html output, with the same result. Chapter titles are tagged with <p style="… lots of attributes …> :frowning:
instead of the more desirable


or better yet, using an internal style sheet to define the style for

once at the top of the file, which would result in much shorter HTML.
See http://www.w3schools.com/html/html_css.asp

  • Peyton

There is no reason to submit a bug report. Scrivener was never designed to output to stylesheets. There has been much discussion on this in the past, so if you wish to search the forums to brief yourself on why that is historically, you may. You may also find numerous posts with tips on how to apply a stylesheet to a document that does not have one. These are more likely going to be found on forums for that word processor doing the conversion, but in principle it is always the same: they have some way of bulk selecting text with the same type of formatting, and once you have a bulk selection you can apply a stylesheet with a single click. For most books, that means only two or three operations.

Toward the future, stylesheet support is on the list of planned features. As for HTML, that’s the output we get from the Qt text engine, we have very little control over anything it does, unfortunately. Our best means of altering it amount to search and replace, so it is better for small things.

We do have a fully semantic output approach, that will give you stylesheets as well as properly formed HTML files, but that is all through the MultiMarkdown engine. If you’ve ever written using Markdown you will know what that is like. With that, you would compile as FODT and use LibreOffice to convert it to RTF. It’s a really high-quality result, but like I say, requires a different approach to writing where everything is in plain-text, no formatting.

This all said, does your editor need stylesheets? Authors using Scrivener have been working without them for going on eight years now, and the only time this topic typically comes up is in academia or self-publishing, where one has to handle much of the formatting themselves. For a copy to the editor though, one usually just needs a simple document. It might be worth checking into that, and saving yourself the effort. Another thing to consider is that if all you need is a table of contents, you can throw a static one in using Scrivener. Just create a contents section in your Binder, select all of the items that should be included, and use the Edit/Copy Special/Copy Documents as ToC menu command. Paste that into your draft, and use RTF to get proper page number links out of it.

This post uses Microsoft Word as the example word processor, but it should give you the gist of how you can go about creating hooks for the stylesheets during compile.