Word count and <$include>

I want the word count to include only the main text, not the front and back matter. It was correct until I used the <$include> code to link to front and back matter contents rather than putting the contents into the actual front and back matter sections. Now the word counts of those text sections are included in the document’s word count, even though it is still set to count only the main text. Is there some way for me to fix this? (macOS 10.14, Scrivener 3.0.3)

Anything inserted using <$include> becomes part of the text it is inserted in, so you cannot exclude it from the word count if it’s included in the main text.

All the best,
Keith

It is being inserted into Front Matter or Back Matter, so I assume it should not be included in the word count, since word count has the exclude front/back matter buttons turned on. Am I missing something?

A-ha, there’s a bug here, but it isn’t actually related to the <$include> tag. It turns out that if you have “Include all text” selected, the “Exclude front/back matter” options are ignored. I have fixed this for the next update, but in the meantime you could tick “Only include” and pick the types instead of “Include all text” if possible to work around the bug.

Thanks and all the best,
Keith

Thank you, Keith. But in fact I was already using the “Only include: Main text” choice and still the word count was including the front and back matter. Is there more to the bug than you have found so far?

Two bugs for the price of one! You’re right, there’s a separate bug here, which I’d missed because during my testing I got rid of the <$include> tags to find out what was going on. Sorry about that. The problem is that when incrementing the counts for each individual document, the code is checking whether the current document is part of the front matter or back matter - and of course your <$include> text is not. I’ve fixed this for the next update too.

Thank you for taking the time to investigate this. I’m looking forward to the next release!

So is there a bug bounty? Do I get free Scrivener for life, or a great review for my novel, or a new software feature of my choice? (I would choose the ability to have “Keep with next” work across documents so that I could have section numbers triggered by the section folders and the accompanying text come from the next scene.)

By the way, when is the next release, in general terms? Are we talking weeks, months, …?