Problem with CSL (substitute does not work)
Hello everyone,
a few weeks ago, I completed my first pull request on GitHub for a CSL style (https://github.com/citation-style-language/styles/blob/master/deutsches-archaologisches-institut-romisch-germanische-kommission-author-date.csl). The reviewer had many useful suggestions, which I implemented. Among other things, he wanted me to use “substitute” in my macros instead of “choose,” which I also did.
However, because of this a problem has now arisen: when a book has no author but only an editor, the editor is not displayed in the bibliography. Here is an example:
How it looks now:
Mölders / Wolfram 2014
Schlüsselbegriffe der Prähistorischen Archäologie. Tübinger archäologische Taschenbücher 11 (Münster / New York 2014).
How it should look:
Mölders / Wolfram 2014
D. Mölders / S. Wolfram (Hrsg.), Schlüsselbegriffe der Prähistorischen Archäologie. Tübinger archäologische Taschenbücher 11 (Münster / New York 2014).
I would be very grateful if you could help me fix this error, as the style does not work correctly otherwise. Thanks a lot.
a few weeks ago, I completed my first pull request on GitHub for a CSL style (https://github.com/citation-style-language/styles/blob/master/deutsches-archaologisches-institut-romisch-germanische-kommission-author-date.csl). The reviewer had many useful suggestions, which I implemented. Among other things, he wanted me to use “substitute” in my macros instead of “choose,” which I also did.
However, because of this a problem has now arisen: when a book has no author but only an editor, the editor is not displayed in the bibliography. Here is an example:
How it looks now:
Mölders / Wolfram 2014
Schlüsselbegriffe der Prähistorischen Archäologie. Tübinger archäologische Taschenbücher 11 (Münster / New York 2014).
How it should look:
Mölders / Wolfram 2014
D. Mölders / S. Wolfram (Hrsg.), Schlüsselbegriffe der Prähistorischen Archäologie. Tübinger archäologische Taschenbücher 11 (Münster / New York 2014).
I would be very grateful if you could help me fix this error, as the style does not work correctly otherwise. Thanks a lot.
Upgrade Storage
cc @damnation
Okay, I tried to fix it and manged this by changing my "author-short" macro, using "choose". I am not sure if that is ellegant but it seems to work.
<macro name="author-short">
<choose>
<if variable="author">
<names variable="author">
<name form="short" delimiter-precedes-last="always" et-al-min="3" et-al-use-first="1"/>
</names>
</if>
<else>
<names variable="editor">
<name form="short" delimiter-precedes-last="always" et-al-min="3" et-al-use-first="1"/>
</names>
</else>
</choose>
</macro>
https://github.com/citation-style-language/styles/pull/7871