Add title-short to disambiguate in bibliography only if necsessary
My citation guidelines request a note-style, which cites a book only by its author and the locator. So far so good – I can manage that in my own CSL file.
When there are two books by the same author, they are to be disambiguated by the title respectively the tittle-short field. That's also not a problem for the inline citations using a conditional.
But for the bibliography the "title-short" field should be only added, when there are two books by the same author.
As an example how it should look like:
only one book by a certain author:
bibliography:
Bock, Dennis, Wiederhohlungs- und Vertiefungskurs Strafrecht Besonderer Teil – Nichtvermögensdelikte, 2. Aufl. Heidelberg, Berlin 2016.
inline citation:
"Bock, S. 52"
two books by a certain author with the title short as an extra field in the bibliography
bibliography:
Bock, Dennis, Wiederholungs- und Vertiefungskurs Strafrecht Besonderer Teil – Nichtvermögensdelikte, 2. Aufl. Heidelberg, Berlin 2016 (zitiert als: Bock, Nichtvermögensdelikte).
Bock, Dennis, Wiederholungs- und Vertiefungskurs Strafrecht Besonderer Teil – Vermögensdelikte, 2. Aufl. Berlin, Heidelberg 2016 (zitiert als: Bock, Vermögensdelikte).
inline citation:
"Bock, Vermögensdelikte, S.52; Bock Nichtvermögensdelikte, S. 66"
The real problem is, that the "zitiert als: " part (translates to: "quoted as") appears always, even when there is only on book by a certain author and I can't get rid of it by any conditional. The only thing working is to leave the "title-short" field blank, which I don't want to do.
I would have to go through my whole library and look for different books by the same author manually and add a short title if I used both of them in the same document, which will be very time consuming.
Is there any way around this?
When there are two books by the same author, they are to be disambiguated by the title respectively the tittle-short field. That's also not a problem for the inline citations using a conditional.
But for the bibliography the "title-short" field should be only added, when there are two books by the same author.
As an example how it should look like:
only one book by a certain author:
bibliography:
Bock, Dennis, Wiederhohlungs- und Vertiefungskurs Strafrecht Besonderer Teil – Nichtvermögensdelikte, 2. Aufl. Heidelberg, Berlin 2016.
inline citation:
"Bock, S. 52"
two books by a certain author with the title short as an extra field in the bibliography
bibliography:
Bock, Dennis, Wiederholungs- und Vertiefungskurs Strafrecht Besonderer Teil – Nichtvermögensdelikte, 2. Aufl. Heidelberg, Berlin 2016 (zitiert als: Bock, Nichtvermögensdelikte).
Bock, Dennis, Wiederholungs- und Vertiefungskurs Strafrecht Besonderer Teil – Vermögensdelikte, 2. Aufl. Berlin, Heidelberg 2016 (zitiert als: Bock, Vermögensdelikte).
inline citation:
"Bock, Vermögensdelikte, S.52; Bock Nichtvermögensdelikte, S. 66"
The real problem is, that the "zitiert als: " part (translates to: "quoted as") appears always, even when there is only on book by a certain author and I can't get rid of it by any conditional. The only thing working is to leave the "title-short" field blank, which I don't want to do.
I would have to go through my whole library and look for different books by the same author manually and add a short title if I used both of them in the same document, which will be very time consuming.
Is there any way around this?
https://pastebin.com/c1SzfM26
I tried the disambiguate="true" condition, but it doesn't seem to work inside the bibliography.
For citations it does work to quote a book by its short-title, but this short-title should be printed in the bibliography after the entry as well (but only if there are two books by the same author).
I'd like to point out, that the problem is not unsolvable in general, but would require to rifle through my Library for each document and add or remove short-titles manually, depending on whether there are two citations of the same author or not.
If there was a solution or a work-around, I would very much appreciate that!
Here is a test that shows what goes in and what comes out.
@adamsmith As you can see in the test, the way it works is to trigger
disambiguate="true"
in the bibliography, on items for which it is triggered in citations. The risk of putting this live would be that some styles in circulation may have been coded on the assumption thatdisambiguate="true"
will have no effect insidecs:bibliography
. It seems a useful facility, though, and a use case that could easily come up again. What do you think?disambiguate="true"
, and it looks like this would be safe. Only one (Leidraad voor juridische auteurs (Dutch)) makes use of the conditional insidecs:bibliography
. It looks like the author was trying to do something similar to @F.Altermann; but the style uses the conditional only incs:bibliography
, so even after this change, it will never take effect.Most of the styles use
disambiguate="true"
in a very straighforward way (there are about four patterns that have been replicated across various styles), but there was one other interesting case. Environment and Urbanization usesdisambiguate="true"
twice, on nodes that are immediately adjacent. I think that (against your advice, actually, if I recall) the processor appliesdisambiguate="true"
step-wise, so you might want to move those two nodes under a single condition, for an all-or-nothing effect. (The invocations are both undercs:citation
in that style, so it would also not be impacted by the proposed change.)Anyway, this seems to be safe as far as the repo styles go. If you feel comfortable with it, I can go ahead and push the button on it.
the behavior in the bibliography would depend on this having been _actively triggered_ in the text, right?
E.g., if you think of a style like MHRA, which uses if disambguate="true" to disambiguate subsequent, short form citations, and I have, e.g. two citations by Smith that _would_ trigger disambiguate in their short form, but they're only cited once (i.e. the short form is never used), disambiguate in the bibliography is false, correct?
In line with that, this means that it's always false if you just create the bibliography without corresponding in text citations (e.g. via right-click or web API)?
So please go ahead with this, I don't see any problems.
@F.Altermann If install the Propachi plugin, you should be able to get the effect you desire from the style. The plugin is a temporary hotfix, you should remove it at the next Zotero release, which will likely include the 1.1.186 version of the processor.
I tried to install the Propachi plugin (running a Debian 64-bit System with the appropriate Zotero Standalone Version 5.0.35.1).When I do it via firefox nothing happens. When I download the plugin and try to install it in a running standalone session, the desired behaviour works like a charm, but when I close the session and restart, Zotero throws an error saying:
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIAppShellService.hiddenDOMWindow]" nsresult: "0x80004005 (NS_ERROR_FAILURE)"
location: "JS frame :: chrome://zotero/content/xpcom/zotero.js :: this.init< :: line 219" data: no]
until I disable the plugin in the addons menu. Any suggestion what else to do than to wait for the next Zotero release?