Carriage Returns in Compiled Headings

I’m not posting this to the bughunt forum because I don’t know if it’s a bug yet.

When I export a complex hierarchical document with the standard “Hierarchical Headings” setting for Word, I get returns inside the heading itself, for example:

2.1





. Character Creation

It happens many times throughout the document, on second and third level headings, in .doc output and .rtf output. I’ve tried fiddling with the heading format and such, but nothing seems to work.

Is this a known bug, a new one, or am I doing something wrong?

So sorry for the late reply here. Could you provide a little more detail about how and where you’re setting up the hierarchical headings for compile? For instance, I just created a sample compile using the Non-Fiction with Sub-Head (Hierarchical) compile preset (selected from the Format As drop-down menu in compile) and the spacing looks correct when opening the RTF in Word 2010. In this preset, the hierarchical numbering is all handled as title prefixes, so none of the numbering is done in the editor. Are you doing something similar? Explaining (or showing via screencaptures) how your documents are set up and what the formatting settings are in the compile tab will help figure out what we need to tweak to get this working (and whether it’s a bug or just a wrong setting somewhere). Thanks!

I found a way around it the previous time, but now, (a year later) I’ve got the same problem again. Here are some screenshots of my custom format, based on the hierarchical one.
scrivener output error.PNG
the structure of the document:
scrivener doc structure.PNG
Some of the formatting panes:

I’ve also tried with the standard “Non-Fiction with Sub-Heads (Hierarchical)” format, and that still has the same problem, though on different chapter headings. I can include the pictures for that in another post, if need be.

And I have updated recently, last week I believe, so I’m not using the same version as when I posted this question originally.

Considering that no one else seems to be having this issue, is there something wrong with how I’m setting up my documents or something?

It should be noted that I’m exporting to HTML most of the time too, to make it slightly easier for me to write scripts to restyle the content, but this is the raw HTML output we’re looking at, before I do anything to it.

I think you’re running into a bug with the page padding. When a document following an assigned page break (via the separators or “page break before”) begins with the <$hn> tag, the page padding is being inserted immediately following the number, rather than before it as it should do.

There are two quick ways I can think of rectifying this until the bug is fixed:

  1. Remove the page padding. :slight_smile: In the compile formatting pane, you’ll see it at the upper right of the preview area. It’s set per document type/level, so not all your documents are likely to have it, but folders for instance probably do, maybe level 1 documents, etc.

  2. Add a temporary marker in front of the <$hn> tag that you can remove after compile by a quick find/replace. Something that won’t occur naturally elsewhere in the project, e.g. !!SHARKBAIT!! (or !!DELETEME!! for traditionalists).

Thanks, that was EXACTLY what I needed.