{% extends "layout.html" %}

{% block title %}Tags explained{% endblock %}

{% block breadcrumb %}
  <li><a href="/tags">Tags explained</a>
{% endblock %}

{% block body %}
  <h2>The tag system</h2>
  <p>Each tag refers to a unique item (section, lemma, theorem, etc.) in order for this project to be referenceable. These tags don't change even if the item moves within the text.

  <h2>How to use it?</h2>
  <p>To find the tag for an item, hover/click on the item in the <a href="/download/book.pdf">pdf file</a> or find the item from the <a href="/browse">table of contents</a>. See below for LaTeX instructions on how to reference a tag.
  <!-- TODO don't mention the pdf as a means to search for a tag! -->

  <h2>More information</h2>
  <p>The tag system provides <strong>stable</strong> references to definitions, lemmas, propositions, theorems, remarks, examples, exercises, situations and even equations, sections and items. As the project grows, each of these gets a tag which will always point to the same mathematical result. The place of the lemma in the document may change, the lemma may be moved to a different chapter, but its tag always keeps pointing to it.</p>
  <p>If it ever turns out that a lemma, theorem, etc. was wrong then we may remove it from the project. However, we will keep the tag, and there will be an explanation for its disappearance (in the file tags mentioned below).

  <h2 id="reference">How to reference tags</h2>
  <p>In your BibTeX file put
  <pre><code>@misc{stacks-project,
    shorthand    = {Stacks},
    author       = {The {Stacks Project Authors}},
    title        = {\textit{Stacks Project}},
    howpublished = {\url{https://stacks.math.columbia.edu}},
    year         = {2018},
  }</code></pre>
  <p>Then you can use the citation code we provide for every tag to <em>cite</em> and <em>link</em> the corresponding tag, for example by
  <pre><code>\cite[\href{https://stacks.math.columbia.edu/tag/0123}{Tag 0123}]{stacks-project}</code></pre>
  <p>This can be changed according to your tastes. In order to make the <code>\url</code> and <code>\href</code> commands to work, one should use the <a href="https://ctan.org/pkg/hyperref"><code>hyperref</code></a> package.

  <h2>Technical information</h2>
  <p>There is a file called <a href="https://github.com/stacks/stacks-project/blob/master/tags/tags"><span class="filename">tags</span></a> (in the <a href="https://github.com/stacks/stacks-project/tree/master/tags">tags subdirectory</a> of the Stacks project) which has on each line the tag followed by an identifier. Example:
  <pre><code>01MB,constructions-lemma-proj-scheme</code></pre>
  <p>Here the tag is <span class="tag">01MB</span> and the identifier is <var>constructions-lemma-proj-scheme</var>. This means that the tag points to a lemma from the file <var>constructions.tex</var>. It currently has the label <var>lemma-proj-scheme</var>. If we ever change the lemma's label, or move the lemma to a different file, then we will change the corresponding line in the file <span class="filename">tags</a> by changing the identifier correspondingly. But we will <strong>never change the tag</strong>.
  <p>A tag is a four character string made up out of digits and capital letters. They are ordered lexicographically between <var>0000</var> and <var>ZZZZ</var> originally giving 1679616 possible tags. But as there might arise confusion from the similarities between <span class="tag">0</span> and <span class="tag">O</span> it was decided to stop using the letter <var>O</var>. The last tag using <var>O</var> is <a href="/tag/04DO">tag <span class="tag">04DO</span></a>. Thus from <span class="tag">04DP</span> on there are only 35 values per position. The 302 tags assigned before this new guideline will remain, as tags are constant.

  <h2 id="stacks-epoch">Stacks epoch</h2><p>The first 3026 tags were introduced in the Stacks project on <a href="https://github.com/stacks/stacks-project/commit/fad2e125112d54e1b53a7e130ef141010f9d151d">May 16, 2009</a>. New tags are assigned by the maintainer of the Stacks project every once in a while using a script. As the Stacks project is always under construction the available tags on the website, in the Git repository, and the available results in the Stacks project can sometimes be a little bit out of sync.
{% endblock %}

{% block sidebar %}
  {{ macros.singlePageLinks() }}
{% endblock %}


