Conditional test for Short-title
From reading the csl syntax summary:
"title - maps to the Title field in the long form, and the Short Title in the short form."
This means that I can't do a <if> test for the existance of the short-title variable.
I need this because I need a field to signal zotero that the "author" is in fact an acronym (eg: IMF or UN) and the bibliography style requires that in this case, we add the full title of the institution immediatelly following. Here is an example:
CEPAL (Comisión Económica para América Latina y el Caribe) (2002), La inversión extranjera en América Latina y el Caribe. Informe 2001 (LC/G.2178-P), Santiago de Chile, mayo. Publicación de las Naciones Unidas, Nº de venta: S.02.II.G.47.
note the parenthesis just after the "CEPAL". This should not be in the in-text citation, only in the bibliographic entry. The only way I can figure out how to do this is to enter the citation and add the full name in a field such as [short-title].
So to format my bibliography, I need to test that this exists, which means that the [author] is an acronym, and then I can add the [short-title].
I've also tried just adding
<text variable="title" form="short" font-style="italic"/>
but this uses the regular [title] if there is no short title.
Any help or ideas??
"title - maps to the Title field in the long form, and the Short Title in the short form."
This means that I can't do a <if> test for the existance of the short-title variable.
I need this because I need a field to signal zotero that the "author" is in fact an acronym (eg: IMF or UN) and the bibliography style requires that in this case, we add the full title of the institution immediatelly following. Here is an example:
CEPAL (Comisión Económica para América Latina y el Caribe) (2002), La inversión extranjera en América Latina y el Caribe. Informe 2001 (LC/G.2178-P), Santiago de Chile, mayo. Publicación de las Naciones Unidas, Nº de venta: S.02.II.G.47.
note the parenthesis just after the "CEPAL". This should not be in the in-text citation, only in the bibliographic entry. The only way I can figure out how to do this is to enter the citation and add the full name in a field such as [short-title].
So to format my bibliography, I need to test that this exists, which means that the [author] is an acronym, and then I can add the [short-title].
I've also tried just adding
<text variable="title" form="short" font-style="italic"/>
but this uses the regular [title] if there is no short title.
Any help or ideas??
For a more hassle-free workaround, you might consider entering the acronym in the database ("CEPAL") as the author name, and then do a manual or macro-driven find and replace on those entries when the document is completely finished. Not a perfect solution, but simple, reliable, and compatible with all Zotero styles.
It would be very useful, though, to have a few customized fields for users who might run into this. I could then specify "generic1" to be what I need in my style (right now I use the [extra] field to generate the style you see above (with the LC/G.... and the S.02.II.... numbers). I was hoping to be able to use another "free" field such as [rights] or [shortTitle].
Oh well.
The style that I currently have already requires that I train the users in where to enter the pertinent information ("only use the [extra] field for the UN sales number"). It would be trivial for me to include the instruction of using the [rights] field for acronym expansion.
For my specific case, I would be happy just being able to write:
<if variable=shortTitle> or <if variable=rights>
Or to have the form="short" of the title *not* default to the full title in the even that there is no short title.
Why not map shortTitle?
Are there any other solutions/workarounds for this?
Not sure if that makes sense, but ... I'm in favor too. :)
I am thinking that what I will do is recommend that users type in the short title with the "..." at the end, although this probably will mean users won't be able to use those entries with other Zotero formats.
If anyone has any other ideas about how I could resolve this they would be appreciated.
I am waking up this conversation, since it seems to be the best place to ask my question.
I am working on a style and I want to display the short-title, only if it is set :
<choose>
<if variable="title-short">
<text variable="title-short" prefix=" [" suffix="]" font-style="italic"/>
</if>
</choose>
This worked on Zotero 3.0.11 : it displays the short-title if it is set, and nothing, if it is not set.
But on Zotero 4.0.4, it doesn't work anymore and I get the full title instead of the short title, if the short short title is not set.
Is this normal ? If yes, is there still a way to conditional test fort title-short ?
Thanks !
Please post your full style somewhere - e.g. gist.github.com - and link to it here so we can take a look.
Thanks for the anwser. You can find here the style I am using :
http://sourceforge.net/p/zotero-mcgillfr/code/ci/master/tree/mcgill-fr.csl
And you can use this rdf to test it (try removing the short title) :
http://sourceforge.net/p/zotero-mcgillfr/tickets/_discuss/thread/a3090d2b/4ca9/attachment/CSNcCanada.rdf
The result should be like this :
Confédération des syndicats nationaux c. Canada (Procureur général), 2008 CSC 68, [2008] 3 RCS 511, Infirmant machin etc, en ligne : CSC <http://canlii.ca/t/21sxt> consulté le 12-11-2012.