retorquere / zotero-better-bibtex

Make Zotero effective for us LaTeX holdouts
https://retorque.re/zotero-better-bibtex/
MIT License
5.28k stars 284 forks source link

Website title for @online entries is exported as journaltitle #1444

Closed johannessennahoj closed 1 year ago

johannessennahoj commented 4 years ago

Report ID: UZKP3GUX-euc Exporter used: Better BibLaTex Expected behavior: The website title field in Zotero should be exported as a 'maintitle' or 'organization', something the @online entry can use. Actual behavior: The Zotero field 'Website Title' for a webpage entry is exported to the bib file as 'journaltitle' field, which the @online entry cannot use.

retorquere commented 4 years ago

@online allows:

johannessennahoj commented 4 years ago

Yes, sorry. Then organization would be more suitable for the website title

dbitouze commented 4 years ago

@online allows:

* subtitle

* titleaddon

* language

* version

* note

* organization

* addendum

Not only (from the biblatex package documentation, version 3.14):

online [...]
    Required fields: author/editor, title, year/date, doi/eprint/url
    Optional fields: subtitle, titleaddon, language, version, note, organization,
                     month, addendum, pubstate, eprintclass, eprinttype, urldate
retorquere commented 4 years ago

Yeah I know but none of those others seemed appropriate.

dbitouze commented 4 years ago

OK, sorry for the noise.

retorquere commented 4 years ago

No worries. Organization seems like a good choice. @njbart?

njbart commented 4 years ago

Yep. The biblatex and biblatex-chicago manuals, plus the biblatex-apa example bib files all agree.

retorquere commented 4 years ago

I'm going to fix this Sunday, sorry for the delay.

retorquere commented 4 years ago

@njbart as part of this I'm now checking structurally whether a field is appropriate for a reference type when I choose to output it. In my test suite, there's an @jusridiction item for which I used to output volume, journaltitle, institution and pages.

Looking at the biblatex manual, @jurisdiction is a sorta-supported type? Which can be expected to get the overall optional fields, and whatever @misc would allow (section 2.1.3 from the manual). What to do with these fields? Is it reasonable to skip them? Export them nonetheless?

This is further complicated by #1370. If I choose to only output type-appropriate fields, I would not add publisher myself to an @article, but would add it when the user put it in the extra field, which I saw as an intentional override from the user. But in recent versions, Zotero has started to pre-parse items before they're handed to translators, so I can no longer distinguish between an item that has a publisher field, and an item that has an extra field with Publisher: IEEE. So only outputting type-approriate fields would mean I would discard the override. The override is still possible with tex.publisher: IEEE, but Publisher: IEEE would be available to both BBT and to CSL-rendered bibliographies, tex.publisher would not.

retorquere commented 4 years ago

I have multiple cases that have such fields for Zotero case types. Is @jurisdiction just a bad match for case? Should I be more lenient for the types from 2.1.3? If so, how much more lenient? Anything goes?

retorquere commented 4 years ago

In the case samples, the fields under consideration are:

Aw damn: https://tex.stackexchange.com/questions/437824/what-is-best-practice-re-handling-legal-sources-with-biblatex-biber-for-discipl

retorquere commented 4 years ago

OK I have a solution for jurisdiction/legal/legislation, now I'm bumping into @patent. Zotero has a Pages field, and allows a creator type Attorney/Agent. @patent only allows holder, subtitle, titleaddon, type, version, location, note, month, addendum, pubstate, doi, eprint, eprintclass, eprinttype, url, urldate. I used to just output pages and output Attorney/Agent as - editora with editoratype = {collaborator}, but those are all not appropriate for @patent it seems.

njbart commented 4 years ago

Let me clarify one thing up front: I have no experience whatsoever with legal citations. And one other thing: Zotero itself does not export or forward to citeproc-js a number of fields, including “Contributor“ and “Attorney/Agent”, so this can’t be judged by looking at the CSL fields either. That being said, in general I tend to think it makes sense to export all fields, including the ones entered into the Extra field. As to “Attorney/Agent”, if you want to export this at all (rather than wait for an actual use case being reported), I think there’s nothing wrong with choosing one of editor[abc] plus an editor[abc]type of, e.g., attorney_agent. Again, I have no idea how this is supposed to be used in real life, and whether there are any biblatex styles that attempt to format some output for such a role, but this solution would make it very clear, for the moment, to what, in terms of Zotero GUI fields, this is supposed to correspond.

retorquere commented 4 years ago

Nope, I'm going to wait for a use-case. The new field-check I have in place works pretty well and I don't want to start adding exceptions to it without either a use-case or relevant docs (and I have docs for the legal case)

retorquere commented 4 years ago

I actually do have a few @patent cases in my test suite. I'll see what info can be learned from the attached issues.

retorquere commented 4 years ago

Note to self: cross-check with #1413, #1414, ~#1060~, #925, ~#1054~, ~#482~, ~#644~, #326, #327, #219, #284, ~#365~

retorquere commented 4 years ago

Sorry this is taking so long, but the field-checker I put in place to prevent this kind of thing found a lot more entries with improper fields being exported, I'm going through them one by one.

retorquere commented 2 years ago

I forgot to save the testcase from UZKP3GUX-euc, sorry. If this still holds interest, I will need a new log.