As can be seen, Section I and Section II have the same section type (Seção/section), and their respective subsections also have the same section type—Subseção/Subsection 1.
Then, it is evident that they should output the same result.
However, when I output it to .docx, I get this result. Microsoft Word sets an empty line and considers it a heading, but that only happens after Section I, not Section II (which is what I want). See the outline to the left.
I have no clue what is going on. The section breaks are the same in the compile format, but it shouldn’t matter because, as I mentioned, the section types are identical in both parts of the paper.
Also, there is no empty line inside Scrivener, and the styles applied to <$title> are identical.
Here is the break between Section I and the “Context” subsection. The first <$title> is styled as Heading 1 and the second is styled as Heading 2.
Are you putting the “title” placeholders directly in the Scrivener Editor? Or using the Section Layout to supply them?
The fastest way to address this may be for us to look at the project directly. Please open a support ticket, here: https://www.literatureandlatte.com/contact-us
You can email a project by using the File → Backup → Backup To command, and checking the box to create a ZIP backup.
I put all of them directly in the Scrivener Editor because someone (I think it was AmberV) told me I could transform them into Word’s styles by using Scrivener’s styles “Heading 1, 2, etc”.
Have you checked that the titles themselves in the binder don’t have a stray Return on the end? It wouldn’t show in the editor placeholders, but it would be included during compile once that placeholder turned into the actual title text, and it would be formatted with the same header style.
Try double-clicking on one of the titles that has the unwanted empty line after it and use the arrow keys to see if there’s an extra blank space at the end, then use the Delete key to remove it if so.
If you find that’s the case, you can wipe out all of them with Edit ▸ Find ▸ Project Replace (make a project backup first, just for safety’s sake!):
Setting the dropdown to Regular Expression,
Replace: \s$
With: leave this empty
Make sure that only “Titles” is ticked in the Affect list, then run the replacement. This will strip all empty space from the ends of the document titles.
Katherine, from the LL support team, helped me solve the issue. I had been using title placeholders (<$title>) directly in Binder items to turn them into headings in Word. However, this required manually formatting them as “Heading 1” in Word to make them appear in the document map.
It turns out there’s a much simpler way: use Section Layouts in Scrivener. Instead of inserting <$title> manually, I only had to enable the “Title” option in the Section Layout settings and configure the formatting in the Compile settings. This way, the titles are automatically formatted as Word headings during compilation.
I had to wrestle a little with Separators, but it worked out in the end.