Flag text in editor as “not included in word count?”

Is there a way to flag sections of text in the editor so that those sections are not included in the document’s word count? For example, given the text:

The first sentence should not be included in the document’s word count, and the second sentence should.

The point is to insert notes interspersed in the text, and keep an accurate word count that does not include these inline notes, without having to resort to keeping notes in a separate document or window. I often roughly sketch out a scene in the editor, and I’d like to keep the sketch in the document and add, edit, and delete these inline notes, without affecting the word count of the scene. The corkboard / outliner and synopsis, note panels in the inspector, and comments have their uses, and their text do not affect word count, but using them requires diverting attention from the text that is being worked on (which is useful in some scenarios, and not useful in other scenarios). Ideally, such flagged text would be distinctly identified using a color, preset, or some other means.

1 Like

Hi,

This is, in fact, one of the things that inline annotations are for. So, use Format > Inline Annotation or shift-command-A for this. Note that the live word count at the bottom will still include these (for speed purposes), but if you hover over the word count, you will get a pop-up showing the count without them.

Inline annotations can also be excluded from Compile.

All the best,
Keith

1 Like

I see that the word count excluding inline annotations is also revealed when hovering over the word count in the footer while editing multiple documents (scrivenings). This is very close to what I’m looking for. Is there a trick to get the word count excluding inline annotations while using the outliner view? The “Word Count” and “Total Word Count” columns, and the counts shown in the context menu and from the Tools icon all show the count including inline annotations.

For speed reasons, unfortunately not. The trouble is that the word count is based on characters, which can be done quickly, but inline annotations are formatting-based, and so it would mean going through all the text, counting the words with that formatting, and subtracting them from the total. It would be a massive speed slowdown both in the outliner and in typing.

All the best,
Keith

Then, for my purposes, using inline annotations will suffice, and I can even change the annotations’ color. I’m happy to see that Scrivener has a method that meets my primary goal.

I’ll post to the AppleScript thread in the Feedback forum about possibly doing this kind of counting using AppleScript, since (for my purposes, at least) I’d be willing to wait while a script runs to do this kind of counting for multiple documents. (I’d typically want to know this word count excluding inline annotations in all of the manuscript’s documents, at the end of the day, and would not need this count to be done in real time.)

Thanks much.

1 Like

I think you can do this already. Select the documents in the Binder (Cmd click) whose words you want to count and then bring up Project > Project Statistics - Selection, having set the Options to exclude Annotations.

1 Like

Yes, and by the way you can also get better stats in an editor by clicking on the footer bar text. It’s a little faster than waiting for the tooltip, and you can tune the results with options. This also works when text has been selected in the editor.

1 Like

Wahoo! Even better. Thanks very much.

I may still post to the AppleScript thread because I have some ideas about properties & functions that would be useful for Scrivener to expose.

Thanks again for the great tips!