andras-simonyi / citeproc-el

A CSL 1.0.2 Citation Processor for Emacs.
GNU General Public License v3.0
85 stars 9 forks source link

Feature request: Implement legal_commentary from CSL-M #92

Closed Quintus closed 2 years ago

Quintus commented 2 years ago

Dear Andreas,

after some more work with citeproc and CSL for my judicial works I came to the conclusion that the current situation for legal commentaries is insufficient for me. Below, I will first give some background on this specific kind of literature before I am going to describe the actual feature I would like to request. There is a tl;dr section at the end of the text.

Background on legal commentaries

First, about the German legal commenties. In the field of Law, we naturally work with, errm, laws. Laws in the European tradition are usually enacted by statute (in constrast to the anglo-american tradition of case law). A statute contains a finite number of articles with the content the parliament has voted about. More often than not, these statutes leave open questions behind. To draw an example from the current debate with which I am currently concerned is whether the German Copyright Code (Urheberrechtsgesetz, UrhG) allows in its § 69d para. 1 decompilation of computer programmes for the purpose of fixing bugs (thankfully, in the universe of Free Software the very idea of having to decompile for bugfixing is remote to say the least, but we all know that there is still enough software which is not Free Software). § 69d para. 1 UrhG is the national transformation of Art. 5 para. 1 of EU directive 2009/24 on which the Court of Justice of the European Union (CJEU, formerly European Court of Justice, ECJ) recently decided that the provivision in directive 2009/24 does entail such a right to decompilation for bugfixing (CJEU, judgment of 2021-10-06, C-13/20, ECLI:EU:C:2021:811). What this means is that § 69d para. 1 UrhG has to be interpreted in the way the CJEU has decided, i.e. that it entails such a right to decompilation for bugfixing.

This is now where the legal commentaries come into play. German legal commentaries enlist each and every article contained in a statute and explain ("comment") them. These explanations include pointers to relevant court decisions or other material relevant for the application of the article in question. For instance, legal commentaries containing explanations for § 69d UrhG will have to reference the aforementioned CJEU judgment so that the practisioners in law know that the CJEU decided as shown above. Typically, commentaries are not authored by a single person (though this does happen). Rather, they have an editor who selects reasonable people to comment on the different articles in the statute. Each article's explanation thus lists prominently the author of itself. Since usually the commentators do not restrict themselves to repeating court decisions, but also include their own thoughts on the commented material, it is often necessary to cite these commentaries. There exist different schemes on how to do this, but they all cite the actual author of the article explanation as the author of the work, not the editor. However, and this is quite a big however, there is only one entry in the bibliography for a commentary book, not one entry per commented article.

Let me give an example. In the German legal tradition we cite with footnotes. One of the typical citation schemes for citing the explanations contained in a commentary is as follows. "Rn" is short for "Randnummer", which translates to "number in the margin", I mapped this in my CSL styles to note.

Loewenheim, in: Schricker/Loewenheim, § 69a UrhG Rn. 14.

v. Ungern-Sternberg, in: Schricker/Loewenheim, § 22 UrhG Rn. 1.

A corresponding bibliography entry for these two footnotes can look like this ("zitiert als" means "cited as", "Bearbeiter" means "commentator" in this context):

Schricker, Gerhard/Loewenheim, Ulrich (Hrsg.): Urheberrecht, Kommentar, 4. Aufl. 2010 (zitiert als: Bearbeiter, in: Schricker/Loewenheim)

Note how there is only this one bibliography entry for both citations, even though they are by different authors. These different authors however are from the same work. Mr. Loewenheim (who accidentally is also editor of the work) explains on § 69a UrhG, whereas Mr. von Ungern-Sternberg explains § 22.

