Skip to content

Instantly share code, notes, and snippets.

@cormacrelf
Created November 27, 2020 18:21
Show Gist options
  • Save cormacrelf/84bc9592cd10602d05a52bed938adece to your computer and use it in GitHub Desktop.
Save cormacrelf/84bc9592cd10602d05a52bed938adece to your computer and use it in GitHub Desktop.
>>===== MODE =====>>
citation
<<===== MODE =====<<
>>===== RESULT =====>>
Kurtz Camembert et al. / Kurt Camembert et al.
<<===== RESULT =====<<
>>===== INPUT =====>>
[
{
"id": "1",
"type": "book",
"author": [
{
"family": "Camembert",
"given": "Kurtz"
},
{
"family": "Rossi",
"given": "Amadeus"
},
{
"family": "Ignoble",
"given": "Ignatius"
}
]
},
{
"id": "2",
"type": "book",
"author": [
{
"family": "Camembert",
"given": "Kurt"
},
{
"family": "Rossi",
"given": "Amadeus"
},
{
"family": "Idiosyncratic",
"given": "Ignatius"
}
]
}
]
<<===== INPUT =====<<
>>===== CSL =====>>
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0.1" default-locale="en-US">
<info>
<id>https://github.com/cormacrelf/citeproc-rs/test-style</id>
<title>test-style</title>
<updated>2000-01-01T00:00:00Z</updated>
</info>
<citation
et-al-min="1"
et-al-use-first="1"
disambiguate-add-givenname="true"
disambiguate-add-names="true">
<layout delimiter=" / " suffix=".">
<names variable="author">
<name initialize="true" initialize-with="." />
</names>
</layout>
</citation>
</style>
<<===== CSL =====<<
# Issue: https://github.com/cormacrelf/citeproc-rs/issues/60
mode: citation
result: Kurtz Camembert et al. / Kurt Camembert et al.
input:
- id: 1
type: book
author:
- given: Kurtz
family: Camembert
- given: Amadeus
family: Rossi
- given: Ignatius
family: Ignoble
- id: 2
type: book
author:
# different given name, but same initial K.
- given: Kurt
family: Camembert
# same
- given: Amadeus
family: Rossi
# different last name
- given: Ignatius
family: Idiosyncratic
csl: |
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0.1" default-locale="en-US">
<info>
<id>https://github.com/cormacrelf/citeproc-rs/test-style</id>
<title>test-style</title>
<updated>2000-01-01T00:00:00Z</updated>
</info>
<citation
et-al-min="1"
et-al-use-first="1"
disambiguate-add-givenname="true"
disambiguate-add-names="true">
<layout delimiter=" / " suffix=".">
<names variable="author">
<name initialize="true" initialize-with="." />
</names>
</layout>
</citation>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment