Editing Style: Conditional change in journal style for specific conference

I am looking to revise a style (transportation-research-board) to maintain the required format for their own conference publication. Although it's technically an 'article-journal', the journal requires a specific formatting for it's own publication compared to other journals in general.

I have been messing around with potential corrections, but my limited experience in csl and xml have left me stumped. Currently, I am exploring the use of 'if/then' or 'when/otherwise' statements inside the "article-journal" citation style formatting. When/otherwise aren't recognized, and if/then do not work. The result is a duplicate citation (both if and else each return a formatted version).

<else-if type="article-journal article-newspaper" match="any">
<choose>
<if match=".[title='specific journal title']">
<!-- SPECIFIC JOURNAL STYLE -->
</if>
<else>
<!-- GENERAL JOURNAL STYLE -->
</else>
</choose>
</else-if>


I also posted a more general description of the problem here:
http://stackoverflow.com/questions/38856938/conditional-statement-for-varying-journal-specific-style
  • This isn't possible---unfortunate for your use case, but by design. I've posted an answer over on StackOverflow.
  • You could use some form of ad Hackery to accomplish this. CSL can use if/then statements to test for the presence of a variable. You could test for a variable that is never present for a journal article (such as 'version') and then give different formats depending on if the variable is present or not. Then, in Zotero, you can add that variable to the items in the specific journal by adding the following syntax to the Extra field:

    {:version: TRRC article}


    This is messy, but it would work to meet this pretty weird requirement.

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.