User talk:Rominet: Difference between revisions

Jump to navigation Jump to search
(→‎Linking to article sections: Examples on how to link to an article heading. Headings already are anchors, so there is no need to add anchors to them.)
Line 48: Line 48:


—[[User:Johan G|Johan G]] ([[User_talk:Johan_G|Talk]] | [[Special:Contributions/Johan_G|contribs]]) 16:15, 25 November 2019 (EST)
—[[User:Johan G|Johan G]] ([[User_talk:Johan_G|Talk]] | [[Special:Contributions/Johan_G|contribs]]) 16:15, 25 November 2019 (EST)
: Hi Johan G,
:
: Thanks for caring and taking the time to write all this, I won't re-add the id, but am not very happy with the change. In my opinion, such explicitly-declared ids/anchors are much better than automatically-created anchors based on the title, because the title can change for various reasons (wording, spelling...) and this would break links using automatic anchors. In fact, your edit broke a link I had just made [https://github.com/frougon/pythondialog/issues/7#issuecomment-557870885 on GitHub]. I had to edit my comment there to fix the link.
:
: When I declare an id for reference purposes, I carefully choose its name and never change it. This is like using \label in LaTeX. Automatic anchors sound stupid to me because 1) one can legitimately want to change a title without breaking all cross-references to it, and 2) one can very well have the exact same titles in different parts of the same page (e.g., two subtitles in different sections), and even if they get different automatic anchors (not even sure this is the case), relying on them is bound to be utterly fragile. For instance, imagine you have two sections ''Linux'' and ''macOS'' and a subsection ''Installation'' inside each of these. You rely on automatic anchors, so you have, in the best case, automatic anchors "Installation1" and "Installation2". Links to "Installation2" are for MacOS. At some later point, the page is modified and we insert section ''Windows'' between ''Linux'' and ''macOS''. The automatic anchor "Installation2" now corresponds to the installation subsection for Windows. All existing links to the installation subsection for macOS are now broken. With explicit ids, this kind of breakage can't happen.
:
: --[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 16:48, 25 November 2019 (EST)
377

edits

Navigation menu