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

[XSLT] <list> "continued-from" not counting/numbering <list-item>s correctly #3238

Closed pgoussy closed 11 months ago

pgoussy commented 1 year ago

Describe the bug For the first time, I attempted to use the continued-from attribute requested in #2650. However, the numbering of the second list didn't continue the numbering of the first list as expected.

In this article, there is a two-item ordered list (L2) following "Dilemma 1", and a second two-item ordered list following "Dilemma 2" (L3). The numbering of these lists should be continuous. However, when I added continued-from="L2" to L3, the <list-item>s were numbered as 7 and 8 rather than 3 and 4 as I expected. I was confused by this until I realized that L1--a separate ordered list, unrelated to L2 and L3--contained four <list-item>s, which would mean L3 contained the seventh and eighth total <list-item>s in the article.

In other words, it appears that the numbered labels for each continued <list-item> are counting the number of <list-item>s in every preceding ordered list, not just the list that was directly referenced in the continued-from attribute.

Janeway version 1.4.3

To Reproduce Steps to reproduce the behavior:

  1. Go to https://journals.publishing.umich.edu/ptpbio/plugins/typesetting/preview_galley/article/2100/galley/963/#heading13
  2. Scroll down to "Dilemma 2" in section 5
  3. See list items "7" and "8", which should instead be "3" and "4"

Expected behavior If a <list list-type="order"> includes the continued-from attribute, then the numbering of that list should directly continue the numbering from the list referenced in continued-from.

In this example, because the list items in <list list-type="order" id="L2"> are numbered as 1 and 2, then the list items for <list list-type="order" id="L3" continued-from="L2"> should be numbered as 3 and 4. The numbering of L1 should not be taken into account at all.

pgoussy commented 1 year ago

Note that I have used a workaround to achieve the desired display, so the linked galley in the "To Reproduce" section no longer shows the error I've described here. Instead of using continued-from and list-type="order", I've simply added the labels manually:

<list list-type="simple" id="L3">
<list-item><p id="P69"><label>(3)</label> Competitionism and neutralism are analogs of MA.</p></list-item>
<list-item><p id="P70"><label>(4)</label> Competitionism and neutralism are each versions of the EFF.</p></list-item>
</list>