How to keep documents in the compilation but exclude them from the <$wc> word count?

How to keep documents in the compilation but exclude them from the <$wc> word count at compile?

Hi.
I don’t think it can be done.
At least, I don’t think that the app is designed so.

Likely your best option would be to compile once without the document you want excluded, check the resulting wordcount, do the real compile while manually filling in the word count either in the editor (wherever you want it), or afterwards.

Or the other way around. Check the word count of the document you want excluded, do the math / substract its wordcount from the whole after compile.

The first option would be best if you count footnotes etc.

Thanks. Since there were others asking basically the same question before, I think it would be a useful feature to add. How to recommend/request adding a feature officially?

Depending on what your intent is, there may be a solution that makes logical sense. For instance if these are kind of “asides” that aren’t meant to be part of the final text for whatever reason at all, then what you could do is use the Document Notes feature in the inspector sidebar for that kind of stuff, instead of the main text editor, and then make a few tweaks to your compile settings to enable these kinds of documents to compile, without being counted:

Compile setup...
  1. Open File ▸ Compile... and double-click on the Format you are using, in the left sidebar, to edit it.
  2. In the Section Layouts pane, locate the layout that is being used to generate text normally and select it. Then click the + button in the top right to duplicate it.
  3. What would probably work best, if you are overriding text and notes formatting, is to first enable the Notes checkbox at the top, and do your best to replicate the formatting from the Text section, in the formatting area below, into the Notes section.
  4. Once you’ve got the formatting copied over or tweaked the way you’d like these sections to appear, disable the Text checkbox for this layout, and optionally the Title checkbox as well (if it doesn’t all go away, check the “Title Options” tab for any prefix/suffix material.
  5. Next, double-check the settings in the Statistics compile format pane. What you want to see, in the middle roughly, is Only include: Main Text.

At that point all you’d need to do is make sure these special sections are marked as such in the main project, with their own Section Type, so that you can assign it to the new layout you created.

While that technique could probably work for a much wider variety of applications, it might at some levels feel unsatisfactory though, particularly if the text is meant to be considered part of the text (but not counted), as that would make Scrivenings mode awkward and such. It’s worth reviewing the other settings in the Statistics compile format pane that was examined above, as some of those conditions will match the most common reasons for excluding content from the official count (like not including the preface, by putting it into the Front Matter folder).