Juris-M / citeproc-js

A JavaScript implementation of the Citation Style Language (CSL) https://citeproc-js.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Words between locators break locator rendering

Tomagori opened this issue · comments

See forum post.

Currently, when citing multiple locators with words between them (e.g. "art. 202 para. 1 in conjunction with art. 130 para. 1"), not all locators are properly rendered. Often, the first is and, depending on some unknown factor, the last might be as well, though this varies.

citeproc-js relies on the specific locator prefixes to identify locator labels (e.g., "art.", "para.", etc.). When there are other words, the locator is rendered as a literal string. This isn't likely to be something that is fixable with the current citeproc-js implementation, at least until more formal support for multiple locators is built into CSL 1.1

Thanks for the swift reply. In that case, using it to cite legislation seems close to impossible at this stage, sadly.

No, that shouldn't be the case at all. Jurism is pretty widely used for citing case law and legislation.

How exactly are you entering the locator?

Pretty much as I describe it above, or, when using it for German papers, like this:

art. 3 para. 4 i.V.m. art. 59 para. 2

As one quite frequently has to cite multiple articles of the same law in a citation, not being able to do so the way that's expected in legal writing presents a major obstacle for me. I could just write out the locators, but at this point I think I'll just use regular foot-notes when citing legislation, as then I don't have a weird mix of Juris-M fields and plain text and I can more easily search/replace things later on with RegEx if need be.

I meant a full citation.

Apologies, if I misunderstood. If I were to cite the German Grundgesetz, the full citation would be: "Art. 3 Abs. 4 i.V.m. Art. 59 Abs. 2 GG"

My relevant CSL is:

<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.1mlz1" default-locale="de-DE" page-range-format="minimal">
  <info>
    <title>test</title>
    <id>test</id>
    <link href="test" rel="self"/>
    <link href="http://juris-m.github.io" rel="documentation"/>
    <category citation-format="note"/>
    <category field="law"/>
    <summary>test for citing legislation</summary>
    <updated>2021-04-30T19:25:20+02:00</updated>
    <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
  </info>
  <locale xml:lang="de-DE">
    <terms>
      <term name="article" form="short">Art.</term>
      <term name="paragraph" form="short">Abs.</term>
    </terms>
  </locale>
  <macro name="locator-note">
    <group delimiter="&amp;#x00A0;">
      <label variable="locator" form="short" text-case="capitalize-first"/>
      <text variable="locator"/>
    </group>
  </macro>
  <citation>
    <layout delimiter="; " suffix=".">
      <choose>
        <if type="legislation">
          <group delimiter="&amp;#x00A0;">
            <text macro="locator-note"/>
            <text variable="title-short"/>
          </group>
        </if>
        <else>
          <!-- nothing -->
        </else>
      </choose>
    </layout>
  </citation>
</style>

The corresponding item would be:

[
	{
		"id": "GrundgesetzFurBundesrepublik1949",
		"type": "legislation",
		"multi": {
			"main": {},
			"_keys": {}
		},
		"language": "de-DE",
		"title": "Grundgesetz für die Bundesrepublik Deutschland",
		"title-short": "GG",
		"jurisdiction": "de",
		"issued": {
			"date-parts": [
				[
					"1949",
					5,
					23
				]
			]
		}
	}
]

Entering art. 3 para. 4 i.V.m. art. 59 para. 2 as the locator returns "Art. 3 para. 4 i.V.m. art. 59 Abs. 2 GG."

If you add delimiters between the elements, then capitalization and term translation is applied correctly
art. 3, para. 4; i.V.m., art. 59, para. 2
yields
Art. 3, Abs. 4; i.V.m., Art. 59, Abs. 2 GG.

That's good to know, thanks! But unfortunately, the output is not correct (this is an issue with juridic styles in all German speaking countries, at least). AFAIK there's no way to override these delimiters with " ", right?

@fbennett any other way to tell the processor that there are multiple delimiters?