Lines added during external folder sync (rtf)

Whenever I edit an RTF file from External Folder Sync in Word and sync back into Scrivener, three newlines are added: two at the top of the file and one at the bottom.

Thanks for the report, looks like this one has been around, in some variation or another, for a while now, and has spread to other file types too.

I don’t know if this could help, but :

Syncing with LibreOffice I got those.
But I was quickly able to determine that it was actually due to LO-Writer introducing his own header and footer space to my document.
Removing the header and footer from my file inside LO-Writer had the RTF file return to Scrivener without the extra blank lines.

1 Like

Thanks, it does look like that may be the root of the problem with RTF. It should not be importing the header or footer at all, of course, whether empty or with content. I tried in another word processor, and that one must export them using a different method. The header content still got imported if I deliberately added one, but prepended directly into the first paragraph. Subsequently if I didn’t add any content (as I shouldn’t for a sync file), I never got any additional newlines.

That still doesn’t explain why all of the other formats do similar, though. It’s funny that this seems related to importing too much RTF code, but plain-text adds lines anyway, where there would be no RTF code to import.

LO actually re-renders his header/footer space as simple carriage returns.

Are you sure? I’m seeing the proper coding in place to designate the line as a header or footer. Here is the text itself:

{\header\pard\plain \s21\tqc\tx4819\tqr\tx9638\noline\ql\ltrpar{\loch
INSERTED HEADER}
\par }

Scrivener should be ignoring paragraphs inside a \header range like that. Otherwise I don’t know how LibreOffice itself or any other word processor would know how to open its RTF files with header/footer info, if it printed them as regular paragraphs.

Inked2022-03-29 18_11_45-Window_LI

Sync to LO…
And back :

image

That’s not LibreOffice though, you’re looking at Scrivener’s interpretation of LibreOffice’s RTF file—that’s a very important difference.

It’s okay though! I don’t need any further clarification—I can see precisely what is happening at the RTF code level which is all that really matters. Thanks for the pointer to that area of the file.

1 Like

:man_shrugging: No

You’re the genius here. I’m just the guy willing to help.
:wink: