names variable="title-short"

Hello,

i have a little question at my own CSl-Style. Actuall it works fine, but the validiadtion (at http://validator.citationstyles.org/)shows one error.

For Explanation.

I use the field "titel-short" to overwrite the authors at the in-text-citations. To use this and also use the "disambiguate-add-year-suffix" i need a macro like this:

____

<macro name="author-short">
<choose>
<if variable="title-short">
<names variable="title-short">
<name form="short" and="symbol" font-variant="small-caps"/>
</names>
</if>
<else>
<names variable="collection-editor">
<name form="short" and="symbol" font-variant="small-caps"/>
<et-al font-variant="normal"/>
<substitute>
<names variable="editor"/>
<names variable="author"/>
<names variable="translator"/>
</substitute>
</names>
</else>
</choose>
</macro>

_______

The problem he found is that “title-short” for attribute “variable” on element “names” from namespace “http://purl.org/net/xbiblio/csl” creates a bad value.

So is it a serious Problem, or exist therefor a workaround yet?

Kind Regards

Frank
  • title and title-short are standard variables. Try this:
    <if variable="title-short">
    <text variable="title-short" font-variant="small-caps"/>
    </if>
  • This form generates no error at he calidation, but works not in the citation. I have this form at the beginning but then he don´t can work with the "disambiguate-add-year-suffix" and create a lot of strange things if the same short-titles appears in on in-text-citation.

    Other ideas?
  • Add your code on gist.github.com, please.
  • Sorry for the long time, i was not in the office the last days.

    Here the link to github:

    https://gist.github.com/anonymous/816e523ecaf270815f42f2ec2a88d99a
  • edited May 12, 2016
    If I change lines 105-107 by
    <text variable="title-short" font-variant="small-caps"/>
    then I got:
    Citation:
    "(SHORT TITLE 2016)"
    Bibliography
    "- SHORT TITLE (2016): Report with very very long title without authors. BioConsult SH GmbH/Husum."

    Is it correct or not?

    EDIT 1: Disambiguation works only with names I think. But you cannot use short-title as variables for names tag.

    EDIT 2: Disambiguation works with short title too, but there is some problem. I try to do some investigation.
  • It´s correct and it works fine. But at "http://validator.citationstyles.org/" ther occures the error that " “title-short” for attribute “variable” on element “names” is not allowed.

    And my question is, if ther is a problem with it or its "only" an unstylish use of "title-short"
  • edited May 12, 2016
    For first change collapse="year-suffix" to collapse="year" in citation tag. It is not the same as you need, but the output is better as before.

    Why do you prefer short-title before authors/editors etc. in author-short macro?
  • edited May 12, 2016
    It seems as a bug in collapse="year-suffix" interpretation. I do not know if it is in Zotero or in CSL processor.

    EDIT: Issue on github: https://github.com/zotero/zotero/issues/1000
  • @BCSHFS, if I understand you correctly, you want to have short titles in in-text citations, even if an item has authors. And when multiple items have the same short title, you want year-suffix disambiguation (the "a", "b", etc. suffixes). Is that the case?

    I'm not sure if that's currently achievable, but as for your question, <names variable="title-short"> is not just unstylish but invalid CSL and should not be used. You should always use <text/> to print the "title-short" variable instead.
  • You could try something like this, though:

    <names variable="original-author">
    <substitute>
    <text variable="title-short"/>
    </substitute>
    </names>


    (as far as I know, the "original-author" name variable isn't used by Zotero, so the style should always substitute in the "title-short" variable)
  • @Rintze: I try it, but it is not working how BCSHFS can.
    I get this output: (Short title 2016a, Short titleb) instead of (Short title 2016a, b)
    If I use "Short title" as a name of author, I get this output:
    (SHORT TITLE 2016a, b)

    In the first case is not short title smallcapsed.
  • Ok, fisrt thanks for your work i will try the solution or Rintze first.

    We use a lot of literatur from organisation or administratice bodies. So for exampe the " Bundesamts fur Seeschifffahrt und Hydrographie". to have not aways such a long in-text-citation we use shortform of this like "BSH" which is displayed in text and additional to the long name in the bibliography.


    If i use

    <names variable="title-short"> - there occurs a problem at the validation but the code works

    If i use

    <text variable="title-short"> - the validation is ok but the disambiguation don´t work, there occurs an error in the in-text-citation, or a streange display of "short-tittle year, year"

    ___

    For first change collapse="year-suffix" to collapse="year" in citation tag. It is not the same as you need, but the output is better as before.

    What is the different in this?
  • edited May 13, 2016
    @BCSHFS: if you use collapse="year" you get output in this form: (Short title 2016a, Short title 2016b)
Sign In or Register to comment.