Skip to content

Instantly share code, notes, and snippets.

@fbennett
fbennett / csl-export.json
Created November 28, 2013 21:55
CSL JSON export of multilingual item with three editors
[
{
"id": 13533,
"type": "book",
"multi": {
"main": {
"title": "en"
},
"_keys": {
"title": {
@fbennett
fbennett / amlaw-title-macro.xml
Created May 13, 2013 11:07
Title macro from the American Law Style, as a worked example from a production environment
<macro name="amlaw-title">
<choose>
<if>
<conditions match="all">
<condition type="book song motion_picture" match="any"/>
<condition variable="title version" match="all"/>
<condition disambiguate="true" position="first" match="any"/>
<condition is-numeric="version" match="all"/>
</conditions>
<group delimiter=", ">
@fbennett
fbennett / conditions_PlusMinus.txt
Created May 8, 2013 11:59
Test of extended CSL condition syntax
>>===== MODE =====>>
citation
<<===== MODE =====<<
This test supports a proposal for extending CSL's conditional attributes.
The proposal introduces two new nodes and associated schema adjustments:
* A cs:conditions element, as an optional first child of cs:if or cs:else-if,
with a sole match attribute. When cs:conditions is used, its parent (cs:if
@fbennett
fbennett / yoan.csl
Last active December 16, 2015 01:19
Style with small fixes
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="in-text" default-locale="en-US" demote-non-dropping-particle="sort-only" page-range-format="expanded">
<info>
<title>these yoan</title>
<id>http://www.zotero.org/styles/yoan-thesis</id>
<link href="http://www.zotero.org/styles/yoan-thesis" rel="self"/>
<link href="http://journals.iucr.org/d/issues/2012/02/00/me0456/index.html" rel="documentation"/>
<author>
<name>yoan texier</name>
<email>[email protected]</email>
@fbennett
fbennett / bib-edit.patch
Created March 31, 2013 09:06
Patch for bibliography editing
diff --git a/chrome/content/zotero/tinymce/integration.html b/chrome/content/zotero/tinymce/integration.html
index f6fc2d2..0be5c34 100755
--- a/chrome/content/zotero/tinymce/integration.html
+++ b/chrome/content/zotero/tinymce/integration.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
@fbennett
fbennett / uncited-items-test.rdf
Created March 31, 2013 06:48
Test data for uncited items bug(s)
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:z="http://www.zotero.org/namespaces/export#"
xmlns:bib="http://purl.org/net/biblio#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<bib:Book rdf:about="#item_3">
<z:itemType>book</z:itemType>
<bib:authors>
<rdf:Seq>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:res="http://purl.org/vocab/resourcelist/schema#"
xmlns:z="http://www.zotero.org/namespaces/export#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<z:UserItem rdf:about="http://zotero.org/users/6204/items/TBZWWHHD">
<res:resource rdf:resource="My%20URL"/>
<z:accessDate>2012-12-11 00:31:21</z:accessDate>
@fbennett
fbennett / new-zealand-veterinary-journal.csl
Created August 31, 2012 00:24
New Zealand Veterinary Journal with explicit year suffixes
<?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>New Zealand Veterinary Journal</title>
<id>http://www.zotero.org/styles/new-zealand-veterinary-journal</id>
<link href="http://www.zotero.org/styles/new-zealand-veterinary-journal" rel="self"/>
<link href="http://www.vetjournal.org.nz/sites/default/files/domain-19/NZVJ%20Instructions%20for%20Authors.pdf" rel="documentation"/>
<author>
<name>sumostorm</name>
<email>[email protected]</email>
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" default-locale="lt" class="note" version="1.1mlz1" page-range-format="expanded" demote-non-dropping-particle="sort-only">
<info>
<title>LIS Russian GOST R 7.0.5-2008 (numeric) En+Lt+Ru</title>
<id>http://www.zotero.org/styles/lis-russian-gost-r-705-2008-en+lt+ru</id>
<link rel="self" href="http://www.zotero.org/styles/lis-russian-gost-r-705-2008-en+lt+ru"/>
<category citation-format="note"/>
<category field="generic-base"/>
<summary/>
<updated>2012-08-23T02:03:56+00:00</updated>
@fbennett
fbennett / cms-full-with-complete-lt-locale.csl
Created August 12, 2012 00:54
LT Chicago Fullnte with complete locale
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.1mlz1" demote-non-dropping-particle="sort-only">
<info>
<title>LT-Chicago Manual of Style (full note)</title>
<id>http://www.zotero.org/styles/lt-chicago-fullnote-bibliography</id>
<author>
<name>Julian Onions</name>
<email>[email protected]</email>
</author>
<contributor>