Merciful Zeus, please give me some tags!

You know 'em, you love 'em. Tags! Hooray for tags!

Please let us tag any item in the binder. Labels are nice. Status is cute. Collections are just… hack-y, and non-hierarchical for some reason.

All of which can be done with just tags. If any item can have any number of tags, building compiles based on them is really easy. “Include all documents with the Ebook tag”. “Include all documents with the Amazon tag”. I’m not even asking for complex AND/OR expressions, though if we’re shooting for the moon, that’d be nice too. :slight_smile:

Allow Scrivener to save tags with compile presets as well. I’ve asked for a similar feature before, but it had to do with specific documents, and I can see why that would be a bad thing to save. But if you can save tags with a preset, I can save an “Amazon Ebook” preset that compiles all my stuff with the “Amazon” tag. Nothing with Amazon tags in the project? Nothing to compile.

Note, this is a wish. I don’t know the guts of Scrivener, but I have an idea of what it would take to implement something like this. It won’t be high on the priority list, but I would love it oh, so much, I felt I had to at least ask.

We can wish, can’t we? That’s what this forum is for. :slight_smile:

Keywords + Search-based collections will do precisely this. While the presentation of the collection is not hierarchical, the compile settings will use the document position in the binder for determining formatting. In the Contents section of compile, choose the search results, or a saved collection as your compile group.

As Robert points out, you are looking for keywords (some people call them tags, it’s really the same thing). They are added to Binder items in the Inspector. Just click on the “key” icon and start adding them. You can organise them in the Project/Show Project Keywords window. From here you can also drag keywords to large selections of documents in the Binder, Corkboard or Outliner. This way you can assign you “Amazon” keyword to hundreds of items at once.

Project Keywords are described in §10.1.4 (pg. 118) of the user manual, and the keywords window itself a few pages later, in §10.3. The Inspector pane, specifically the keyword section of it, is documented in §19.3.3 (pg. 266).

A collection can be expressed hierarchically during compile, if it is used as a filter in the Contents pane, rather than as a compile group. Compiling a collection from the pull-down at the top will just print out a list from the collection. Using it as a filter will map the collections contents on the current compile group (usually the whole Draft) and add or remove those items according to the filter settings.

I’m not sure I understand the distinction you’re trying to make between a “filter in the Contents pane” and “compiling from the pull-down at the top”. I don’t see any way to use a collection as a filter without using the drop-down at the top to choose that collection.

To go over the basics, for the benefit of the OP: Basically the Contents pane works from top down (in fact that is how most of Compile works—which is why Formatting is applied to the Contents pane, not the Binder, a subtle distinction that may be more clear later on).

  1. The Compile Group drop-down sets the scope for everything that comes after. At its broadest, it is set to “Draft”. It can also be used to select a Collection, or the current Binder selection (prior to pulling up Compile).
  2. The Contents list itself can dictate what compiles via the “Include in Compile” checkbox.
  3. The “Compile” drop-down below that then just sets how that checkbox works. It could be completely ignored, inverted (if you just wanted to print notes, say) or by default it just works logically.
  4. Filter then takes all of the above, and uses some criteria on each individual line in the Contents pane. If a line matches the criteria it is compiled, if not, it is removed (or if you have the logic flipped the item is removed if it matches the criteria, for example if you wish to compile everything but items tagged with “Amazon” you would use a filter set in exclusion mode).

Stepping back to the compile group function and collections: if you set the compile group to a collection, then you will be presented with a flat list from that collection, because that is what collections are. Most likely you would not want to use a fancy compile preset for something like that, because then everything would be formatted like a chapter or something. The Formatting pane does not use the original hierarchy of an item, but rather the hierarchy as presented in the Contents pane (because as said, the compile works top-down in general, panes lower on the list modify the results of panes from higher in the list—thus you can run a Replacement on something you’ve typed into a Suffix field in the Formatting pane). When compiling from a collection, everything is “Level 1”, because it is a flat list that comes out of the Contents pane. This can be verified by setting level 1 titles to red text, level 2 to blue, and compiling. All titles will be red when compiling from a collection as the group, no matter what their depth in the original outline.

On the other hand, if you want to use a collection as a filter, where it determines what pieces of the current group are to be compiled, then you could for example leave the compile group to “Draft” (thus hierarchical), enable Filter, set it to “Include: Documents in Collection: Amazon”, and watch as the items not in that collection are removed from the list, without altering the underlying list otherwise—its hierarchy is preserved. A level 2 item stays a level 2 item, and will be formatted as such (blue in our test case).

By selecting Collection A as your compile group, and then applying Collection A as your inclusion filter, you aren’t accomplishing anything because they both are using the same list of items. A more useful example would be to set Collection A as your group, and Collection B as your exclusion filter, to print a list of only items that are in A, not also B. So you can see how these two tools can be used to perform simple Booleans, based on perhaps even more complicated searches that are being done at the Collection level itself. But that is all very advanced stuff.

Simply put:

  • Compile group sets the main scope that the rest of the compiler will work on.
  • Filters add or remove items from the group based on their criteria.
  • Everything else in the compile pane then works on the list as shown in the Contents pane (you have to visualise items with the Include checkbox off as not being there—obviously we can’t remove them from the list or you wouldn’t be able to add them back).

Ah! Thanks for that. I finally visited the Contents pane and noticed the “Filter” check-box near the bottom. That’s where you would do the filtering using a collection so that hierarchy is preserved, right? Thanks for making that distinction; I hadn’t tested that thoroughly enough to realize my mistake.

For further clarification, since my contribution here has muddied the waters :unamused: :
Collection_filter-small.png

… and that’s the correct way to use a collection while preserving hierarchy.

Yup! That’s the idea. Filters are for modifying the list, and compile group is for making the list to begin with.

To return to one question in the original post, in saving filter settings and other such things into a compile preset, even a project specific preset, is problematic for the same reason that compile settings dependent upon specific documents is problematic in that you could end up with settings that hinge upon components that no longer exist. That just feels a little sloppy, so the capability just isn’t there. Compile presets stick strictly to those options which will function regardless of the project content (where content can also mean meta-data such as keywords). That may change in the future (it might not) but for now that is how it is designed to work.

Is the Filter check box available on Mac only? I’m using Windows and I don’t see it.

Steve

That’s correct, we haven’t added filtering to the Windows version yet, but you can still select by a collection as your compile group, which does satisfy the base request above, where one can automatically gather documents that have been tagged a certain way, and compile a list of them. Filter just lets you do that against a hierarchy (or another search).