Editing an existent style file
Hi,
I'm having a lot of difficulty getting even a basic grasp of editing a csl file to correct a few errors in the South African Medical Journal style. The style file is linked below. I'm trying to alter, for example, "cited" to "accessed on" where dates are given for citations, along with removing URLs for certain file types. I spent ages adding bits and pieces within tags like bibliography etc in the style editor in Zotero and nothing ever seemed to change - even things directly out of the style editing guide on this website.
Can anyone explain in nice and simple terms how to do something like altering "cited" to "accessed", and how to alter specific things about the bibliography. There don't seem to be any whole csl files available anywhere I can find from which to jump off and start editing - though everyone seems to know how to do it! I am probably just being exceptionally dim.
Thanks for any help you can give - I'd love to be able to start editing these as there often little tweaks needed to match a particular journal's style.
Please fine the style file here - it doesn't render if I simply post it and I don't know how to add code on this forum.
http://www.zotero.org/styles/south-african-medical-journal
Thanks
I'm having a lot of difficulty getting even a basic grasp of editing a csl file to correct a few errors in the South African Medical Journal style. The style file is linked below. I'm trying to alter, for example, "cited" to "accessed on" where dates are given for citations, along with removing URLs for certain file types. I spent ages adding bits and pieces within tags like bibliography etc in the style editor in Zotero and nothing ever seemed to change - even things directly out of the style editing guide on this website.
Can anyone explain in nice and simple terms how to do something like altering "cited" to "accessed", and how to alter specific things about the bibliography. There don't seem to be any whole csl files available anywhere I can find from which to jump off and start editing - though everyone seems to know how to do it! I am probably just being exceptionally dim.
Thanks for any help you can give - I'd love to be able to start editing these as there often little tweaks needed to match a particular journal's style.
Please fine the style file here - it doesn't render if I simply post it and I don't know how to add code on this forum.
http://www.zotero.org/styles/south-african-medical-journal
Thanks
The thing with the style you mention is, that it is a dependent style of vancouver-superscript-brackets-only-year.csl.
So you'd need to change that one. But of course many other styles are dependent of the vancouver style, so we'd probably would need to make this an indepedent style.
You can see the difference here:
1. The SAMJ style is rather short. Just a few info bits and points to the vancouver style in line 7: https://github.com/citation-style-language/styles/blob/master/dependent/south-african-medical-journal.csl
2. The vancouver style (https://github.com/citation-style-language/styles/blob/master/vancouver-superscript-brackets-only-year.csl) has actually the information on how the citations should look like.
For your specific question you would then change line 64 from
<text term="cited" text-case="lowercase"/>
to<text term="accessed" text-case="lowercase"/>
You can certainly just post here in the forum and we'll make fixes, but it would be even better if you'd learned CSL and could contribute directly to the repository. :) We are happy to help.
Check out the editors here: http://editor.citationstyles.org/about/
You can switch between code and visual. Really helpful to get into it.
I've installed it locally and it seems to work, though it says it's not a valid CSL 1.0.1 style file which I don't understand. Anyway, how do I go about making it more widely available? It may as well be used since I think it's closer than the existing SAMJ style file.
though you will need to get it to validate before we take it.
I face a related problem.
I have a grant proposal with a 1 page limit for all references.
I am currently using Zotero CSL:
American Chemical Society (page-first)
But to save space, I need a style that only includes the first 2 author's names, followed by 'et al.'.
I failed in attempting to edit the style.
Does anyone know of a built in style more compact?
Or could guide me to editing the American Chemical Society (page-first)
thanks, Doug
et-al-min="3" et-al-use-first="2"
to the line starting with<bibliography
, e.g. right after bibliography (with a space of course)First I found the .csl file on my harddrive, and made the edit with a text editor, and saved under a new name.
The new .csl did not show up on my list of options.
So then I went into Zotero Preferences, found 'Styles' and clicked 'Style Editor'.
It defaulted to the American Chemical Society (page-first) csl.
I made the edit you suggested, and clicked 'Save As'
I got:
"Error parsing style:
Error: File is not valid XML"
But, when I reopened my file and refreshed, the bibliography refreshed to the new format.
So, not sure why it worked, but it worked.
I failed in attempting to rename the file and remove links to the previous base style.
<id>
and<title>
. You need to change the style ID and Title between those tags, respectively, to anything else, then reinstall the file through the Cite pane of the Zotero preferences.The style is generally correct, the change I would need is all first names to be omitted from parentheticals, and all first names to be abbreviated in the reference list.
I also tried editing the code at all places where "first" is mentioned, but do not know how exactly to to do it. By intuition I deleted the numbers in quotation marks in all cases where "use-first" was followed by a number (lines 158, 173, 175, 177, 178), but this resulted in a parenthetical listing all authors instead of only the first author followed by et al. and year.
Could someone please show me what to change?
Thank you in advance.
https://www.zotero.org/support/kb/given_name_disambiguation
That would likely be an issue with your Zotero data (same author entered some places as initials, some places with the full given name), not an issue with your style.
I face similar problem, and since I'm total programming moron, I have no idea how to solve it.
I quote some internet articles in my thesis and I'd like to change the way how the access date is presented in document. Now it looks like "[12 January 2019]", while I'd prefer something like "(access: 12.01.2019)". I looked at it with Zotero style editor, but this is totally double Dutch to me. Could someone help me with this issue?
I use specific Polish legal style that I generally like, it's just this one thing that looks bad.