zestedesavoir / zmarkdown

Live demo: https://zestedesavoir.github.io/zmarkdown/
MIT License
226 stars 53 forks source link

Les renvois en pied de page sont cassés dans les PDF #450

Open SpaceFox opened 2 years ago

SpaceFox commented 2 years ago

Cf https://zestedesavoir.com/tutoriels/pdf/3843/dates-durees-et-horloges-en-informatique.pdf par exemple.

Les liens de renvoi aux notes de pied de page sont affichées sous la forme 1 footnote:1 où seul le premier chiffre est un lien. Le renvoi au texte dans le pied de page est de la même forme. Les liens ne renvoient vers aucune ancre valide.

Je soupçonne que c’est un effet de bord des renvois dans un moyen-tuto (donc dans plusieurs fichiers markdown distincts, en terme de stockage).

StaloneLab commented 2 years ago

Note : still unresolved.

Linking to footnotes has been removed (please note it never worked properly), but numbers have been fixed, so that display is way better than before.

Two problems still remain if we want to enable linking:

LaTeX allows the separation of the footnote mark and the footnote text (\footnotemark, \footnotetext). This interface might be enough for visual typesetting. But the relation between\footnotemark to \footnotetext is not as strong as \ref to \label. Therefore it is not clear in general which \footnotemark references which \footnotetext. But that is necessary to implement hyperlinking. Thus the implementation of hyperref does not support the optional argument of \footnotemark and \footnotetext.

Therefore, using another package on LaTeX side would be necessary. Before, we used \label and \ref, but the link was not made to the footnote but to the section title instead. As a matter of consequence, I am issuing a fix on ZMdv11, removing linking, and marking this issue blocked until problem solved on the LaTeX template. I will open an issue as soon as possible on this repository.