Add the possibility to simplify sequential citations

Created on 23 April 2025, 5 days ago

Problem/Motivation

Add the possibility to simplify sequential citations to prevent long lists of citations in certain cases

Proposed resolution

Instead of always using a comma as separator, use a dash as separator if there are more than 2 sequential citations and only keep the first and last citation of the sequence. E.g. 1,2,3,5,6,7 would become 1-3, 5-7.

Feature request
Status

Active

Version

4.0

Component

Footnotes

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dieterholvoet
  • Pipeline finished with Failed
    5 days ago
    Total: 250s
    #480244
  • Pipeline finished with Failed
    5 days ago
    Total: 293s
    #480264
  • 🇬🇧United Kingdom scott_euser

    Thanks for the contributions!

    Few comments:

    1. We should at least warn that backlinks will no longer work (e.g. 1-5 won't link back to 2, 3, etc)
    2. I believe we should use 'en dash' to match standards
    3. Is the idea of preprocess hook because we don't have a single spot in the plugins/classes to build them? Wondering if maybe it's time to have a footnotes links builder service. Worried if we put the code to build them in too many places it'd be even harder to fix issues.
    4. And finally this needs test coverage, too much going on in the footnotes backlinks already to add things into there without coverage

    Thanks!

  • 🇧🇪Belgium dieterholvoet Brussels

    Is the idea of preprocess hook because we don't have a single spot in the plugins/classes to build them?

    Yes, just to make it work anywhere #theme => footnote_links is used. I guess it's only used at one place in the module, but it could also be used in another module. And also to support controlling this behaviour by passing #simplify_sequential_citations => TRUE/FALSE.

  • Pipeline finished with Failed
    4 days ago
    Total: 451s
    #481209
Production build 0.71.5 2024