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
78 stars 12 forks source link

Ideas for language variant selections #60

Open denismaier opened 5 years ago

denismaier commented 5 years ago

Currently, non-fullnote note styes produce an superflous secondary element on position=first. The question is if this behaviour can be changed. One option would be a gui setting to suppress this, but the preference menu is currently being redesigned for ReactJs on the Zotero side, so any GUI improvements will take some time.

So perhaps in the meantime it might be an option to define the language variant patterns using some plain text style files, just like CSL styles? I agree that an intuitive UI would be amazing, something like the drag-and-drop selector Frank describes here. On the other hand, it's perhaps easier without GUI constraints. I am thinking of something like this:

<variants>
  <titles primary="transliteration" secondary="original" secondary-affixes="brackets"/>
</variants>

This could be easily extended with more nodes allowing for different settings in notes and in the bibliography.

<variants>
  <bibliography>
    <titles primary="transliteration" secondary="original" secondary-affixes="brackets"/>
  </bibliography>
  <notes>
    <titles primary="transliteration"/ >
  </notes>
</variants>

Or even:

<variants>
  <bibliography>
    <titles primary="transliteration" secondary="original" secondary-affixes="brackets"/>
  </bibliography>
  <notes>
    <first>
      <titles primary="transliteration" secondary="original" secondary-affixes="brackets"/ >
    </first>
    <subsequent>
      <titles primary="transliteration"/ >
    </subsequent>
  </notes>
</variants>

Obviously, a GUI is more intuitive, but given that CSL works similarly, such an approach might also be justifiable, at least if reactifying the menu is the issue. Also, I don't have the impression that this is utterly complex.

fbennett commented 5 years ago

We can look at adding a toggle in the current UI to suppress secondary forms on citations. If that will satisfy requirements, it's not super-hard to stir in.

denismaier commented 5 years ago

Yes, that sounds like a good idea. I don't think we can come up with a way to suppress automatically without getting into trouble. One possible automatic way would be a test like "if there is no element with if position=first under cs:citation then suppress secondary forms on citations. But I would think that this is very error-prone and easily breakable... So a checkbox in the current UI sounds like the best solution.

fbennett commented 4 years ago

Sorry for leaving this for quite a long time. Looking back over the issue, I think I would need specific output examples to work from, before attempting to address it.

denismaier commented 4 years ago

Here too, thanks for coming back to this. I can prepare some examples next week.

denismaier commented 4 years ago

Let's say we have this a bibliographic reference like so:

A. Author. This is a title [with a variant]. Publisher 2020.

In a non-fullnote style, I wouldn't expect the variant to be rendered in the first citation. Instead, I'd expect this:

Author, This is a title.

But even in a fullnote style, you might want to have the variants only in the bibliography. So you might want this in the citations:

A. Author. This is a title. Publisher 2020.