janeway icon indicating copy to clipboard operation
janeway copied to clipboard

Links from endnotes into article body become incorrect if an endnote is referenced more than once in the text

Open pgoussy opened this issue 2 years ago • 0 comments

Describe the bug Per my Discord conversation with @mauromsl - It appears that the footnote linker/counter gets confused if a single endnote is referenced multiple times in the article body. The superscript callouts in the body link down to the correct endnotes, but the caret links at the end of each endnote point up to incorrect callouts in the body. Given that the rid attributes in the JATS <xref>s reference the accurate id attributes in the <ref>s, we presume that this is an issue with Janeway's XSLT.

These incorrect links appear to start at the endnote that should be referenced next in the body, but instead a previous endnote was referenced. For instance: in the example linked below, fn24 is referenced in the body multiple times: once immediately after fn23 (as expected) and then again after fn28. The caret links are all accurate up to fn28, but starting with fn29 they're all inaccurate--fn29 points to the 29th callout in the article body (which happens to be "24" rather than "29" as Janeway assumes), then fn30 points to the 30th callout (which is "28"), etc.

Janeway version 1.4.2

To Reproduce Steps to reproduce the behavior:

  1. Go to https://journals.publishing.umich.edu/ptpbio/plugins/typesetting/preview_galley/article/2628/galley/968/#heading23
  2. Scroll down to end of Notes section
  3. Click on caret link at the end of fn29
  4. Note that it links up to superscript 24 (which does link down to fn24 as it should)

Expected behavior Footnote callouts in the article body should use the rid in the JATS <xref> to link to the endnote <ref> with a matching id, rather than counting and re-numbering the links based on the number/order of callouts in the article.

pgoussy avatar Jul 12 '22 17:07 pgoussy