Juris-M / zotero

Juris-M is a variant of the free and friendly Zotero research platform, with support for legal and multilingual materials.
https://juris-m.github.io
Other
75 stars 12 forks source link

Automatic short-title used without being called #99

Closed georgd closed 3 years ago

georgd commented 3 years ago

With Juris-M and Word, using the jm-ibfd-with-page-label style, when citing a book, I get an automatic short-title created from a title with a hyphen or dash character as 'hereinafter':

S. Zapata, Brazil—Permanent Establishments, Topical Analyses IBFD (accessed 1 Mar. 2010) [hereinafter Brazil].

The style, however, would only print the 'hereinafter' bracket on these conditions (https://github.com/Juris-M/jm-styles/blob/master/jm-ibfd-with-page-label.csl#L452-L461, called by macro hereinafter, L462 and following):

  <macro name="title-short">
    <choose>
      <if variable="hereinafter">
        <text variable="hereinafter"/>
      </if>
      <else-if variable="title-short">
        <text variable="title-short"/>
      </else-if>
    </choose>
  </macro>

I'd expect this behaviour only if calling <text variable="title" form="short"/>.

The item can be found at https://www.zotero.org/groups/2352960/csl-tests-gmd/collections/RDQ7U532/items/ULHI695V

The style-test is rendering correctly with citeproc-test-runner 1.1.111 (see https://github.com/Juris-M/jm-style-tests/blob/master/jm-ibfd-with-page-label/topicalAnalysis_test025.txt)

fbennett commented 3 years ago

So you would expect variable="title-short" to test false unless a value is set in the Short Title field?

georgd commented 3 years ago

Yes. And citeproc-test-runner does so.

georgd commented 3 years ago

Otherwise, users would have to enter the whole title in the short-title field for each entry where they wouldn’t want a short-title.

Edit: In general, I don’t really like the short-title automatism. Juridic short title rules are too complex to implement automatically with reasonable efforts ('from the title, pick the most relevant substantives and adjectives, observing the list of mandatory abbreviations, even in composed words,...'). The program could support the user by proposing a short title. But currently it’s not at really transparent to the user why it happens and how.

fbennett commented 3 years ago

Ha. I was apparently doubtful about this, and wrapped the code in a condition:

https://github.com/Juris-M/citeproc-js/blob/master/src/load.js#L883

Jurism is setting that toggle. I'll turn it off in the next release.