]'
26 | exit 1
27 | fi
28 | else
29 | echo "" > run-opt.js
30 | fi
31 |
32 | "${TRACEMONKEY}" -u "${TARGET}"
33 |
34 | rm -f run-opt.js
35 | rm -f run-opt.jsxdr
36 |
37 | echo $START
38 | echo $(date) \<--------------END
39 |
--------------------------------------------------------------------------------
/attic/scrape_dutch_particles.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | #-*- encoding: utf-8 -*-
3 |
4 | # Data source is the site linked here:
5 | # https://forums.zotero.org/discussion/30974/2/any-idea-why-an-a-author-comes-last-in-the-bibliography/2/#Item_26
6 |
7 | from lxml import etree
8 | htmlparser = etree.HTMLParser()
9 | tree = etree.parse(open("tussies.html"), htmlparser)
10 |
11 | nodes = tree.xpath('//li/strong')
12 |
13 | nodemap = {}
14 | nodelist = []
15 |
16 | for node in nodes:
17 | nodemap[node.text.encode('utf-8').lower()] = True;
18 |
19 | for node in nodemap.keys():
20 | nodelist.append(node)
21 |
22 | nodelist.sort()
23 |
24 | for node in nodelist:
25 | print node
26 |
--------------------------------------------------------------------------------
/attic/speed.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | START="$(date) <--------------START"
3 | cd $(dirname $0)
4 | cd ..
5 | RHINO="${PWD}"/rhino/js-1.7R1.jar
6 | DOJO="${PWD}"/dojo/dojo/dojo.js
7 | DOH="${PWD}"/dojo/util/doh/
8 |
9 | TARGET="${PWD}"/tests/test_speed.js
10 |
11 | java -client -jar "${RHINO}" "${TARGET}" dojoUrl="${DOJO}" testModule=""
12 | echo $START
13 | echo $(date) \<--------------END
14 |
--------------------------------------------------------------------------------
/attic/unused_tests/namespaces_Nada.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | >>===== SCHEMA =====>>
6 | 0.8
7 | <<===== SCHEMA =====<<
8 |
9 |
10 | >>===== RESULT =====>>
11 | <<===== RESULT =====<<
12 |
13 |
14 | >>===== CSL =====>>
15 |
16 |
17 |
18 |
19 |
20 | <<===== CSL =====<<
21 |
22 |
23 | >>===== INPUT =====>>
24 | [{
25 | "id":"ITEM-1",
26 | "type": "book",
27 | "title": "Book A"
28 | }]
29 | <<===== INPUT =====<<
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/attic/unused_tests/namespaces_Nada2.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | >>===== SCHEMA =====>>
6 | 0.8
7 | <<===== SCHEMA =====<<
8 |
9 |
10 | >>===== RESULT =====>>
11 | <<===== RESULT =====<<
12 |
13 |
14 | >>===== CSL =====>>
15 |
16 |
17 |
18 |
19 |
20 | <<===== CSL =====<<
21 |
22 |
23 | >>===== INPUT =====>>
24 | [{
25 | "id":"simple-western-name-1",
26 | "type": "book",
27 | "title": "Book A"
28 | }]
29 | <<===== INPUT =====<<
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/attic/unused_tests/namespaces_Nada3.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | >>===== SCHEMA =====>>
6 | 0.8
7 | <<===== SCHEMA =====<<
8 |
9 |
10 | >>===== RESULT =====>>
11 | <<===== RESULT =====<<
12 |
13 |
14 | >>===== CSL =====>>
15 |
22 | <<===== CSL =====<<
23 |
24 |
25 | >>===== INPUT =====>>
26 | [{
27 | "id":"ITEM-1",
28 | "type": "book",
29 | "title": "Book A"
30 | }]
31 | <<===== INPUT =====<<
32 |
--------------------------------------------------------------------------------
/attic/unused_tests/namespaces_Nada4.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | >>===== SCHEMA =====>>
6 | 0.8
7 | <<===== SCHEMA =====<<
8 |
9 |
10 | >>===== RESULT =====>>
11 | <<===== RESULT =====<<
12 |
13 |
14 | >>===== CSL =====>>
15 |
31 | <<===== CSL =====<<
32 |
33 |
34 | >>===== INPUT =====>>
35 | [{
36 | "id":"simple-western-name-1",
37 | "type": "book",
38 | "title": "Book A"
39 | }]
40 | <<===== INPUT =====<<
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/attic/unused_tests/namespaces_NonNada.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | >>===== SCHEMA =====>>
6 | 0.8
7 | <<===== SCHEMA =====<<
8 |
9 |
10 | >>===== RESULT =====>>
11 | Book A
12 | <<===== RESULT =====<<
13 |
14 |
15 | >>===== CSL =====>>
16 |
17 |
18 |
19 |
20 |
21 | <<===== CSL =====<<
22 |
23 |
24 | >>===== INPUT =====>>
25 | [{
26 | "id":"ITEM-1",
27 | "type": "book",
28 | "title": "Book A"
29 | }]
30 | <<===== INPUT =====<<
31 |
--------------------------------------------------------------------------------
/attic/unused_tests/namespaces_NonNada2.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | >>===== SCHEMA =====>>
6 | 0.8
7 | <<===== SCHEMA =====<<
8 |
9 |
10 | >>===== RESULT =====>>
11 | Book A
12 | <<===== RESULT =====<<
13 |
14 |
15 | >>===== CSL =====>>
16 |
17 |
18 |
19 |
20 |
21 | <<===== CSL =====<<
22 |
23 |
24 | >>===== INPUT =====>>
25 | [{
26 | "id":"ITEM-1",
27 | "type": "book",
28 | "title": "Book A"
29 | }]
30 | <<===== INPUT =====<<
31 |
--------------------------------------------------------------------------------
/attic/unused_tests/terms_EmptyOverload.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== SCHEMA =====>>
7 | 0.9
8 | <<===== SCHEMA =====<<
9 |
10 |
11 | >>===== RESULT =====>>
12 | <<===== RESULT =====<<
13 |
14 |
15 | >>===== CSL =====>>
16 |
37 | <<===== CSL =====<<
38 |
39 |
40 | >>===== INPUT =====>>
41 | [
42 | {
43 | "id":"ITEM-1",
44 | "type": "book",
45 | "author": [{"name":"Appleton, Victor"}],
46 | "title": "Tom Swift and His Electric Runabout",
47 | "issued": {"year":"1910"}
48 | }
49 | ]
50 | <<===== INPUT =====<<
51 |
--------------------------------------------------------------------------------
/attic/unused_tests/terms_Missing.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== SCHEMA =====>>
7 | 0.9
8 | <<===== SCHEMA =====<<
9 |
10 |
11 | >>===== RESULT =====>>
12 | Bogus
13 | <<===== RESULT =====<<
14 |
15 |
16 | >>===== CSL =====>>
17 |
33 | <<===== CSL =====<<
34 |
35 |
36 | >>===== INPUT =====>>
37 | [
38 | {
39 | "id":"ITEM-1",
40 | "type": "book",
41 | "author": [{"name":"Appleton, Victor"}],
42 | "title": "Tom Swift and His Electric Runabout",
43 | "issued": {"year":"1910"}
44 | }
45 | ]
46 | <<===== INPUT =====<<
47 |
--------------------------------------------------------------------------------
/attic/xmle4xLoad.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Pre-sniff loader for E4X parsing module
3 | *
4 | * E4X is no longer supported in browsers, but it is implemented in
5 | * Rhino, where it serves a useful role in the test suite, for
6 | * catching XML errors that are missed by jing and by the string-based
7 | * parser.
8 | *
9 | * So ... we'd like to keep it around, but E4X code throws ugly syntax
10 | * errors when it is loaded anywhere outside of Rhino. Since there is
11 | * no standard loading incantation that holds across JavaScript engines,
12 | * this poses something of a problem for a "one size fits all" release
13 | * of citeproc-js.
14 | *
15 | * Hmm.
16 | *
17 | * So what we have here is a hack. We assume that E4X will run ONLY in
18 | * Rhino, or at least only in engines running "server-side," and and
19 | * have a load() function. And are loading the processor from a local
20 | * disk. That is accessible to the context into which the processor
21 | * code is being loaded. And that the path to the file with the E4X
22 | * stuff in it is "./src/xmle4x.js". I said it was a hack, and I
23 | * wasn't kidding.
24 | */
25 |
26 | if ("undefined" !== typeof XML) {
27 | try {
28 | load("./src/xmle4x.js");
29 | } catch (e) {
30 | throw "OOPS: "+e;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/attic/xmljsonMakeXml.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juris-M/citeproc-js/f88a47e6d143ace8a79569388534ff8ad9205da0/attic/xmljsonMakeXml.js
--------------------------------------------------------------------------------
/cslrun.yaml:
--------------------------------------------------------------------------------
1 | groupIdMap:
2 | final: 2319948
3 | draft: 2339078
4 | path:
5 | styletests: fixtures/styles
6 | local: fixtures/local
7 | std: fixtures/std/processor-tests/humans
8 | src: src
9 | abbrevs: /media/storage/src/JM/jurism/juris-abbrevs
10 | locale: locale
11 | modules: /media/storage/src/JM/citeproc-js/juris-modules
12 | cslschema: csl-schemata/csl.rnc
13 | cslmschema: csl-schemata/csl-mlz.rnc
14 |
--------------------------------------------------------------------------------
/demo/README.md:
--------------------------------------------------------------------------------
1 | # `citeproc-js` Demo Page
2 |
3 | The code in this folder can be used to spin up a local `citeproc-js`
4 | demo page. It is mainly intended as a sample of running code for
5 | developers working with the processor.
6 |
7 | The demo.html page must be served from an HTTP server. (Because it uses AJAX
8 | requests, it won't work if you open it in your browser from the filesystem.)
9 | So, either put this citeproc-js repository in a directory served by, for example,
10 | Apache, or you can use Node.js with the included tiny server script,
11 | node-server.js.
12 |
13 | To start the server, clone this repo to your local machine, open a terminal,
14 | enter this `./demo` subdirectory, and run the following command:
15 |
16 | node ./node-server.js
17 |
18 | Point a browser at the address reported by the server, and the
19 | demo page should appear.
20 |
21 | See the demo.js file for more information about how it works.
22 |
23 | ----
24 | Hope this helps. If you run into any snags, feel free to give me a shout.
25 |
26 | Frank Bennett
27 | Nagoya
28 | Japan
29 |
--------------------------------------------------------------------------------
/demo/demo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | CSL Bibliography Samples
11 |
12 |
13 | This page displays citations rendered by citeproc-js.
14 |
15 |
16 |
17 |
18 |
19 |
20 | Citations
21 |
22 |
23 |
24 |
25 |
26 |
27 | Time:
28 |
29 |
30 |
31 |
32 | Bibliography
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo",
3 | "version": "1.0.0",
4 | "description": "The code in this folder can be used to spin up a local `citeproc-js` demo page. It is mainly intended as a sample of running code for developers working with the processor.",
5 | "main": "demo.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "devDependencies": {
12 | "ecstatic": "^4.1.4",
13 | "getopts": "^2.2.5",
14 | "randomize": "0.0.4"
15 | },
16 | "dependencies": {
17 | "http-server": "^0.12.3"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/fixtures/local/abbrevs_Archive.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Pick.
9 | <<===== RESULT =====<<
10 |
11 | >>== ABBREVIATIONS ==>>
12 | {
13 | "default": {
14 | "container-title": {
15 | "Pickwick Papers": "Pick."
16 | }
17 | }
18 | }
19 | <<== ABBREVIATIONS ==<<
20 |
21 |
22 | >>===== CSL =====>>
23 |
38 | <<===== CSL =====<<
39 |
40 |
41 | >>===== INPUT =====>>
42 | [
43 | {
44 | "id": "ITEM-1",
45 | "type": "book",
46 | "archive": "Pickwick Papers"
47 | }
48 | ]
49 | <<===== INPUT =====<<
50 |
--------------------------------------------------------------------------------
/fixtures/local/abbrevs_ArchivePlace.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Studwell
9 | <<===== RESULT =====<<
10 |
11 | >>== ABBREVIATIONS ==>>
12 | {
13 | "default": {
14 | "place": {
15 | "Studwell Close": "Studwell"
16 | }
17 | }
18 | }
19 | <<== ABBREVIATIONS ==<<
20 |
21 |
22 | >>===== CSL =====>>
23 |
38 | <<===== CSL =====<<
39 |
40 |
41 | >>===== INPUT =====>>
42 | [
43 | {
44 | "id": "ITEM-1",
45 | "type": "book",
46 | "archive-place": "Studwell Close"
47 | }
48 | ]
49 | <<===== INPUT =====<<
50 |
--------------------------------------------------------------------------------
/fixtures/local/abbrevs_Event.txt:
--------------------------------------------------------------------------------
1 | >>== MODE ==>>
2 | citation
3 | <<== MODE ==<<
4 |
5 |
6 | >>== ABBREVIATIONS ==>>
7 | {
8 | "default": {
9 | "title": {
10 | "1st Session": "1st Sess."
11 | }
12 | },
13 | "us": {
14 | "title": {
15 | "1st Session": "1st Sess."
16 | }
17 | }
18 | }
19 | <<== ABBREVIATIONS ==<<
20 |
21 |
22 | >>== RESULT ==>>
23 | 1st Sess.
24 | <<== RESULT ==<<
25 |
26 | >>===== CSL =====>>
27 |
42 | <<===== CSL =====<<
43 |
44 |
45 | >>===== INPUT =====>>
46 | [
47 | {
48 | "id": "ITEM-1",
49 | "title": "Hello",
50 | "event": "1st Session",
51 | "note": "{:jurisdiction:us}",
52 | "type": "bill"
53 | }
54 | ]
55 | <<===== INPUT =====<<
56 |
--------------------------------------------------------------------------------
/fixtures/local/abbrevs_JournalExistsInList.txt:
--------------------------------------------------------------------------------
1 | >>== MODE ==>>
2 | citation
3 | <<== MODE ==<<
4 |
5 |
6 | >>== ABBREVIATIONS ==>>
7 | {
8 | "default": {
9 | "container-title": {
10 | "Journal of Irreproducible Results": "J. Irrep. Res."
11 | }
12 | }
13 | }
14 | <<== ABBREVIATIONS ==<<
15 |
16 |
17 | >>== RESULT ==>>
18 | J. Irrep. Res.
19 | <<== RESULT ==<<
20 |
21 | >>===== CSL =====>>
22 |
37 | <<===== CSL =====<<
38 |
39 |
40 | >>===== INPUT =====>>
41 | [
42 | {
43 | "container-title": "Journal of Irreproducible Results",
44 | "id": "ITEM-1",
45 | "journalAbbreviation": "JIR",
46 | "type": "article-journal"
47 | }
48 | ]
49 | <<===== INPUT =====<<
50 |
--------------------------------------------------------------------------------
/fixtures/local/abbrevs_Jurisdiction.txt:
--------------------------------------------------------------------------------
1 | >>== MODE ==>>
2 | citation
3 | <<== MODE ==<<
4 |
5 |
6 | >>== ABBREVIATIONS ==>>
7 | {
8 | "default": {
9 | "place": {
10 | "US:NE": "Neb."
11 | }
12 | }
13 | }
14 | <<== ABBREVIATIONS ==<<
15 |
16 |
17 | >>== RESULT ==>>
18 | Neb.
19 | <<== RESULT ==<<
20 |
21 | >>===== CSL =====>>
22 |
37 | <<===== CSL =====<<
38 |
39 |
40 | >>===== INPUT =====>>
41 | [
42 | {
43 | "id": "ITEM-1",
44 | "jurisdiction": "us:ne",
45 | "type": "bill"
46 | }
47 | ]
48 | <<===== INPUT =====<<
49 |
--------------------------------------------------------------------------------
/fixtures/local/abbrevs_SeriesExistsInList.txt:
--------------------------------------------------------------------------------
1 | >>== MODE ==>>
2 | citation
3 | <<== MODE ==<<
4 |
5 |
6 |
7 |
8 | >>== RESULT ==>>
9 | I.R. Wildlife Series
10 | <<== RESULT ==<<
11 |
12 | >>== ABBREVIATIONS ==>>
13 | {
14 | "default": {
15 | "collection-title": {
16 | "International Rescue Wildlife Series": "I.R. Wildlife Series"
17 | }
18 | }
19 | }
20 | <<== ABBREVIATIONS ==<<
21 |
22 |
23 | >>===== CSL =====>>
24 |
39 | <<===== CSL =====<<
40 |
41 |
42 | >>===== INPUT =====>>
43 | [
44 | {
45 | "collection-title": "International Rescue Wildlife Series",
46 | "id": "ITEM-1",
47 | "type": "book"
48 | }
49 | ]
50 | <<===== INPUT =====<<
51 |
--------------------------------------------------------------------------------
/fixtures/local/affix_CommaAfterQuoteCompactPrefix.txt:
--------------------------------------------------------------------------------
1 | >>==== MODE ====>>
2 | citation
3 | <<==== MODE ====<<
4 |
5 | >>==== RESULT ====>>
6 | “quote”, Hello Thing
7 | <<==== RESULT ====<<
8 |
9 | >>==== CITATION-ITEMS ====>>
10 | [
11 | [
12 | {
13 | "id": "ITEM-1",
14 | "prefix": "'quote',"
15 | }
16 | ]
17 | ]
18 | <<==== CITATION-ITEMS ====<<
19 |
20 | >>==== CSL ====>>
21 |
36 | <<==== CSL ====<<
37 |
38 | >>==== INPUT ====>>
39 | [
40 | {
41 | "id": "ITEM-1",
42 | "title": "Hello Thing",
43 | "type": "book"
44 | }
45 | ]
46 | <<==== INPUT ====<<
47 |
48 |
--------------------------------------------------------------------------------
/fixtures/local/affix_SpaceWithQuotesCompactSuffix.txt:
--------------------------------------------------------------------------------
1 | >>==== MODE ====>>
2 | citation
3 | <<==== MODE ====<<
4 |
5 | >>==== RESULT ====>>
6 | The Title And “so it goes”
7 | <<==== RESULT ====<<
8 |
9 | >>==== CITATION-ITEMS ====>>
10 | [
11 | [
12 | {
13 | "id": "ITEM-1",
14 | "suffix": "And \"so it goes\""
15 | }
16 | ]
17 | ]
18 | <<==== CITATION-ITEMS ====<<
19 |
20 | >>==== CSL ====>>
21 |
36 | <<==== CSL ====<<
37 |
38 | >>==== INPUT ====>>
39 | [
40 | {
41 | "id": "ITEM-1",
42 | "title": "The Title",
43 | "type": "book"
44 | }
45 | ]
46 | <<==== INPUT ====<<
47 |
48 |
--------------------------------------------------------------------------------
/fixtures/local/bugreports_BadKanjiDateParse.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | 四月 1, 1976
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "id": "ITEM-1",
35 | "issued": {
36 | "date-parts": [],
37 | "raw": "四月 1, 1976"
38 | },
39 | "title": "Some Book or Other",
40 | "type": "book"
41 | }
42 | ]
43 | <<===== INPUT =====<<
44 |
--------------------------------------------------------------------------------
/fixtures/local/bugreports_CapsAfterOneWordPrefixCompactPrefix.txt:
--------------------------------------------------------------------------------
1 | >>==== MODE ====>>
2 | citation
3 | <<==== MODE ====<<
4 |
5 | >>==== RESULT ====>>
6 | Nocapsafter. ibid.
7 | Caps after. Ibid.
8 | <<==== RESULT ====<<
9 |
10 | >>==== CITATION-ITEMS ====>>
11 | [
12 | [
13 | {
14 | "id": "ITEM-1",
15 | "prefix": "Nocapsafter."
16 | }
17 | ],
18 | [
19 | {
20 | "id": "ITEM-1",
21 | "prefix": "Caps after."
22 | }
23 | ]
24 | ]
25 | <<==== CITATION-ITEMS ====<<
26 |
27 | >>==== CSL ====>>
28 |
43 | <<==== CSL ====<<
44 |
45 | >>==== INPUT ====>>
46 | [
47 | {
48 | "id": "ITEM-1",
49 | "title": "Title",
50 | "type": "book"
51 | }
52 | ]
53 | <<==== INPUT ====<<
54 |
55 |
--------------------------------------------------------------------------------
/fixtures/local/bugreports_CslReverseLookup.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | John Doe
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
30 | <<===== CSL =====<<
31 |
32 |
33 | >>===== INPUT =====>>
34 | [
35 | {
36 | "author": [
37 | {
38 | "family": "Doe",
39 | "given": "John"
40 | }
41 | ],
42 | "id": "ITEM-1",
43 | "issued": {
44 | "date-parts": [
45 | [
46 | "1965",
47 | "6",
48 | "1"
49 | ]
50 | ]
51 | },
52 | "title": "His Anonymous Life",
53 | "type": "book"
54 | }
55 | ]
56 | <<===== INPUT =====<<
57 |
--------------------------------------------------------------------------------
/fixtures/local/bugreports_IllustratorInExtra.txt:
--------------------------------------------------------------------------------
1 | >>==== MODE ====>>
2 | citation
3 | <<==== MODE ====<<
4 |
5 | >>==== RESULT ====>>
6 | John C. Smith; Karl T. Brown
7 | <<==== RESULT ====<<
8 |
9 | >>==== CITATION-ITEMS ====>>
10 | [
11 | [
12 | {
13 | "id": "ITEM-1"
14 | }
15 | ]
16 | ]
17 | <<==== CITATION-ITEMS ====<<
18 |
19 | >>==== CSL ====>>
20 |
37 | <<==== CSL ====<<
38 |
39 | >>==== INPUT ====>>
40 | [
41 | {
42 | "id": "ITEM-1",
43 | "note": "illustrator: Smith || John C.\nauthor: Brown || Karl T.",
44 | "title": "Book A",
45 | "type": "book"
46 | }
47 | ]
48 | <<==== INPUT ====<<
49 |
50 |
--------------------------------------------------------------------------------
/fixtures/local/bugreports_ShortFormOfTitleFails.txt:
--------------------------------------------------------------------------------
1 | >>== MODE ==>>
2 | citation
3 | <<== MODE ==<<
4 |
5 |
6 | >>== ABBREVIATIONS ==>>
7 | {
8 | "default": {
9 | "title": {
10 | "Journal of Irreproducible Results": "J. Irrep. Res."
11 | }
12 | }
13 | }
14 | <<== ABBREVIATIONS ==<<
15 |
16 |
17 | >>== RESULT ==>>
18 | Minpō Japanese Civil Code.
19 | <<== RESULT ==<<
20 |
21 | >>===== CSL =====>>
22 |
38 | <<===== CSL =====<<
39 |
40 |
41 | >>===== INPUT =====>>
42 | [
43 | {
44 | "id": "ITEM-1",
45 | "title": "民法",
46 | "type": "legislation",
47 | "multi":{
48 | "_keys":{
49 | "title":{
50 | "ja-alalc97":"Minpō",
51 | "en":"Japanese Civil Code"
52 | }
53 | }
54 | }
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/bugreports_TurkishDateCorruption.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | September 20, 2006; August 30, 1999
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "id": "ITEM-1",
35 | "issued": {
36 | "date-parts": [],
37 | "raw": "September 20, 2006"
38 | },
39 | "title": "Some English Book or Other",
40 | "type": "book"
41 | },
42 | {
43 | "id": "ITEM-2",
44 | "issued": {
45 | "date-parts": [],
46 | "raw": "ağustos 30, 1999"
47 | },
48 | "title": "Some Turkish Book or Other",
49 | "type": "book"
50 | }
51 | ]
52 | <<===== INPUT =====<<
53 |
--------------------------------------------------------------------------------
/fixtures/local/bugreports_UnderscoreDateRangeDelimiter.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | 1897–1912
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "id": "ITEM-1",
35 | "issued": {
36 | "date-parts": [],
37 | "raw": "1897_1912"
38 | },
39 | "title": "Some Book or Other",
40 | "type": "book"
41 | }
42 | ]
43 | <<===== INPUT =====<<
44 |
--------------------------------------------------------------------------------
/fixtures/local/bugreports_YearLastBadOutput.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | January 1, 1989
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "id": "ITEM-1",
35 | "issued": {
36 | "date-parts": [],
37 | "raw": "01/01/1989"
38 | },
39 | "title": "Some Book or Other",
40 | "type": "book"
41 | }
42 | ]
43 | <<===== INPUT =====<<
44 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ExtraFieldRecognition.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | His Anonymous Life (Rocky Mountain Time Zone)
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
31 | <<===== CSL =====<<
32 |
33 |
34 | >>===== INPUT =====>>
35 | [
36 | {
37 | "id": "ITEM-1",
38 | "note": "{:abstract:Rocky Mountain Time Zone}",
39 | "title": "His Anonymous Life",
40 | "type": "book"
41 | }
42 | ]
43 | <<===== INPUT =====<<
44 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_NoByzantineInitialsMisstep.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | >>===== RESULT =====>>
6 | 林誠
7 | <<===== RESULT =====<<
8 |
9 |
10 | >>===== CSL =====>>
11 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "author": [
35 | {
36 | "family": "林",
37 | "given": "誠"
38 | }
39 | ],
40 | "id": "ITEM-1",
41 | "type": "book"
42 | }
43 | ]
44 | <<===== INPUT =====<<
45 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ParseDroppingParticleSortOrder.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Doe, John de
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
31 | <<===== CSL =====<<
32 |
33 |
34 | >>===== INPUT =====>>
35 | [
36 | {
37 | "author": [
38 | {
39 | "family": "Doe",
40 | "given": "John de"
41 | }
42 | ],
43 | "id": "ITEM-1",
44 | "type": "book"
45 | }
46 | ]
47 | <<===== INPUT =====<<
48 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ParseNonDroppingParticleSortOrder.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | van Doe, John
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
31 | <<===== CSL =====<<
32 |
33 |
34 | >>===== INPUT =====>>
35 | [
36 | {
37 | "author": [
38 | {
39 | "family": "van Doe",
40 | "given": "John",
41 | "parse-names": "true"
42 | }
43 | ],
44 | "id": "ITEM-1",
45 | "type": "book"
46 | }
47 | ]
48 | <<===== INPUT =====<<
49 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ParseParticleAsName.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | van den Doe, John
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
31 | <<===== CSL =====<<
32 |
33 |
34 | >>===== INPUT =====>>
35 | [
36 | {
37 | "author": [
38 | {
39 | "family": "\"van den Doe\"",
40 | "given": "John",
41 | "parse-names": "true"
42 | }
43 | ],
44 | "id": "ITEM-1",
45 | "type": "book"
46 | }
47 | ]
48 | <<===== INPUT =====<<
49 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ParseSuffixAllCapsForceCommaNormalOrder.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | Weird, but possible.
7 |
8 | >>===== RESULT =====>>
9 | John Doe, III
10 | <<===== RESULT =====<<
11 |
12 |
13 | >>===== CSL =====>>
14 |
31 | <<===== CSL =====<<
32 |
33 |
34 | >>===== INPUT =====>>
35 | [
36 | {
37 | "author": [
38 | {
39 | "family": "Doe",
40 | "given": "John,! III",
41 | "parse-names": "true"
42 | }
43 | ],
44 | "id": "ITEM-1",
45 | "type": "book"
46 | }
47 | ]
48 | <<===== INPUT =====<<
49 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ParseSuffixAllCapsForceCommaSortOrder.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | Doe, John, III
8 | <<===== RESULT =====<<
9 |
10 |
11 | >>===== CSL =====>>
12 |
29 | <<===== CSL =====<<
30 |
31 |
32 | >>===== INPUT =====>>
33 | [
34 | {
35 | "author": [
36 | {
37 | "family": "Doe",
38 | "given": "John,! III",
39 | "parse-names": "true"
40 | }
41 | ],
42 | "id": "ITEM-1",
43 | "type": "book"
44 | }
45 | ]
46 | <<===== INPUT =====<<
47 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ParseSuffixAllCapsSimpleNormalOrder.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | John Doe III
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
30 | <<===== CSL =====<<
31 |
32 |
33 | >>===== INPUT =====>>
34 | [
35 | {
36 | "author": [
37 | {
38 | "family": "Doe",
39 | "given": "John, III",
40 | "parse-names": "true"
41 | }
42 | ],
43 | "id": "ITEM-1",
44 | "type": "book"
45 | }
46 | ]
47 | <<===== INPUT =====<<
48 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ParseSuffixAllCapsSimpleSortOrder.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Doe, John, III
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
30 | <<===== CSL =====<<
31 |
32 |
33 | >>===== INPUT =====>>
34 | [
35 | {
36 | "author": [
37 | {
38 | "family": "Doe",
39 | "given": "John, III",
40 | "parse-names": "true"
41 | }
42 | ],
43 | "id": "ITEM-1",
44 | "type": "book"
45 | }
46 | ]
47 | <<===== INPUT =====<<
48 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ParseSuffixMixedCaseForceCommaNormalOrder.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | John Doe, Jr.
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
30 | <<===== CSL =====<<
31 |
32 |
33 | >>===== INPUT =====>>
34 | [
35 | {
36 | "author": [
37 | {
38 | "family": "Doe",
39 | "given": "John,! Jr.",
40 | "parse-names": "true"
41 | }
42 | ],
43 | "id": "ITEM-1",
44 | "type": "book"
45 | }
46 | ]
47 | <<===== INPUT =====<<
48 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ParseSuffixMixedCaseForceCommaSortOrder.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Doe, John, Jr.
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
30 | <<===== CSL =====<<
31 |
32 |
33 | >>===== INPUT =====>>
34 | [
35 | {
36 | "author": [
37 | {
38 | "family": "Doe",
39 | "given": "John,! Jr.",
40 | "parse-names": "true"
41 | }
42 | ],
43 | "id": "ITEM-1",
44 | "type": "book"
45 | }
46 | ]
47 | <<===== INPUT =====<<
48 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ParseSuffixMixedCaseSimpleNormalOrder.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | John Doe Jr.
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
30 | <<===== CSL =====<<
31 |
32 |
33 | >>===== INPUT =====>>
34 | [
35 | {
36 | "author": [
37 | {
38 | "family": "Doe",
39 | "given": "John, Jr.",
40 | "parse-names": "true"
41 | }
42 | ],
43 | "id": "ITEM-1",
44 | "type": "book"
45 | }
46 | ]
47 | <<===== INPUT =====<<
48 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_ParseSuffixMixedCaseSimpleSortOrder.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Doe, John, Jr.
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
30 | <<===== CSL =====<<
31 |
32 |
33 | >>===== INPUT =====>>
34 | [
35 | {
36 | "author": [
37 | {
38 | "family": "Doe",
39 | "given": "John, Jr.",
40 | "parse-names": "true"
41 | }
42 | ],
43 | "id": "ITEM-1",
44 | "type": "book"
45 | }
46 | ]
47 | <<===== INPUT =====<<
48 |
--------------------------------------------------------------------------------
/fixtures/local/citeprocjs_SecondaryOnShort.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | 民法 Minpō
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
29 | <<===== CSL =====<<
30 |
31 |
32 | >>===== INPUT =====>>
33 | [
34 | {
35 | "id": "ITEM-1",
36 | "multi": {
37 | "_keys": {
38 | "title": {
39 | "ja-Latn-hepburn": "Minpō"
40 | }
41 | }
42 | },
43 | "title": "民法",
44 | "type": "book"
45 | }
46 | ]
47 | <<===== INPUT =====<<
48 |
--------------------------------------------------------------------------------
/fixtures/local/date_CheaterDateRange.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | >>[0] December 31, 2014–January 1, 2015
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CITATIONS =====>>
13 | [
14 | [
15 | {
16 | "citationID": "CITATION-1",
17 | "citationItems": [
18 | {
19 | "id": "ITEM-1"
20 | }
21 | ],
22 | "properties": {
23 | "noteIndex": 1
24 | }
25 | },
26 | [],
27 | []
28 | ]
29 | ]
30 | <<===== CITATIONS =====<<
31 |
32 |
33 | >>===== CSL =====>>
34 |
49 | <<===== CSL =====<<
50 |
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "note": "issued: 2014-12-31/2015-01-01"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/date_DateBCraw.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 |
8 | >>===== RESULT =====>>
9 | (5BC)
10 | <<===== RESULT =====<<
11 |
12 |
13 | >>===== CSL =====>>
14 |
33 | <<===== CSL =====<<
34 |
35 |
36 | >>===== INPUT =====>>
37 | [
38 | {
39 | "id": "ITEM-1",
40 | "issued": {
41 | "date-parts": [],
42 | "raw": "-5"
43 | },
44 | "title": "Ignore me",
45 | "type": "book"
46 | }
47 | ]
48 | <<===== INPUT =====<<
49 |
--------------------------------------------------------------------------------
/fixtures/local/date_LoneJapaneseMonth.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | July 1964
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "id": "ITEM-1",
35 | "issued": {
36 | "date-parts": [],
37 | "raw": "7月1964"
38 | },
39 | "title": "My Title",
40 | "type": "book"
41 | }
42 | ]
43 | <<===== INPUT =====<<
44 |
--------------------------------------------------------------------------------
/fixtures/local/date_RawParseSimpleDate.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 |
8 | >>===== RESULT =====>>
9 | (28 October 1958)
10 | <<===== RESULT =====<<
11 |
12 |
13 | >>===== CSL =====>>
14 |
33 | <<===== CSL =====<<
34 |
35 |
36 | >>===== INPUT =====>>
37 | [
38 | {
39 | "id": "ITEM-1",
40 | "issued": {
41 | "date-parts": [],
42 | "raw": "Oct 28, 1958"
43 | },
44 | "title": "Ignore me",
45 | "type": "book"
46 | }
47 | ]
48 | <<===== INPUT =====<<
49 |
--------------------------------------------------------------------------------
/fixtures/local/date_RawSeasonRange1.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Spring 1999–Summer 2001
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "id": "ITEM-1",
35 | "issued": {
36 | "date-parts": [],
37 | "raw": "Spring 1999 - Summer 2001"
38 | },
39 | "type": "book"
40 | }
41 | ]
42 | <<===== INPUT =====<<
43 |
--------------------------------------------------------------------------------
/fixtures/local/date_RawSeasonRange2.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | Down Under season range.
6 |
7 | >>===== RESULT =====>>
8 | Summer–Spring 1999
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "id": "ITEM-1",
35 | "issued": {
36 | "date-parts": [],
37 | "raw": "Summer 1999 - Spring 1999"
38 | },
39 | "type": "book"
40 | }
41 | ]
42 | <<===== INPUT =====<<
43 |
--------------------------------------------------------------------------------
/fixtures/local/date_RawSeasonRange3.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | Down Under season range.
6 |
7 | >>===== RESULT =====>>
8 | Spring–Summer 1999
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "id": "ITEM-1",
35 | "issued": {
36 | "date-parts": [],
37 | "raw": "Spring 1999 - Summer 1999"
38 | },
39 | "type": "book"
40 | }
41 | ]
42 | <<===== INPUT =====<<
43 |
--------------------------------------------------------------------------------
/fixtures/local/decor_BreakingQuotes.txt:
--------------------------------------------------------------------------------
1 | >>== MODE ==>>
2 | citation
3 | <<== MODE ==<<
4 |
5 | Then: This parse used to break by throwing a mismatched
6 | straight single quote and properly formatted double
7 | quotes.
8 |
9 | Now: The string is passed back verbatim. As the parse
10 | breaks completely (there are no matching pairs),
11 | that is the better behavior.
12 |
13 | 2017-02-04
14 |
15 | >>== RESULT ==>>
16 | '"Black Power”, and the Roots of the African American Freedom Struggle
17 | <<== RESULT ==<<
18 |
19 | mhra.csl
20 |
21 |
22 | >>===== CSL =====>>
23 |
38 | <<===== CSL =====<<
39 |
40 |
41 | >>===== INPUT =====>>
42 | [
43 | {
44 | "id": "ITEM-1",
45 | "title": "'\"Black Power”, and the Roots of the African American Freedom Struggle",
46 | "type": "article"
47 | }
48 | ]
49 | <<===== INPUT =====<<
50 |
--------------------------------------------------------------------------------
/fixtures/local/flipflop_ItalicsSimplePlus.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | One TwoG Three</i> Four Five!
9 | One <i>TwoH Three Four Five!
10 | <<===== RESULT =====<<
11 |
12 | >>===== CITATION-ITEMS =====>>
13 | [
14 | [
15 | {
16 | "id": "ITEM-7"
17 | }
18 | ],
19 | [
20 | {
21 | "id": "ITEM-8"
22 | }
23 | ]
24 | ]
25 | <<===== CITATION-ITEMS =====<<
26 |
27 |
28 |
29 |
30 | >>===== CSL =====>>
31 |
46 | <<===== CSL =====<<
47 |
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-7",
53 | "title": "One TwoG Three Four Five!",
54 | "type": "book"
55 | },
56 | {
57 | "id": "ITEM-8",
58 | "title": "One TwoH Three Four Five!",
59 | "type": "book"
60 | }
61 | ]
62 | <<===== INPUT =====<<
63 |
--------------------------------------------------------------------------------
/fixtures/local/form_TitleShortWithTitleSubSupport.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Book A
9 | <<===== RESULT =====<<
10 |
11 | >>===== OPTIONS =====>>
12 | {
13 | "clobber_locator_if_no_statute_section": false,
14 | "handle_parallel_articles": true,
15 | "main_title_from_short_title": true,
16 | "consolidate_legal_items": true
17 | }
18 | <<===== OPTIONS =====<<
19 |
20 | >>===== CSL =====>>
21 |
36 | <<===== CSL =====<<
37 |
38 |
39 | >>===== INPUT =====>>
40 | [
41 | {
42 | "id": "ITEM-1",
43 | "title": "Book A: The Long Version",
44 | "title-short": "Book A",
45 | "type": "book"
46 | }
47 | ]
48 | <<===== INPUT =====<<
49 |
--------------------------------------------------------------------------------
/fixtures/local/form_UppercaseSubtitleWithNumber.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | 6.1: Should not trigger implicit short title
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CITATION-ITEMS =====>>
13 | [
14 | [
15 | {
16 | "id": "ITEM-1"
17 | }
18 | ]
19 | ]
20 | <<===== CITATION-ITEMS =====<<
21 |
22 |
23 |
24 | >>===== OPTIONS =====>>
25 | {
26 | "uppercase_subtitles": true,
27 | "implicit_short_title": true
28 | }
29 | <<===== OPTIONS =====<<
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 |
50 | >>===== INPUT =====>>
51 | [
52 | {
53 | "id": "ITEM-1",
54 | "title": "6.1 : should not trigger implicit short title",
55 | "type": "article-journal"
56 | }
57 | ]
58 | <<===== INPUT =====<<
59 |
--------------------------------------------------------------------------------
/fixtures/local/initials_NonByzantineSimple.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | 我妻栄。小泉【健】。
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
30 | <<===== CSL =====<<
31 |
32 |
33 | >>===== INPUT =====>>
34 | [
35 | {
36 | "author": [
37 | {
38 | "family": "我妻",
39 | "given": "栄"
40 | }
41 | ],
42 | "id": "ITEM-1",
43 | "type": "book"
44 | },
45 | {
46 | "author": [
47 | {
48 | "family": "小泉",
49 | "given": "健一郎"
50 | }
51 | ],
52 | "id": "ITEM-2",
53 | "type": "book"
54 | }
55 | ]
56 | <<===== INPUT =====<<
57 |
--------------------------------------------------------------------------------
/fixtures/local/institutions_QuotesSuppressCommaSplit.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | Note: With the move to using field separators, quote escapes are
6 | no longer required, and have been removed from citeproc-js.
7 |
8 |
9 | >>===== RESULT =====>>
10 | Ministry of Fear, Loathing and Error & Mercuricon Spittle
11 | <<===== RESULT =====<<
12 |
13 |
14 | >>===== CSL =====>>
15 |
32 | <<===== CSL =====<<
33 |
34 |
35 | >>===== INPUT =====>>
36 | [
37 | {
38 | "author": [
39 | {
40 | "literal": "Ministry of Fear, Loathing and Error"
41 | },
42 | {
43 | "family": "Spittle",
44 | "given": "Mercuricon",
45 | "static-ordering": false
46 | }
47 | ],
48 | "id": "item-1",
49 | "type": "book"
50 | }
51 | ]
52 | <<===== INPUT =====<<
53 |
--------------------------------------------------------------------------------
/fixtures/local/label_NonNumericLabelAsSingular.txt:
--------------------------------------------------------------------------------
1 | >>== MODE ==>>
2 | citation
3 | <<== MODE ==<<
4 |
5 |
6 | >>== RESULT ==>>
7 | Title: Vol. 1. Volume title, second, and third
8 | <<== RESULT ==<<
9 |
10 | >>===== CSL =====>>
11 |
39 | <<===== CSL =====<<
40 |
41 |
42 | >>===== INPUT =====>>
43 | [
44 | {
45 | "id": "Titlea",
46 | "type":"book",
47 | "title":"Title",
48 | "volume":"1. Volume title, second, and third"
49 | }
50 | ]
51 | <<===== INPUT =====<<
52 |
--------------------------------------------------------------------------------
/fixtures/local/locale_RescueBadLocales.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | His Anonymous Life; Her anonymouse laife
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "id": "ITEM-1",
35 | "language": "English",
36 | "title": "His anonymous life",
37 | "type": "book"
38 | },
39 | {
40 | "id": "ITEM-2",
41 | "language": "XnotEnglish",
42 | "title": "Her anonymouse laife",
43 | "type": "book"
44 | }
45 | ]
46 | <<===== INPUT =====<<
47 |
--------------------------------------------------------------------------------
/fixtures/local/locale_TitleCaseEnglishLangUpperEmptyLocale.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | Input data for this test included a key with irregular capitalization.
6 | This option controls for it.
7 |
8 | >>===== OPTIONS =====>>
9 | {
10 | "normalize_lang_keys_to_lowercase": true
11 | }
12 | <<===== OPTIONS =====<<
13 |
14 |
15 |
16 | >>===== RESULT =====>>
17 | His Anonymous Life
18 | <<===== RESULT =====<<
19 |
20 |
21 | >>===== CSL =====>>
22 |
37 | <<===== CSL =====<<
38 |
39 |
40 | >>===== INPUT =====>>
41 | [
42 | {
43 | "id": "ITEM-1",
44 | "language": "EN",
45 | "title": "His anonymous life",
46 | "type": "book"
47 | }
48 | ]
49 | <<===== INPUT =====<<
50 |
--------------------------------------------------------------------------------
/fixtures/local/locator_PassThroughEnDash.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | zu B. I. 3.–4., Rn. 21–22 der Gründe
9 | <<===== RESULT =====<<
10 |
11 | >>===== CITATION-ITEMS =====>>
12 | [
13 | [
14 | {
15 | "id": "ITEM-1",
16 | "locator": "zu B. I. 3.–4., Rn. 21–22 der Gründe"
17 | }
18 | ]
19 | ]
20 | <<===== CITATION-ITEMS =====<<
21 |
22 |
23 |
24 | >>===== CSL =====>>
25 |
40 | <<===== CSL =====<<
41 |
42 |
43 | >>===== INPUT =====>>
44 | [
45 | {
46 | "id": "ITEM-1",
47 | "type": "book",
48 | "archive": "Pickwick Papers"
49 | }
50 | ]
51 | <<===== INPUT =====<<
52 |
--------------------------------------------------------------------------------
/fixtures/local/locator_QuashAffixesWithLocator.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | One
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CITATION-ITEMS =====>>
13 | [
14 | [
15 | {
16 | "id": "ITEM-5",
17 | "label": "locator label should be ignored too"
18 | }
19 | ]
20 | ]
21 | <<===== CITATION-ITEMS =====<<
22 |
23 |
24 | >>===== CSL =====>>
25 |
44 | <<===== CSL =====<<
45 |
46 |
47 | >>===== INPUT =====>>
48 | [
49 | {
50 | "id": "ITEM-5",
51 | "title": "One",
52 | "type": "bill"
53 | }
54 | ]
55 | <<===== INPUT =====<<
56 |
--------------------------------------------------------------------------------
/fixtures/local/magic_StripPeriodsOnDottedTitle.txt:
--------------------------------------------------------------------------------
1 | >>== MODE ==>>
2 | citation
3 | <<== MODE ==<<
4 |
5 | >>== RESULT ==>>
6 | The XYZ of Cong Rec and OpenCongress.org
7 | <<== RESULT ==<<
8 |
9 | >>===== CSL =====>>
10 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "id": "ITEM-1",
35 | "title": "The X.Y.Z. of Cong. Rec. and OpenCongress.org",
36 | "type": "book"
37 | }
38 | ]
39 | <<===== INPUT =====<<
40 |
--------------------------------------------------------------------------------
/fixtures/local/magic_StripPeriodsWithTextCase.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Kitchens v Grohman
9 | <<===== RESULT =====<<
10 |
11 |
12 |
13 | >>===== CSL =====>>
14 |
29 | <<===== CSL =====<<
30 |
31 |
32 | >>===== INPUT =====>>
33 | [
34 | {
35 | "id": "ITEM-1",
36 | "title": "Kitchens v. Grohman",
37 | "type": "legal_case"
38 | }
39 | ]
40 | <<===== INPUT =====<<
41 |
--------------------------------------------------------------------------------
/fixtures/local/magic_SuppressLayoutDelimiterIfPrefixCommaCompactPrefix.txt:
--------------------------------------------------------------------------------
1 | >>==== MODE ====>>
2 | citation
3 | <<==== MODE ====<<
4 |
5 | >>==== RESULT ====>>
6 | Book A, cited in Book B
7 | <<==== RESULT ====<<
8 |
9 | >>==== CITATION-ITEMS ====>>
10 | [
11 | [
12 | {
13 | "id": "ITEM-1"
14 | },
15 | {
16 | "id": "ITEM-2",
17 | "prefix": ", cited in"
18 | }
19 | ]
20 | ]
21 | <<==== CITATION-ITEMS ====<<
22 |
23 | >>==== CSL ====>>
24 |
39 | <<==== CSL ====<<
40 |
41 | >>==== INPUT ====>>
42 | [
43 | {
44 | "id": "ITEM-1",
45 | "title": "Book A",
46 | "type": "book"
47 | },
48 | {
49 | "id": "ITEM-2",
50 | "title": "Book B",
51 | "type": "book"
52 | }
53 | ]
54 | <<==== INPUT ====<<
55 |
56 |
--------------------------------------------------------------------------------
/fixtures/local/multilingual_RightToLeft.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 | >>===== OPTIONS =====>>
6 | {
7 | "rtl_support": true
8 | }
9 | <<===== OPTIONS =====<<
10 |
11 |
12 |
13 |
14 | >>===== RESULT =====>>
15 | (הוצאה לאור של מכללת אוהלו)
16 | <<===== RESULT =====<<
17 |
18 |
19 | >>===== CSL =====>>
20 |
37 | <<===== CSL =====<<
38 |
39 |
40 | >>===== INPUT =====>>
41 | [
42 | {
43 | "title":"הוצאה לאור של מכללת אוהלו",
44 | "id": "ITEM-1",
45 | "type": "book",
46 | "issued": {
47 | "date-parts": [[2002]]
48 | },
49 | "language": "he"
50 | }
51 | ]
52 | <<===== INPUT =====<<
53 |
--------------------------------------------------------------------------------
/fixtures/local/multilingual_TextPrimaryNonexistent.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Aardvaark; Zzzzzzzzz
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
32 | <<===== CSL =====<<
33 |
34 |
35 | >>===== INPUT =====>>
36 | [
37 | {
38 | "id": "ITEM-1",
39 | "title": "Aardvaark",
40 | "type": "book"
41 | },
42 | {
43 | "id": "ITEM-2",
44 | "title": "Zzzzzzzzz",
45 | "type": "book"
46 | }
47 | ]
48 | <<===== INPUT =====<<
49 |
--------------------------------------------------------------------------------
/fixtures/local/multilingual_TextSecondaryNonexistent.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | 民法; 刑法
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
29 | <<===== CSL =====<<
30 |
31 |
32 | >>===== INPUT =====>>
33 | [
34 | {
35 | "id": "ITEM-1",
36 | "multi": {
37 | "_keys": {
38 | "title": {
39 | "en": "Civil Code"
40 | }
41 | }
42 | },
43 | "title": "民法",
44 | "type": "book"
45 | },
46 | {
47 | "id": "ITEM-2",
48 | "multi": {
49 | "_keys": {
50 | "title": {
51 | "en": "Criminal Code"
52 | }
53 | }
54 | },
55 | "title": "刑法",
56 | "type": "book"
57 | }
58 | ]
59 | <<===== INPUT =====<<
60 |
--------------------------------------------------------------------------------
/fixtures/local/name_EtAlAsSuffix.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | John Doe et al.
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
30 | <<===== CSL =====<<
31 |
32 |
33 | >>===== INPUT =====>>
34 | [
35 | {
36 | "author": [
37 | {
38 | "family": "Doe",
39 | "given": "John, et al."
40 | }
41 | ],
42 | "id": "ITEM-1",
43 | "title": "His Anonymous Life",
44 | "type": "book"
45 | }
46 | ]
47 | <<===== INPUT =====<<
48 |
--------------------------------------------------------------------------------
/fixtures/local/name_EtAlAsSuffixInCitationShort.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Doe et al.
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
30 | <<===== CSL =====<<
31 |
32 |
33 | >>===== INPUT =====>>
34 | [
35 | {
36 | "author": [
37 | {
38 | "family": "Doe",
39 | "given": "John, et al."
40 | }
41 | ],
42 | "id": "ITEM-1",
43 | "title": "His Anonymous Life",
44 | "type": "book"
45 | }
46 | ]
47 | <<===== INPUT =====<<
48 |
--------------------------------------------------------------------------------
/fixtures/local/name_SimpleVietnamese.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | This is actually an INCORRECT result, but should be the
7 | default behavior of the processor.
8 |
9 | Correct output would be: Lê Cao Đài
10 |
11 | >>===== RESULT =====>>
12 | Cao Đài Lê
13 | <<===== RESULT =====<<
14 |
15 |
16 | >>===== CSL =====>>
17 |
34 | <<===== CSL =====<<
35 |
36 |
37 | >>===== INPUT =====>>
38 | [
39 | {
40 | "author": [
41 | {
42 | "family": "Lê",
43 | "given": "Cao Đài"
44 | }
45 | ],
46 | "id": "ITEM-1",
47 | "type": "book"
48 | }
49 | ]
50 | <<===== INPUT =====<<
51 |
--------------------------------------------------------------------------------
/fixtures/local/nameattr_EtAlSubsequentMinOnCitationInCitation.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | John Doe et al.
8 | <<===== RESULT =====<<
9 |
10 |
11 | >>===== CITATION-ITEMS =====>>
12 | [
13 | [
14 | {
15 | "id": "ITEM-1",
16 | "position": 1
17 | }
18 | ]
19 | ]
20 | <<===== CITATION-ITEMS =====<<
21 |
22 |
23 | >>===== CSL =====>>
24 |
42 | <<===== CSL =====<<
43 |
44 |
45 | >>===== INPUT =====>>
46 | [
47 | {
48 | "author": [
49 | {
50 | "family": "Doe",
51 | "given": "John"
52 | },
53 | {
54 | "family": "Roe",
55 | "given": "Jane"
56 | }
57 | ],
58 | "id": "ITEM-1",
59 | "type": "book"
60 | }
61 | ]
62 | <<===== INPUT =====<<
63 |
--------------------------------------------------------------------------------
/fixtures/local/nameattr_EtAlSubsequentMinOnStyleInCitation.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | John Doe et al.
8 | <<===== RESULT =====<<
9 |
10 |
11 | >>===== CITATION-ITEMS =====>>
12 | [
13 | [
14 | {
15 | "id": "ITEM-1",
16 | "position": 1
17 | }
18 | ]
19 | ]
20 | <<===== CITATION-ITEMS =====<<
21 |
22 |
23 | >>===== CSL =====>>
24 |
43 | <<===== CSL =====<<
44 |
45 |
46 | >>===== INPUT =====>>
47 | [
48 | {
49 | "author": [
50 | {
51 | "family": "Doe",
52 | "given": "John"
53 | },
54 | {
55 | "family": "Roe",
56 | "given": "Jane"
57 | }
58 | ],
59 | "id": "ITEM-1",
60 | "type": "book"
61 | }
62 | ]
63 | <<===== INPUT =====<<
64 |
--------------------------------------------------------------------------------
/fixtures/local/number_AffixesOnAdjacentNumbers.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | [2002] 3
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
31 | <<===== CSL =====<<
32 |
33 |
34 | >>===== INPUT =====>>
35 | [
36 | {
37 | "collection-number": "2002",
38 | "id": "ITEM-1",
39 | "volume": "3"
40 | }
41 | ]
42 | <<===== INPUT =====<<
43 |
--------------------------------------------------------------------------------
/fixtures/local/number_AmpersandQA.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | Q&A
9 | <<===== RESULT =====<<
10 |
11 | >>===== CSL =====>>
12 |
27 | <<===== CSL =====<<
28 |
29 |
30 | >>===== INPUT =====>>
31 | [
32 | {
33 | "id": "ITEM-1",
34 | "type": "book",
35 | "page": "Q&A"
36 | }
37 | ]
38 | <<===== INPUT =====<<
39 |
--------------------------------------------------------------------------------
/fixtures/local/number_CollapseWithEnDash.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | 437–72
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
33 | <<===== CSL =====<<
34 |
35 |
36 | >>===== INPUT =====>>
37 | [
38 | {
39 | "page": "437–472",
40 | "id": "ITEM-1"
41 | }
42 | ]
43 | <<===== INPUT =====<<
44 |
45 |
--------------------------------------------------------------------------------
/fixtures/local/number_ExplicitLeafNumber.txt:
--------------------------------------------------------------------------------
1 | >>== MODE ==>>
2 | citation
3 | <<== MODE ==<<
4 |
5 |
6 | >>== RESULT ==>>
7 | page 54-57; pages 65–67; pages 70-72–83-84
8 | <<== RESULT ==<<
9 |
10 | >>===== CSL =====>>
11 |
29 | <<===== CSL =====<<
30 |
31 |
32 | >>===== INPUT =====>>
33 | [
34 | {
35 | "id": "ITEM-1",
36 | "page": "54\\-57",
37 | "type": "book"
38 | },
39 | {
40 | "id": "ITEM-2",
41 | "page": "65-67",
42 | "type": "book"
43 | },
44 | {
45 | "id": "ITEM-3",
46 | "page": "70\\-72-83\\-84",
47 | "type": "book"
48 | }
49 | ]
50 | <<===== INPUT =====<<
51 |
--------------------------------------------------------------------------------
/fixtures/local/number_LargeNumber.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | 9007199254740993
9 | <<===== RESULT =====<<
10 |
11 | >>===== CSL =====>>
12 |
27 | <<===== CSL =====<<
28 |
29 |
30 | >>===== INPUT =====>>
31 | [
32 | {
33 | "id": "ITEM-1",
34 | "type": "book",
35 | "page": "9007199254740993"
36 | }
37 | ]
38 | <<===== INPUT =====<<
39 |
--------------------------------------------------------------------------------
/fixtures/local/number_ParsedLabels.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | chappie 15; ch’ppie 15
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
43 | <<===== CSL =====<<
44 |
45 |
46 | >>===== INPUT =====>>
47 | [
48 | {
49 | "id": "ITEM-1",
50 | "number": "ch. 15",
51 | "type": "legislation"
52 | }
53 | ]
54 | <<===== INPUT =====<<
55 |
--------------------------------------------------------------------------------
/fixtures/local/number_RangeDelimiters.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | 1–2; 128–35; 155-1
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "id": "ITEM-1",
35 | "page": "1-2",
36 | "type": "book"
37 | },
38 | {
39 | "id": "ITEM-2",
40 | "page": "128-35",
41 | "type": "book"
42 | },
43 | {
44 | "id": "ITEM-3",
45 | "page": "155\\-1",
46 | "type": "book"
47 | }
48 | ]
49 | <<===== INPUT =====<<
50 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberChapteroverrideMultipleOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] chapters 101st–105th, 108th & 110th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "ch. 101-105, 108 & 110"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberChapteroverrideMultiplePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] chapters 101–105, 108 & 110
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "ch. 101-105, 108 & 110"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberChapteroverrideMultipleRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] chapters ci–cv, cviii & cx
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "ch. 101-105, 108 & 110"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberChapteroverrideRangeLongordinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] chapters first–eighth
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "ch. 1-8"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberChapteroverrideRangeOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] chapters 101st–105th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "ch. 101-105"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberChapteroverrideRangePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] chapters 101–105
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "ch. 101-105"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberChapteroverrideRangeRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] chapters ci–cv
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "ch. 101-105"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberChapteroverrideSingleLongordinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] chapter tenth
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "ch. 10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberChapteroverrideSingleOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] chapter 10th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "ch. 10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberChapteroverrideSinglePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] chapter 10
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "ch. 10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberChapteroverrideSingleRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] chapter x
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "ch. 10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelMultipleLongordinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] first–third, fifth & eighth
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "1-3, 5 & 8"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelMultipleOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] 101st–105th, 108th & 110th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "101-105, 108 & 110"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelMultiplePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] 101–105, 108 & 110
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "101-105, 108 & 110"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelMultipleRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] ci–cv, cviii & cx
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "101-105, 108 & 110"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelRangeLongordinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] first–eighth
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "1-8"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelRangeOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] 101st–105th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "101-105"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelRangePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] 101–105
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "101-105"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelRangeRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] ci–cv
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "101-105"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelSingleLongordinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] tenth
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "10"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelSingleOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] 10th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "10"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelSinglePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] 10
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "10"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNolabelSingleRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] x
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
47 | <<===== CSL =====<<
48 |
49 | >>===== INPUT =====>>
50 | [
51 | {
52 | "id": "ITEM-1",
53 | "type": "book",
54 | "number": "10"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefMultipleLongordinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] numbers first–third, fifth & eighth
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "1-3, 5 & 8"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefMultipleOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] numbers 101st–105th, 108th & 110th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "101-105, 108 & 110"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefMultiplePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] numbers 101–105, 108 & 110
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "101-105, 108 & 110"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefMultipleRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] numbers ci–cv, cviii & cx
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "101-105, 108 & 110"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefRangeLongordinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] numbers first–eighth
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "1-8"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefRangeOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] numbers 101st–105th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "101-105"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefRangePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] numbers 101–105
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "101-105"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefRangeRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] numbers ci–cv
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "101-105"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefSingleLongordinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] number tenth
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefSingleOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] number 10th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefSinglePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] number 10
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberNumberlabelundefSingleRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] number x
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelMultipleLongordinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] pages first–third, fifth & eighth
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 1-3, 5 & 8"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelMultipleOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] pages 101st–105th, 108th & 110th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 101-105, 108 & 110"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelMultiplePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] pages 101–105, 108 & 110
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 101-105, 108 & 110"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelMultipleRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] pages ci–cv, cviii & cx
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 101-105, 108 & 110"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelRangeLongordinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] pages first–eighth
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 1-8"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelRangeOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] pages 101st–105th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 101-105"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelRangePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] pages 101–105
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 101-105"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelRangeRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] pages ci–cv
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 101-105"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelSingleLongordinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] page tenth
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelSingleOrdinal.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] page 10th
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelSinglePlain.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] page 10
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RevNumberPagelabelSingleRoman.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== RESULT =====>>
7 | >>[0] page x
8 | <<===== RESULT =====<<
9 |
10 | >>===== CITATIONS =====>>
11 | [
12 | [
13 | {
14 | "citationID": "CITATION-1",
15 | "citationItems": [
16 | {
17 | "id": "ITEM-1"
18 | }
19 | ],
20 | "properties": {
21 | "noteIndex": 1
22 | }
23 | },
24 | [],
25 | []
26 | ]
27 | ]
28 | <<===== CITATIONS =====<<
29 |
30 |
31 | >>===== CSL =====>>
32 |
50 | <<===== CSL =====<<
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "type": "book",
57 | "number": "p. 10"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/number_RomanUpperCase.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | IV.
9 | <<===== RESULT =====<<
10 |
11 | >>===== CITATION-ITEMS =====>>
12 | [
13 | [
14 | {
15 | "id": "ITEM-1",
16 | "locator": "iv"
17 | }
18 | ]
19 | ]
20 | <<===== CITATION-ITEMS =====<<
21 |
22 |
23 |
24 | >>===== CSL =====>>
25 |
42 | <<===== CSL =====<<
43 |
44 |
45 | >>===== INPUT =====>>
46 | [
47 | {
48 | "id": "ITEM-1",
49 | "type": "book",
50 | "title": "My Title"
51 | }
52 | ]
53 | <<===== INPUT =====<<
54 |
55 |
--------------------------------------------------------------------------------
/fixtures/local/number_Substring.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | ’789
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
28 | <<===== CSL =====<<
29 |
30 |
31 | >>===== INPUT =====>>
32 | [
33 | {
34 | "collection-number": "2002",
35 | "id": "ITEM-1",
36 | "number": "123-456-789"
37 | }
38 | ]
39 | <<===== INPUT =====<<
40 |
--------------------------------------------------------------------------------
/fixtures/local/number_WithDelimiter.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | 32/4, 324; 43/5, 435
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
39 | <<===== CSL =====<<
40 |
41 |
42 | >>===== INPUT =====>>
43 | [
44 | {
45 | "id": "ITEM-1",
46 | "issue": "4",
47 | "type": "book",
48 | "volume": "32"
49 | },
50 | {
51 | "id": "ITEM-2",
52 | "issue": "5",
53 | "type": "book",
54 | "volume": "43"
55 | }
56 | ]
57 | <<===== INPUT =====<<
58 |
--------------------------------------------------------------------------------
/fixtures/local/position_NearNoteTrue.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 |
8 | >>===== RESULT =====>>
9 | Note is near!
10 | <<===== RESULT =====<<
11 |
12 |
13 | >>===== CITATION-ITEMS =====>>
14 | [
15 | [
16 | {
17 | "id": "ITEM-1",
18 | "near-note": true,
19 | "position": 1
20 | }
21 | ]
22 | ]
23 | <<===== CITATION-ITEMS =====<<
24 |
25 |
26 | >>===== CSL =====>>
27 |
49 | <<===== CSL =====<<
50 |
51 |
52 | >>===== INPUT =====>>
53 | [
54 | {
55 | "id": "ITEM-1",
56 | "title": "Book A",
57 | "type": "book"
58 | }
59 | ]
60 | <<===== INPUT =====<<
61 |
--------------------------------------------------------------------------------
/fixtures/local/spaces_ExplicitDoubleSpaceDelimiter.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | One. Two.
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
31 | <<===== CSL =====<<
32 |
33 |
34 | >>===== INPUT =====>>
35 | [
36 | {
37 | "id": "ITEM-1",
38 | "note": "Two",
39 | "title": "One",
40 | "type": "book"
41 | }
42 | ]
43 | <<===== INPUT =====<<
44 |
--------------------------------------------------------------------------------
/fixtures/local/spaces_ExplicitDoubleSpacePrefix.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | One. Two.
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
31 | <<===== CSL =====<<
32 |
33 |
34 | >>===== INPUT =====>>
35 | [
36 | {
37 | "id": "ITEM-1",
38 | "note": "Two",
39 | "title": "One",
40 | "type": "book"
41 | }
42 | ]
43 | <<===== INPUT =====<<
44 |
--------------------------------------------------------------------------------
/fixtures/local/spaces_ExplicitDoubleSpaceSuffix.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | One. Two.
9 | <<===== RESULT =====<<
10 |
11 |
12 | >>===== CSL =====>>
13 |
29 | <<===== CSL =====<<
30 |
31 |
32 | >>===== INPUT =====>>
33 | [
34 | {
35 | "id": "ITEM-1",
36 | "note": "Two",
37 | "title": "One",
38 | "type": "book"
39 | }
40 | ]
41 | <<===== INPUT =====<<
42 |
--------------------------------------------------------------------------------
/fixtures/local/variables_TitleShortOnAbbrevWithTitle.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 |
7 | >>===== RESULT =====>>
8 | My Short Title
9 | <<===== RESULT =====<<
10 |
11 | >>== ABBREVIATIONS ==>>
12 | {
13 | "default": {
14 | "title": {
15 | "My Long Title": "My Short Title"
16 | }
17 | }
18 | }
19 | <<== ABBREVIATIONS ==<<
20 |
21 | >>===== CSL =====>>
22 |
37 | <<===== CSL =====<<
38 |
39 |
40 | >>===== INPUT =====>>
41 | [
42 | {
43 | "id": "ITEM-1",
44 | "title": "My Long Title",
45 | "type": "book"
46 | }
47 | ]
48 | <<===== INPUT =====<<
49 |
--------------------------------------------------------------------------------
/fixtures/local/wrappers_DOI.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | >>===== OPTIONS =====>>
7 | {
8 | "wrap_url_and_doi": true
9 | }
10 | <<===== OPTIONS =====<<
11 |
12 |
13 | >>===== RESULT =====>>
14 | (His Anonymous Life 10.1111/j.1747-4469.1976.tb00951.x)
15 | <<===== RESULT =====<<
16 |
17 |
18 | >>===== CSL =====>>
19 |
37 | <<===== CSL =====<<
38 |
39 |
40 | >>===== INPUT =====>>
41 | [
42 | {
43 | "id": "ITEM-1",
44 | "title": "His Anonymous Life",
45 | "DOI": "10.1111/j.1747-4469.1976.tb00951.x",
46 | "type": "book"
47 | }
48 | ]
49 | <<===== INPUT =====<<
50 |
--------------------------------------------------------------------------------
/fixtures/processor/bibliographyTest.js:
--------------------------------------------------------------------------------
1 | const fs = require("fs");
2 |
3 |
4 | describe("CiteprocJS.Bibliography", function () {
5 | beforeEach(function () {
6 | // Get the processor image
7 | var CSL = require("../citeproc_commonjs.js");
8 | // Get the sys image with locales and input data
9 | var sys = require("./data/sys.js");
10 | });
11 |
12 |
13 | describe("#uncitedUpdate", function () {
14 | it("should update a bibliography entry when the item data is changed", function* () {
15 | // Fetch the input item
16 | sys.items = JSON.parse(fs.readFileSync("./data. input01.json"));
17 | // Fetch the CSL code
18 | var styleCode = fs.readFileSync("./data/style01.csl");
19 | // Instantiate the processor with sys and the CSL
20 | var citeproc = Citeproc.Engine(styleCode, sys, "en");
21 | citeproc.updateUncited(["ITEM-1"]);
22 | var res = citeproc.makeBibliography();
23 | assert.equal(XX, YY);
24 | citeproc.updateUncited(["ITEM-1"]);
25 | var res2 = citeproc.makeBibliography();
26 | assert.equal(res, res2);
27 | });
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "citeproc",
3 | "version": "2.4.49",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@citeproc-rs/wasm": {
8 | "version": "0.0.0-canary-88f356a",
9 | "resolved": "https://registry.npmjs.org/@citeproc-rs/wasm/-/wasm-0.0.0-canary-88f356a.tgz",
10 | "integrity": "sha512-Gf+uiM9AIWrYdaZYfTWcVZJYoqnbjRzVOxF4fdnlf99JZ4zdcNPt8FdecMFAkpLKFASDIp+BS7EETpLPePmDOw=="
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "citeproc",
3 | "version": "2.4.63",
4 | "description": "The citeproc-js citation formatting module, in CommonJS format. This version is based on citeproc-js 1.4.63",
5 | "main": "citeproc_commonjs.js",
6 | "repository": {
7 | "type": "git",
8 | "url": "https://github.com/juris-m/citeproc-js.git"
9 | },
10 | "files": [
11 | "citeproc_commonjs.js"
12 | ],
13 | "author": "Michael McMillan (http://michaelmcmillan.net/)",
14 | "contributors": [
15 | "Frank Bennett (https://juris-m.github.io)"
16 | ],
17 | "license": "CPAL-1.0 OR AGPL-1.0",
18 | "dependencies": {}
19 | }
20 |
--------------------------------------------------------------------------------
/package.template:
--------------------------------------------------------------------------------
1 | {
2 | "name": "citeproc",
3 | "version": "%%NPM_VERSION%%",
4 | "description": "The citeproc-js citation formatting module, in CommonJS format. This version is based on citeproc-js %%CITEPROC_VERSION%%.",
5 | "main": "citeproc_commonjs.js",
6 | "repository": {
7 | "type" : "git",
8 | "url" : "https://github.com/juris-m/citeproc-js.git"
9 | },
10 | "files": [
11 | "citeproc_commonjs.js"
12 | ],
13 | "author": "Michael McMillan (http://michaelmcmillan.net/)",
14 | "contributors": [
15 | "Frank Bennett (https://juris-m.github.io)"
16 | ],
17 | "license": "CPAL-1.0 OR AGPL-1.0",
18 | "dependencies": {},
19 | "devDependencies": {}
20 | }
21 |
--------------------------------------------------------------------------------
/src/disambig_citations.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Registry.CitationReg = function () {
4 | this.citationById = {};
5 | this.citationByIndex = [];
6 | };
7 |
--------------------------------------------------------------------------------
/src/node_alternativetext.js:
--------------------------------------------------------------------------------
1 | CSL.Node["alternative-text"] = {
2 | build: function (state, target) {
3 | if (this.tokentype === CSL.SINGLETON) {
4 | // do stuff
5 | var func = function(state, Item) {
6 | var Item = state.refetchItem(Item.id);
7 | CSL.getCite.call(state, Item);
8 | };
9 | this.execs.push(func);
10 | }
11 | target.push(this);
12 | }
13 | };
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/node_bibliography.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node = {};
4 |
5 | CSL.Node.bibliography = {
6 | build: function (state, target) {
7 | if (this.tokentype === CSL.START) {
8 |
9 | state.build.area = "bibliography";
10 | state.build.root = "bibliography";
11 | state.build.extension = "";
12 |
13 | var func = function(state) {
14 | state.tmp.area = "bibliography";
15 | state.tmp.root = "bibliography";
16 | state.tmp.extension = "";
17 | };
18 | this.execs.push(func);
19 |
20 | }
21 | target.push(this);
22 | }
23 | };
24 |
25 |
--------------------------------------------------------------------------------
/src/node_choose.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node.choose = {
4 | build: function (state, target) {
5 | var func;
6 | if (this.tokentype === CSL.START) {
7 | //open condition
8 | func = function (state) {
9 | state.tmp.jump.push(undefined, CSL.LITERAL);
10 | };
11 | }
12 | if (this.tokentype === CSL.END) {
13 | //close condition
14 | func = function (state) {
15 | state.tmp.jump.pop();
16 | };
17 | }
18 | this.execs.push(func);
19 | target.push(this);
20 | },
21 |
22 | configure: function (state, pos) {
23 | if (this.tokentype === CSL.END) {
24 | state.configure.fail.push((pos));
25 | state.configure.succeed.push((pos));
26 | } else {
27 | state.configure.fail.pop();
28 | state.configure.succeed.pop();
29 | }
30 | }
31 | };
32 |
--------------------------------------------------------------------------------
/src/node_comment.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node["#comment"] = {
4 | // This is a comment in the CSL file.
5 | build: function () {
6 | // Save some space in the log files -- no need to mention this, really.
7 | // CSL.debug("CSL processor warning: comment node reached");
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/src/node_condition.js:
--------------------------------------------------------------------------------
1 | CSL.Node["condition"] = {
2 | build: function (state) {
3 | if (this.tokentype === CSL.SINGLETON) {
4 | var test = state.fun.match[this.match](this, state, this.tests);
5 | state.tmp.conditions.addTest(test);
6 | }
7 | }
8 | };
9 |
--------------------------------------------------------------------------------
/src/node_conditions.js:
--------------------------------------------------------------------------------
1 | CSL.Node["conditions"] = {
2 | build: function (state) {
3 | if (this.tokentype === CSL.START) {
4 | state.tmp.conditions.addMatch(this.match);
5 | }
6 | if (this.tokentype === CSL.END) {
7 | state.tmp.conditions.matchCombine();
8 | }
9 | }
10 | };
11 |
--------------------------------------------------------------------------------
/src/node_else.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node["else"] = {
4 | build: function (state, target) {
5 | target.push(this);
6 | },
7 | configure: function (state, pos) {
8 | if (this.tokentype === CSL.START) {
9 | state.configure.fail[(state.configure.fail.length - 1)] = pos;
10 | }
11 | }
12 | };
13 |
14 |
--------------------------------------------------------------------------------
/src/node_elseif.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node["else-if"] = {
4 | //
5 | // these function are the same as those in if, might just clone
6 | build: function (state, target) {
7 | CSL.Conditions.TopNode.call(this, state, target);
8 | target.push(this);
9 | },
10 | configure: function (state, pos) {
11 | CSL.Conditions.Configure.call(this, state, pos);
12 | }
13 | };
14 |
--------------------------------------------------------------------------------
/src/node_etal.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node["et-al"] = {
4 | build: function (state, target) {
5 | if (state.build.area === "citation" || state.build.area === "bibliography") {
6 | var func = function (state) {
7 | state.tmp.etal_node = this;
8 | if ("string" === typeof this.strings.term) {
9 | state.tmp.etal_term = this.strings.term;
10 | }
11 | };
12 | this.execs.push(func);
13 | }
14 | target.push(this);
15 | }
16 | };
17 |
--------------------------------------------------------------------------------
/src/node_if.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node["if"] = {
4 | build: function (state, target) {
5 | CSL.Conditions.TopNode.call(this, state, target);
6 | target.push(this);
7 | },
8 | configure: function (state, pos) {
9 | CSL.Conditions.Configure.call(this, state, pos);
10 | }
11 | };
12 |
13 |
--------------------------------------------------------------------------------
/src/node_info.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node.info = {
4 | build: function (state) {
5 | if (this.tokentype === CSL.START) {
6 | state.build.skip = "info";
7 | } else {
8 | state.build.skip = false;
9 | }
10 | }
11 | };
12 |
13 |
--------------------------------------------------------------------------------
/src/node_institutionpart.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node["institution-part"] = {
4 | build: function (state, target) {
5 | var func;
6 | if ("long" === this.strings.name) {
7 | if (this.strings["if-short"]) {
8 | func = function (state) {
9 | state.nameOutput.institutionpart["long-with-short"] = this;
10 | };
11 | } else {
12 | func = function (state) {
13 | state.nameOutput.institutionpart["long"] = this;
14 | };
15 | }
16 | } else if ("short" === this.strings.name) {
17 | func = function (state) {
18 | state.nameOutput.institutionpart["short"] = this;
19 | };
20 | }
21 | this.execs.push(func);
22 | target.push(this);
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/src/node_intext.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node.intext = {
4 | build: function (state, target) {
5 | if (this.tokentype === CSL.START) {
6 |
7 | state.build.area = "intext";
8 | state.build.root = "intext";
9 | state.build.extension = "";
10 |
11 | var func = function(state, Item) {
12 | state.tmp.area = "intext";
13 | state.tmp.root = "intext";
14 | state.tmp.extension = "";
15 | }
16 | this.execs.push(func);
17 | }
18 | if (this.tokentype === CSL.END) {
19 |
20 | // Do whatever cs:citation does with sorting.
21 | state.intext_sort = {
22 | opt: {
23 | sort_directions: state.citation_sort.opt.sort_directions
24 | }
25 | }
26 | state.intext.srt = state.citation.srt;
27 | }
28 | target.push(this);
29 | }
30 | };
31 |
32 |
--------------------------------------------------------------------------------
/src/node_macro.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node.macro = {
4 | build: function () {}
5 | };
6 |
--------------------------------------------------------------------------------
/src/node_namepart.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.Node["name-part"] = {
4 | build: function (state) {
5 | state.build[this.strings.name] = this;
6 | }
7 | };
8 |
--------------------------------------------------------------------------------
/src/obj_ambigconfig.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | /**
4 | * Ambiguous Cite Configuration Object
5 | * @class
6 | */
7 | CSL.AmbigConfig = function () {
8 | this.maxvals = [];
9 | this.minval = 1;
10 | this.names = [];
11 | this.givens = [];
12 | this.year_suffix = false;
13 | this.disambiguate = 0;
14 | };
15 |
--------------------------------------------------------------------------------
/src/print.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | if ("undefined" === typeof console) {
4 | CSL.debug = function (str) {
5 | dump("CSL: " + str + "\n");
6 | };
7 | CSL.error = function (str) {
8 | dump("CSL error: " + str + "\n");
9 | };
10 | } else {
11 | CSL.debug = function (str) {
12 | console.log("CSL: " + str);
13 | };
14 | CSL.error = function (str) {
15 | //print("CSL error: " + str + "\n");
16 | console.log("CSL error: " + str);
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/src/print_zotero.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true, Zotero: true */
2 |
3 | CSL.debug = function (str) {
4 | Zotero.debug("CSL: " + str);
5 | };
6 |
7 | CSL.error = function (str) {
8 | Zotero.debug("CSL error: " + str);
9 | };
10 |
11 | function DOMParser() {
12 | return Components.classes["@mozilla.org/xmlextras/domparser;1"]
13 | .createInstance(Components.interfaces.nsIDOMParser);
14 | }
15 |
--------------------------------------------------------------------------------
/src/system.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.setupXml = function(xmlObject) {
4 | var dataObj = {};
5 | var parser = null;
6 | if ("undefined" !== typeof xmlObject) {
7 | if ("string" === typeof xmlObject) {
8 | xmlObject = xmlObject.replace("^\uFEFF", "")
9 | .replace(/^\s+/, "");
10 | if (xmlObject.slice(0, 1) === "<") {
11 | // Assume serialized XML
12 | dataObj = CSL.parseXml(xmlObject);
13 | } else {
14 | // Assume serialized JSON
15 | dataObj = JSON.parse(xmlObject);
16 | }
17 | parser = new CSL.XmlJSON(dataObj);
18 | } else if ("undefined" !== typeof xmlObject.getAttribute) {
19 | // Assume DOM instance
20 | parser = new CSL.XmlDOM(xmlObject);
21 | } else if ("undefined" !== typeof xmlObject.toXMLString) {
22 | // Assume E4X object
23 | parser = new CSL.XmlE4X(xmlObject);
24 | } else {
25 | // Assume JS object
26 | parser = new CSL.XmlJSON(xmlObject);
27 | }
28 | } else {
29 | CSL.error("unable to parse XML input");
30 | }
31 | if (!parser) {
32 | CSL.error("citeproc-js error: unable to parse CSL style or locale object");
33 | }
34 | return parser;
35 | };
36 |
--------------------------------------------------------------------------------
/src/util_integration.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 |
4 | CSL.Engine.prototype.setCitationId = function (citation, force) {
5 | var ret, id, direction;
6 | ret = false;
7 | if (!citation.citationID || force) {
8 | id = Math.floor(Math.random() * 100000000000000);
9 | while (true) {
10 | direction = 0;
11 | if (!this.registry.citationreg.citationById[id]) {
12 | // In case the ID is used as an HTML identifier in the
13 | // calling application.
14 | // https://github.com/Juris-M/citeproc-js/issues/22
15 | citation.citationID = "a" + id.toString(32);
16 | break;
17 | } else if (!direction && id < 50000000000000) {
18 | direction = 1;
19 | } else {
20 | direction = -1;
21 | }
22 | if (direction === 1) {
23 | id += 1;
24 | } else {
25 | id += -1;
26 | }
27 | }
28 | ret = "" + id;
29 | }
30 | this.registry.citationreg.citationById[citation.citationID] = citation;
31 | return ret;
32 | };
33 |
--------------------------------------------------------------------------------
/src/util_names_tests.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | CSL.NameOutput.prototype.isPerson = function (value) {
4 | if (value.literal
5 | || (!value.given && value.family && value.isInstitution)) {
6 |
7 | return false;
8 | } else {
9 | return true;
10 | }
11 | };
12 |
--------------------------------------------------------------------------------
/src/util_sort.js:
--------------------------------------------------------------------------------
1 | /*global CSL: true */
2 |
3 | /**
4 | * Helper functions for constructing sort keys.
5 | * @namespace Sort key utilities
6 | */
7 | CSL.Util.Sort = {};
8 |
9 | /**
10 | * Strip prepositions from a string
11 | * Used when generating sort keys.
12 | */
13 | CSL.Util.Sort.strip_prepositions = function (str) {
14 | var m;
15 | if ("string" === typeof str) {
16 | m = str.match(/^(([aA]|[aA][nN]|[tT][hH][eE])\s+)/);
17 | }
18 | if (m) {
19 | str = str.substr(m[1].length);
20 | }
21 | return str;
22 | };
23 |
--------------------------------------------------------------------------------
/tools/CHARS.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | import sys
4 |
5 | def toNum(str):
6 | return int(str, base=16)
7 |
8 |
9 | nums = [
10 | ["0590", "05ff"],
11 | ["0080", "017f"],
12 | ["0400", "052f"],
13 | ["0370", "03ff"],
14 | ["1f00", "1fff"],
15 | ["0600", "06ff"],
16 | ["202a", "202e"],
17 | ["200c"],
18 | ["200d"],
19 | ["200e"],
20 | ["0218"],
21 | ["0219"],
22 | ["021a"],
23 | ["021b"]
24 | ]
25 |
26 | lst = [];
27 | for num in nums:
28 | if len(num) == 2:
29 | start = toNum(num[0])
30 | end = toNum(num[1])
31 | while start <= end:
32 | lst.append(["U+%s" % hex(start), unichr(start)])
33 | start += 1
34 | else:
35 | lst.append(["U+%s" % toNum(num[0]), unichr(toNum(num[0]))])
36 | for v,c in lst:
37 | print "%s = %s" % (v, c)
38 |
--------------------------------------------------------------------------------
/tools/CONV.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | import sys
4 |
5 | text = open(sys.argv[1]).read().decode("utf8")
6 |
7 | for char in text:
8 | if ord(char) > 256:
9 | c = hex(ord(char))[2:]
10 | while len(c) < 4:
11 | c = "0" + c
12 |
13 | sys.stdout.write("\u%s" % (c,))
14 | else:
15 | sys.stdout.write(char)
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/tools/REPLACE.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cd $(dirname $0)
4 |
5 | cd ..
6 |
7 |
8 | if [ "$1" == "--action" ]; then
9 | ACTION="1"
10 | shift
11 | fi
12 |
13 | if [ "$2" == "" ]; then
14 | echo Must give two values. First is the value to replace, the second is the replacement value.
15 | exit 1
16 | fi
17 | if [ "$3" != "" ]; then
18 | echo Must give ONLY two values. First is the value to replace, the second is the replacement value.
19 | exit 1
20 | fi
21 |
22 |
23 | if [ "$2" == "NOTHING" ]; then
24 | ARG2=""
25 | else
26 | ARG2="$2"
27 | fi
28 | for i in ./tests/std/humans/*.txt; do
29 | if [ $(grep -c "${1}" $i) -gt 0 ]; then
30 | if [ "$ACTION" == "1" ]; then
31 | #cat $i | sed -e "s~$1~${ARG2}~g" > $i.NEW
32 | cat $i | sed -e "s~${1}~${ARG2}~g" > $i.NEW
33 | mv $i.NEW $i
34 | else
35 | echo "-----OLD-----"
36 | grep "${1}" $i
37 | echo "-----NEW-----"
38 | grep "${1}" $i | sed -e "s~${1}~${ARG2}~g"
39 | fi
40 | fi
41 | done
42 |
--------------------------------------------------------------------------------
/tools/absorb-styles.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | import sys,os,os.path,re
4 |
5 | scriptpath = os.path.dirname(sys.argv[0])
6 | styledir = os.path.join(scriptpath,"..","tests","fixtures","std","styles")
7 | styledir = os.path.abspath(styledir)
8 |
9 | path = sys.argv[1]
10 |
11 | count = 0
12 |
13 | for filename in os.listdir(path):
14 | if filename.find("_") == -1: continue
15 | if not filename.endswith(".txt"): continue
16 | filepath = os.path.join(path,filename)
17 | txt = open(filepath).read()
18 | rex = '(?sm)^(.*>>=.*CSL[^\n]+)\n(.*)(\n<<=.*CSL.*)'
19 | m = re.match(rex,txt)
20 | if (m):
21 | if m.group(2).endswith(".csl"):
22 | count += 1
23 | scriptpath = os.path.join(styledir,m.group(2))
24 | style = open(scriptpath).read()
25 | txt = re.sub(rex,"\\1\n%s\\3" % (style,),txt)
26 | open(filepath,"w+").write(txt)
27 |
--------------------------------------------------------------------------------
/tools/getIANA.sh:
--------------------------------------------------------------------------------
1 | wget http://www.iana.org/assignments/language-subtag-registry
2 |
--------------------------------------------------------------------------------
/tools/populate.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | ./test.py -B
6 | cp citeproc.js ~/src/JM/propachi-vanilla/chrome/content/citeproc.js
7 |
8 | cat citeproc.js \
9 | | sed -s 's/this\.development_extensions\.main_title_from_short_title = false/this\.development_extensions\.main_title_from_short_title = true/' \
10 | | sed -s 's/this\.development_extensions\.uppercase_subtitles = false/this\.development_extensions\.uppercase_subtitles = true/' \
11 | > ~/src/JM/propachi-upper/chrome/content/citeproc.js
12 |
13 | cp citeproc.js ~/src/JM/jurism/chrome/content/zotero/xpcom/citeproc.js
14 |
15 | cp citeproc.js ~/src/JM/juris-m-top/js/citeproc.js
16 |
--------------------------------------------------------------------------------