Compile preview

I realise it may be some work, so much so in fact that it outweighs any benefits, but it would be nice to be able to preview a compile to check that things format and get inserted properly; images, placeholders, tabs and indents and so forth. Pretty much because I don’t want to have to go through the process of overwriting my ‘formattest.rtf’ file each time and opening it in Word to see how my fairly complicated formatting is going to work.

Since I use indented numbered examples with really descriptive keys in them, like <$n:eg:getupwithouttobacco>, they break the pretty formatting indentation that I use. It usually works in the compile process anyway, since the above will be replaced by something like (23), but all the same, it would be nice if a preview to that could be generated just for say, what’s currently selected in the binder.

The problem with having a preview of Compile is that Compile for the most part exports to formats that it cannot possibly preview accurately. It cannot hope to show you what a fully compiled e-book will look like on the Kindle, for instance - the only way to test that is to export and open the .mobi file in Kindle Previewer. Likewise, it can’t show you how the text will look in Word, since Word has its own layout engine, and Scrivener’s layout engines don’t support end-of-page formatting. So the best it could ever do is show you a very rough preview, and even then, it would have to compile everything in the background. (Even a partial preview would require some compile work, since the appearance of individual sections may be determined by what has come before.)

Thus, the best way of getting a preview is probably to compile for “Print” and us the “Preview” button in the print panel. This will give you a rough idea of how everything will look before you compile to other formats.

That’s not to say that some form of preview hasn’t crossed our minds. In fact, there is some test code in Scrivener that you can enable if you want, but bear in mind that this is entirely unsupported and was never fully completed. But try closing Scrivener and entering the following in Terminal.app before restarting Scrivener:

defaults write com.literatureandlatte.scrivener2.plist TestCompilePreview YES

When you restart Scrivener, you will find a “Preview” button in Compile that opens a window and shows you a very rough preview of the first few pages of your compile. Like I say, this is just rough internal test code that I’ve experimented with, so please don’t report any bugs related to this - it’s just something that I have been toying with for a possible future version.

All the best,
Keith

And presumably if I want to turn it off I would enter the following?

defaults write com.literatureandlatte.scrivener2.plist TestCompilePreview NO

You know something? You guys are unendingly awesome.

Yep, that’s the one.

And thanks! :slight_smile: