Closed JohnLukeBentley closed 4 years ago
The Indigo book style is modular. The juris- prefixed macros in the style are placeholders that will be used only if the modular-style infrastructure is not available (as in Mendeley or Zotero).
To see output from your code, use the online editor. Open a jurisdiction for editing. Paste in your juris macro to replace the sample version. Add your change to juris-title. The style module should validate, and you can preview the behavior of the style.
If bundled with Juris-M, the module would be used when that jurisdiction is set in the Jurisdiction field of an item.
In addition to testing output with the JurisM MS word plugin I've lately taken your suggestion above and tested output with the editor. I get contradicting results. Before detailing that I might ask a high order question to clarify what I should expect ...
Module Composition: Scaffolding and Components
Each bracketed term [in citation sample output] comes from a separate CSL macro (a component) supplied by the legal style module. Components are joined together in the style that calls the module, with code that we will call the scaffolding.
In our module for Atlantis, the scaffolding is contained in the cs:citation element at the bottom of the file. We will not touch this block in this tutorial—it is, in fact, not part of the module code. In production, our module will be called by another, more general style (Chicago Full Note, APA, OSCOLA, etc.), and the calling style will supply its own scaffolding.
The module components consist of a set of juris-prefixed macros. Here is the full list of them, all of which must be defined:
From that I take it I'm to understand that in a *.csl file that targets juris-m, when used with Juris-M, rather than Zotero or Mendeley:
juris-
prefixed macros; andcs:citation
code which will (for entries with a jurisdiction set) call the "module" (some set of juris-
prefixed macros).But I'm a bit confused by ...
The Indigo book style is modular. The juris- prefixed macros in the style are placeholders that will be used only if the modular-style infrastructure is not available (as in Mendeley or Zotero).
...
If bundled with Juris-M, the module would be used when that jurisdiction is set in the Jurisdiction field of an item.
... which would seem to mean:
If jm-indigobook.csl has been modded so that the "module" (juris-
prefixed macros) have been defined:
juris-
prefixed macros) will be ignored and the "scaffolding" (CSL conventional cs:citation
code) will be used; andjuris-
prefixed macros) will be used and the "scaffolding" (CSL conventional cs:citation
code) will be [also used | or ignored (I'm not sure which)];To put this as a question:
If jm-indigobook.csl has been modded so that the "module" (juris-
prefixed macros) have been defined and this is used with JurisM against an Entry with a jurisdiction set, which of the following should occur:
juris-
prefixed macros) will be used and the "scaffolding" (CSL conventional cs:citation
code) will be also be used.juris-
prefixed macros) will be used and the "scaffolding" (CSL conventional cs:citation
code) will be ignored.?
Note this question, a question of when the "scaffolding" (CSL conventional cs:citation
code) is ignored, is orthogonal to the original post ... as that post (so it appears to me) demonstrates a case where the "module" (juris-
prefixed macros) is ignored while the other relevant conditions are met:
juris-
prefixed macros) has been defined;... but if you answer the question I ask in this post (and correct any other misunderstanding I'm betraying) then I might be able make the original post clearer.
Your confusion is understandable. The documentation was written soon after coming off the coding of modular style support, and it could do with a round of revision for readability.
From that I take it I'm to understand that in a *.csl file that targets juris-m, when used with Juris-M, rather than Zotero or Mendeley:
- A "module" entails the set of juris- prefixed macros; and
- The "scaffolding" contains cs:citation code which will (for entries with a jurisdiction set) call the "module" (some set of juris- prefixed macros).
Yes, that's the scenario.
If jm-indigobook.csl has been modded so that the "module" (juris- prefixed macros) have been defined:
- In Zotero or Mendeley: the "module" (juris- prefixed macros) will be ignored and the "scaffolding" (CSL conventional cs:citation code) will be used; and
- In JurisM and against an entry with a jurisdiction set: the "module" (juris- prefixed macros) will be used and the "scaffolding" (CSL conventional cs:citation code) will be [also used | or ignored (I'm not sure which)];
It's the latter. The macros defined in the style are replaced by the instance in the module. When I wrote "scaffolding" in the docs, I meant the macro that calls the modular elements the "jurism" macro in the JM styles, if I recall correctly), not the eponymous placeholders. The scaffolding controls how the elements will be joined together, how back-references will be composed, and might add some styling (like italics on juris-title
, say). Working out which aspects of a cite are determined entirely by the jurisdiction, and which aspects can be controlled by the calling style, was the hardest part of the design. (And the hardest part of that was the handling of locators and locator labels. I think the solution in code is solid, but the documentation for that may be particularly opaque.)
If jm-indigobook.csl has been modded so that the "module" (juris- prefixed macros) have been defined and this is used with JurisM against an Entry with a jurisdiction set, which of the following should occur:
- the "module" (juris- prefixed macros) will be used and the "scaffolding" (CSL conventional cs:citation code) will be also be used.
- the "module" (juris- prefixed macros) will be used and the "scaffolding" (CSL conventional cs:citation code) will be ignored.
Again, the latter. Thejuris-
macros in the parent style are used only if the processor has no jurisdiction support, or support has been disabled. Note, though, that only the juris-
macros overwrite their counterparts.
Does that help to clarify? If something still seems not right, let me know: I'm confident that it's working correctly, but it's also important that it be understood (and comprehensible).
Ah - there are two points that I should have raised more clearly earlier.
Submit
button, it does not immediately become available in Juris-M. It is saved as a pull request to the Juris-M/style-modules
project on GitHub. I never merge the zz
samples, since they are not meant for production. For production modules, there is a workflow:
style-modules
master.style-modules
is pulled into the myles
plugin project master.myles
plugin is pulled into the zotero-standalone-build
project.zotero-standalone-build
are used to compose the working client and binary updates for clients in the wild.myles
plugin, as part of a general update.At the end of all that, the module is available in clients via the Word and LibreOffice plugins. Testing locally in Word would require a local development copy of the client. That takes some work to set up, and it isn't really necessary, since the online style editor tells the truth about the behavior of the module code.
On submitting csl files (Styles) entered via the online editor. Thanks for that explanation. I had assumed [Submit] just saved a user's file between sessions - for testing/play purposes only. I wasn't aware that this was made available to a production Juris-M (via the plugin architecture you describe). I see, for example and as you describe, my practice sessions manifesting as pull requests at https://github.com/Juris-M/style-modules/pull/240 (You, fbennett, can reject those pull requests).
As a matter separate to this thread's purpose it might be worth providing a [Temp] V [Production Save] submit option.
Your confusion is understandable. The documentation was written soon after coming off the coding of modular style support, and it could do with a round of revision for readability.
On the other hand I do see you've put a great deal of good effort into the documentation. Having an interactive tutorial to demonstrate the jusris-m, csl based, file format is a great tool. But yes there's room for revision for readability. And, yes, if this thread doesn't identify a need to change code it my revealed confusion might assist in identifying points where the documentation can be revised. However ...
I'm confident that it's working correctly,...
Given that, my understanding needs further correction to account for the contradicting output I'm getting.
So from your response above I have confirmed, that if I use
... then, with regard to the the JurisM MS Word Plugin ...
the "module" (juris- prefixed macros) will be used and the "scaffolding" (CSL conventional cs:citation code) will be ignored.
I'll call that "the expected output".
However, the online sampler (aka the "editor", at https://juris-m.github.io/editor/) output contradicts the expected output ...
"module" (juris- prefixed macros) is used and the "scaffolding" (CSL conventional cs:citation code) is used.
... and, as I attempted to demonstrate in the first post, Juris-M's Word plugin output contradicts both the expected output, and the online sampler output:
"module" (juris- prefixed macros) is ignored and the "scaffolding" (CSL conventional cs:citation code) is used.
These results can be reproduced as follows ...
Setup the entry in JurisM:
In https://juris-m.github.io/editor/ :
Observe the "Full plain" output:
JLB 001, JLB 002 JLB 003.
Note the only purpose for my <text value="JLB XXX" />
nodes in jlb-test-jm-indigobook.csl
is just to mark which code a processor picks up during output. That is, those JLB nodes are just debugging nodes.
<text value="JLB 001" />
is the only child of <macro name="juris-title">
<text value="JLB 002" />
is a descendant of <macro name="jurism">
<text value="JLB 003" />
is a descendant of <citation ...>
The remaining juris-*
macros remain undefined.
These debugging nodes aren't intended to represent my beliefs about the location of where production modifications should occur. And, moreover, I'm aware that in production underneath <macro name="juris-title">
you'd be wanting <text variable="title"/>
somewhere (with all the conditions and formatting that constitute the Jurism/csl author's desires).
So with those debugging markers in place the output seems to show: the "module" (juris- prefixed macros) is used and the "scaffolding" (CSL conventional cs:citation code) is used.
In JurisM standalone > Edit > Preferences > Cite > |Styles| ...
In MS Word.
Strata Schemes Management Act, JLB 002 (Australia New South Wales 2015) JLB 003.
So the two juris-m processors, the one driving the https://juris-m.github.io/editor/ and the one driving MS Word, produce different results given the same input file jlb-test-jm-indigobook.csl and the same entry data (assuming no mistake).
But the chief point is that the JurisM MS Word Plugin output seems to show: the "module" (juris- prefixed macros) is ignored and the "scaffolding" (CSL conventional cs:citation code) is used. This contradicts the expected output.
Output Location | "module" (juris- prefixed macros) | "scaffolding" (CSL conventional cs:citation code) | Example |
---|---|---|---|
Expected | Used | Ignored | JLB 001 |
Online Sampler | Used | Used | JLB 001, JLB 002 JLB 003. |
Word Plugin | Ignored | Used | Strata Schemes Management Act, JLB 002 (Australia New South Wales 2015) JLB 003. |
It seems to me you must either:
Change your endorsement of the expected outcome of the JurisM MS Word Plugin ...
So from your response above I have confirmed, that if I use
- JurisM standalone (not, for example, Zotero Standalone);
- With an entry having a jurisdiction;
- Using a modified version of jm-indigobook.csl;
- Where that modified version of jm-indigobook.csl includes code in the "juris-" prefixed macros;
... then, with regard to the the JurisM MS Word Plugin ...
the "module" (juris- prefixed macros) will be used and the "scaffolding" (CSL conventional cs:citation code) will be ignored.
... or ...
Change the output of the Word Plugin to match the expected outcome; or
Otherwise untangle my continued confusion.
The online editor has been discontinued, in favor of Citeproc Test Runner, which can perform batch testing of the legal style modules in the context of a calling style.
Following the tutorial at the Juris-M editor https://juris-m.github.io/editor/ I'm expecting to be able to add code to the marcro's prefixed with
juris-
.However, behold my gist JohnLukeBentley/jlb-test-jm-indigobook.csl
With respect to
JM Indigo Book
I've made the following modifications:Changed some info stuff:
Changed the (initially blank)
juris-title
macro to:In the
jurism
macro, full-format section, modded as followsIn the
citation
section modded as followsIn MS Word I have a Statue (legislation type) and Case (legal_case type) output as follows:
Statue:
Case:
The output "JLB 001" is missing when I'd expect it to override the titles to produce something like:
Statue:
Case:
Perhaps the processor provides sensible defaults when it encounters a blank
juris-
prefixed macro, as in ...... but there's a bug in the processor that means it fails to pick up on non blank
juris-
prefixed macros. That is, it wrongly ignores ...???
Edit: I'm on 5.0.44m22