New Style: BMC Bioinformatics
Hi Everyone,
I have created a new style for BMC Bioinformatics (should be applicable to most of the BMC journals as well) based on what I have found here: http://www.biomedcentral.com/bmcbioinformatics/ifora/
This style does not handle every case, but it should gracefully handle weblinks, books, chapters, and journal articles.
Unfortunately, I haven't taken the time to figure out SVN (sunk enough time in just making the style) so I am posting the text below if someone could kindly submit it. Thanks.
--- Beginning of CSL style ----
<?xml version="1.0" encoding="UTF-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en">
<info>
<title>BMC Bioinformatics</title>
<id>http://www.zotero.org/styles/bmcbioinformatics</id>
<link href="http://www.zotero.org/styles/bmcbioinformatics.csl"/>
<author>
<name> Robert M Flight</name>
<email>rflight79@gmail.com</email>
</author>
<category term="biology"/>
<updated>2008-12-05T09:54:00+00:00</updated>
<!-- This is just a basic style that handles journal articles, book chapters, books, and websites according to the examples given on http://www.biomedcentral.com/bmcbioinformatics/ifora/
Many of the other types of entries could be done, but I have not felt the need to code those in as of yet RMF Dec 05, 2008-->
</info>
<macro name="author">
<names variable="author" suffix=": ">
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
</names>
</macro>
<macro name="editor">
<names variable="editor" prefix="Edited by " suffix="">
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
</names>
</macro>
<macro name="publisher">
<text variable="publisher-place" suffix=": "/>
<text variable="publisher" suffix="; "/>
</macro>
<macro name="container-title">
<text variable="container-title" font-weight="normal" font-style="italic" vertical-align="baseline" form="short"/>
</macro>
<macro name="title">
<choose>
<if type="book">
<text variable="title" font-weight="normal" font-style="italic" suffix=""/>
</if>
<else>
<text variable="title" suffix="" font-weight="bold"/>
</else>
</choose>
</macro>
<macro name="volume">
<text variable="volume" font-weight="bold" font-style="normal"/>
</macro>
<macro name="edition">
<choose>
<if is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="long" suffix="."/>
</group>
</if>
<else>
<text variable="edition" suffix="." />
</else>
</choose>
</macro>
<citation>
<option name="collapse" value="citation-number"/>
<sort>
<key variable="citation-number"/>
</sort>
<layout prefix="[" suffix="]" delimiter=", ">
<text variable="citation-number"/>
</layout>
</citation>
<bibliography>
<option name="et-al-min" value="6"/>
<option name="et-al-use-first" value="3"/>
<layout>
<text variable="citation-number" suffix=". "/>
<choose>
<if type="webpage"> <!-- The webpages will be the bane of my existence -->
<text macro="title"/>
<text variable="URL" prefix=" [" suffix="]"/>
</if>
<else> <!-- Now for everything else -->
<text macro="author"/>
<text macro="title" suffix=". "/>
<choose>
<if type="book">
<text macro="edition" prefix=" " suffix=" "/>
<text macro="publisher" prefix=" "/>
</if>
<else-if type="chapter">
<text term="in" text-case="capitalize-first" suffix=" "/>
<text macro="container-title" suffix=". "/>
<text macro="edition" suffix=". "/>
<text macro="editor" />
<text macro="publisher" prefix=" "/>
</else-if>
<else>
<text macro="container-title" suffix=" "/>
</else>
</choose>
<date variable="issued">
<date-part name="year"/>
</date>
<text macro="volume" prefix=", "/>
<!-- This was to deal with supplemental issues, but is-numeric evaluates to true if there is a number in there at all, so for right now, this is commented out RMF Dec 4, 2008 -->
<!--
<choose>
<if is-numeric="issue">
</if>
<else>
<text variable="issue" prefix="(" suffix=")"/>
</else>
</choose>
-->
<text variable="page" prefix=":"/>
<text item="."/>
</else>
</choose>
</layout>
</bibliography>
</style>
--- End of Style ---
I have created a new style for BMC Bioinformatics (should be applicable to most of the BMC journals as well) based on what I have found here: http://www.biomedcentral.com/bmcbioinformatics/ifora/
This style does not handle every case, but it should gracefully handle weblinks, books, chapters, and journal articles.
Unfortunately, I haven't taken the time to figure out SVN (sunk enough time in just making the style) so I am posting the text below if someone could kindly submit it. Thanks.
--- Beginning of CSL style ----
<?xml version="1.0" encoding="UTF-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en">
<info>
<title>BMC Bioinformatics</title>
<id>http://www.zotero.org/styles/bmcbioinformatics</id>
<link href="http://www.zotero.org/styles/bmcbioinformatics.csl"/>
<author>
<name> Robert M Flight</name>
<email>rflight79@gmail.com</email>
</author>
<category term="biology"/>
<updated>2008-12-05T09:54:00+00:00</updated>
<!-- This is just a basic style that handles journal articles, book chapters, books, and websites according to the examples given on http://www.biomedcentral.com/bmcbioinformatics/ifora/
Many of the other types of entries could be done, but I have not felt the need to code those in as of yet RMF Dec 05, 2008-->
</info>
<macro name="author">
<names variable="author" suffix=": ">
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
</names>
</macro>
<macro name="editor">
<names variable="editor" prefix="Edited by " suffix="">
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
</names>
</macro>
<macro name="publisher">
<text variable="publisher-place" suffix=": "/>
<text variable="publisher" suffix="; "/>
</macro>
<macro name="container-title">
<text variable="container-title" font-weight="normal" font-style="italic" vertical-align="baseline" form="short"/>
</macro>
<macro name="title">
<choose>
<if type="book">
<text variable="title" font-weight="normal" font-style="italic" suffix=""/>
</if>
<else>
<text variable="title" suffix="" font-weight="bold"/>
</else>
</choose>
</macro>
<macro name="volume">
<text variable="volume" font-weight="bold" font-style="normal"/>
</macro>
<macro name="edition">
<choose>
<if is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="long" suffix="."/>
</group>
</if>
<else>
<text variable="edition" suffix="." />
</else>
</choose>
</macro>
<citation>
<option name="collapse" value="citation-number"/>
<sort>
<key variable="citation-number"/>
</sort>
<layout prefix="[" suffix="]" delimiter=", ">
<text variable="citation-number"/>
</layout>
</citation>
<bibliography>
<option name="et-al-min" value="6"/>
<option name="et-al-use-first" value="3"/>
<layout>
<text variable="citation-number" suffix=". "/>
<choose>
<if type="webpage"> <!-- The webpages will be the bane of my existence -->
<text macro="title"/>
<text variable="URL" prefix=" [" suffix="]"/>
</if>
<else> <!-- Now for everything else -->
<text macro="author"/>
<text macro="title" suffix=". "/>
<choose>
<if type="book">
<text macro="edition" prefix=" " suffix=" "/>
<text macro="publisher" prefix=" "/>
</if>
<else-if type="chapter">
<text term="in" text-case="capitalize-first" suffix=" "/>
<text macro="container-title" suffix=". "/>
<text macro="edition" suffix=". "/>
<text macro="editor" />
<text macro="publisher" prefix=" "/>
</else-if>
<else>
<text macro="container-title" suffix=" "/>
</else>
</choose>
<date variable="issued">
<date-part name="year"/>
</date>
<text macro="volume" prefix=", "/>
<!-- This was to deal with supplemental issues, but is-numeric evaluates to true if there is a number in there at all, so for right now, this is commented out RMF Dec 4, 2008 -->
<!--
<choose>
<if is-numeric="issue">
</if>
<else>
<text variable="issue" prefix="(" suffix=")"/>
</else>
</choose>
-->
<text variable="page" prefix=":"/>
<text item="."/>
</else>
</choose>
</layout>
</bibliography>
</style>
--- End of Style ---
Note: your author macro is going to be pretty fragile, since it doesn't account for the possibility of a missing author, and thus the need to substitute.
Also, see my use of the label element, which is how you're supposed to handle things like "edited by."
Finally, you might look to remove some the type-specific conditions in the bib layout.
"label" element? Hadn't come across that one yet, I will have to look into it (have any examples handy?). I would love to remove some of the type-specific conditions in the bib layout, however for webpage I don't have much of a choice, as I only want the 2 fields to show up whether there is any other information included in the reference or not (see link to the style above), and now that I look at the code I may be able to get rid of some of the other typing, I will have to play around with it some more. It just sucks up so much freaking time ....
I know XML and CSL is time-consuming to grok, but I'm guessing you've made your way pretty far up the learning curve, so that you'll find further progress much easier.