GladTeX icon indicating copy to clipboard operation
GladTeX copied to clipboard

Identical (or sufficiently similar) long excluded formulas generate the same ID and only one description

Open phisonate opened this issue 9 months ago • 0 comments

The current ID generation mechanism uses a heavily simplified version of a formula to generate its corresponding ID which is used to link to it. As this generation is deterministic and returns the same ID for the same input formula, the same ID is used for identical multiple long excluded formulas, which prohibits backlinking to them as they in turn also generate only one description for all of them.

It can also happen that formulas that are just similar generate the same ID and description which leads to wrong formula descriptions. An example of this would be the "formulas" $loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong formuuuuula$ and $loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong formuuuuula$ which differ in number of 'o's but generate the same ID.

While this currently is only relevant to embedded excluded formula descriptions, as outsourced descriptions in an extra file don't link back to their formula in the document at the moment, it could be considered implementing this backlinking mechanism for those extra file descriptions as well.

phisonate avatar Jul 02 '25 14:07 phisonate