Full manual of CSL
Is there any full (detail) manual for the overview at
http://www.zotero.org/support/dev/csl_syntax_summary#formatting
I am having some problem understanding the use of 'match' inside the conditionals. Is there any page with some examples on that?
I would appreciate any feedback.
http://www.zotero.org/support/dev/csl_syntax_summary#formatting
I am having some problem understanding the use of 'match' inside the conditionals. Is there any page with some examples on that?
I would appreciate any feedback.
match is very simple - it's either match="any" or match="none"
remember that you can use "if" only to test for some select things, namely
- the presence of a variable
- the item type
- if a variable is numeric or not
So, what does the following line really mean
<if type="chapter book" match="any">
Is this a test to see if any of the multiple citation entries is a book chapter? Or, does it mean something entirely different?
What this line means is - test if the one item that csl is formatting (and it always goes one by one, all the if commands refer to just one item) - is either a "book" or a "book section" (the latter being "chapter" in csl).
So whatever follows will only be applied to books and and book sections.
Is that right?
Thank you.
You don't need a match command in all cases - e.g.
if type="book"
works without any match.
But then if you want to say - "if an item is not a book", you can do
if type="book" match="none"
or as in the example above, if something applies to a whole list of items you do
if type="book chapter article-journal" match="any"
I am trying to distinguish between two types of report: report and working paper. For working paper, I want to put some string in te "Extra" field. Now when I try:
<else-if type="report">
<choose>
<if variable="extra">
<text variable="title" font-style="italic"/>
</if>
<else>
<text variable="title" quotes="true"/>
</else>
</choose>
</else-if>
It won't work. I tried <if variable="extra" match="none"> then the else branch won't work!
Thank you.
(the whole list of mappings is here:
http://www.zotero.org/support/dev/csl_syntax_summary#variables )
I have achieved all that I targeted, for now. One little thing, for conferences is there any way to add a conference end date. I put "2003/9/7" in the date field and get it as "September 7" in the right place. However, I would like to see "September 7-9"
Any way to do that, at this point.
Thanks again