question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make punctuation collapsing localisable

See original GitHub issue

Punctuation in input data may collide with punctuation in style definitions. The citeprocs handle these punctuation clusters by applying hard-coded rules. While these rules have been chosen on a good basis and probably suffice for all English language documents and most others in Latin script, some style guides or non-English standards might require divergent collapsing.

I brought this up on the citeproc-js issue tracker for a German language style which requires suppression of subsequent , after titles ending in ! or ?, with the intention of a CSLm-extension: https://github.com/Juris-M/citeproc-js/issues/154. @denismaier suggested to discuss this here and also came up with possible solutions to make punctuation collapsing localisable on a per-style basis:

<punct-handling>
  <punct>
    <input value="?,"/>
    <output value="?"/>
  </punct>
</punct-handling>

Perhaps this is closer to how it looks in citeproc-js:

<punct-handling>
  <punct value="?">
    <next value="!" result="?!"/>
    <next value="." result="?"/>
    <next value=":" result="?"/>
    <next value="," result="?,"/>
    <next value=";" result="?;"/>
  </punct>
</punct-handling>

We can take the combinations from citeproc-js as a basis for here if we can agree upon a syntax. I think CSL 1.1 is a good target for this. But perhaps we can even add it to 1.0.2 as this just makes the current behaviour explicit and configurable.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:44 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
bdarcuscommented, Oct 6, 2020

Not commenting on the details, but do keep in mind that XML elements are ordered.

1reaction
bwiernikcommented, Oct 5, 2020

@cormacrelf the motivation is that some locales use different punctuation symbols entirely (e.g., Persian has its own semicolon symbol). Currently, supporting that requires a completely separate style, rather than just being able to localize the semicolon symbol.

It’s a fairly similar situation as in French where a colon is localized to narrow-no-break-space-colon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Collapse or expand parts of a document - Microsoft Support
The ability to collapse and expand content in your document is based on its outline level. You can quickly add an outline level...
Read more >
A.N.R.GHG Publishing Helper – WordPress 插件 | WordPress.org ...
Display lists of references in the post or page;; Optionally make them collapsible, and display them collapsed or expanded at page load; ...
Read more >
How do I collapse certain strings with a specific pattern from a ...
One way to do it is to use strsplit , with the following logic * Split on empty space * Space preceded by...
Read more >
retirement Archives | Technical Debt for Policymakers
Collapse of the I-35W bridge in Minneapolis, Minnesota ... That makes retiring localizable technical debt a particularly manageable challenge.
Read more >
[PDF] Massive black hole seeds born via direct gas collapse in ...
the formation of black holes from direct collapse in metal-free ... ence model which could make black hole masses rise significantly.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found