Full list of item types wanted
Hi!
I am trying to write a new style and look for a full list of item types, eg. book, thesis, chapter, article-journal et.c. Is there one?
I am trying to write a new style and look for a full list of item types, eg. book, thesis, chapter, article-journal et.c. Is there one?
Note, though, that relying on types too much in the style is a bad idea.
What do you mean that relying on types too much in the style is a bad idea? What else is there to rely on?
One more thing; I've checked a few styles and it seems that no one put "if" clauses in the bibliography / layout section? I would want to make one macro for each type that exists and output that with if clauses in the layout section. Maybe the code would become longer, but to me it seems it would be easier to read. Probably it is not a good idea since that is not how it is done, but why?
a) it leads to a lot of redundancy and, hence, potential for errors.
b) formatting will be less robust (since you don't account for all possible types)
Look at styles like APA, or some of the Chicago ones, for models.
But just as an example of what I was talking about, you'd rely on macros like:
<macro name="title">
<choose>
<if variable="container-title">
<choose>
<if variable="volume issue" match="any">
<text variable="title"/>
</if>
<else>
<text variable="title" font-weight="bold"/>
</else>
</choose>
</if>
<else>
<text variable="title" font-style="italic"/>
</else>
</choose>
</macro>
You get the idea here?
The main point is that relying on rich macros that always have some default rule is the most reliable approach.
However, the styles I've been writing have only been for journals in the natural sciences. Most papers published in these journals use only a small subset of item types in their references (mostly journal articles, a few chapters, books and patents). So in most cases a style that only specifies these item types will suffice (and often the journal's style guide won't even give any details beyond this small selection of item types). In addition, most of these journal styles guides are written specifically from an item type point of view. Finally, I've not found it that straight-forward to discover which variables are used in each item type and how they're mapped to the fields in Zotero, so I've just found it easier to write and correct styles using item types.
Yes, that's reasonable. The hard sciences are a special case that is much easier to deal with. But once you move outside of that area, the type-based approach is much more difficult.
BTW, another part of the background to this idea is my belief that we need to build better CSL creation interfaces that rely on well-built macros.
I read: „“chapter” is a generic fallback for bookSection, encyclopediaArticle, dictionaryEntry, conferencePaper” in http://www.zotero.org/support/dev/csl_syntax_summary, but I want a different formating for each: bookSection, encyclopediaArticle, dictionaryEntry and Journal
What can I do?
You can try working through fields that aren't used in dictonary and encyclopedia articles, but that is going to be difficult.
(btw. chapter is a type, not a variable, just to avoid confusion in both the code and the conversation)
There is no current # of pages article - this is forthcoming and there are a bunch of threads out there discussing this.
Journal abbr. can be called by <text variable="container-title" form="short"/>