Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Initial commit
  • Loading branch information
Klaus Thoden committed May 5, 2017
0 parents commit ed33d41
Show file tree
Hide file tree
Showing 5 changed files with 214 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
output.html
6 changes: 6 additions & 0 deletions README.md
@@ -0,0 +1,6 @@
# CSL style for EOA #
This repository contains the CSL style file for Edition Open Access. It comes with an examplary database and a small markdown file for testing.

Testing can be done with the pandoc tool and its plugin pandoc-citeproc

pandoc --filter pandoc-citeproc input.md -s -o output.html
94 changes: 94 additions & 0 deletions eoa.csl
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="../thirdparty/schema/csl.rnc" type="application/relax-ng-compact-syntax"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" default-locale="en-GB" class="in-text">
<info>
<!-- The required cs:info element fulfills the same function in
independent styles as it does in dependent styles: it
stores the style metadata. -->
<title>Edition Open Access</title>
<id>http://www.zotero.org/styles/edition-open-acceess</id>
<author>
<name>Klaus Thoden</name>
<email>kthoden@mpiwg-berlin.mpg.de</email>
</author>
<rights
license="http://creativecommons.org/licenses/by-sa/3.0/">This
work is licensed under a Creative Commons Attribution-ShareAlike
3.0 License</rights>
<link rel="documentation" href="http://edition-open-access.de/support/editorial.html">http://www.edition-open-access.de/support/editorial.html</link>
<category citation-format="author-date"/>
<summary>Style file for Editon Open Access publications.</summary>
<updated>2017-05-04T13:21:00+02:00</updated>
</info>
<locale xml:lang="en">
<!-- The optional cs:locale elements can be used to overwrite the
locale data from the locale files. -->
<terms>
<term name="no date">without date</term>
</terms>
</locale>
<locale xml:lang="de">
<!-- The optional cs:locale elements can be used to overwrite the
locale data from the locale files. -->
<terms>
<term name="no date">ohne Datum</term>
</terms>
</locale>
<macro name="author">
<names variable="author">
<name and="text" initialize="false" name-as-sort-order="all"/>
</names>
</macro>
<macro name="issued-year">
<choose>
<if variable="issued">
<date variable="issued">
<date-part name="year"/>
</date>
</if>
<else>
<text term="no date"/>
</else>
</choose>
</macro>

<!-- The optional cs:macro elements can be used to store CSL code
for use by cs:citation, cs:bibliography, or other cs:macro
elements. -->

<citation et-al-min="3" et-al-use-first="1">
<sort>
<key macro="author"/>
</sort>
<layout prefix="" suffix="" delimiter=",">
<group delimiter=",">
<text macro="author"/>
<text macro="issued-year"/>
</group>
</layout>
</citation>
<!-- The required cs:citation element defines the format of
citations. -->
<bibliography>
<!-- The optional cs:bibliography element defines the format of the
bibliography. -->
<sort>
<key macro="author"/>
<key macro="issued-year"/>
<key variable="title"/>
</sort>
<layout suffix=".">
<group delimiter=". ">
<text macro="author"/>
<text macro="issued-year"/>
<text variable="title"/>
<text variable="container-title"/>
</group>
<group>
<text variable="volume"/>
<text variable="issue" prefix="(" suffix=")"/>
</group>
<text variable="page"/>
</layout>
</bibliography>
</style>
97 changes: 97 additions & 0 deletions example.bib
@@ -0,0 +1,97 @@
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/
%% Created for ☞ at 2016-11-23 18:00:49 +0100
%% Saved with string encoding Unicode (UTF-8)
@book{Piaget_1985,
Address = {Chicago},
Author = {Piaget, Jean},
Publisher = {University of Chicago Press},
Title = {The Equilibration of Cognitive Structures},
Year = {1985}}

@booklet{Kaulbach_1960,
Address = {Köln},
Author = {Kaulbach, Friedrich},
Publisher = {Kölner Universitäts-Verlag},
Series = {Kant-Studien. Ergänzungshefte},
Title = {Die Metaphysik des Raumes bei Leibniz und Kant},
Volume = {79},
Year = {1960}}

