Removing annotations leave extra line feeds

I use Scrivener (3.1.4) for organizing class teaching notes. A few of the documents that are part of the custom template begin with multiline annotations (8-10 paragraphs of 1-2 sentences) at the top of the page that contain reminders about various things.

When I compile to DocX, I check “Remove annotations” and the annotations are removed, but left in their place are multiple line feeds that I would like to get removed. I found this post from Jan 2012 that had the opposite problem – the line feed was being removed with the annotation and this was classified as a bug.

Compiling to other RTF and PDF shows the same problem. Is there a way to get the excess line feeds removed during compilation?

Not sure why that would happen, could change annotations to comments and even highlight by certain colors. Can remove comments at time of compile and might not have same issue. Option if no one comes up with obvious solutions. The other thing is look in template at invisibles (View> Text Editing>Show invisibles)
to make sure template does not have some hidden lines in format.

I would make the template a folder or a document stack, with the first document in the stack being your annotations, with the rest of your current template as sibling(s) below it. Then I’d edit in Scrivenings view. When it comes to compile, you simply exclude or include the annotations document as necessary.

I’m a Mac user, so I don’t know if there are any gotchas with that on Windows.


The first thing I can think of off the top of my head is that multi-line annotations were only somewhat supported until fairly recently, in the Windows version. If you created them prior to that point they may still be “one per line” even if they look otherwise, and thus leaving behind newlines between the annotation lines.

So first I would try selecting the whole block, removing the annotation from it, and then applying it again, and see if that works better for you.

The second thing may be entirely unrelated to annotations. If your “New Pages” settings for the Section Layout has page padding enabled, that will insert a fixed number of newlines. You can check that by double-clicking on your compile Format in the left sidebar, selecting the Layout used for this type of item, and checking the Pad top of page with n blank lines setting, in the New Pages tab.

Thanks for everyone’s replies.

I looked at the New Pages settings for the section layout and the padding parameter was already set to zero.

I looked closer at what was happening and learned that Scrivener is not treating a multiline annotation as one annotation, but as individual annotations that appear as a single annotation in the editor. The extra line feeds I am seeing are caused by blank lines in the body of the annotation. If the annotation contains no blank lines, then I do not see the extra line feeds. Otherwise, there is one line feed left behind for each blank line (defined as two consecutive pilcrows) in the annotation.

I would count this as a bug in Scrivener’s annotations handling during compilation. Everything displayed as a single annotation in the editor should be removed if “Remove annotations” is checked for compilation.

Edit: I did try selecting the entire annotation block, removing the annotation, then reselecting the block and reapplying the annotation. It made no difference in whether the extra line feeds appeared in the output.

Edit 2: I also edited and resaved the template, then generated a test project with the revised template and the results were the same.

As an alternative, you could use a character attributes style to remove your annotations. This might give better results in your case. (?)

I tried and tried and tried again, I can’t reproduce your issue.

Ah ha, thanks, that is what I was missing. I tried with a more “traditional” sequence of word processor style paragraphs instead of Markdown-ish empty-line spaced paragraphs.

Yes, and testing leaving the annotations in we can also observe that the markers are placed around each paragraph instead of at the very beginning and end of the sequence.

Looks like we have a little more work to do there.

The workaround of using a delete-me style, as mentioned above, is one approach. If you want to stick with annotations though (as I would, given their unique properties and dedicated feature set), something you can try using is Shift+Return to insert line breaks instead of full newlines. In my testing that works fine. The main question there is whether these are ever meant to go beyond Scrivener and into a plain-text processing environment (like Markdown), as life feeds tend not to mix well with those.