citeproc-rb 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +93 -0
- data/Rakefile +73 -0
- data/TODO +25 -0
- data/VERSION +1 -0
- data/data/locales/locales_en.xml +89 -0
- data/data/locales/locales_nl.xml +96 -0
- data/data/styles/ama.csl +184 -0
- data/data/styles/apa.csl +230 -0
- data/data/styles/apsa.csl +175 -0
- data/data/styles/asa.csl +215 -0
- data/data/styles/chicago-author-date.csl +361 -0
- data/data/styles/chicago-fullnote-bibliography.csl +665 -0
- data/data/styles/chicago-note-bibliography.csl +437 -0
- data/data/styles/chicago-note.csl +383 -0
- data/data/styles/harvard.csl +185 -0
- data/data/styles/ieee.csl +111 -0
- data/data/styles/mhra.csl +317 -0
- data/data/styles/mla.csl +173 -0
- data/data/styles/nature.csl +87 -0
- data/data/styles/nlm.csl +118 -0
- data/examples/citeproc_driver.rb +174 -0
- data/lib/citeproc.rb +28 -0
- data/lib/citeproc/csl.rb +647 -0
- data/lib/citeproc/csl_parser.rb +479 -0
- data/lib/citeproc/csl_processor.rb +485 -0
- data/lib/citeproc/csl_reference.rb +228 -0
- data/lib/citeproc/filters/bibo/bibo.rb +635 -0
- data/lib/citeproc/filters/bibo/bibo_input_filter.rb +242 -0
- data/lib/citeproc/filters/bibo/bibo_utils.rb +75 -0
- data/lib/citeproc/filters/csl_citation/csl_citation.rb +137 -0
- data/lib/citeproc/filters/csl_citation/csl_citation_input_filter.rb +274 -0
- data/lib/citeproc/formatters/base_formatter.rb +115 -0
- data/lib/citeproc/formatters/xhtml_formatter.rb +144 -0
- data/lib/citeproc/input_filter.rb +97 -0
- data/test/fixtures/bibo_test_data.n3 +191 -0
- data/test/fixtures/bibo_test_data.yaml +96 -0
- data/test/fixtures/bibo_test_how_to_cook.n3 +63 -0
- data/test/fixtures/bibo_test_zotero.rdf +129 -0
- data/test/fixtures/csl_test_data.json +62 -0
- data/test/fixtures/csl_test_data.yaml +8 -0
- data/test/fixtures/locales/test_locale_en.xml +89 -0
- data/test/fixtures/styles/test_csl_parse.csl +230 -0
- data/test/fixtures/styles/test_groups.csl +32 -0
- data/test/fixtures/styles/test_names.csl +46 -0
- data/test/fixtures/styles/test_sort.csl +125 -0
- data/test/fixtures/styles/test_text_terms.csl +40 -0
- data/test/test_all.rb +14 -0
- data/test/test_bibo.rb +20 -0
- data/test/test_csl.rb +136 -0
- data/test/test_csl_parser.rb +222 -0
- data/test/test_sample_bibo.rb +82 -0
- metadata +101 -0
data/README
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
citeproc-rb README
|
2
|
+
==================
|
3
|
+
|
4
|
+
NB: citeproc-rb is currently incomplete and error-prone.
|
5
|
+
Please check http://xbiblio.sourceforge.net/ regularly for updates.
|
6
|
+
|
7
|
+
|
8
|
+
Overview
|
9
|
+
--------
|
10
|
+
|
11
|
+
citeproc-rb is a Ruby port of Citeproc, a process for converting citations
|
12
|
+
into a variety of formats using a macro language called Citation Style Language
|
13
|
+
(CSL). For more details on Citeproc and CSL, please check
|
14
|
+
http://xbiblio.sourceforge.net/.
|
15
|
+
|
16
|
+
citeproc-rb itself is currently designed to citations in two formats: an internal
|
17
|
+
CSL model and Bibliontology (http://bibliontology). Bibliontology itself is
|
18
|
+
designed to support a range of additional formats, such as BibTeX, greatly
|
19
|
+
extending the range of formats supported.
|
20
|
+
|
21
|
+
The basic classes of Citeproc-rb is as follows:
|
22
|
+
|
23
|
+
Citeproc - the main process for Citeproc; controls the processing
|
24
|
+
pipeline
|
25
|
+
InputFilter - converts input sources and provides a standard interface for
|
26
|
+
retrieving citation data
|
27
|
+
Csl - the CSL object model
|
28
|
+
CslParser - parses CSL rules into an object model
|
29
|
+
CslProcessor - processes citations according to the CSL rules
|
30
|
+
BaseFormatter - formats citations in plain text
|
31
|
+
XhtmlFormatter - formats citations in XHTML
|
32
|
+
|
33
|
+
Together these classes form a processing pipeline: the Citeproc controls
|
34
|
+
filtering citations input; the parsing of CSL rules; and
|
35
|
+
formatting the citations according to the rules.
|
36
|
+
|
37
|
+
The InputFilter class provides some basic services but is designed to be
|
38
|
+
sub-classed for particular input formats.
|
39
|
+
|
40
|
+
|
41
|
+
Requirements
|
42
|
+
------------
|
43
|
+
|
44
|
+
* ruby 1.8
|
45
|
+
<http://www.ruby-lang.org/>
|
46
|
+
|
47
|
+
Optional:
|
48
|
+
|
49
|
+
* Rubygems
|
50
|
+
<http://www.rubygems.org/>
|
51
|
+
|
52
|
+
* ActiveSupport
|
53
|
+
<http://rubyforge.org/projects/activesupport/>
|
54
|
+
|
55
|
+
* YAML
|
56
|
+
<http://yaml4r.sourceforge.com/>
|
57
|
+
|
58
|
+
* JSON
|
59
|
+
<http://json.rubyforge.com/>
|
60
|
+
|
61
|
+
* Redland Ruby bindings (for Bibliontology support)
|
62
|
+
<http://librdf.org/>
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
Usage
|
67
|
+
-----
|
68
|
+
|
69
|
+
To use the internal CSL model with JSON:
|
70
|
+
|
71
|
+
ruby examples/citeproc_driver.rb --input test/fixtures/csl_test_data.json --content-type json --csl data/styles/ama.csl
|
72
|
+
|
73
|
+
With YAML:
|
74
|
+
|
75
|
+
ruby examples/citeproc_driver.rb --input test/fixtures/csl_test_data.yaml --content-type yaml --csl data/styles/ama.csl
|
76
|
+
|
77
|
+
To use Bibliontology data, again with YAML (but note the YAML includes class specifications):
|
78
|
+
|
79
|
+
ruby examples/citeproc_driver.rb --input-filter bibo --input test/fixtures/bibo_test_data.yaml --content-type yaml --csl data/styles/ama.csl
|
80
|
+
|
81
|
+
With RDF (presumes Redland with Ruby bindings is installed):
|
82
|
+
|
83
|
+
ruby examples/citeproc_driver.rb --input-filter bibo --input test/fixtures/bibo_test_data.xml --content-type rdf --csl data/styles/ama.csl
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
License
|
88
|
+
-------
|
89
|
+
|
90
|
+
You can redistribute it and/or modify it under the same term as Ruby.
|
91
|
+
|
92
|
+
|
93
|
+
Liam Magee <liam.magee@gmail.com>
|
data/Rakefile
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
require "rake/rdoctask"
|
2
|
+
require "rake/testtask"
|
3
|
+
require "rake/gempackagetask"
|
4
|
+
|
5
|
+
require "rubygems"
|
6
|
+
|
7
|
+
dir = File.dirname(__FILE__)
|
8
|
+
lib = File.join(dir, "lib", "citeproc.rb")
|
9
|
+
version = File.read('VERSION').chomp
|
10
|
+
|
11
|
+
task :default => [:test]
|
12
|
+
|
13
|
+
Rake::TestTask.new do |test|
|
14
|
+
test.libs << "test"
|
15
|
+
test.test_files = [ "test/test_all.rb" ]
|
16
|
+
test.verbose = true
|
17
|
+
end
|
18
|
+
|
19
|
+
Rake::RDocTask.new do |rdoc|
|
20
|
+
rdoc.rdoc_files.include( "README", "VERSION", "lib/" )
|
21
|
+
rdoc.main = "README"
|
22
|
+
rdoc.rdoc_dir = "doc/html"
|
23
|
+
rdoc.title = "Citeproc-rb Documentation"
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
spec = Gem::Specification.new do |spec|
|
29
|
+
spec.name = "citeproc-rb"
|
30
|
+
spec.version = version
|
31
|
+
spec.platform = Gem::Platform::RUBY
|
32
|
+
spec.summary = "Citeproc-rb is a Ruby port of the ."
|
33
|
+
spec.files = Dir.glob("{data,examples,lib,test}/**/*.{rb,csl,xml,n3,rdf,json,yaml}").
|
34
|
+
delete_if { |item| item.include?(".svn") } +
|
35
|
+
["Rakefile"]
|
36
|
+
|
37
|
+
spec.test_suite_file = "test/test_all.rb"
|
38
|
+
spec.has_rdoc = true
|
39
|
+
spec.extra_rdoc_files = %w{README TODO VERSION}
|
40
|
+
spec.rdoc_options << '--title' << 'Citeproc-rb Documentation' <<
|
41
|
+
'--main' << 'README'
|
42
|
+
|
43
|
+
spec.require_path = 'lib'
|
44
|
+
|
45
|
+
spec.author = "Liam Magee"
|
46
|
+
spec.email = "liam.magee@gmail.com"
|
47
|
+
spec.homepage = "http://xbiblio.sourceforge.org"
|
48
|
+
spec.description = <<END_DESC
|
49
|
+
Citeproc-rb is a Ruby port of Citeproc, a process for converting citations
|
50
|
+
into a variety of formats using a macro language called Citation Style Language
|
51
|
+
(CSL). For more details on Citeproc and CSL, please check
|
52
|
+
http://xbiblio.sourceforge.net/.
|
53
|
+
END_DESC
|
54
|
+
end
|
55
|
+
|
56
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
57
|
+
pkg.need_zip = true
|
58
|
+
pkg.need_tar = true
|
59
|
+
end
|
60
|
+
|
61
|
+
desc "Show library's code statistics"
|
62
|
+
task :stats do
|
63
|
+
require 'code_statistics'
|
64
|
+
CodeStatistics.new( ["Citeproc-rb", "lib"],
|
65
|
+
["Functionals", "examples"],
|
66
|
+
["Units", "test"] ).to_s
|
67
|
+
end
|
68
|
+
|
69
|
+
desc "Add new files to Subversion"
|
70
|
+
task :add_to_svn do
|
71
|
+
sh %Q{svn status | ruby -nae 'system "svn add \#{$F[1]}" if $F[0] == "?"' }
|
72
|
+
end
|
73
|
+
|
data/TODO
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
TODO:
|
2
|
+
|
3
|
+
Parser:
|
4
|
+
- Validation
|
5
|
+
|
6
|
+
BaseFormatter:
|
7
|
+
- Some conditions
|
8
|
+
- Add more types - need to compare bibliontology classes with CSL types
|
9
|
+
- Mark-up option - a bit clumsy
|
10
|
+
- Sorting
|
11
|
+
- Options
|
12
|
+
- Tests and fixtures
|
13
|
+
- Document
|
14
|
+
- Dynamic InputFilter ?
|
15
|
+
- Spacing issues
|
16
|
+
|
17
|
+
InputFilter:
|
18
|
+
- Better name (Resolver, Mapper)?
|
19
|
+
|
20
|
+
OutputFilter:
|
21
|
+
- Support differential mark-up (at least: XHTML/XSL-FO)
|
22
|
+
|
23
|
+
Bibliontology
|
24
|
+
- Revise: ensure all CSL variables, types etc are supported
|
25
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,89 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<terms xmlns="http://purl.org/net/xbiblio/csl">
|
3
|
+
<locale xml:lang="en">
|
4
|
+
<term name="in">in</term>
|
5
|
+
<term name="ibid">ibid</term>
|
6
|
+
<term name="accessed">accessed</term>
|
7
|
+
<term name="forthcoming">forthcoming</term>
|
8
|
+
<term name="references">References</term>
|
9
|
+
<term name="no date">nd</term>
|
10
|
+
<term name="and">and</term>
|
11
|
+
<term name="et-al">et al.</term>
|
12
|
+
|
13
|
+
<!-- LONG LOCATOR FORMS -->
|
14
|
+
<term name="page">
|
15
|
+
<single>page</single>
|
16
|
+
<multiple>pages</multiple>
|
17
|
+
</term>
|
18
|
+
<term name="paragraph">
|
19
|
+
<single>paragraph</single>
|
20
|
+
<multiple>paragraph</multiple>
|
21
|
+
</term>
|
22
|
+
<term name="volume">volume</term>
|
23
|
+
<term name="issue">number</term>
|
24
|
+
|
25
|
+
<!-- SHORT LOCATOR FORMS -->
|
26
|
+
<term name="page" form="short">
|
27
|
+
<single>p</single>
|
28
|
+
<multiple>pp</multiple>
|
29
|
+
</term>
|
30
|
+
<term name="paragraph" form="short">
|
31
|
+
<single>¶</single>
|
32
|
+
<multiple>¶¶</multiple>
|
33
|
+
</term>
|
34
|
+
<term name="volume" form="short">vol</term>
|
35
|
+
<term name="issue" form="short">no</term>
|
36
|
+
|
37
|
+
<!-- LONG ROLE FORMS -->
|
38
|
+
<term name="editor">
|
39
|
+
<single>editor</single>
|
40
|
+
<multiple>editors</multiple>
|
41
|
+
</term>
|
42
|
+
<term name="translator">
|
43
|
+
<single>translator</single>
|
44
|
+
<multiple>translators</multiple>
|
45
|
+
</term>
|
46
|
+
|
47
|
+
<!-- SHORT ROLE FORMS -->
|
48
|
+
<term name="editor" form="short">
|
49
|
+
<single>ed</single>
|
50
|
+
<multiple>eds</multiple>
|
51
|
+
</term>
|
52
|
+
<term name="translator" form="short">
|
53
|
+
<single>tran</single>
|
54
|
+
<multiple>trans</multiple>
|
55
|
+
</term>
|
56
|
+
|
57
|
+
<!-- VERB ROLE FORMS -->
|
58
|
+
<term name="editor" form="verb">edited by</term>
|
59
|
+
<term name="translator" form="verb">translated by</term>
|
60
|
+
|
61
|
+
<!-- LONG MONTH FORMS -->
|
62
|
+
<term name="month-01">January</term>
|
63
|
+
<term name="month-02">February</term>
|
64
|
+
<term name="month-03">March</term>
|
65
|
+
<term name="month-04">April</term>
|
66
|
+
<term name="month-05">May</term>
|
67
|
+
<term name="month-06">June</term>
|
68
|
+
<term name="month-07">July</term>
|
69
|
+
<term name="month-08">August</term>
|
70
|
+
<term name="month-09">September</term>
|
71
|
+
<term name="month-10">October</term>
|
72
|
+
<term name="month-11">November</term>
|
73
|
+
<term name="month-12">December</term>
|
74
|
+
|
75
|
+
<!-- SHORT MONTH FORMS -->
|
76
|
+
<term name="month-01" form="short">Jan</term>
|
77
|
+
<term name="month-02" form="short">Feb</term>
|
78
|
+
<term name="month-03" form="short">Mar</term>
|
79
|
+
<term name="month-04" form="short">Apr</term>
|
80
|
+
<term name="month-05" form="short">May</term>
|
81
|
+
<term name="month-06" form="short">Jun</term>
|
82
|
+
<term name="month-07" form="short">Jul</term>
|
83
|
+
<term name="month-08" form="short">Aug</term>
|
84
|
+
<term name="month-09" form="short">Sep</term>
|
85
|
+
<term name="month-10" form="short">Oct</term>
|
86
|
+
<term name="month-11" form="short">Nov</term>
|
87
|
+
<term name="month-12" form="short">Dec</term>
|
88
|
+
</locale>
|
89
|
+
</terms>
|
@@ -0,0 +1,96 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<terms xmlns="http://purl.org/net/xbiblio/csl">
|
3
|
+
<locale xml:lang="nl">
|
4
|
+
<info>
|
5
|
+
<translator>
|
6
|
+
<name>Johan Kool</name>
|
7
|
+
<email>johankool@users.sourceforge.net</email>
|
8
|
+
</translator>
|
9
|
+
<updated>2006-08-30T11:40:23+05:00</updated>
|
10
|
+
</info>
|
11
|
+
<term name="in">in</term>
|
12
|
+
<term name="ibid">ibid</term>
|
13
|
+
<term name="accessed">benaderd</term>
|
14
|
+
<term name="forthcoming">in voorbereiding</term>
|
15
|
+
<term name="references">Referenties</term>
|
16
|
+
<term name="and">en</term>
|
17
|
+
<term name="from">uit</term>
|
18
|
+
<term name="et-al">et al.</term>
|
19
|
+
|
20
|
+
<!-- LONG LOCATOR FORMS -->
|
21
|
+
<term name="page">
|
22
|
+
<single>pagina</single>
|
23
|
+
<multiple>pagina’s</multiple>
|
24
|
+
</term>
|
25
|
+
<term name="paragraph">
|
26
|
+
<single>paragraaf</single>
|
27
|
+
<multiple>paragrafen</multiple>
|
28
|
+
</term>
|
29
|
+
<term name="volume">volumen</term>
|
30
|
+
<term name="issue">deel</term>
|
31
|
+
|
32
|
+
<!-- SHORT LOCATOR FORMS -->
|
33
|
+
<term name="page" form="short">
|
34
|
+
<single>p.</single>
|
35
|
+
<multiple>p.</multiple>
|
36
|
+
</term>
|
37
|
+
<term name="paragraph" form="short">
|
38
|
+
<single>§</single>
|
39
|
+
<multiple>§</multiple>
|
40
|
+
</term>
|
41
|
+
<term name="volume" form="short">vol.</term>
|
42
|
+
<term name="issue" form="short">deel</term>
|
43
|
+
|
44
|
+
<!-- LONG ROLE FORMS -->
|
45
|
+
<term name="editor">
|
46
|
+
<single>redacteur</single>
|
47
|
+
<multiple>redacteuren</multiple>
|
48
|
+
</term>
|
49
|
+
<term name="translator">
|
50
|
+
<single>vertaler</single>
|
51
|
+
<multiple>vertalers</multiple>
|
52
|
+
</term>
|
53
|
+
|
54
|
+
<!-- SHORT ROLE FORMS -->
|
55
|
+
<term name="editor" form="short">
|
56
|
+
<single>red.</single>
|
57
|
+
<multiple>red.</multiple>
|
58
|
+
</term>
|
59
|
+
<term name="translator" form="short">
|
60
|
+
<single>vert.</single>
|
61
|
+
<multiple>vert.</multiple>
|
62
|
+
</term>
|
63
|
+
|
64
|
+
<!-- VERB ROLE FORMS -->
|
65
|
+
<term name="editor" form="verb">redactie door</term>
|
66
|
+
<term name="translator" form="verb">vertaald door</term>
|
67
|
+
|
68
|
+
<!-- LONG MONTH FORMS -->
|
69
|
+
<term name="month-01">januari</term>
|
70
|
+
<term name="month-02">februari</term>
|
71
|
+
<term name="month-03">maart</term>
|
72
|
+
<term name="month-04">april</term>
|
73
|
+
<term name="month-05">mei</term>
|
74
|
+
<term name="month-06">juni</term>
|
75
|
+
<term name="month-07">juli</term>
|
76
|
+
<term name="month-08">augustus</term>
|
77
|
+
<term name="month-09">september</term>
|
78
|
+
<term name="month-10">oktober</term>
|
79
|
+
<term name="month-11">november</term>
|
80
|
+
<term name="month-12">december</term>
|
81
|
+
|
82
|
+
<!-- SHORT MONTH FORMS -->
|
83
|
+
<term name="month-01" form="short">jan</term>
|
84
|
+
<term name="month-02" form="short">feb</term>
|
85
|
+
<term name="month-03" form="short">maa</term>
|
86
|
+
<term name="month-04" form="short">apr</term>
|
87
|
+
<term name="month-05" form="short">mei</term>
|
88
|
+
<term name="month-06" form="short">jun</term>
|
89
|
+
<term name="month-07" form="short">jul</term>
|
90
|
+
<term name="month-08" form="short">aug</term>
|
91
|
+
<term name="month-09" form="short">sep</term>
|
92
|
+
<term name="month-10" form="short">okt</term>
|
93
|
+
<term name="month-11" form="short">nov</term>
|
94
|
+
<term name="month-12" form="short">dec</term>
|
95
|
+
</locale>
|
96
|
+
</terms>
|
data/data/styles/ama.csl
ADDED
@@ -0,0 +1,184 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en">
|
3
|
+
<info>
|
4
|
+
<title>American Medical Association</title>
|
5
|
+
<id>http://www.zotero.org/styles/ama</id>
|
6
|
+
<link href="http://www.zotero.org/styles/ama"/>
|
7
|
+
<author>
|
8
|
+
<name>Julian Onions</name>
|
9
|
+
<email>julian.onions@gmail.com</email>
|
10
|
+
</author>
|
11
|
+
<category term="numeric"/>
|
12
|
+
<category term="medicine"/>
|
13
|
+
<updated>2008-03-08T20:38:52+00:00</updated>
|
14
|
+
<summary>The American Medical Association style as used in JAMA.</summary>
|
15
|
+
<link href="http://www.samford.edu/schools/pharmacy/dic/amaquickref07.pdf" rel="documentation"/>
|
16
|
+
</info>
|
17
|
+
<macro name="editor">
|
18
|
+
<names variable="editor">
|
19
|
+
<name name-as-sort-order="all" sort-separator=" " initialize-with="" delimiter=", " delimiter-precedes-last="always"/>
|
20
|
+
<label form="short" prefix=", " text-case="lowercase" suffix="."/>
|
21
|
+
</names>
|
22
|
+
</macro>
|
23
|
+
<macro name="anon">
|
24
|
+
<text term="anonymous" form="short" text-case="capitalize-first"/>
|
25
|
+
</macro>
|
26
|
+
<macro name="author">
|
27
|
+
<group suffix=".">
|
28
|
+
<names variable="author">
|
29
|
+
<name name-as-sort-order="all" sort-separator=" " initialize-with=""
|
30
|
+
delimiter=", " delimiter-precedes-last="always"/>
|
31
|
+
<label form="short" prefix=" " suffix="" text-case="lowercase"/>
|
32
|
+
<substitute>
|
33
|
+
<names variable="editor"/>
|
34
|
+
<text macro="anon"/>
|
35
|
+
</substitute>
|
36
|
+
</names>
|
37
|
+
</group>
|
38
|
+
</macro>
|
39
|
+
<macro name="author-short">
|
40
|
+
<names variable="author">
|
41
|
+
<name form="short" and="symbol" delimiter=", " initialize-with="."/>
|
42
|
+
<substitute>
|
43
|
+
<names variable="editor"/>
|
44
|
+
<names variable="translator"/>
|
45
|
+
<text macro="anon"/>
|
46
|
+
</substitute>
|
47
|
+
</names>
|
48
|
+
</macro>
|
49
|
+
<macro name="access">
|
50
|
+
<group>
|
51
|
+
<text value="Available at:" suffix=" "/>
|
52
|
+
<text variable="URL"/>
|
53
|
+
<group prefix=" [" suffix="]">
|
54
|
+
<text term="accessed" text-case="capitalize-first" suffix=" "/>
|
55
|
+
<date variable="accessed">
|
56
|
+
<date-part name="month" suffix=" "/>
|
57
|
+
<date-part name="day" suffix=", "/>
|
58
|
+
<date-part name="year"/>
|
59
|
+
</date>
|
60
|
+
</group>
|
61
|
+
</group>
|
62
|
+
</macro>
|
63
|
+
<macro name="title">
|
64
|
+
<choose>
|
65
|
+
<if type="book">
|
66
|
+
<text variable="title" font-style="italic"/>
|
67
|
+
</if>
|
68
|
+
<else>
|
69
|
+
<text variable="title"/>
|
70
|
+
</else>
|
71
|
+
</choose>
|
72
|
+
</macro>
|
73
|
+
<macro name="publisher">
|
74
|
+
<group delimiter=": ">
|
75
|
+
<text variable="publisher-place"/>
|
76
|
+
<text variable="publisher"/>
|
77
|
+
</group>
|
78
|
+
</macro>
|
79
|
+
<macro name="year-date">
|
80
|
+
<group prefix=" ">
|
81
|
+
<choose>
|
82
|
+
<if variable="issued">
|
83
|
+
<date variable="issued">
|
84
|
+
<date-part name="year"/>
|
85
|
+
</date>
|
86
|
+
</if>
|
87
|
+
<else>
|
88
|
+
<text term="no date"/>
|
89
|
+
</else>
|
90
|
+
</choose>
|
91
|
+
</group>
|
92
|
+
</macro>
|
93
|
+
<macro name="edition">
|
94
|
+
<choose>
|
95
|
+
<if is-numeric="edition">
|
96
|
+
<group delimiter=" ">
|
97
|
+
<number variable="edition" form="ordinal"/>
|
98
|
+
<text term="edition" form="short" suffix="."/>
|
99
|
+
</group>
|
100
|
+
</if>
|
101
|
+
<else>
|
102
|
+
<text variable="edition" suffix="."/>
|
103
|
+
</else>
|
104
|
+
</choose>
|
105
|
+
</macro>
|
106
|
+
<citation>
|
107
|
+
<option name="collapse" value="citation-number"/>
|
108
|
+
<sort>
|
109
|
+
<key variable="citation-number"/>
|
110
|
+
</sort>
|
111
|
+
<layout delimiter="," vertical-align="sup">
|
112
|
+
<text variable="citation-number" />
|
113
|
+
<group prefix="(" suffix=")">
|
114
|
+
<label variable="locator" form="short"/>
|
115
|
+
<text variable="locator"/>
|
116
|
+
</group>
|
117
|
+
</layout>
|
118
|
+
</citation>
|
119
|
+
<bibliography>
|
120
|
+
<option name="hanging-indent" value="false"/>
|
121
|
+
<option name="et-al-min" value="6"/>
|
122
|
+
<option name="et-al-use-first" value="3"/>
|
123
|
+
<layout>
|
124
|
+
<text variable="citation-number" prefix="" suffix=". "/>
|
125
|
+
<text macro="author" suffix=""/>
|
126
|
+
<choose>
|
127
|
+
<if type="book">
|
128
|
+
<group suffix=".">
|
129
|
+
<text macro="title" prefix=" " suffix="."/>
|
130
|
+
<text macro="edition" prefix=" " />
|
131
|
+
<text macro="editor" prefix=" (" suffix=")"/>
|
132
|
+
</group>
|
133
|
+
<text prefix=" " suffix="" macro="publisher"/>
|
134
|
+
<group suffix="." prefix="; ">
|
135
|
+
<date variable="issued">
|
136
|
+
<date-part name="year"/>
|
137
|
+
</date>
|
138
|
+
<text variable="page" prefix=":"/>
|
139
|
+
</group>
|
140
|
+
</if>
|
141
|
+
<else-if type="chapter">
|
142
|
+
<text macro="title" prefix=" " suffix="."/>
|
143
|
+
<group class="container" prefix=" ">
|
144
|
+
<text term="in" text-case="capitalize-first" suffix=": "/>
|
145
|
+
<text macro="editor"/>
|
146
|
+
<text variable="container-title" font-style="italic" prefix=" " suffix="."/>
|
147
|
+
<text variable="volume" prefix="Vol " suffix="."/>
|
148
|
+
<text macro="edition" prefix=" "/>
|
149
|
+
<text variable="collection-title" prefix=" " suffix="."/>
|
150
|
+
<group suffix=".">
|
151
|
+
<text macro="publisher" prefix=" "/>
|
152
|
+
<group suffix="." prefix="; ">
|
153
|
+
<date variable="issued">
|
154
|
+
<date-part name="year"/>
|
155
|
+
</date>
|
156
|
+
<text variable="page" prefix=":"/>
|
157
|
+
</group>
|
158
|
+
</group>
|
159
|
+
</group>
|
160
|
+
</else-if>
|
161
|
+
<else>
|
162
|
+
<group suffix=".">
|
163
|
+
<text macro="title" prefix=" " />
|
164
|
+
<text macro="editor" prefix=" "/>
|
165
|
+
</group>
|
166
|
+
<group class="container" prefix=" " suffix=".">
|
167
|
+
<text variable="container-title" font-style="italic" form="short" suffix="."/>
|
168
|
+
<group delimiter=";" prefix=" ">
|
169
|
+
<date variable="issued">
|
170
|
+
<date-part name="year"/>
|
171
|
+
</date>
|
172
|
+
<group>
|
173
|
+
<text variable="volume" />
|
174
|
+
<text variable="issue" prefix="(" suffix=")"/>
|
175
|
+
</group>
|
176
|
+
</group>
|
177
|
+
<text variable="page" prefix=":"/>
|
178
|
+
</group>
|
179
|
+
</else>
|
180
|
+
</choose>
|
181
|
+
<text prefix=" " macro="access" suffix="."/>
|
182
|
+
</layout>
|
183
|
+
</bibliography>
|
184
|
+
</style>
|