Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most ghastly link fragment anchor names #10868

Closed
jidanni opened this issue May 16, 2024 · 5 comments
Closed

Most ghastly link fragment anchor names #10868

jidanni opened this issue May 16, 2024 · 5 comments
Labels
HTML HTML / XHTML output Usage The mentioned problem is not a doxygen problem but due to usage of a feature.

Comments

@jidanni
Copy link

jidanni commented May 16, 2024

Excuse me, I've not even heard of Doxygen for five minutes. In fact my only contact with it was trying to make a permalink to
https://gdal.org/doxygen/classOGRGeometry.html#:~:text=Centroid()
which you see I have managed to do via Google :~: stuff, and risky "()" to make sure I got to the right spot. But that's life.

Yes, I would rather have used real HTML links that will work in all browsers, like the ones Doxygen makes,
https://gdal.org/doxygen/classOGRGeometry.html#a91787f669b2a148169667e270e7e40df
but did you notice that ghastly #a91787f669b2a148169667e270e7e40df there at the end?
How long will that last? Till the next revision?
And OK, even if it is a permalink, it is not a permalink that one can be proud of or that one can know where one is going before arriving.

Let's see how the other folks do it:
(No need to click it. I'm just showing how the URL is composed:)
https://gdal.org/user/ogr_sql_dialect.html#ogr-geom-area
There, nice, clean, low key. The perfect balance between...
We're talking the Zen masters of link fragment naming!
Maybe users need to manually choose the names. I don't know. All I know is it's better that those godforsaken obnoxious barcode-like ASCII porridge Doxygen style link fragments.

Also, I noticed they managed to keep the name of their document system out of the URL. But maybe that's configurable...

@albert-github albert-github added needinfo reported bug is incomplete, please add additional info HTML HTML / XHTML output labels May 16, 2024
@albert-github
Copy link
Collaborator

  • What is the exact question?
  • Which version of doxygen are you using?

In general:

  • Can you please attach a, small, self contained example (source+configuration file in a, compressed, tar or zip file!) that allows us to reproduce the problem? Please don't add external links as they might not be persistent (also references to GitHub repositories are considered non persistent).
  • Please also specify the full doxygen version used (doxygen -v).

Regarding:

Yes, I would rather have used real HTML links that will work in all browsers, like the ones Doxygen makes,
https://gdal.org/doxygen/classOGRGeometry.html#a91787f669b2a148169667e270e7e40df
but did you notice that ghastly #a91787f669b2a148169667e270e7e40df there at the end?
How long will that last? Till the next revision?

This link should not change. Doxygen tries to keep these hashes stable and only change them when there is no other way.
Another way for you might be to have a look at the \anchor command where you can define your own anchors and refer to them (e.g. through the \ref command in doxygen).

@jidanni
Copy link
Author

jidanni commented May 16, 2024

I have never used Doxygen. I am just trying to make a hyperlink to a place in somebody else's document that was created with apparently Doxygen.

It's good that there is \anchor etc. but I think you should start considering changing the default link style too, as that's apparently what most people use. Thanks.

@albert-github albert-github added Usage The mentioned problem is not a doxygen problem but due to usage of a feature. and removed needinfo reported bug is incomplete, please add additional info labels May 16, 2024
@albert-github
Copy link
Collaborator

I have never used Doxygen. I am just trying to make a hyperlink to a place in somebody else's document that was created with apparently Doxygen.

Best to ask the creator of the document whether it is reasonable that you link to the mentioned place or should link to another place.
In case it is reasonable to link to the mentioned place suggest to the creator to use the \anchor command.

@jidanni
Copy link
Author

jidanni commented May 17, 2024

By the way, come to think about it, the very long IDs are overkill. The most internal links needed in a single web page could be handled by #l9999 length links. In fact they could start at #l0 and grow as long as needed.

@doxygen
Copy link
Owner

doxygen commented May 17, 2024

@jidanni The IDs are md5 hashes for the signature of the item they link to. So they should be quite persistent. If you think about member overloads, you'll quickly understand that a readable anchor is not really possible in general. Otherwise you end up with something like this where a -number is used to distinguish between the methods, which is not very stable or intuitive.

@doxygen doxygen closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTML HTML / XHTML output Usage The mentioned problem is not a doxygen problem but due to usage of a feature.
Projects
None yet
Development

No branches or pull requests

3 participants