substitute problem

Hi,

small problem I can't seem to fix:

For the bibliography section, I have a macro that substitutes the author with other roles, if no author is given. I was under the impression that substitution stops as soon as the first field listed there finds a hit.

My code runs as follows:


<else>
<choose>
<if variable="title" match="all">
<group delimiter=". ">
<names variable="author">
<name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="never"/>
<substitute>
<text variable="authority"/>
<text macro="director"/>
<text macro="editortranslator"/>
<text macro="editor"/>
<text macro="illustrator"/>
<text macro="translator"/>
</substitute>
</names>
</group>
</if>
</choose>
</else>


I run the text macros here instead of simple names variables, because unlike in the citations, I do want stuff like "(Ed.)", "(Transl.)", etc. added after the name.

However, in cases where I have both an editor and a translator, I get the following:

Wise, Isaac Mayer (Ed.)Rodkinson, Michael Levi (Trans.). New Edition of the Babylonian Talmud. Volume 1: Tract Sabbath. Second edition, re-edited, revised and enlarged. Boston: Talmud Society, 1918.

Why does it show both, the editor and the translator? Where am I going wrong?

Many thanks and best wishes,
Daniel

  • I run the text macros here instead of simple names variables, because unlike in the citations, I do want stuff like "(Ed.)", "(Transl.)", etc. added after the name.
    That's still not necessary, though: You can simply add the label to cs:names and then use names variable in substitute and it will inherit the label. You can look at almost any existing style for examples of this.

    My guess for why you're seeing what you do is that you're literally using the editortranslator macro in substitute which, presumably, calls the editor _and_ translator.

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.