Conditional Compilation Limitation

There are several ways you can go about getting more from filters, if you need it—this is indeed an idea that scales well. Most of them will revolve around using Collections as your primary filter, and putting the variability into the collections themselves. The idea is to create a collection for each compile target, which will through one way or another, list everything that should be in that particular edition. Some ideas:

  • Manually created collections can work fine for some things. You drop the items into the tab that you want compiled and that’s that. It’s very simple, but it is also more time consuming and prone to error. I find this method works best for proofing smaller chunks of text. I can drag in the parts that need proofing, along with some standard elements that I always want.
  • Search collections will generally be the better tool for the job. With searches you can use various metadata to mark sections as being relevant to this or that edition, and the edition collection itself can look for those markers.

As for what you can use as metadata:

  • Keywords are an obvious choice, as you can assign however many you need to a particular item in the binder. Something may be relevant to two out of three editions, and that is no problem for keywords to handle. When setting up a collection to work toward this, you can type each keyword into the search field and set the search mode to “Any words” to include all overlap, with of course the scope being set to “Keywords”. Other options may be handy, such as draft only.
  • Custom metadata also opens up some possibilities. You could for instance use checkboxes to indicate which editions a section should be included within. The search itself would look for “Yes”, and to confine it to which checkboxes matter, you would first select one of the checkboxes from the magnifying glass menu, and then Option-click on the button to add additional checkboxes to the search scope.

There are surely other approaches as well. You could even continue having a simple exclusive assignment with labels, if it is unlikely that binder items will ever be relevant to more than one edition, but regard editions as consisting of more than one label using the same technique used for the “Any Words” keyword search.

One last thing of note, specifically for what set you down this path in the first place, is the Front Matter feature. That won’t solve any of the above, to be clear, but if all you need is a different ToC per edition (or whatever), then using different front matter folders is the easiest way to accomplish this. Since the Front Matter setting is bound to the compile format you use, and each edition is likely to have a different compile format, switching between editions only requires switching formats.