CSL question: repeating variables

edited July 29, 2018
E.g. in the APA style, in , there is:

<text macro="author"/>
<text macro="issued"/>

If I duplicate these lines as

<text macro="author"/>
<text macro="issued"/>
<text macro="author"/>
<text macro="issued"/>

the date appears twice, but IF THERE ARE no authors, the organisation only apears once. What is it within the CSL description that enables 'repetition'?

I am trying to create a style for a proposal, where we are limited on words (and words are counted by \S+, so e.g. [A/B/2018] is one word). I could use IEEE, but it's not very friendly, as the numbering does't give you a clue. So I'm trying to create a style that prefixes each entry in an APA bib with a tag, as follows:

[Author/Autor/2018] Author, A., Autor, B. (2018). .... APA continues....

So I inserted the additional <text macro="author"/>, <text macro="issued"/>, which works for authors. But - when there is no author, e.g. I expected

[Organisation/2018] Organisation (2018). .... APA continues....

but I get

[Organisation/2018] TITLE (2018). .... APA continues....

So somehow the authors-replacement field (i.e. organisation) is 'used up', and then CSL replaces it with the next best element (i.e. title).

Many thanks!
  • edited July 29, 2018
    I thought this was resolved - but it isn't...
  • What is happening is that for 'report' items, the 'publisher' variable is included in the 'substitute' section of 'names'. When a variable is called as part of 'substitute' (because the main variable called under 'names' isn't present), that variable is suppressed for the rest of the reference.
  • I assume that's something that is built into the CSL engine, rather than controlled by the specific style? Is it possible to avoid this?
  • You can code styles without using substitute (e.g. by using choose -if - else-if instead)
  • Thanks!

    In the meantime I've worked around the issue by using the extra field. As it was a limited number of entries, this worked fine. If there's a CSL web meet sometime, I'd love to participate.
Sign In or Register to comment.