There are different types of commentaries which are cited differently. I have observed four kinds of them:

  1. Commentaries cited by their editors or, alternatively, by their founders. This is the type of commentary I used in the examples above.
  2. Commentaries cited by a well-known title. The commentary "Münchener Kommentar zum BGB", a huge multi-volume commentary on the German Civil Code, is of this type. A footnote citation would look like this: Schubert, in: MüKoBGB, § 242 Rn. 4. The long form in the bibliography could be: Münchener Kommentar zum Bürgerlichen Gesetzbuch, 8. Aufl. 2019 (ztiert als: Bearbeiter, in: MüKoBGB). The MüKo has a special problem in that its separate volumes are issued independently with their own editions. The solution is to have each volume with its own bibliography entry and add a "volume" field to it.
  3. Commentaries cited by their only author, i.e. the rare type of commentary entirely written by one person without a separate editor. The standard commentary on the German Penal Code is of this type and could have a footnote citation like Fischer, StGB, § 13 Rn. 10 and a long-form bibliography entry like Fischer, Strafgesetzbuch, Kommentar, 69. Aufl. 2022 (note there is no "zitiert als").
  4. Pure online commentaries. They have become popular in recent times. I normally treat them like type 1 commentaries since they are usually cited by their title. They are special in that they do not have a single edition, but different parts of them are updated independently and have different timestamps. I have not found a way to deal with that yet (no, they do not have stable URLs). A citation can look like v. Lewinski, in: BeckOK Datenschutzrecht, 38. Edition 01.01.2021, Art. 22 Rn. 1, and I have no idea how a long bibliography entry should look.

Actual feature request

I am aware that parts of what I outlined above are a feature request against org itself or even CSL. After studying the CSL-M specification I restrict myself to request only part of the above. Namely, please implement the legal_commentary type. It is specificed as a special variant of chapter, but promoted to a separate type. This is not entirely fortunate, since from the above you can deduce that it probably fits better to have it as an alternative to the book type (since it only appears once in the bibliography). The Biblatex citation style biblatex-juradiss does indeed treat it like so, requiring the writer to specify the actual commentator each time the work is cited (occupying and effectively replacing the prenote field of the LaTeX citation commands).

It is insufficient to just use the CSL chapter type for commentary entries. I am doing that currently, but since there exists a wealth of at least 4 different types of commentaries (see above) and because chapter also encompasses both of what Biblatex separates into @incollection and @inbook (see #67) the CSL instructions for chapter in my CSL styles grow into high complexity that will ultimately make them unmaintenable. The juristische-schulung.csl style works around that problem by abusing entry-encyclopedia for commentary entries, but that, naturally, makes it impossible to cite encyclopedia entries, which I do need separately, since there exist specialised encyclopedias for certain fields. Not everything is Wikipedia.

In addition to supporting the legal_commentary side on the CSL side, please also add support for @commentary on the Biblatex side and map these entries to legal_commentary. @commentary is specifically included in Biblatex for this type of work (Biblatex manual § 2.1.3).

As far as I understand the CSL-M specification, it does not conflict with the normal CSL 1.0.1 as far as "extensions" are concerned, and legal_commentary is marked as an "extension". That is, adding support for such parts of it should not require changes to existing features. Thus, it should be possible to implement legal_commentary without having to implement all of CSL-M. Things are different for "modifications" included in CSL-M, but at least at this point in time I do not request them.

CSL-M also adds a CSL variable commenter. Currently I record the authors of explanations in commentaries simply with the author field in my Biblatex database, which has been sufficient to me. It might however come in handy to have a separate field for them. Biblatex includes a field commentator (note the different spelling) which could be mapped to this. From reading § 2.2.2 of the Biblatex manual, it seems as if the field is aimed at linguists who comment on works authored by others. The "author" of a statute the commentary is for would in this diction be the Parliament. Statutes are considered to have no authors in German law citations, or rather, it is assumed everyone knows that the author is the Parliament.

There are some things in CSL-M which do not make sense to me at first sight. It requires the page variable to be strictly numeric for instance; given how often introductory chapters have roman numerals this seems like a useless restriction to me. But I do not request them to be added anyway. Things like this would break "ordinary" CSL styles used in CSL-M mode, which sounds like a bad idea to me. CSL-M should only enhance CSL.

tl;dr

Please add the CSL type legal_commentary from CSL-M and treat it as a separate type (similar to chapter). Also support @commentary in Biblatex databases and map them to the CSL type legal_commentary. If desired, support the CSL-M variable commenter and fill it in from the differently spelled commentator field in Biblatex.

Thanks for reading this voluminous ticket.

-quintus

bdarcus commented 2 years ago

I am aware that parts of what I outlined above are a feature request against org itself or even CSL. After studying the CSL-M specification I restrict myself to request only part of the above. Namely, please implement the legal_commentary type.

If this is really all you need, @Quintus, you should indeed propose it (ideally should have a month or more ago ;-)) to the csl schema repo.

