0

I have been reading a lot of LaTeX source files recently and I noticed certain naming conventions like \label{fig:...} and \label{tab:...}. It this used as some kind of scoping to avoid namespace pollution? Where does this come from and why is the colon used specifically (as it doesn't seem to make any difference to the underlying system whether a colon or, say, a dash is used)?

David Carlisle
  • 757,742
apriori
  • 953
  • 2
    label just treats the option as a string and givs no meaning to the colon at all, some ediors will suggest prefixed nams jus to make it easier for humans to remember what that \ref{tab:whatever} is referncing a table – David Carlisle Mar 21 '22 at 12:46
  • 2
    See e.g. https://tex.stackexchange.com/q/361156/82917, https://tex.stackexchange.com/q/298250/82917 – campa Mar 21 '22 at 12:47
  • 2
    Also https://tex.stackexchange.com/q/152196/82917. As for the colon: it might be dangerous, see https://tex.stackexchange.com/q/18311/82917. – campa Mar 21 '22 at 12:53

0 Answers0