Question about links in proofs

Yesterday I got an email asking about links between tags in proofs. Here is the question:

————————–

On the page 00KD in the proof of Lemma 00KK the reader will find the strings “If (00KN)” or “Assume (00KP)”, provided you view the page in “tags” mode. However, these strings are not found in the pdf. You have to click on them to see what they mean, and it turns out to be the items (1), (2), … of Lemma 00KK. How does this work?

Related but different question: on the page 00KA shouldn’t there be a hyperlink to the definition of χM?

—————————-

The explanation is that in Lemma 00KK there is an itemized list in the underlying latex file. Then I decided to give latex labels to the items so I could refer to them in the proof. If you have a pdf reader which can deal with (internal) links, then you can click on the occurences of (1), (2), … in the proof of 00KK and you’ll be thrown to the corresponding statements in the proof of 00KK.

There are several other places in the Stacks project where the items of an itemized list have latex labels. But most of the time we don’t do this. (It turns out to work to be best for the structure of the Stacks project if each lemma has a single conclusion.) I would appreciate feedback on whether readers think it works well in the cases where we do do this.

I hope that this addresses the first question somewhat.

Second question. Ideally, mathematicians who help out with the Stacks project should only have to worry about helping make the pdfs readable and mathematically correct, etc. The underlying website code will hopefully display the mathematics in such a way that the experience is similar (or better than) reading the pdf. So if you want a “link” back to the definition of χM in Definition 00KA, then try to change or suggest a change in the latex so that it looks good in the pdf.

Specifically in Definition 00KA we could change the latex code to read

$\chi_M$ as defined in Definition \ref{definition-chi}.

except that then we would also need to insert, earlier, a definition environment where we define χM and φM. Perhaps this isn’t a bad idea.

Technically speaking (please ignore this): I do not want to add another layer to the underlying latex files. However, in the future we could have a “hover” functionality where hovering would show you the definitions of defined terms… I would want this to be implemented in such a way that no changes need to be made inside the latex files, but perhaps a separate file would be added (similar to the tags file being maintained outside the latex).