@techreport{walkowski_digital_2016,
Author = {Walkowski, Niels-Oliver},
Year = {2016},
Institution = {Niedersächsische Staats- und Universitätsbibliothek Göttingen},
Location = {Göttingen},
Number = {17},
Title = {Digital Publications beyond Digital Communication},
Url = {http://nbn-resolving.de/urn:nbn:de:gbv:7-dariah-2016-3-4},
Bdsk-Url-1 = {http://nbn-resolving.de/urn:nbn:de:gbv:7-dariah-2016-3-4}}

@phdthesis{Carvalho2012,
Author = {Carvalho, {Teresa Nobre de}},
Keywords = {Brentjes},
School = {University of Lisbon},
Title = {O mundo natural asiático aos olhos da Occidente. Contribuição dos textos ibéricos quinhentistas para a construção de uma nova consciência europeia sobre a Ásia},
Year = {2012}}

@misc{Gert2011,
Author = {Bernard Gert},
Publisher = {The Stanford Encyclopedia of Philosophy},
Title = {The Definition of Morality},
Type = {Online Database},
Url = {http://plato.stanford.edu/archives/fall2012/entries/morality-definition/},
Urldate = {2014-10-14},
Year = {2011 [2002]},
Bdsk-Url-1 = {http://plato.stanford.edu/archives/fall2012/entries/morality-definition/}}

@incollection{Asper_2009,
Address = {Oxford},
Author = {Markus Asper},
Booktitle = {The Oxford Handbook of the History of Mathematics},
Editor = {Eleanor Robson and Jacqueline Stedall},
Pages = {107-132},
Publisher = {Oxford University Press},
Title = {The two cultures of mathematics in ancient Greece},
Year = {2009}}

@inproceedings{Gamba_2008,
Address = {Detroit},
Author = {Gamba, Enrico and Andersen, Kirsti},
Booktitle = {Complete Dictionary of Scientific Biography. Vol. 23},
Keywords = {DBB},
Pages = {174-178},
Publisher = {Charles Scribner's Sons},
Title = {{M}onte, {G}uidobaldo, {M}archese {D}el},
Year = {2008}}

@article{Hsu_1993,
Author = {Hsu, Mei-ling},
Journal = {Imago Mundi},
Pages = {90-100},
Title = {The Qin Maps: A Clue to Later Chinese Cartographic Development},
Volume = {45},
Year = {1993}}

@newspaper{wenk_riesenschweinerei_2016,
Abstract = {18 Jahre „Didi \& Stulle“: Die jetzt veröffentlichte Gesamtausgabe führt noch einmal die Stärken der Reihe vor Augen - zeigt aber auch, wieso Fil gut daran tat, die Serie zu beenden.},
Author = {Wenk, Erik},
Title = {Eine Riesenschweinerei - „Didi \& Stulle“ komplett},
Url = {http://www.tagesspiegel.de/kultur/comics/berliner-comic-klassiker-eine-riesenschweinerei-didi-und-stulle-komplett/14742676.html},
Urldate = {2016-11-23},
Bdsk-Url-1 = {http://www.tagesspiegel.de/kultur/comics/berliner-comic-klassiker-eine-riesenschweinerei-didi-und-stulle-komplett/14742676.html}}

@article{test,
Author = {Thoden, Klaus},
Journal = {Test},
Pages = {15-20},
Title = {This should not appear, because it is not cited},
Volume = {21},
Year = {1980}}
16 changes: 16 additions & 0 deletions input.md
@@ -0,0 +1,16 @@
---
csl: eoa.csl
bibliography: example.bib
lang: de
nocite: |
@Piaget_1985, @Kaulbach_1960, @walkowski_digital_2016, @Carvalho2012, @Gert2011, @Asper_2009, @Gamba_2008, @Hsu_1993, @wenk_riesenschweinerei_2016
---
<!--
https://pandoc.org/MANUAL.html
A small markdown file for testing the pandoc conversion of a bib file based on a CSL style file.
Usage: pandoc --filter pandoc-citeproc input.md -s -o output.html
-->

0 comments on commit ed33d41

Please sign in to comment.