cc @denismaier

Quintus commented 2 years ago

Am Donnerstag, dem 06. Januar 2022 schrieb bdarcus:

If this is really all you need, you should indeed propose it (ideally should have a month or more ago ;-)) to the csl schema repo.

I have not yet assessed all possibilities of CSL-M. Before approaching you and the other CSL people (many thanks for this great specification, by the way) I want to make sure I fully understand the status quo. I am still fairly new to CSL, citeproc, and even newer to CSL-M. As for missing the 1.0.2 CSL spec release (by the way, do you have release notes? I did not find a list of what is new on https://docs.citationstyles.org/en/v1.0.2/specification.html) I am sorry. However, the Chair I work at was loaded with work that prevented me from engaging in depth with CSL again. And I was quite happy to take a break during the Christmas holidays and not touch my PC too much.

Basically, I write my scientific content and am in parallel writing CSL styles while in parallel evaluating whether either of pure CSL or CSL-M can do what I need. Everything influences everything while I do this. I have changed how some of my Biblatex entries are stored so that I can better query them from the CSL files I write. It takes me a while to come to a conclusion like the one proposed in this ticket. Before I suggest something, I need to know if it is possible within the current system or not, if necessary by bending it a little too far (see the Festschrift thing in the prior issue, where mapping Biblatex’s “namea” to CSL’s “recipient” did the trick).

Next up for me after Andras agrees to this feature to be implemented would be to check if I somehow can manage to have only one exported bibliography entry for multiple @commentary entries in the Biblatex file. I don’t know. I have to research first. If it turns out to be impossible, I will check if I can write a little Elisp to do it for me. If it turns out to be more than “a little Elisp” I will raise another feature request.

This entire endevour of org+citeproc+CSL+CSL-M is an adventure for me. I progress through it slowly, uncovering new areas as I make my way. So, to sum it up, I cannot answer the question you posed to me: is this really all I need? I do not know yet. As I write more papers (and alas, my PhD thesis, for which I have not yet decided whether I will use org+citeproc+CSL(-M) or clang to my old and sometimes broken Biblatex style) new needs may arise. There is for instance another question lingering around I will have to research about -- in my CSL files I am currently checking against the presence of the "title-short" variable in order to differenciate commentary types 1 and 2 as per the above listing. I am not entirely sure if this is officially supported. If the "legal_commentary" type is added to citeproc I might be able to check against other variables; currently that would conflict with the other queries I use. In that case, the problem would be disposed of and I do not need to check. So again, this is a feature I will not request before I see I actually need it.

I have a secret goal. If Emacs/org/citeproc/CSL makes for a smooth editing experience for scientific writing in German law, I am going to suggest it to my fellow Word-plagued jurists (a collegue recently lost a day of work after Word crashed and corrupted the document so he had to resort to the prior day’s backup). But I will not do that before I cannot confidently author documents myself in it. Also, I will have to write a number of CSL styles for the German judicial journals. But do one thing after the other, as we say over here in Germany.

-quintus

-- Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite Passau, Deutschland | @.*** | O<

andras-simonyi commented 2 years ago

Just reacting, at least for now, to the core request: if I understood it correctly this doesn't require any change in the CSL "engine" of citeproc-el, because (for better or worse...) there is no built in list of legitimate types, anything can be used in the styles. The trickier part is the biblatex mapping, because currently the commentary biblatex type is mapped to the CSL book, which seems reasonable for most cases. Since the mapping is contained in a variable now (citeproc-blt-to-csl-types-alist) couldn't you simply customize it to map commentary to legal_commentary? This would hopefully make your style work without requiring any change in citeproc-el.

Quintus commented 2 years ago

there is no built in list of legitimate types, anything can be used in the styles.

This I did not know. I assumed that by just editing citeproc-blt-to-csl-types-alist I would risk breaking something in a subtile way. Thanks for the hint!

currently the commentary biblatex type is mapped to the CSL book, which seems reasonable for most cases.

I agree. This is a specific of German judicial citing and not something that is needed much elsewhere. Simply adapting the mapping for me is sufficient.

couldn't you simply customize it to map commentary to legal_commentary? This would hopefully make your style work without requiring any change in citeproc-el.

Yes! I tried your suggestion and can report it works as advertised. I used the following Elisp to overwrite the mapping:

(setf (alist-get 'commentary citeproc-blt-to-csl-types-alist) "legal_commentary")

Now checking in the CSL style against type="legal_commentary" does work.

Very nice, thank you! Still, to ensure this finds a more solid ground, I am later going to file a ticket against CSL for incorporating legal_commentary as a type probably, as has been suggested above.

-quintus

denismaier commented 2 years ago

I agree. This is a specific of German judicial citing and not something that is needed much elsewhere. Simply adapting the mapping for me is sufficient.

Just let me add that this is common not only in Germany, but also in Austria and Switzerland. @georgd would be the appropriate person to ask about this...

Anyway, the main problem with legal commentaries in the German language law scholarship is really that we'll need so some sort of hierarchical datamodel, or at least a cross-referencing mechanism for this. The idea would be to add the parent entry automatically in the bibliography when a child is cited, while child entries for a given work will have to be excluded from the bibliography. There may be other issues, but this would cover use cases 1, 2, and 4 outlined by @Quintus.

Another thing regarding the "not something that is needed much elsewhere" issue: Some people/styles do similar things with ordinary edited books, so a generic cross-linking mechanism might be useful there too.

georgd commented 2 years ago

When working on Austrian legal styles for Juris-M, I was confronted with a few shortcomings in CSL-M with regards to German language legal citation. I discussed them with Frank Bennett, the maintainer of CSL-M and citeproc-js, who found solutions for most of them and implemented them in CSL-M. I should be able to provide insight in the decisions that were met.

In general, I’d refrain from implementing solutions that are incompatible with vanilla CSL or CSL-M in order to not fragment the CSL-ecosystem any more.

I am aware that parts of what I outlined above are a feature request against org itself or even CSL. After studying the CSL-M specification I restrict myself to request only part of the above. Namely, please implement the legal_commentary type. It is specificed as a special variant of chapter, but promoted to a separate type. This is not entirely fortunate, since from the above you can deduce that it probably fits better to have it as an alternative to the book type (since it only appears once in the bibliography). The Biblatex citation style biblatex-juradiss does indeed treat it like so, requiring the writer to specify the actual commentator each time the work is cited (occupying and effectively replacing the prenote field of the LaTeX citation commands).

As the individual citation is on the level of the single commentary and not on the commentary volume level, the clean solution is the one implemented in CSL-M with legal_commentary as a variant of chapter. I did consider the book variant path as well but with the implementation of the CSL-M extensions track-containers and consolidate-containers such a workaround wasn’t necessary any longer. They take care of only putting the commentary volume once in the bibliography.

CSL-M also adds a CSL variable commenter. Currently I record the authors of explanations in commentaries simply with the author field in my Biblatex database, which has been sufficient to me. It might however come in handy to have a separate field for them. Biblatex includes a field commentator (note the different spelling) which could be mapped to this. From reading § 2.2.2 of the Biblatex manual, it seems as if the field is aimed at linguists who comment on works authored by others. The "author" of a statute the commentary is for would in this diction be the Parliament. Statutes are considered to have no authors in German law citations, or rather, it is assumed everyone knows that the author is the Parliament.

The commenter isn’t intended for use in legal_commentary. Instead, the commentary author is entered as author (the author of the law would be entered in an entry of the law itself). The commenter variable has been added for commenters of case law (Glossator·in) where author is intended for the judge(s).

There are some things in CSL-M which do not make sense to me at first sight. It requires the page variable to be strictly numeric for instance; given how often introductory chapters have roman numerals this seems like a useless restriction to me. But I do not request them to be added anyway. Things like this would break "ordinary" CSL styles used in CSL-M mode, which sounds like a bad idea to me. CSL-M should only enhance CSL.

This change of variable types is annoying when converting a CSL style to a CSL-M style but that’s about it for the style author. The type change seems to allow for manipulation functionality which is available for number variables but not for text variables. Nevertheless, you can still enter any text in a page number field. And a style is either interpreted as a CSL style or as a CSL-M style by citeproc-js, so the dialects are clearly separated.

One more remark: If you implement a German legal style with an enhanced set of variables, it would be great if you looked at how the set of variables is implemented in Juris-M. This would help interoperability between styles. E.g. online commentaries often come with version numbers. For this, Juris-M shows a version field in the legal commentary.

I have a secret goal. If Emacs/org/citeproc/CSL makes for a smooth editing experience for scientific writing in German law, I am going to suggest it to my fellow Word-plagued jurists (a collegue recently lost a day of work after Word crashed and corrupted the document so he had to resort to the prior day’s backup).

A nice goal. Here, at the WU Vienna, we actively recommend our jurists to use Juris-M with Word. Do you use Zotero to enter your CSL data?

denismaier commented 2 years ago

but with the implementation of the CSL-M extensions track-containers and consolidate-containers such a workaround wasn’t necessary any longer. They take care of only putting the commentary volume once in the bibliography.

Yes, that's a neat solution!

Quintus commented 2 years ago

Quite an interesting discussion.

with the implementation of the CSL-M extensions track-containers and consolidate-containers such a workaround wasn’t necessary any longer. They take care of only putting the commentary volume once in the bibliography.

As I outlined further above, I am still making my way through all these specification documents. I pretty much jumped from LaTeX/Biblatex directly to citeproc-el and am using pure Word at work. Thanks for pointing these mechanisms out; they seem to cover the problem with the hierarchical entries. Hopefully this finds its way into citeproc-el.

This change of variable types is annoying when converting a CSL style to a CSL-M style but that’s about it for the style author. The type change seems to allow for manipulation functionality which is available for number variables but not for text variables. Nevertheless, you can still enter any text in a page number field. And a style is either interpreted as a CSL style or as a CSL-M style by citeproc-js, so the dialects are clearly separated.

If I understand correctly, it will not cause problems to use the same database with a CSL or CSL-M style, since the differences are minor enough. Every once in a while, it is worthwhile to write for media outside the Law profession. In that case, I have nothing to object other than to point out that it can increase the effort for the programmer, as it is not possible to treat ordinary CSL styles as valid CSL-M.

One more remark: If you implement a German legal style with an enhanced set of variables, it would be great if you looked at how the set of variables is implemented in Juris-M.

I can certainly take a look, but I can make no promises. I will make my styles public once they reach a stable state, but in the first line they need to work for me who wants to stay off Word as far as possible. Before I studied Law I was already programming and became familiar with Emacs, and I still want to do my work with Emacs to the largest extend possible. This is what will drive my decisions in writing the styles, therefore they will assume the use of citeproc-el. I do agree that being able to use the same styles in Juris-M and citeproc-el (and other CSL processors like citeproc-js) is an advantage, though, so I will try to not deliberately include constructs which do not interoperate well. Collisions I will however resolve towards citeproc-el.

A nice goal. Here, at the WU Vienna, we actively recommend our jurists to use Juris-M with Word. Do you use Zotero to enter your CSL data?

As a good Emacs user I use Ebib, and I maintain my main bibliographic database in Biblatex format (.bib). That’s what most tooling supports, that’s what I already have had from my prior work with LaTeX, and it mostly works for me. The rough edges yield issues on this tracker currently. And maybe I want to or need to resort to writing something in LaTeX again, a path which I want to keep open in any case. I don’t mind writing in LaTeX; if it would not be required to submit papers in DOCX format to the publishers, I would have continued to use it, but LaTeX converts badly to DOCX for obvious reasons. org converts fine (via ODT as an intermediate format).

The university of Passau where I am employed does not have any official recommendations, but it does license Citavi. From my observations, most local jurists just use Word as-is, typing all the citations by hand, but some do use Citavi (which I never used so I cannot comment on it). Even people using OpenOffice/LibreOffice are an exception, and certainly I have never seen a jurist using Emacs. Possibly relativising a little on my broad statement before, I am certainly not going to actively try to convert anyone; the Emacs way of doing things is not for everyone, though I believe that it does have merits even for non-programmers. But that’s something everyone must find for himself. A possibility to confidently write papers in our discipline with Emacs however is something I do support and try to help with.

-quintus

georgd commented 2 years ago

This change of variable types is annoying when converting a CSL style to a CSL-M style but that’s about it for the style author. The type change seems to allow for manipulation functionality which is available for number variables but not for text variables. Nevertheless, you can still enter any text in a page number field. And a style is either interpreted as a CSL style or as a CSL-M style by citeproc-js, so the dialects are clearly separated.

If I understand correctly, it will not cause problems to use the same database with a CSL or CSL-M style, since the differences are minor enough. Every once in a while, it is worthwhile to write for media outside the Law profession. In that case, I have nothing to object other than to point out that it can increase the effort for the programmer, as it is not possible to treat ordinary CSL styles as valid CSL-M.

Yes. there shouldn’t be a problem, in general. The database consists of a collection of fields per item and fields that aren’t referenced in a style simply won’t be used. Just for some fields you should be cautious as for what you enter, as CSL-M might put restrictions on what is a vaild input:

This is especially true for the jurisdiction field. CSL-M allows you to modularise styles with respect to the formatting of legal item types according to the jurisdiction they belong to. Therefore, the contents of the jurisdiction field need to be a value accepted by the CSL-M scheme. Otherwise, the citeproc might crash.

Furthermore, if you want to make use of the style modules, the court field needs to apply the court code defined in the Legal Resource Registry.

And there’s some special formatting for the language field if you need multilingual input/output (a vector like en > de).

One more remark: If you implement a German legal style with an enhanced set of variables, it would be great if you looked at how the set of variables is implemented in Juris-M.

I can certainly take a look, but I can make no promises. I will make my styles public once they reach a stable state, but in the first line they need to work for me who wants to stay off Word as far as possible. Before I studied Law I was already programming and became familiar with Emacs, and I still want to do my work with Emacs to the largest extend possible. This is what will drive my decisions in writing the styles, therefore they will assume the use of citeproc-el. I do agree that being able to use the same styles in Juris-M and citeproc-el (and other CSL processors like citeproc-js) is an advantage, though, so I will try to not deliberately include constructs which do not interoperate well. Collisions I will however resolve towards citeproc-el.

I understand that. You belong to a rare subspecies of legal scholars :D

My point of view is a bit different. I’m not a lawyer but a librarian and as such I support our scholars and students in the use of reference management systems. From my experience, Citavi and Juris-M are the only reasonable choices for all the complexity of legal citation when used with Word. What Zotero is missing, I think you are experiencing already and EndNote has by far too limited capabilities when it comes to citation styles.

Personally, I prefer writing Markdown (or LaTeX directly) and I do recommend such workflow to more tech savvy colleagues but the legal ones all use Word. Therefore, IMO, it is preferable to have legal styles written in CSL-M rather than vanilla CSL. But of course, for you it’s of no use if citeproc-el (or for markdown users pandoc’s citeproc) doesn’t support it.

The discussion to include CSL-M functionality in CSL is old (much older than my participation in it) and – to a certain degree understandably – the CSL maintainers have been reluctant to do so, for anything more advanced than simple fields and item types (even more so if they are not used in the English speaking world). There’s an open issue that tries to find out what can be added to CSL to make it more suitable for legal citations within non-legal styles: https://github.com/citation-style-language/schema/issues/353

Quintus commented 2 years ago

Thank you for this thoughtful answer. I need to catch up with what has been written prior about the inclusion of CSL-M into CSL indeed.

This is especially true for the jurisdiction field.

But the CSL-M specification says jurisdiction is deprecated?

Furthermore, if you want to make use of the style modules, the court field needs to apply the court code defined in the Legal Resource Registry.

Thanks for the pointer. It looks like a useful thing to make use of. It isn’t obvious at first glance how to compose the identifier, but I will dedicate some time to do it right. Hopefully I can figure out a way to automatically generate the identifier for my existing database entries.

I understand that. You belong to a rare subspecies of legal scholars :D

Probably. It is always good for entertainment. A few days ago a collegue watched me over the shoulder while copying some files around via terminal. He said that this looked “rather professional”. And this was not even while I was at Emacs (I still need to warm up more with Dired).

From my experience as a programmer I have adopted the desire to meld my computing environment exactly into the way I would like it to be. Since as jurists we work with text, Emacs is, in my opinion, the best option. It just needs a little more interoperability since we of course do not live on an isolated island. I thus take personal interest in the legal framework for interoperability and have actually published a paper about its use in APIs (Zeitschrift zum Innovations- und Technikrecht (InTeR) 2021, pp. 27 ff. and pp. 90 ff., German).

At least I want to enable those who want to avoid (Microsoft) vendor lock-in.

My point of view is a bit different. I’m not a lawyer but a librarian and as such I support our scholars and students in the use of reference management systems.

Once I find my way into the existing tooling and how it relates to Emacs and citeproc-el, I think I am going to write about how I do things and will gladly include links to Juris-M and/or other CSL-M software. Are their public resources from your university I can link to for this purpose?

You are the very first person I talked to who recommends not using Word+Citavi for legal citations. It is a relief to see that they do exist and I will do my best to interoperate. I should give you a visit when I hop over the border again at some point after the pandemic has normalised; Vienna isn’t too far from Passau.

Therefore, IMO, it is preferable to have legal styles written in CSL-M rather than vanilla CSL

I agree with this, but the utility for me lasts with citeproc-el implementing the features I need from it (see the followup discussion in #96). These days, my time for programming is pretty limited, but if Andras refuses inclusion of these features because I am too much of an exception, I will try my hand at it myself and make a PR. I never contributed Elisp before (my .emacs.d/init.el looks horrible from a quality point of view, I am mostly a C++ and Ruby programmer), but for a tool I am likely to adopt for the rest of my academic life it is worth the effort. Just don’t count on me doing it quickly.

Quintus commented 2 years ago

@georgd I am trying to wind my head around how to properly format a CSL-M-conforming entry for a court decision (legal_case) but I haven’t quite understood things yet. So I read through the CSL-M specification, the README of the legal resource registry repository and your explanations above. For a CSL-M-conforming legal_case entry in a CSL-JSON bibliography file I need to:

In the CSL-M style file I can then test against the contents of jurisdiction by means of the condition extensions country (contains only the first part of jurisdiction) and court-class, which is specifically tailored toward testing the virtual variable of the same name, which in turn is constructed by matching jurisdiction with the court-class specification in the style file’s <locale/> section. For the court name, I can either output authority (containing the user's preferred representation) or court (result of the automatic processing of jurisdiction?)?

Did I get things correct?

Quintus commented 2 years ago

Just to be clear: I see that there is a mention of jurisdiction in the CSL-M spec, but it is expressly listed in the section “deprecated and decommissioned features”, so I see no point in trying to conform with it. I feel a little clueless now as to how things fit together today. Also, the link to the URN:LEX specification in the CSL-M spec is broken, it’s now here.

georgd commented 2 years ago

@Quintus I’m sorry! I did compile an answer to your last post, but obviously never sent it. Now it got lost in some Nirvana.

The deprecation of jurisdiction is only valid for the condition jurisdiction which was superseded by the condition country which only covers the top-level jurisdictions. Sublevels should be handled in modules like the ones you find at https://github.com/Juris-M/style-modules (e.g. juris-us+fl-IndigoTemp.csl.

Here’s an example from my test suite:

[
  {
    "type": "legal_case",
    "authority": "bgh",
    "number": "IV ZR 241/18",
    "issued": {
      "literal": "09.09.2019",
      "date-parts": [
        [],
        []
      ]
    },
    "note": "",
    "multi": {
      "main": {},
      "_keys": {}
    },
    "jurisdiction": "de"
  }
]

Another one with reporter:

[
  {
    "id": "3456789",
    "type": "legal_case",
    "authority": "bverwg",
    "number": "11 C 8/97",
    "container-title": "Buchholz",
    "document-name": "310 § 65 VwGO",
    "document-number": "131",
    "issued": {
      "raw": "1999-09-01"
    },
    "genre": "Beschl.",
    "note": "",
    "multi": {
      "main": {},
      "_keys": {}
    },
    "jurisdiction": "de"
  }
]

On court-class, the way I implemented it in the DE style-module can be found her: https://github.com/Juris-M/style-modules/blob/fecfdf82af773711ce887d54db0f18d38271999c/juris-de.csl#L19. This is mainly for sorting purposes in the styles I have written so far.

Quintus commented 2 years ago

Thank you, that was helpful. So jurisdiction, at least from a teutonic view, effectively boils down to the court’s covered area (örtliche Zuständigkeit), while authority gives the actual court name (without the city name) in the standard-abbreviated form assigned by the LRR. This sounds sensible for me and now the court-class element within <locale/> finally makes sense to me (the value of name assigned there is what can be tested for in the court-class condition, right?).

One more question. What exactly is the purpose of a style module? The term is mentioned multiple times in the CSL-M specification, but it is not defined. When I look at the file you linked, I see definitions of CSL macros, but they are not used anywhere (in fact there appear to be no actual CSL definitions in the file). I conclude from this that somehow, Juris-M provides CSL files with, mmh, holes in it in form of macros with the names defined in the style modules, but I’d like to have this conclusion verified. If so, are these macro names anywhere formally defined? If not, I’d take style modules as a Juris-M specific thing and would not ask Andras to implement that for citeproc-el (or try that myself).

On court-class, the way I implemented it in the DE style-module can be found her: https://github.com/Juris-M/style-modules/blob/fecfdf82af773711ce887d54db0f18d38271999c/juris-de.csl#L19.

It’s missing the recently (2018) re-erected Bavarian Oberstes Bayerisches Landesgericht (BayObLG). It’s on the same level as the Bundesgerichtshof (BGH) (highest court), but only has jurisdiction over Bavaria and only in limited areas of law. Effectively it’s a pet project of Bavaria’s political leader to show his support for local problems.

georgd commented 2 years ago

Thank you, that was helpful. So jurisdiction, at least from a teutonic view, effectively boils down to the court’s covered area (örtliche Zuständigkeit), while authority gives the actual court name (without the city name) in the standard-abbreviated form assigned by the LRR.

Exactly, as far as the code is concerned. The citeproc then can render them in a translated form or with alternate forms, if necessary and required by the style file (by preference setting like in https://github.com/Juris-M/jm-styles/blob/master/jm-leg-cit-rechtsquellenverzeichnis-literaturverzeichnis.csl#L24).

This sounds sensible for me and now the court-class element within <locale/> finally makes sense to me (the value of name assigned there is what can be tested for in the court-class condition, right?).

Right. You can see an implementation here, for example: https://github.com/Juris-M/jm-styles/blob/master/jm-leg-cit-rechtsquellenverzeichnis-literaturverzeichnis.csl#L771-L806

One more question. What exactly is the purpose of a style module? The term is mentioned multiple times in the CSL-M specification, but it is not defined. When I look at the file you linked, I see definitions of CSL macros, but they are not used anywhere (in fact there appear to be no actual CSL definitions in the file). I conclude from this that somehow, Juris-M provides CSL files with, mmh, holes in it in form of macros with the names defined in the style modules, but I’d like to have this conclusion verified. If so, are these macro names anywhere formally defined? If not, I’d take style modules as a Juris-M specific thing and would not ask Andras to implement that for citeproc-el (or try that myself).

Style modules are created for jurisdictions or subjurisdictions so they can be reused in different styles. There’s a fixed set of macros which can be used in a module and they have to be called in a certain manner in a style file (see style module https://github.com/Juris-M/style-modules/blob/master/juris-de.csl#L41 and following lines and style file https://github.com/Juris-M/jm-styles/blob/master/jm-leg-cit-rechtsquellenverzeichnis-literaturverzeichnis.csl#L568-L595).

On court-class, the way I implemented it in the DE style-module can be found her: https://github.com/Juris-M/style-modules/blob/fecfdf82af773711ce887d54db0f18d38271999c/juris-de.csl#L19.

It’s missing the recently (2018) re-erected Bavarian Oberstes Bayerisches Landesgericht (BayObLG). It’s on the same level as the Bundesgerichtshof (BGH) (highest court), but only has jurisdiction over Bavaria and only in limited areas of law. Effectively it’s a pet project of Bavaria’s political leader to show his support for local problems.

In LRR, the court is defined here https://github.com/Juris-M/legal-resource-registry/blob/master/src/juris-de-desc.json#L1170-L1175. I have to admit that I wasn’t totally sure about the nature of that court when I defined the court classes. Is it an ordinary court or an administrative one? Above BayVerfGH and/or the OLGs? According to what you said now, I should assign it the court class o1, right?

georgd commented 2 years ago

Thank you, that was helpful. So jurisdiction, at least from a teutonic view, effectively boils down to the court’s covered area (örtliche Zuständigkeit),

Just a remark: the LRR tries to replicate, if possible, the hierarchical relationship of courts. This is completely covered for AT for both administrative and ordinary jurisdiction, for extant and former courts of the Second Republic. Recently, it has been implemented for CH, too. And as far as I can tell, the same is true for DE and other jurisdictions, like the US. For France, however, where a recent reform has changed the whole system, only the higher courts are covered completely and systematically. In the lower instances, there are some inaccuracies where various branches follow different territorial divisions.