Compression of text occurs during compile

I originally put this in the Technical Support Forum, but I think it might be a bug, so I’m reposting it here.

When I compile to a .doc, the number of words per line is higher than if I’d simply copied and pasted the text from Scrivener to Word. Or, if I compile it, and copy the text from the compiled .doc and paste into a brand new .doc, it does the same thing.

Basically, it looks like Scrivener compresses the text by around 0.55pt (yes, I did some experimenting). Is there a reason for this compression? Or a way to turn it off? It seems like this sort of thing could lead to an inaccuracy when it comes to page counts based on words-per-page, especially with very large works. Is there perhaps a kerning function that I can’t find that can be turned off?

After doing some more fiddling with compile settings, this happens when the output font is set as Courier New, but not when it’s set as Times New Roman. I’ll see if any other fonts do the same thing.

Has anyone else noticed this? Are there any moderators that might have read my post and have feedback, one way or the other?

So sorry it’s taken a while to get to this! I’ve done some testing and do see the issue you’re getting with the RTF-based compiles, but it looks like this is to do with the the compiler tasks behind the scenes, so I need to bring it up with the developer to get a more thorough investigation. There’s not a clear formatting setting to prevent this (such as adjusting the kerning), since this happens when there are no formatting overrides at all. You may be able to tweak the settings to get the desired output if you do override formatting and then make some adjustments to the font size, but that’s rather a clunky workaround since the font size is, theoretically, coming out just as it should.

I’ll check with Lee on this to see what’s going on with the compiler and how we might be able to avoid it. Thanks for bringing this to our attention, and again, apologies that it took so long to reply to you.

EDIT: Actually, I said that, but looking at this a little more, it appears to be specific to opening in Word–opening the compiled .doc or .rtf file in OpenOffice looks the same as a paste or PDF. There is a bug I’ve noticed where compiled text that should be left-aligned opens in Word marked as though it is left-aligned but obviously justified on the page. I wonder if that’s affecting this, or stemming from the same underlying cause. That also is not a problem in OpenOffice. So I’ll still be checking in with Lee on this, but meantime if you have another word processor to try out (OpenOffice is of course free, as is LibreOffice and various others) you may want to experiment using that so you’re getting the right word-per-line count.

OK, I’ve done some more testing with this, and it seems to come down to MS Word’s incorrect handling of the RTF. Various other word processors read the compiled files correctly, as noted earlier. In fact, MS Word 2002 (XP) also displays it correctly; 2010 does not. I created a few RTF files from other programs, completely skipping Scrivener, and they likewise opened incorrectly in Word 2010. So this isn’t really a Scrivener bug but a bug with how some versions of Word are interpreting the RTF code (which is used for the .doc and .docx formats from Scrivener as well). I don’t have any other versions of Word to test with myself, so I’d be interested to know which version you were using.

Meanwhile, I have found another solution–at least in MS Word 2010, it’s possible to resave the document to .docx and have the formatting corrected, so the correct number of words-per-line appears. Once that’s done you can then again resave to .doc or .rtf from Word to maintain the appearance if you need one of those formats for the final version.

I suppose I shouldn’t be too surprised that the problem exists on Microsoft’s end. I am currently using Word 2010, and I think I’ll probably just stick to using Times New Roman, since I can’t seem to get your “save to new format, save back to first format” workaround to actually work.

Hmm, I’ll take a look at the workaround again later and see if I did something else that I forgot to note; pretty sure it was just Save As to .docx, which fixed the formatting, and then another Save As from there to .doc or .rtf. Could be that additional formatting in the original file is interfering with this; my samples were all pretty basic.

Good news is that this seems to work correctly again in Word 2013…