Small-caps - editing an existing style
Hello,
I am trying to edit the Journal of American Archaeology style in order to reflect the Antiquity journal style with regards to using small caps for author names.
I have looked at the suggestions here: https://forums.zotero.org/discussion/24209/small-caps-instead-of-capital-letters/
and tried to implement this advice in the JAA style but to no effect.
If someone could point me in right direction I would very much appreciate the help!
Best,
Rebecca
I am trying to edit the Journal of American Archaeology style in order to reflect the Antiquity journal style with regards to using small caps for author names.
I have looked at the suggestions here: https://forums.zotero.org/discussion/24209/small-caps-instead-of-capital-letters/
and tried to implement this advice in the JAA style but to no effect.
If someone could point me in right direction I would very much appreciate the help!
Best,
Rebecca
As per the previous thread I attempted to replace text-case="uppercase" with font-variant="small-caps" in the author sections...
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
<info>
<title>Antiquity</title>
<id>http://www.zotero.org/styles/american-journal-of-archaeology</id>
<link href="http://www.zotero.org/styles/american-journal-of-archaeology" rel="self"/>
<link href="http://www.ajaonline.org/submissions#4" rel="documentation"/>
<author>
<name>Konstantinos Kopanias</name>
<email>kkopanias@gmx.de</email>
</author>
<category citation-format="author-date"/>
<category field="anthropology"/>
<issn>0002-9114</issn>
<eissn>1939-828X</eissn>
<summary>The American Journal of Archaeology style</summary>
<updated>2013-08-29T05:27:03+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<locale>
<terms>
<term name="editor" form="verb-short">ed.</term>
<term name="translator" form="verb-short">trans.</term>
</terms>
</locale>
<macro name="secondary-contributors">
<choose>
<if type="chapter paper-conference" match="none">
<group delimiter=". ">
<choose>
<if variable="author">
<names variable="editor">
<label form="verb-short" prefix=" " font-variant="small-caps" suffix=" "/>
<name and="text" delimiter=", "/>
</names>
</if>
</choose>
<choose>
<if variable="author editor" match="any">
<names variable="translator">
<label form="verb" font-variant="small-caps" suffix=" "/>
<name and="text" delimiter=", "/>
http://citationstyles.org/downloads/specification.html#name-part-formatting
In other words, starting with your last line:
<name and="text" delimiter=", ">
<name-part name="family" font-variant="small-caps"/>
<name-part name="given" font-variant="small-caps"/>
</name>
If you want to share larger pieces of code, use a public gist on gist.github.com or pastebin.com
I have pasted the csl contents here http://pastebin.com/MP7Lv89X
On updating the test style to Zotero, I do now also get a warning that the file is not a valid CSL 1.0.1 style file (that I didn't have before) so the changes I have made may be preventing the style from reading properly.
i.e. the order always needs to be
<name...>
<name-part ../>
</name>
If you look in your lines 113-115, you have
<name-part../>
which won't work.<name-part.../>
<name .../>
You need
<name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", " delimiter-precedes-last="always" initialize-with=".">
<name-part name="family" font-variant="small-caps"/>
<name-part name="given" font-variant="small-caps"/>
</name>
(note the missing end tag "/>" in the first line)
Same logic for all other instances where you'd want this.
I was confused by </names> and </name> as the bounding terms and thought the inserted text merely had to lie within </names>
I've been dealing with the same journal, and having similar issues. If you got the CSL to work, would you be able to post the final output somewhere? You'd save me hours of work!
I dug through my workings and have pasted the whole content of the last csl I edited here:
http://pastebin.com/F39TRXTK
In all honesty I can't remember if I got it to work or gave up and did it manually - but it should give you a start.
It will appear on the style repository within 30mins.. (See here if you need instructions for installing styles in standalone.)
Any problems please let us know.
Below is the section I changed manually (seeking to get ‘Retrieved <date> from <URL>.’) It works fine in the online CSL editor.
I seem to have closed all nested items, the only thing I can think of is that it's something to do with 'text value' as opposed to 'text term'. What's the difference between those?
<macro name="access">
<choose>
<if variable="URL">
<text value="Retrieved "/>
<group prefix=" " delimiter=" " suffix="">
<date variable="accessed">
<date-part name="day" suffix=" "/>
<date-part name="month" suffix=" "/>
<date-part name="year"/>
</date>
<group>
<text term="from"/>
<text variable="URL" prefix=" "/>
</group>
</group>
</if>
</choose>
</macro>
The full code is here: https://gist.github.com/anonymous/de4be3f1442a7f0c126a
Thanks
https://gist.github.com/anonymous/de4be3f1442a7f0c126a#file-gistfile1-txt-L110
dates can either have form attributes or date-part subelements, but not both.
http://simonster.github.io/csl-validator.js/
that would have at least gotten you in the right vicinity.
I'll try the validator in future, but I don't think I would have been able to work it out based on the response there...