-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chimia.csl #1704
Merged
Merged
chimia.csl #1704
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,329 @@ | ||
<?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" initialize-with-hyphen="true" default-locale="en-US"> | ||
<info> | ||
<title>CHIMIA</title> | ||
<id>http://www.zotero.org/styles/chimia</id> | ||
<link href="http://www.zotero.org/styles/chimia" rel="self"/> | ||
<link href="https://chimia.ch/index.php?option=com_content&view=category&layout=blog&id=109&Itemid=489&lang=en" rel="documentation"/> | ||
<author> | ||
<name>Martin Brändle</name> | ||
<email>mpbraendle@gmail.com</email> | ||
<uri>http://www.id.uzh.ch/cl/iframe/org/visitenk/index.php?id=mb</uri> | ||
</author> | ||
<category citation-format="numeric"/> | ||
<category field="chemistry"/> | ||
<issn>0009-4293</issn> | ||
<summary>A style for CHIMIA, the International Journal for Chemistry and Official Membership Journal of the Swiss Chemical Society (SCS) and its Divisions. | ||
This style has been tested with Mendeley and Zotero and has been validated using the CSL Schema 1.0.1. Papers for Mac does not correctly format webpages and patents due to unknown reasons.</summary> | ||
<updated>2015-10-10T16:30:00+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> | ||
<!-- MACROS, sorted alphabetically --> | ||
<!-- author --> | ||
<macro name="author"> | ||
<names variable="author"> | ||
<name initialize-with=". " delimiter=", " delimiter-precedes-last="always"/> | ||
<label form="short" prefix=", " text-case="capitalize-first" suffix=" "/> | ||
<substitute> | ||
<names variable="editor"/> | ||
<names variable="translator"/> | ||
</substitute> | ||
</names> | ||
</macro> | ||
|
||
<!-- computer program --> | ||
<macro name="computerprogram"> | ||
<group delimiter=", "> | ||
<group delimiter=" "> | ||
<text variable="title" text-case="title"/> | ||
<text macro="program-version"/> | ||
</group> | ||
<text macro="author"/> | ||
<text macro="publisher"/> | ||
<text macro="year-date"/> | ||
</group> | ||
<text macro="doi" prefix=", "/> | ||
</macro> | ||
|
||
<!-- DOI --> | ||
<macro name="doi"> | ||
<choose> | ||
<if variable="DOI"> | ||
<text variable="DOI" prefix="DOI: "/> | ||
</if> | ||
</choose> | ||
</macro> | ||
|
||
<!-- edition --> | ||
<macro name="edition"> | ||
<group delimiter=" "> | ||
<text variable="edition"/> | ||
<text term="edition" form="short"/> | ||
</group> | ||
</macro> | ||
|
||
<!-- editor --> | ||
<macro name="editor"> | ||
<group delimiter=" "> | ||
<names variable="editor"> | ||
<label form="short" text-case="capitalize-first" suffix=" "/> | ||
<name initialize-with=". " delimiter=", " delimiter-precedes-last="always"/> | ||
</names> | ||
</group> | ||
</macro> | ||
|
||
<!-- full-accessed --> | ||
<macro name="full-accessed"> | ||
<date variable="accessed" prefix="accessed " delimiter=" "> | ||
<date-part name="month" form="long"/> | ||
<date-part name="day" suffix=", "/> | ||
<date-part name="year" font-weight="bold"/> | ||
</date> | ||
</macro> | ||
|
||
<!-- publisher --> | ||
<macro name="publisher"> | ||
<group delimiter=", "> | ||
<text variable="publisher" text-case="capitalize-all"/> | ||
<text variable="publisher-place" text-case="title"/> | ||
</group> | ||
</macro> | ||
|
||
<!-- pages --> | ||
<macro name="pages"> | ||
<choose> | ||
<if type="chapter paper-conference"> | ||
<label variable="page" form="short" suffix=" "/> | ||
<text variable="page-first"/> | ||
</if> | ||
<else> | ||
<text variable="page-first"/> | ||
</else> | ||
</choose> | ||
</macro> | ||
|
||
<!-- program-version --> | ||
<macro name="program-version"> | ||
<choose> | ||
<if variable="version"> | ||
<text variable="version"/> | ||
</if> | ||
<else-if variable="edition"> | ||
<text variable="edition"/> | ||
</else-if> | ||
<else> | ||
<text variable="number"/> | ||
</else> | ||
</choose> | ||
</macro> | ||
|
||
<!-- thesis-number --> | ||
<macro name="thesis-number"> | ||
<choose> | ||
<if variable="volume"> | ||
<choose> | ||
<if is-numeric="volume"> | ||
<text value="No. "/> | ||
</if> | ||
</choose> | ||
<number variable="volume" form="numeric"/> | ||
</if> | ||
<else-if variable="number"> | ||
<choose> | ||
<if is-numeric="number"> | ||
<text value="No. "/> | ||
</if> | ||
</choose> | ||
<number variable="number" form="numeric"/> | ||
</else-if> | ||
</choose> | ||
</macro> | ||
|
||
<!-- thesis-type --> | ||
<macro name="thesis-type"> | ||
<choose> | ||
<if variable="genre"> | ||
<text variable="genre"/> | ||
</if> | ||
<else> | ||
<text value="Ph.D. Thesis"/> | ||
</else> | ||
</choose> | ||
</macro> | ||
|
||
<!-- volume --> | ||
<macro name="volume"> | ||
<group delimiter=" "> | ||
<choose> | ||
<if type="chapter paper-conference"> | ||
<text term="volume" form="short" text-case="capitalize-first"/> | ||
</if> | ||
</choose> | ||
<text variable="volume"/> | ||
</group> | ||
</macro> | ||
|
||
<!-- year-date --> | ||
<macro name="year-date"> | ||
<group font-weight="bold"> | ||
<choose> | ||
<if variable="issued"> | ||
<date variable="issued"> | ||
<date-part name="year"/> | ||
</date> | ||
</if> | ||
</choose> | ||
</group> | ||
</macro> | ||
<!-- END MACROS --> | ||
|
||
<!-- CITATION --> | ||
<citation collapse="citation-number"> | ||
<sort> | ||
<key variable="citation-number"/> | ||
</sort> | ||
<layout vertical-align="sup" delimiter="," prefix="[" suffix="]"> | ||
<text variable="citation-number"/> | ||
</layout> | ||
</citation> | ||
|
||
<!-- BIBLIOGRAPHY --> | ||
<bibliography entry-spacing="0" second-field-align="flush"> | ||
<layout suffix="."> | ||
<text variable="citation-number" prefix="[" suffix="] "/> | ||
<choose> | ||
<!-- journal/review article --> | ||
<if type="article-journal review" match="any"> | ||
<text macro="author" suffix=", "/> | ||
<group delimiter=" "> | ||
<text variable="container-title" form="short" font-style="italic" strip-periods="false"/> | ||
<group delimiter=", "> | ||
<text macro="year-date"/> | ||
<group> | ||
<text variable="volume" font-style="italic"/> | ||
</group> | ||
<text macro="pages"/> | ||
</group> | ||
</group> | ||
<text macro="doi" prefix=", "/> | ||
</if> | ||
<!-- book and report --> | ||
<else-if type="book report bill graphic legal_case legislation motion_picture song" match="any"> | ||
<choose> | ||
<!-- Zotero maps computer program to book, so check on version variable (may fail) --> | ||
<if variable="version"> | ||
<text macro="computerprogram"/> | ||
</if> | ||
<else> | ||
<text macro="author" suffix=", "/> | ||
<group delimiter=", "> | ||
<text variable="title" prefix="‘" suffix="’" /> | ||
<text macro="publisher"/> | ||
<text macro="year-date"/> | ||
</group> | ||
<text macro="doi" prefix=", "/> | ||
</else> | ||
</choose> | ||
</else-if> | ||
<!-- book chapter or conference proceedings --> | ||
<else-if type="chapter paper-conference entry-encyclopedia" match="any"> | ||
<text macro="author" suffix=", "/> | ||
<group delimiter=", "> | ||
<group delimiter=" "> | ||
<text term="in"/> | ||
<text variable="container-title" text-case="title" prefix="‘" suffix="’" /> | ||
</group> | ||
<text macro="volume" font-style="italic"/> | ||
<text macro="edition"/> | ||
<text macro="editor"/> | ||
<text macro="publisher"/> | ||
<text macro="year-date"/> | ||
<text macro="pages"/> | ||
</group> | ||
<text macro="doi" prefix=", "/> | ||
</else-if> | ||
<!-- thesis --> | ||
<else-if type="thesis"> | ||
<text macro="author" suffix=", "/> | ||
<group delimiter=", "> | ||
<group delimiter=" "> | ||
<text macro="thesis-type"/> | ||
<text variable="publisher"/> | ||
<text macro="thesis-number"/> | ||
</group> | ||
<text variable="publisher-place"/> | ||
<text macro="year-date"/> | ||
</group> | ||
<text macro="doi" prefix=", "/> | ||
</else-if> | ||
<!-- computer program (is mapped to type "article" in Mendeley) --> | ||
<else-if type="article"> | ||
<text macro="computerprogram"/> | ||
</else-if> | ||
<!-- patent --> | ||
<else-if type="patent"> | ||
<text macro="author" suffix=", "/> | ||
<group delimiter=", "> | ||
<text variable="number"/> | ||
<text macro="year-date"/> | ||
</group> | ||
</else-if> | ||
<!-- webpage --> | ||
<else-if type="webpage"> | ||
<group delimiter=", "> | ||
<text variable="title"/> | ||
<text variable="URL" font-style="italic"/> | ||
<text macro="full-accessed"/> | ||
</group> | ||
</else-if> | ||
<!-- weblog --> | ||
<else-if type="post-weblog"> | ||
<text macro="author" suffix=", "/> | ||
<group delimiter=", "> | ||
<text variable="title"/> | ||
<text variable="URL" font-style="italic"/> | ||
<text macro="full-accessed"/> | ||
</group> | ||
</else-if> | ||
<!-- manuscript (not in Mendeley) --> | ||
<else-if type="manuscript" match="any"> | ||
<text macro="author" suffix=", "/> | ||
<group delimiter=", "> | ||
<text variable="title" prefix="‘" suffix="’" /> | ||
<text macro="publisher"/> | ||
<text macro="year-date"/> | ||
</group> | ||
</else-if> | ||
|
||
<!-- anything else: | ||
article-magazine | ||
article-newspaper | ||
broadcast | ||
dataset | ||
entry | ||
entry-dictionary | ||
figure | ||
interview | ||
map | ||
musical_score | ||
pamphlet | ||
post | ||
--> | ||
<else> | ||
<text macro="author" suffix=", "/> | ||
<group delimiter=" "> | ||
<text variable="container-title" form="short" font-style="italic"/> | ||
<group delimiter=", "> | ||
<text macro="year-date"/> | ||
<group> | ||
<text variable="volume" font-style="italic"/> | ||
</group> | ||
<text macro="pages"/> | ||
</group> | ||
</group> | ||
<text macro="doi" prefix=", "/> | ||
</else> | ||
</choose> | ||
</layout> | ||
</bibliography> | ||
</style> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not very happy with this. Couldn't we maybe do this by testing for the version variable? Zotero maps software to book. Mendeley also maps a whole lot of other item types to article.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing on the version variable is not a sufficient condition, since it may be empty. Not every software has a version attached to it, and authors may be lax in citing correctly.
I would rather prefer that in the next CSL version, a type "computer program" (or similar) will be introduced, as Endnote does have. I will add some checks, so if the version variable is not empty, we are sure that it is a program.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The basic problem is:
In the worst case 2) and 3) together would require checking on 6 different combinations, and you still have no clue if the document type is still a computer program.
So implementation of 1) in the next version of CSL is absolutely essential.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I leave the "article" part as it is. For Zotero, although rarely used by chemists - they prefer Endnote or Mendeley - I will add a check on version in the "book" section. Although I'm not happy with this. The easiest solution would be to add correct document types, so that reference management software not has to map arbitrarily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, no disagreement with the need for a software item type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a ticket? Can't find one in the zotero-bits repo or schema/documentation CSL repos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adam3smith? We should probably create one in the zotero-bits repo if one doesn't yet exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, agree. I don't think there is one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: zotero/zotero-bits#69