openlibhums / janeway

A web-based platform for publishing journals, preprints, conference proceedings, and books
https://janeway.systems/
GNU Affero General Public License v3.0
168 stars 63 forks source link

Multi-paragraph endnotes: no line breaks, duplicate links #2656

Open pgoussy opened 2 years ago

pgoussy commented 2 years ago

Describe the bug If a footnote/endnote contains multiple <p> tags in the JATS, there appear to be two rendering issues in Janeway:

To Reproduce Steps to reproduce the behavior:

  1. Go to https://journals.publishing.umich.edu/ergo/plugins/typesetting/preview_galley/article/1118/galley/417/
  2. Click on Notes in the floating TOC
  3. Scroll down to note 3 ("It may be helpful to think...")
  4. Notice that (a) all of the text runs together in a single block, and (b) there are ten separate [^] links throughout the paragraph. This is obviously an extreme example (most multi-paragraph notes only have two or three paras) but it illustrates the issue very effectively.

Here's how this example is tagged in the JATS:

<fn id="FN3">
<label>3</label><p id="P55">It may be helpful to think of <underline>Identity</underline> and <underline>Candidates</underline> as dealing in conditional epistemic probabilities&#x2014;roughly, what one should expect or believe, given one&#x2019;s evidence. This comes to something like the following (for simplicity&#x2019;s sake, we put this in the singular second-person). Where D is the relevant data&#x2014;that is, whatever evidence philosophical theories must take into account&#x2014;and x is a candidate:</p>
<p id="P56"><underline>P-Identity</underline>: If P(x fills the emotional office/D) is high, then either: D is strong evidence that you = x, or you = x</p>
<p id="P57"><underline>P-Candidates:</underline> P(your animal fills the emotional office/D) is high</p>
<p id="P58">Therefore, either D is strong evidence that you = x, or you = x (from P-Identity and P-Candidates, MP)</p>
<p id="P59">The conclusion here is either that animalism is strongly confirmed by the evidence or that animalism is simply true. In either case, the argument supports animalism.</p>
<p id="P60">If you cannot make sense of some candidates being <italic>better</italic> suited for the emotional office than others or of one candidate being the <italic>best</italic>, we offer this alternative formulation of the argument:</p>
<p id="P61"><underline>Identity*</underline>: We are the things that have our emotional states.</p>
<p id="P62"><underline>Candidates*</underline>: The things that have our emotional states are our animals.</p>
<p id="P63">Therefore, we are our animals (from Identity* and Candidates*)</p>
<p id="P64">The conclusion is the same. And nothing we&#x2019;ll say on behalf of our argument will hinge on this difference in formulation.</p>
</fn>

Expected behavior Within a footnote/endnote item, each <p> in the JATS should render as a separate paragraph in the HTML. However, there should only be one caret [^] linking back up to the note's reference in the text, and that link should appear at the very end of the note.

Screenshots 2021-12-08_16-47-02

pgoussy commented 1 year ago

Bumping this up! It appears that the duplicate caret links are no longer showing up, but multi-paragraph footnotes are still displaying with all of the <p> tags merged into a contiguous block of text: 2023-02-20_17-16-47

pgoussy commented 1 year ago

Bumping this up as we've gotten some author complaints about it, and Apex is claiming that they cannot manually add a line break between these endnote paragraphs. Can this be fixed in the liquid XSLT?