The tags system

As you may have noticed the numbering of lemmas, propositions, theorems, sections, chapters etc is not constant over time in the stacks project. Hence if you want to reference a result in the stacks project then you cannot refer to a number in the text, because what works now is almost surely not going to work in the future. Still, I want the stacks project to have stable references.

The reason for not requiring a stable numbering is that I want to be free to edit the latex files in the project, move results around, reorganize chapters, add chapters, and even move results to different chapters. Maybe later I want to change the format altogether and dispense with having chapters, and so on.

We cannot use the latex labels to reference results for various reasons: I want the latex labels to be “human readable”, and we may want to edit them. A random example is the label lemma-stalk-exact which refers to a lemma in etale-cohomology.tex on exactness of the stalk functor. At some point we may want to rename this lemma-stalk-functor-exact. Or perhaps future versions of the stacks project will be written in XML and labels and references work entirely differently.

To provide for stable references Cathy O’Neil came up with the tags system. I implemented it about a year ago, and some people have started using it already. The idea is very simple. Each mathematical result gets a tag, which is just a four character string made out of capitals and digits. Once a tag has been assigned to a mathematical result or definition, it will always point to that exact mathematical result or definition.

Let’s see how this works in practice. For example the lemma mentioned above has tag 03PT. Then if you want to refer to this lemma you refer to the tag instead. You would put something like

\cite[Lemma 03PT]{stacks-project}

in your latex file. How can the reader of your manuscript, or blog post, or email figure out what result you are referring too? They would search for a tag on this page. Entering the tag into the search bar on that page returns a page telling you exactly the location of the corresponding mathematical result in the current version of the stacks project.

Conversely, how do you find the tag of a result in the stacks project? As you may have noticed the lemmas, proposition, theorems in the online version of the stacks project are hyperlinks. If you click on them you will be brought to a page telling you the tag of the result you clicked on (or just hover your mouse over the hyperlink to discover the tag).

There is more we can do with this system. For example the pdf files contain hyperanchors whose anchor name is the tag. Here are two small tests. Currently whether this works still depends on your browser and pdf viewer setup.

No matter. The basic functionality of the tags system, which is to provide stable references, works fine and has been working fine for a while now. You could call it a stable feature of the stacks project!

3 thoughts on “The tags system

  1. Pingback: What is the stacks project? « Stacks Project Blog

  2. Pingback: References « Stacks Project Blog

  3. Pingback: Revamped tag lookup | Stacks Project Blog

Comments are closed.