Tag/tiddler naming question: singular vs plural?

Such a perennial problem for me! For reasons parallel to yours.

I often intuitively start with singular: This tiddler about Du Bois should be tagged as philosopher (or whatever).

Then at some point, I develop the tag tiddler itself to offer some kind of overview. At that point I regret letting the tag be singular, because the overview tiddler, with its list of many things so tagged, looks very funny with a singular title. And any solution that involves captions or aliases threatens to compound the work I face down the road.

I also think that the plural tag more clearly directs web-visitors to realize that clicking on it might give them a window into other tiddlers under that category. For that reason, I’ve tried to get into the habit of starting with plurals from the get-go.

However, I’ve also gotten into the habit of linking directly to relevant tags in wikitext (that is, making an inline link of the <<tag philosophers>> kind so that the dropdown is right there, with link to the actual tiddler available at the top: We'll consider various <<tag philosophers>> from this tradition). But we don’t have an easy syntax (so far as I know) for doing with tags what we can do with pretty links to tiddlers: "Not everyone counts Du Bois as a [[philosopher|philosophers]]"

We had a long discussion about this and other things regarding links.tiddlywiki.org . The consensus was that tags should be singular.

1 Like

That sounds like a useful opportunity! <<mytag philosopher philosophers>>.

Anyone want to give it a go?

I’m pretty sure I agree with that consensus. But it’s hard to break the ad hoc habit. I think I’ll go check out the title cascade.

Mark, it seems that the reasons that might be in play there (at the links aggregator) might not be relevant to other uses.

I do see the resulting site, but not (at least at first browse) anything like the reasoning behind making tags singular (though of course, to break a tie while trying to standardize, it’s logical to prefer the singular if there isn’t a compelling reason to choose the plural).

Did you hear, in that discussion, reasons that would seem to generalize? If so, would you like to share/paraphrase?

It seems both Scott and I do a great deal with the category tiddler itself, which really “wants” to be plural…

1 Like

I also started out rather inconsistently (though since a lot of my early tags were tiddlers first, I’ve got plurals that I now wish were singular instead. It’d be an easy fix with Relink and/or Commander, in theory, but I’ve got a lot of templates to update as well… someday.)

I eventually settled on a singular-first approach, though I generally put the plural in the caption. I’ve added a line in the View Template Title cascade so captions are preferentially displayed as the titles of tag tiddlers (excluding subcategories like people, where I do actually want to display the full name).

I also use @pmario’s uni-link plugin for aliases, and the first alias I add is generally the plural - so for tag/tiddler “author”, I can link to either [[author]] or [[authors|?]], which feels a bit neater than [[authors|author]] (and is quicker to add with a hotkey). The plugin also includes a setting that lets you use the caption as the default displayed for all links, which I use so much I forget it’s not standard TW behavior.

Matt Lauber’s Aliases plugin takes a slightly different approach to the same problem: it takes advantage of the normal [[link]] syntax and also adds automatic disambiguation pages. I present both as options in case anyone else dealing with this issue hasn’t encountered them yet!

1 Like

I think that’s where I’m headed. Could you share the line you use in the cascade.?

I hadn’t known about those alias plugins. I’ll have to investigate. Thanks for sharing!

In a tiddler $:/config/ViewTemplateTitleFilters/caption, tagged with $:/tags/ViewTemplateTitleFilter, I have the following filter:

[has[caption]!search:caption:some[< {]then[$:/core/ui/ViewTemplate/title/caption]]

And then in the tiddler $:/core/ui/ViewTemplate/title/caption:

\whitespace trim
<h2 class="tc-title">
<$view field="caption"/>
</h2>

A few notes:

  • Make sure that your new $:/config tiddler is above the default in the $:/tags/ViewTemplateTitleFilter tag so it gets applied first!
  • Strictly speaking, it’s not good practice to use the $:/core prefix for a custom tiddler… but I started out by cloning $:/core/ui/ViewTemplate/title/default and didn’t bother to change the namespace, since it will never leave my own ecosystem anyway.
  • You probably don’t really need !search:caption:some[< {] in the config filter. I added it because I have a few tiddlers whose caption is a transcluded image or a bit of wikitext that I want to use as a tab caption within the <<tabs>> macro, but not in normal viewing-the-tiddler contexts.

If you want to exclude a class of tiddlers from your new caption-first behavior, you could of course change the filter to something like has[caption]!tag[People]. Alternately, if you want an even more specialized View Title for People (e.g. “Full Name” displays as “Full Name (Party)”), you can just make an additional config tiddler with text [tag[People]then[$:/core/ui/ViewTemplate/title/people]] and drag it above both the .../caption and .../default filters.

1 Like

This is a start. To make it consistent, it needs to have the list item template also tweaked. You would probably not want to use this in production this way, since I override two core tiddlers. Or … maybe you would. As always, make a backup before trying.

Edit: Removing the code for now, as it has introduced an error. Maybe I’ll work on it later if there is interest.

Edit 2: Try some other code.

2023-08-29b-make-tag-macro-use-alternate-title.json (3.7 KB)

1 Like

Well, it’s one of those things that could put you into an infinite love/hate spiral

It depends a lot on whether you’re trying to answer the question

  • This tiddler is a part of the … group OR
  • This tiddler IS A …

So it sort of depends on your mindset at any given moment. But given that the singular covers all situations, including when you only have one tagged element, and the inconsistencies when assigning plurals (If you have more than one item tagged “HelloThere”, should you call the tag “HelloTheres” ?), singular is overall better.

But I don’t remember the details. I think @pmario had the deciding insight.

Here are some arguments for using singular:

  • You perform the act of tagging on the individual tiddlers, not on the “group”.
  • Chances are that there are more of the individual tiddlers than there are groups they belong to.
  • Except for the very “tag tiddler” itself, the places that are to display the tag name can probably instead display the plural form e.g prettylinks, transclude caption, etc.

As a rule I use singular and the way tag/tags is used is a good guide.

  • All system tags are under the name space $:/tags
  • We call something a tag but it is added to the tags field
    • Field names should be plural if they hold one or more or suffix with -list
  • Even if a tag tags other tags, it is often singular eg: the category tag would tag multiple category tags, because the tag says on the given category this is a category.

Tags are usualy relative to the tiddler that it tags, so from the tiddler perspective a tag is clasifying each tiddler as having that quality implied by the tag. As a result they are more often than not singular.

  • Almost always when I use a Plural tag name I later change it to singular later, tags can be renamed and relink makes this trivial even for hardcoded ones.

As raised earlier I also sometimes use a caption on a tag tiddler where the caption is the plural of the singlular tag name. I dont bother when the tag name is neither singular or plural only like people.

Thank you very much. has[caption] is so much simpler than I was thinking about. But I’m pretty sure it would work for me. It’s true, anytime I add a caption, I would probably want it to appear in the place of the title, and if I need some blacklisting, I’m sure I can figure that out. The stupid places my brain was going instead of this simple condition… d’oh.

Thanks. I will have to study it. I think that for real-world usage, it would have to be a standalone component and not an override of the commonly-used <<tag>>, but that’s no big deal. Dropping it on the main site is pretty funny now. :wink:

There seems to be no debate. Singular it is!

Thanks everyone for the insight!

Oh, speaking of title vs caption there is a new and arguably better way to do this now with a function.

\function caption.title() [all[current]get[caption]addsuffix<caption-indicator>] :else[all[current]get[title]]
\define caption-indicator() ꜂

<$list filter="[tag[TableOfContents]]">
<$link to=<<currentTiddler>> ><<caption.title>></$link><br>
</$list>
  • caption.title acts on the currentTiddler
  • The caption will be returned as plain text if available
  • caption.title can be used as an operator or filter
  • Caption indicator is optional
1 Like

Oh drat. An error crept in. I’ll expunge it for now.

Edit: Reposted with (hopefully) fixed code.

1 Like

Thank you very much. This worked perfectly! And Relink let me quickly change everything to match.

This is such a wonderful community!

1 Like

:thinking: I’m just baffled here. I don’t think there’s any risk of people getting confused about whether to make a “HelloTheres” tag. :crazy_face:

The people who lean toward using plural tags are not really arguing “for plurals” for plurals’ sake, after all. We’re simply treating the natural/best name for the “home-base tiddler” of a tag as the best name for that tag.

Everything depends on use. Some projects will employ tags that function as adjectives (“white” or “blue”) and the fact that these could be nouns wouldn’t mean the tag should be a plural noun (“whites” and “blues” — totally different meaning!).

Maybe I use a “home” tag for things related to my household, and the tiddler itself displays a dynamic table for those items. There’s no risk that I’ll convert that tag to “homes” out of the conviction that “plurals are good”. :wink:

I simply want to encourage appreciation of this fact: for projects that tend to develop each tag’s “parent” tiddler itself, there’s much to say for choosing to name each tag exactly in whatever way will make sense when we engage with the tag as a tiddler.

Cheers, all!

1 Like

Love this approach! Also works when thinking about each tag’s ViewTemplate for that matter.