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??
  • CSL (Zotero's citation formatting language) does not support this. What you say about being unable to test for content of the "short title" field is true, but using that field to supply data of a completely different category (an author name) would not be a happy experience in any case; things would break on you very easily, and I could turn out to be quite frustrating.

    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.
  • Thanks fbennett. This is what I think we'll have to do.

    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.
  • edited December 16, 2009
    Additonal custom fields might not happen -- one of the aims of the project is to make it easy to exchange bibliographic information, and customization cuts against that. But we'll keep your use case in mind (in the collective consciousness of CSL development). There are several ways it could be handled, any of which would be easier than what you're having to do now.
  • Thanks for that. I wish something would be done because the United Nations has this weird bibliographic style that makes it completely non-portable (since there is UN-specific information such as "document signature" and "sales number") and hard to generate using Zotero. And the UN is not a small organization.

    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?
  • edited December 16, 2009
    Aha. It sounds like we have a common interest in sorting out the international organization space in the Zotero data model. Your expertise and stake in getting things set up correctly would be very welcome over on the zotero-legal group, set up to explore and propose orderly database extensions or modifications and best-practice data entry for legal materials. UN materials are near the top of the list of uncharted categories. Feel free to sign up.
  • Sorry for warming up this +1 yr old discussion, but I'd like to add that in Engineering there are often documents that are short referenced by an abbriviation (i.e. a short title in CSL), like technical standards or similar. Without having the short title mapped, as suggested by brazuca, it becomes virtually impossible to use Zotero for documents where you have documents that should be cited with a short title (but have the author/issuer at first in the bibliogrphy) and other documents that are regularly cited, i. e. author-date.

    Are there any other solutions/workarounds for this?
  • To be honest, the form attribute seems a bad idea in retrospect. Perhaps we ought to add a first-class "short-title" variable?
  • In general I'm in favor of that - how exactly would you deal with the existing styles using the attribute, though? Auto-convert? Allow access to the short-title field both by a variable and through the attribute?
  • Autoconvert, presumably. There's no reason CSL 1.01, or 1.1, or whatever can't have a migration XSLT.
  • edited February 28, 2011
    I'm putting a really high value on stability at this point, but it is trivial to upgrade styles if we do it.
  • Agree that a separate variable would probably be better, and that this could be rolled into the 1.1 update.
  • edited February 28, 2011
    I think this is probably right. On thing that may (I hope) be coming down the road is support for a user-defined, document-specific "hereinafter" form for titles, supplied via an external abbreviations list. Setting the short title as its own variable would allow the "proper" short title to be distinguished from the "hereinafter" form, which could then be called with form="short" (and the same for journal abbreviations etc.)

    Not sure if that makes sense, but ... I'm in favor too. :)
  • So we need a separate variable for the short form of "container-title" as well, then? Any other candidates? (https://bitbucket.org/bdarcus/csl-schema/src/tip/csl-variables.rnc)
  • I just wanted to add a vote for some way to check if the short title exists. I am currently working on a format that requires "..." to be added to the short title of a book or article when it is used (the short title in these cases just being the first 3 or 4 words of the title). But for me to reliably add the "..." I need to check if the short title exists.

    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.
  • This would require extension of the formatting language, so the first port of call would be the CSL discussion list at xbiblio-devel.
  • @Devin Roza, @fbennett, "container-title-short" and "title-short" variables will be added with CSL 1.0.1.
  • (As you can see, it's a very pro-active list. :)
  • Fantastic news. Thanks a lot Rintze!
  • edited April 15, 2013
    Hi,

    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 !
  • that should definitely work and does for me.
    Please post your full style somewhere - e.g. gist.github.com - and link to it here so we can take a look.
  • Hi,

    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.
  • Thanks for the style and sample input. I can reproduce this. I know the cause (it's a small thing due to some recent changes, simple to fix). I'll have a will have a revision out within an hour or so.
  • Fixed. You can test the changes by installing the processor patch plugin.
  • edited April 18, 2013
    If anyone has contact with the folks at CanLII, you might mention to them that while the new API is good to see, dumping entire citations to a single field doesn't get us much further than screen-scraping.
  • It works ! Thanks a lot !
Sign In or Register to comment.