gerby-project / gerby-website

Tag-based webview of LaTeX documents
MIT License
28 stars 22 forks source link

Make a toggle between numbering and tags #4

Closed pbelmans closed 7 years ago

pbelmans commented 7 years ago

People keep on referring to numbers in comments, which makes perfect sense, as the only way to read off the tag of a lemma inside a section is by hovering over the link. When writing a comment (and possibly somewhere else, maybe even keep track of their preferences using a cookie) we can let them toggle between these.

Solution: just enclose the number in a <span> which contains the tag as a data-tag attribute. Then in JavaScript we can toggle between these two pieces of information in a completely uniform way.