Basic help on which variable to edit
Hi everyone, I have spent a rather frustrating afternoon trying to work out how to make some basic changes to a style, and have managed to work it out for the most part, despite the online documentation sending me round in circles with links which just refer to one page which then refers you back to the original...
There is one thing which I can't figure out how to do and that is to italicise the journal titles in my bibliography.
Any help would be much appreciated.
(I love zotero but this manual editing and lack of straightforward documentation as to which variables refer to which fields and how to change basic elements makes it a bit of a tool for the elite or those with a lot of time on their hands...)
There is one thing which I can't figure out how to do and that is to italicise the journal titles in my bibliography.
Any help would be much appreciated.
(I love zotero but this manual editing and lack of straightforward documentation as to which variables refer to which fields and how to change basic elements makes it a bit of a tool for the elite or those with a lot of time on their hands...)
CSL documentation should be pretty well ordered.
As for your questions
<text variable="container-title" font-style="italic"/>
As for "Elite" - modifying styles requires some level of skill and/or immersion, but normally that's not something you should need to do.
Item mappings are here:
http://gsl-nagoya-u.net/http/pub/csl-fields/index.html
Basically, the main problem I had was that the step by step guide found at http://www.zotero.org/support/dev/citation_styles/style_editing_step-by-step
Only gave a couple of examples of things you might want to do.
However, on that page it states: See the documentation page of the CSL project website for information on making CSL changes . Clicking on this link
http://citationstyles.org/citation-style-language/documentation/
takes you to a page where you can haev a look at a CSL primer (http://citationstyles.org/downloads/primer.html) which is helpful but again doesn't list all the main things you'd like to change: e.g. my question: which element refers to the journal title
So trying to look elsewhere for this information, I tried clicking on •Zotero-specific CSL documentation
at http://www.zotero.org/support/dev/citation_styles
which simply took me back to the page with the link to the step-by step guide on it!
The other pages with info about CSL are obviously and no doubt rightly designed for people with some previous knowledge of this sort of thing. It would be a case of having to learn the whole language in order to make a small change like the one I needed.
I am sure there are probably lots of people like me who would really just like to do very basic and common things (italicising things, removing commas, full stops etc.) when there isn't a style which fits what they need for some obscure journal or other (as in my case).
Thanks for your help. Don't get me wrong, Zotero is great. But I just feel this is something that might be worth thinking about.
http://gsl-nagoya-u.net/http/pub/csl-fields/
Hope it helps.
http://www.zotero.org/support/dev/citation_styles
The reason this can't be part of the main CSL documentation on citationstyles.org is that CSL is used in many other programs.
Otherwise, I fear you're asking us to square the circle documentation-wise. We try to have easy tutorials with low barriers to entry such as
http://www.zotero.org/support/dev/citation_styles/style_editing_step-by-step
which includes a discussion of the very helpful Zotero test panel, which allows you to work with styles in real time trial-and-error.
(Both Mendeley and Papers2 have similar - though worse ;-) - tutorials on their blogs. For the CSL project in general there is the primer on citationstyles).
And we have comprehensive documentation here:
http://citationstyles.org/downloads/specification.html
I don't think it's feasible to write documentation that's quick, easy, _and_ comprehensive. Many changes are simple or quick, but there are so many possible things that can be changed that we can't have an example up for all of them.
I have checked out the documentation, and today once again I decided to try it out. Once again I find myself stymied by a lack of (I suppose) basic programming knowledge.
For example: what does <else> mean? I suppose it's an instruction - 'if the above does not apply then do this'. But I can't find an explanation in the Language Specification.
I've tried pasting in this bit in the appropriate place in the Zotero editing window thing:
<else-if type="chapter">
<text variable="title" quotes="true">
</else-if>
I got it from the specifications page, but it tells me
Error parsing style:
SyntaxError: XML tag name mismatch (expected text)
I don't know what 'parsing' means
I don't know what 'XML tag name mismatch' means
Sure I can guess the meaning, and trial and error, trawl the forum, etc. But it really does not make it easy.
I'm not against having to put some effort into using this wonderful free program, but one thing I *really* miss from EndNotes (maybe the only thing) is an easy style editor.
I'm starting a new job at a new university, and they have their own style. I want to make it easy for the students to use Zotero (and therefore I also spend less time checking citations etc.). But I am finding it very difficult to work out how to adapt a style.
OK this is probably a long pointless moan, as I know there is no style editor. But:
* Is there any structural/programming reason why there is no style editor with a nice GUI etc?
* Is there any possiblity for an easy style editor?
* Could we start a fund to pay someone to do it?
2. & 3. Yes, and it's already being funded:
http://csleditor.wordpress.com/
I wouldn't expect anything within the next 6months, though.
Documentation on cs:choose - including else - is in the specs here:
http://citationstyles.org/downloads/specification.html#choose
<else> always follows <if> or <else-if> - it means "in all other cases" just like the English word.
Errors aren't terribly easy to understand, as they're produced automatically. One of the early skills people beginning to code learn is to interpret (parse?) error messages:
For "Parsing" see e.g. the Wikipedia article (first paragraph is enough): http://en.wikipedia.org/wiki/Parsing - where the formal grammar in this case is XML in general and the CSL schema specifically.
XML tags are the various commands (like "text" "name" etc.) at the beginning of the line. Each tag needs to be ended with an end tag - marked by a forward slash / -
e.g. in your example above you would need
<text variable="title" quotes="true"/>
(note the slash at the end.)
If you don't end the tag in the same line, you need to insert a full end tag as in
<text variable="title" quotes="true">
</text>
This extended form is usually not necessary for <text>, but you'll frequently see and use it for <date> or <name>, for example, and, of course, with all <if> and related tags.
Because you're missing the end tag, the error message tells you that it expects more <text> command - "(expected text)" - instead it sees </else-if> and throws an error.
Yes your solution for the code works, also giving a single quote which is great as it is just what I wanted. Seeing as I copied the original code from the specifications page, maybe someone should check to see if it needs correcting.
Great news re the editor, looking forward to that!
Thanks again,
Julian