inukshuk / citeproc-ruby Goto Github PK
View Code? Open in Web Editor NEWA Citation Style Language (CSL) Cite Processor
A Citation Style Language (CSL) Cite Processor
When Latex code for accents is given in author names, citeproc does not include the comma, space at the end of the name. The code below generates the following output:
Brown, J., & L\'{e}ssS. (2013). A book. Lawrence Erlbaum.
Brown, J., & Less, S. (2013). A book. Lawrence Erlbaum.
The first line should be:
Brown, J., & L\'{e}ss, S. (2013). A book. Lawrence Erlbaum.
Code example:
require 'bibtex'
require 'citeproc'
biblio = BibTeX.parse <<-END
@book{sample1,
author = {J. Brown and S. L\\'{e}ss},
title = {A book},
publisher = {Lawrence Erlbaum},
year = {2013}
}
@book{sample2,
author = {J. Brown and S. Less},
title = {A book},
publisher = {Lawrence Erlbaum},
year = {2013}
}
END
item = biblio['sample1']
puts CiteProc.process item.to_citeproc
item = biblio['sample2']
puts CiteProc.process item.to_citeproc
I am just trying out asciidoctor-bibtex, and it looks like a very promising project. I am just wondering why citations in note styles are not rendered in footnotes, but end up in the main text. Is this a bug, a design choice, or am I making something wrong? (I guess this is citeproc-ruby issue so I am crossposting here. The asciidoctor-bibtex issue is here.)
The example given in Readme.md does not work. I typed exactly the same into my IRB, after installing the Gem:
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'citeproc'
=> true
irb(main):003:0> book = {
irb(main):004:1* 'author' => [{ 'given' => 'Edgar Allen', 'family' => 'Poe' }],
irb(main):005:1* 'title' => 'Poetry, Tales, and Selected Essays',
irb(main):006:1* 'type' => 'book',
irb(main):007:1* 'issued' => { 'date-parts' => [[1996]] },
irb(main):008:1* 'editor' => [{ 'family' => 'Quinn', 'given' => 'Patrick F.'}, { 'family' => 'Thompson', 'given' => 'G.R.' }],
irb(main):009:1* 'publisher' => 'Library of America',
irb(main):010:1* 'publisher-place' => 'New York'
irb(main):011:1> }
=> {"author"=>[{"given"=>"Edgar Allen", "family"=>"Poe"}], "title"=>"Poetry, Tales, and Selected Essays", "type"=>"book", "issued"=>{"date-parts"=>[[1996]]}, "editor"=>[{"family"=>"Quinn", "given"=>"Patrick F."}, {"family"=>"Thompson", "given"=>"G.R."}], "publisher"=>"Library of America", "publisher-place"=>"New York"}
irb(main):012:0> CiteProc.process(book)
NameError: uninitialized constant Object::CiteProc
from (irb):12
from /usr/local/bin/irb19:12:in `
I get a bit further if I use Citeproc instead of CiteProc
irb(main):013:0> Citeproc.process(book)
NoMethodError: undefined method process' for Citeproc:Module from (irb):13 from /usr/local/bin/irb19:12:in
But still can't get there.
A functioning example would be very helpful - I tried looking at the rspecs, but I couldn't make much sense of them.
I'm looking to create an output format that outputs ansi console codes -- any tips on where to start on creating a new output format?
Is there any documentation? The only one I found is very outdated and frankly not working. Also how do you add pages to citations?
Is there support for generating citation styles? Right now the output for an entry always appears to be formatted for a bibliography.
The following entry could not be parsed by citeproc. All other 1000+ entries went well, most have similar date fields:
@incollection{hrimech1998spontaneous,
author = {Hrimech, M. and Bouchard, Paul},
container = {Developing paradigms in self-directed learning},
date-added = {2012-03-11 13:04:46 +0000},
date-modified = {2012-03-11 13:04:54 +0000},
editor = {Long, H. and Associates},
location = {Oklahoma, OK : Oklahoma},
pages = {27–44},
publisher = {University Press},
title = {Spontaneous learning strategies in the natural setting},
year = {1998},
bdsk-file-1 = {YnBsaXN0MDDUAQIDBAUIJidUJHRvcFgkb2JqZWN0c1gkdmVyc2lvblkkYXJjaGl2ZXLRBgdUcm9vdIABqAkKFRYXGyIjVSRudWxs0wsMDQ4RFFpOUy5vYmplY3RzV05TLmtleXNWJGNsYXNzog8QgASABqISE4ACgAOAB1lhbGlhc0RhdGFccmVsYXRpdmVQYXRo0hgNGRpXTlMuZGF0YU8RAZgAAAAAAZgAAgAAB1NTREhvbWUAAAAAAAAAAAAAAAAAAAAAAAAAAMl5T9hIKwAAANrWUhpocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAETRzhy4IbIQAAAAAAAAAAAAIAAgAACSAAAAAAAAAAAAAAAAAAAAAHQmliZGVzawAAEAAIAADJeZYoAAAAEQAIAADLglNhAAAAAQAMANrWUgAXPTEAAZ9eAAIAOVNTREhvbWU6VXNlcnM6AFN0aWFuOgBCaWJkZXNrOgBocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZgAADgA2ABoAaAByAGkAbQBlAGMAaAAxADkAOQA4AHMAcABvAG4AdABhAG4AZQBvAHUAcwAuAHAAZABmAA8AEAAHAFMAUwBEAEgAbwBtAGUAEgAuVXNlcnMvU3RpYW4vQmliZGVzay9ocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZgATAAEvAAAVAAIADP//AACABdIcHR4fWCRjbGFzc2VzWiRjbGFzc25hbWWjHyAhXU5TTXV0YWJsZURhdGFWTlNEYXRhWE5TT2JqZWN0XxAoLi4vLi4vQmliZGVzay9ocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZtIcHSQloiUhXE5TRGljdGlvbmFyeRIAAYagXxAPTlNLZXllZEFyY2hpdmVyAAgAEQAWAB8AKAAyADUAOgA8AEUASwBSAF0AZQBsAG8AcQBzAHYAeAB6AHwAhgCTAJgAoAI8Aj4CQwJMAlcCWwJpAnACeQKkAqkCrAK5Ar4AAAAAAAACAQAAAAAAAAAoAAAAAAAAAAAAAAAAAAAC0A==}
}
/usr/local/lib/ruby/1.9.1/date.rb:1022:in new_by_frags': invalid date (ArgumentError) from /usr/local/lib/ruby/1.9.1/date.rb:1066:in
parse'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/date.rb:54:in parse_date!' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/date.rb:38:in
parse!'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/variable.rb:52:in initialize' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/variable.rb:47:in
new'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/variable.rb:47:in parse' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/item.rb:33:in
block in merge!'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/item.rb:33:in each_pair' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/item.rb:33:in
merge!'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/item.rb:14:in initialize' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:90:in
new'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:90:in block in import' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:89:in
each'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:89:in import' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:22:in
block in process'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:12:in initialize' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:18:in
new'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:18:in process' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc.rb:82:in
process'
from bibtex-batch.rb:101:in block in <main>' from /usr/local/lib/ruby/gems/1.9.1/gems/bibtex-ruby-2.0.4/lib/bibtex/bibliography.rb:144:in
each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bibtex-ruby-2.0.4/lib/bibtex/bibliography.rb:144:in each' from bibtex-batch.rb:79:in
I am using citeproc-ruby
to create a markdown-version of my list of publications. I know that the csl-file is supposed to control the bibliography layout, yet I am running into the problem that the line breaks of the output are not recognized by markdown (one space instead of two).
Is there a way to append a space / line break to each of the entries after render
?
# Open bibliography
bib = BibTeX.open('bibliography.bib').convert(:latex)
# Create a new processor with the desired style, # format, and locale.
cp = CiteProc::Processor.new style: 'chicago-author-date', format: 'text', locale: 'de'
cp.import bib.to_citeproc
# Process entries with keyword "submitted"
submitted = bib['@*[keywords=submitted]'].map do |e|
cp.render :bibliography, :id => e.key
end
# Write to output file
File.open( 'publications.de.markdown', "w" ) do |file|
file.puts submitted
end
Numeric CSL styles which format the citation number with superscript seem to contain something like this:
<citation collapse="citation-number">
<sort>
<key variable="citation-number"/>
</sort>
<layout delimiter="," vertical-align="sup">
<text variable="citation-number"/>
</layout>
</citation>
citeproc-ruby outputs the "sup" part directly into the HTML - but "vertical-align: sup" is invalid CSS (it should be "vertical-align: super" instead). As a result, the rendered HTML displays without any superscript formatting.
The CSL spec seems to suggest that "vertical-align: sup" is the correct CSL (even if it is wrong in CSS).
Perhaps citeproc-ruby should be detecting this and outputting "vertical-align: super" instead?
There is currently also a test checking this behaviour.
I'm evaluating using this in a server side (web) application. For my use case, I just actually need to take a single citation (which I already have in a csl-data-json hash), and output it in one of a handful of styles. Following the directions in the README, I get:
csl_hash # a csl-data-json style hash, assume exists
cp = CiteProc::Processor.new style: 'chicago-note-bibliography', format: 'html'
cp.import [csl]
cp.render :bibliography, id: csl.first["id"]
This works, but it's slow. On my macbook, 100-200ms. Too slow for me.
However, good news, profiling reveals that it's slow mostly only because each time it loads and parses the style and locale files. The slow is in CSL::Loader.load
, which is called twice, once with chicago-note-bibliography
and once with the (default) locale en-US
.
If just to play around, I modify CSL::Loader.load to cache in memory, it saves an order of magnitude of time, down to 10-20ms to process.
One probably wouldn't want to actually do that, because then any program using would cache whether it wanted to or not, eventually holding all styles and locales ever used in memory. Plus there could be concurrency issues.
But it would be good if there were some way for the caller to load the style/locale manually, and pass it in. Perhaps something like:
chicago_note_bibliography = CSL::Loader.load("chicago-note-bibliography")
locale = CSL::Loader.load("en-US")
# now I can re-use them to my hearts content over and over,
# without paying the loading cost...
cp = CiteProc::Processor.new style: chicago_note_bibliography, locale: locale, format: 'html'
cp.import [csl]
cp.render etc
# do it again without reload
cp = CiteProc::Processor.new style: chicago_note_bibliography, locale: locale, format: 'html'
cp.import [another_csl]
cp.render etc
That's not quite right, CSL::Loader
is actually a module, I got to figure out where it is used, plus of course this just doesn't work at present. It could probably be made to work, I started looking at the code, and got a bit lost in all the objects across three gems involved, but perhaps it could be done fairly straightforwardly. I'm still investigating, toward a potential PR (in one or more of the involved gems).
Or maybe there's other existing API not mentioned in the README that would be better to use for this, either as-is, or with some modification.
Do you have any thoughts? Thanks!
This publication:
@incollection{hrimech1998spontaneous,
Author = {Hrimech, M. and Bouchard, Paul},
Container = {Developing paradigms in self-directed learning},
Date-Added = {2012-03-11 13:04:46 +0000},
Date-Modified = {2012-03-11 13:04:54 +0000},
Editor = {Long, H. and Associates},
Location = {Oklahoma, OK : Oklahoma},
Pages = {27–44},
Publisher = {University Press},
Title = {Spontaneous learning strategies in the natural setting},
Year = {1998},
Bdsk-File-1 = {YnBsaXN0MDDUAQIDBAUIJidUJHRvcFgkb2JqZWN0c1gkdmVyc2lvblkkYXJjaGl2ZXLRBgdUcm9vdIABqAkKFRYXGyIjVSRudWxs0wsMDQ4RFFpOUy5vYmplY3RzV05TLmtleXNWJGNsYXNzog8QgASABqISE4ACgAOAB1lhbGlhc0RhdGFccmVsYXRpdmVQYXRo0hgNGRpXTlMuZGF0YU8RAZgAAAAAAZgAAgAAB1NTREhvbWUAAAAAAAAAAAAAAAAAAAAAAAAAAMl5T9hIKwAAANrWUhpocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAETRzhy4IbIQAAAAAAAAAAAAIAAgAACSAAAAAAAAAAAAAAAAAAAAAHQmliZGVzawAAEAAIAADJeZYoAAAAEQAIAADLglNhAAAAAQAMANrWUgAXPTEAAZ9eAAIAOVNTREhvbWU6VXNlcnM6AFN0aWFuOgBCaWJkZXNrOgBocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZgAADgA2ABoAaAByAGkAbQBlAGMAaAAxADkAOQA4AHMAcABvAG4AdABhAG4AZQBvAHUAcwAuAHAAZABmAA8AEAAHAFMAUwBEAEgAbwBtAGUAEgAuVXNlcnMvU3RpYW4vQmliZGVzay9ocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZgATAAEvAAAVAAIADP//AACABdIcHR4fWCRjbGFzc2VzWiRjbGFzc25hbWWjHyAhXU5TTXV0YWJsZURhdGFWTlNEYXRhWE5TT2JqZWN0XxAoLi4vLi4vQmliZGVzay9ocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZtIcHSQloiUhXE5TRGljdGlvbmFyeRIAAYagXxAPTlNLZXllZEFyY2hpdmVyAAgAEQAWAB8AKAAyADUAOgA8AEUASwBSAF0AZQBsAG8AcQBzAHYAeAB6AHwAhgCTAJgAoAI8Aj4CQwJMAlcCWwJpAnACeQKkAqkCrAK5Ar4AAAAAAAACAQAAAAAAAAAoAAAAAAAAAAAAAAAAAAAC0A==}}
and this command cit = CiteProc.process item.to_citeproc, :style => :apa
crashes
/usr/local/lib/ruby/1.9.1/date.rb:1022:in new_by_frags': invalid date (ArgumentError) from /usr/local/lib/ruby/1.9.1/date.rb:1066:in
parse'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/date.rb:54:in parse_date!' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/date.rb:38:in
parse!'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/variable.rb:52:in initialize' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/variable.rb:47:in
new'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/variable.rb:47:in parse' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/item.rb:33:in
block in merge!'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/item.rb:33:in each_pair' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/item.rb:33:in
merge!'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/item.rb:14:in initialize' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:90:in
new'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:90:in block in import' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:89:in
each'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:89:in import' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:22:in
block in process'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:12:in initialize' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:18:in
new'
from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc/processor.rb:18:in process' from /usr/local/lib/ruby/gems/1.9.1/gems/citeproc-ruby-0.0.4/lib/citeproc.rb:82:in
process'
from bibtex-batch.rb:105:in block in <main>' from /usr/local/lib/ruby/gems/1.9.1/gems/bibtex-ruby-2.0.4/lib/bibtex/bibliography.rb:144:in
each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bibtex-ruby-2.0.4/lib/bibtex/bibliography.rb:144:in each' from bibtex-batch.rb:82:in
Note that I could not reproduce this from IRB (although the resulting citation is empty, so something is still going wrong):
irb(main):022:0> item = c[0]
=> #<BibTeX::Entry ./author = Hrimech, M. and Bouchard, Paul, ./container = Developing paradigms in self-directed learning, ./date-added = 2012-03-11 13:04:46 +0000, ./date-modified = 2012-03-11 13:04:54 +0000, ./editor = Long, H. and Associates, ./location = Oklahoma, OK : Oklahoma, ./pages = 27â44, ./publisher = University Press, ./title = Spontaneous learning strategies in the natural setting, ./year = 1998, ./bdsk-file-1 = YnBsaXN0MDDUAQIDBAUIJidUJHRvcFgkb2JqZWN0c1gkdmVyc2lvblkkYXJjaGl2ZXLRBgdUcm9vdIABqAkKFRYXGyIjVSRudWxs0wsMDQ4RFFpOUy5vYmplY3RzV05TLmtleXNWJGNsYXNzog8QgASABqISE4ACgAOAB1lhbGlhc0RhdGFccmVsYXRpdmVQYXRo0hgNGRpXTlMuZGF0YU8RAZgAAAAAAZgAAgAAB1NTREhvbWUAAAAAAAAAAAAAAAAAAAAAAAAAAMl5T9hIKwAAANrWUhpocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAETRzhy4IbIQAAAAAAAAAAAAIAAgAACSAAAAAAAAAAAAAAAAAAAAAHQmliZGVzawAAEAAIAADJeZYoAAAAEQAIAADLglNhAAAAAQAMANrWUgAXPTEAAZ9eAAIAOVNTREhvbWU6VXNlcnM6AFN0aWFuOgBCaWJkZXNrOgBocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZgAADgA2ABoAaAByAGkAbQBlAGMAaAAxADkAOQA4AHMAcABvAG4AdABhAG4AZQBvAHUAcwAuAHAAZABmAA8AEAAHAFMAUwBEAEgAbwBtAGUAEgAuVXNlcnMvU3RpYW4vQmliZGVzay9ocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZgATAAEvAAAVAAIADP//AACABdIcHR4fWCRjbGFzc2VzWiRjbGFzc25hbWWjHyAhXU5TTXV0YWJsZURhdGFWTlNEYXRhWE5TT2JqZWN0XxAoLi4vLi4vQmliZGVzay9ocmltZWNoMTk5OHNwb250YW5lb3VzLnBkZtIcHSQloiUhXE5TRGljdGlvbmFyeRIAAYagXxAPTlNLZXllZEFyY2hpdmVyAAgAEQAWAB8AKAAyADUAOgA8AEUASwBSAF0AZQBsAG8AcQBzAHYAeAB6AHwAhgCTAJgAoAI8Aj4CQwJMAlcCWwJpAnACeQKkAqkCrAK5Ar4AAAAAAAACAQAAAAAAAAAoAAAAAAAAAAAAAAAAAAAC0A==>
irb(main):023:0> cit = CiteProc.process item.to_citeproc, :style => :apa
=> "In ."
When I removed this one citation from the file of more than 1000, everything else processed swimmingly. Looking at it, I can't see immediately what is wrong. Automatically generated from BibDesk.
Updating citeproc-ruby from 1.1.8 to 1.1.10 (to get #54), also updates citeproc from 1.0.8 to 1.0.9.
When trying to launch my app, I now get the above message: "CiteProc requires the unicode_utils
or unicode
Gem on Ruby 2.3". I am pretty sure I did not get that before, and it's due to the update. Aha, yes. inukshuk/citeproc@c14d3cd
These gems are both pretty old, are they really needed on ruby 2.3, which has a lot of built in unicode? It looks like you determined upcase/downcase was not unicode aware on 2.3?
Updating only a patch level (1.1.8 => 1.1.10, and 1.0.8 => 1.0.9) resulting in a change that makes your app no longer boot when before it would, is kind of sad. I would have rather had it continue using the old upcase/downcase if unicode utils are missing, but with a warning. And if the issue mentioned an example of the problem it was trying to fix, that'd be awesome too.
When generating a Chicago style citation, we want to truncate long author lists with , et al.
after 5 authors, when using the chicago-author-name
style from the csl-styles gem. For example, given this citeproc-ruby input:
csl_citation_data = {"id"=>"sulpub",
"type"=>"article-journal",
"author"=>[{"family"=>"Sohl", "given"=>"G."}, {"family"=>"Odermatt", "given"=>"B."}, {"family"=>"Maxeiner", "given"=>"S."}, {"family"=>"Degen", "given"=>"J."}, {"family"=>"Willecke", "given"=>"K."}, {"family"=>"SecondLast", "given"=>"T."}, {"family"=>"Last", "given"=>"O."}],
"title"=>"New insights into the expression and function of neural connexins with transgenic mouse mutants",
"page"=>"245-259",
"publisher"=>"ELSEVIER SCIENCE BV",
"container-title"=>"BRAIN RESEARCH REVIEWS",
"volume"=>"47",
"issue"=>"1-3",
"issued"=>{"date-parts"=>[["2004"]]}}
item = CiteProc::CitationItem.new id: 'sulpub'
item.data = CiteProc::Item.new(csl_citation_data)
csl_style = CSL::Style.load('chicago-author-date')
csl_renderer = CiteProc::Ruby::Renderer.new format: 'html'
csl_renderer.render item, csl_style.bibliography
#=> "Sohl, G., B. Odermatt, S. Maxeiner, J. Degen, K. Willecke, T. SecondLast, and O. Last. 2004. “New Insights into the Expression and Function of Neural Connexins with Transgenic Mouse Mutants.” <i>BRAIN RESEARCH REVIEWS</i> 47 (1-3). ELSEVIER SCIENCE BV: 245–59."
We want to get back a truncated author list, i.e.
expected: "Sohl, G., B. Odermatt, S. Maxeiner, J. Degen, K. Willecke, et al. 2004. ...
got: "Sohl, G., B. Odermatt, S. Maxeiner, J. Degen, K. Willecke, T. SecondLast, and O. Last. 2004. ... "
XML comments (i.e. ) in CSL files cause citeproc-ruby to die with the following error:
ERROR CiteProc : failed to process item {"id"=>, "author"=>[Edgar Allen Poe], "title"=>Poetry, Tales, and Selected Essays, "type"=>book, "issued"=>{"date-parts"=>[[1996]], "literal"=>nil}, "editor"=>[Patrick F. Quinn, G.R. Thompson], "publisher"=>Library of America, "publisher-place"=>New York}:
undefined method `evaluate' for {"node"=>"CSL::Nodes::Node"}:CSL::Nodes::Node
I'm pretty sure it is because the Node factory does not know the Comment
XML node and thus creates a Node instance. This instance, however, does not have an evaluate method.
I currently see three possible solutions:
evaluate
method to Nodedef evaluate(data, processor)
false
end
All options have (little) pros and cons, so I leave it up to you to decide :)
Hi, thanks for writing all this stuff! I am looking at it to see how to use it to do what I need, and I notice there is this gem, citeproc-ruby
, which depends on another gem, citeproc. Can you explain the motivation or division of responsibilities between these two gems? It would help me understand the code. The gem just called citeproc
is, of course, in ruby, just like this gem citeproc-ruby
is!
I am looking to use the ruby citeproc gems to test styles that are not in csl/styles
-- how would I feed the style to the processor in this case?
I am having trouble getting date ranges to render.
I am not sure if I am doing something wrong, it is a bug in my input, or it is a bug in the CSL style (or perhaps the CSL style I am using refuses to do it?). But looking at the CSL docs and playing with custom CSL styles... I don't think it's the CSL style.
I don't see any examples of date ranges in spec/citeproc/ruby/renderer/date_spec.rb. Or can't find any other examples in specs to use as a guide.
Is it possible date ranges don't work? Or aren't being properly imported from CSL data input json?
Can you provide any advice, or a working example of something rendering a date range, like "1900-1910" when that's in the citation?
I was trying to generate a citation with only the author. As described in this feature:
But this might not work anymore? I pulled the code and run that feature in local and have this failure:
Is there anything that might have broken this? And why cucumber tests are not running in Travis?
suppress-author
in the other hand is working fine
Anything I could help with? I might include here rubocop & gemfile.lock too
I'm trying to use citeproc-ruby to generate HTML from BibTeX. It doesn't seem to convert much to HTML, though. Given the file test.bib
@Article{dashes,
author = {Joe Bloggs},
title = {I like --- em --- dashes},
journal = {Journal of 'apostrophes'},
year = 2011,
url = {http://www.example.com/}
}
the code
#!/usr/bin/env ruby
require 'citeproc'
require 'bibtex'
bib = BibTeX.open('test.bib', :filter => :latex)
puts "<html><body>"
puts CiteProc.process bib.to_citeproc, :style => 'apa', :format => 'html'
puts "</body></html>"
gives me
Bloggs, J., 2011. I like — em — dashes. Journal of ’apostrophes’, 3–5. Available at: http://www.example.com/.
whereas I would have expected to see something more like
Bloggs, J. (2011). I like — em — dashes. Journal of ‘ apostrophes ’, 3—5. Available at: <a href="http://www.example.com/">http://www.example.com/</a>.
Is there a filter that I need to pass?
Hi,
I've been (very happily) using the citeproc-ruby gem, together with bibtex-ruby, for the last year, until I needed to update my Ruby version to 1.9.3... When I try to process an entry, I get the following:
1.9.3-p125 :015 > CiteProc.process(book)
NoMethodError: undefined method `stringify_keys' for {"delimiter"=>" ", "node"=>"CSL::Nodes::Group"}:CSL::Nodes::Group
from /Users/luisf/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.10/lib/active_record/attribute_assignment.rb:69:in `assign_attributes'
I know that in the documentation you explicitly say that the version 0.0.x of this gem is not supposed to work on Ruby 1.9.3; I've already tried to run the new citeproc and citeproc-js gems, also with no success (I had issues installing the johnston gem).
I'd be very interested in continuing to use this gem with Ruby 1.9.3 - what are my options (if any)?
Many thanks!
Luis
Am I using the API correctly? I tried to render an inline citation using a numeric style, expecting output such as [1]
, [2]
etc. but am seeing an empty string instead. Is there an alternative method here? The default citation style (chicago-author-date) works as expected, so I'm assuming this is specific to numeric styles.
Apologies if this belongs in a different repository, unsure if it is citeproc or style-specific.
bibliography = BibTeX.parse <<-END
@book{key16,
year = {2016},
publisher = {Publisher},
editor = {Editor},
title = {Title 16},
author = {Author}
}
END
processor = CiteProc::Processor.new(style: :'institute-of-physics-numeric',
format: 'text')
processor.import bibliography.to_citeproc
processor.render :citation, id: 'key16' # returns empty string
default_processor = CiteProc::Processor.new(style: :'chicago-author-date',
format: 'text')
default_processor.import bibliography.to_citeproc
default_processor.render :citation, id: 'key16' # returns "(Author 2016)"
I'm currently assembling a sample rendering using
result = ''
cp = CiteProc::Processor.new(style: style, format: 'html')
cp.import(items)
items.each_slice(2){|citation|
result += cp.process(citation.map{|i| { 'id' => i['id'] } }) + "<br/>\n"
}
result += "<hr/>\n"
cp.bibliography.each{|line| result += line + "<br/>\n" }
but for acta-naturae.csl
I'm getting [,]
for the results from cp.process
. I think this may be a footnote style -- should I get the footnote text differently? I realize this sample may be too sparse, I'll be glad to elaborate where required.
When trying the following code with citeproc-ruby 1.1.5:
require 'citeproc'
require 'csl/styles'
cp = CiteProc::Processor.new format: 'html'
cp << CiteProc::CitationItem.new(
:id => 'test',
:author => 'First Last',
:'container-title' => 'one & two & three',
)
puts cp.render(:bibliography, id: 'test').first
the output is
Last, First. n.d. <i>One &Amp; Two &Amp; Three</i>.
whereas it should be
Last, First. n.d. <i>One & Two & Three</i>.
Note how the &
escape sequence incorrectly was capitalized; i.e., it seems that capitalization is applied after HTML instead of before, while it should be the other way round.
I want to render styles in both the CSL::Style.root
directory and the dependent
sub directory, currently i can only render styles in the CSL::Style.root
and not the dependent
sub dir. How to do this?
This works fine because the apa
style sits in the CSL::Style.root
directory:
require 'citeproc'
require 'csl/styles'
cp = CiteProc::Processor.new style: "apa", format: 'html'
cp << CiteProc::Item.new(:id => 'theid', :title => 'The Title')
cp.render :bibliography, id: 'theid'
If I want try to render the 3-biotech
style (which sits in the dependent
sub directory) I get error:
cp = CiteProc::Processor.new style: "3-biotech", format: 'html'
cp << CiteProc::Item.new(:id => 'theid', :title => 'The Title')
cp.render :bibliography, id: 'theid'
CSL::ParseError: failed to extract CSL data from "3-biotech": No such file or directory @ rb_sysopen - 3-biotech
from /home/resrev/.rvm/gems/ruby-2.3.1/gems/csl-1.4.5/lib/csl/loader.rb:90:in `rescue in extract_data_from'
from /home/resrev/.rvm/gems/ruby-2.3.1/gems/csl-1.4.5/lib/csl/loader.rb:88:in `extract_data_from'
from /home/resrev/.rvm/gems/ruby-2.3.1/gems/csl-1.4.5/lib/csl/loader.rb:31:in `load'
I think this is because the CSL::Style.root
is not pointing to this dependent
sub directory - but if I change this to point to the sub directory i wont be able to call the apa
style any longer as its in the parent directory?
Even if I do make this change, i get another error:
CSL::Style.root = File.join(CSL::Style.root,"dependent")
cp.render :bibliography, id: 'theid'
ArgumentError: no CSL node: nil
from /home/resrev/.rvm/gems/ruby-2.3.1/gems/citeproc-ruby-1.1.6/lib/citeproc/ruby/renderer.rb:37:in `render'
from /home/resrev/.rvm/gems/ruby-2.3.1/gems/citeproc-ruby-1.1.6/lib/citeproc/ruby/engine.rb:95:in `block in render'
from /home/resrev/.rvm/gems/ruby-2.3.1/gems/citeproc-1.0.5/lib/citeproc/citation_data.rb:177:in `each'
from /home/resrev/.rvm/gems/ruby-2.3.1/gems/citeproc-1.0.5/lib/citeproc/citation_data.rb:177:in `each'
from /home/resrev/.rvm/gems/ruby-2.3.1/gems/citeproc-ruby-1.1.6/lib/citeproc/ruby/engine.rb:93:in `map'
from /home/resrev/.rvm/gems/ruby-2.3.1/gems/citeproc-ruby-1.1.6/lib/citeproc/ruby/engine.rb:93:in `render'
from /home/resrev/.rvm/gems/ruby-2.3.1/gems/citeproc-1.0.5/lib/citeproc/processor.rb:113:in `render'
from (irb):23
Thanks for this nice library btw :)
I am using Jekyll-Scholar with a custom CSL and cannot make the word "pages" appear in the reference.
The issue is with the label
for variable pages
. As described in CSL specification for Label, I want to get e.g. "pages 342-351" output in the reference. To achieve that, I am using the following group:
<group delimiter=" ">
<label variable="page"/>
<text variable="page"/>
</group>
However, Jekyll-Scholar seems to omit the word "page/pages" and only outputs the number. I have created a gist with a minimal CSL (which only outputs this group) and a bib file with pages
attribute to reproduce.
Am I doing something wrong or is this not supported yet?
Hello!
First, thank you for making such a wonderful library.
From reading the documentation, it looks like the CiteProc::Processor only accepts BibTex references as in input, e.g.
cp = CiteProc::Processor.new style: 'apa', format: 'text'
cp.import BibTeX.open('./references.bib').to_citeproc
Is there support for importing references as unstructured text or as an array (or hash) of CSL-JSON objects? I have both.
Thanks.
Using citeproc-ruby (1.1.8)
def generate_csl_citation(csl_citation_data, csl_style)
item = CiteProc::CitationItem.new(id: 'sulpub')
item.data = CiteProc::Item.new(csl_citation_data)
csl_renderer = CiteProc::Ruby::Renderer.new(format: 'html')
csl_renderer.render item, csl_style.bibliography
end
conference_pub_in_journal_hash
=> {:title=>"My test title",
:type=>"paper-conference",
:articlenumber=>33,
:pages=>"33-56",
:author=>[{:name=>"Smith, Jack", :role=>"editor"}, {:name=>"Sprat, Jill", :role=>"editor"}, {:name=>"Jones, P. L."}, {:firstname=>"Alan", :middlename=>"T", :lastname=>"Jackson"}],
:year=>"1987",
:supplement=>"33",
:publisher=>"Some Publisher",
:journal=>{:name=>"Some Journal Name", :volume=>33, :issue=>32, :year=>1999},
:conference=>{:name=>"The Big Conference", :year=>2345, :number=>33, :location=>"Knoxville, TN", :city=>"Knoxville", :statecountry=>"TN"}}
# same data mapped into a CSL doc
csl_doc
=> {"id"=>"sulpub",
"type"=>"article-journal",
"author"=>[{"family"=>"Jones", "given"=>" P. L."}, {"family"=>"Jackson", "given"=>" Alan T."}],
"title"=>"My test title",
"chapter-number"=>33,
"page"=>"33-56",
"publisher"=>"Some Publisher",
"container-title"=>"Some Journal Name",
"volume"=>33,
"issue"=>32,
"issued"=>{"date-parts"=>[["1987"]]},
"number"=>33,
"event"=>"The Big Conference",
"event-date"=>{"date-parts"=>[[2345]]},
"event-place"=>"Knoxville,TN"}
# page data in the CSL doc hash
conference_pub_in_journal_hash[:pages]
=> "33-56"
conference_pub_in_journal_hash[:pages].encoding
=> #<Encoding:UTF-8>
conference_pub_in_journal_hash[:pages].bytes
=> [51, 51, 45, 53, 54]
# same chars in the csl_doc
csl_doc['page'].bytes
=> [51, 51, 45, 53, 54]
# the result of mapping into a Chicago citation using the method above with
# CSL::Style.load('chicago-author-date')
chicago_citation
=> "Jones, P. L., and Alan T. Jackson. 1987. “My Test Title.” <i>Some Journal Name</i> 33 (32). Some Publisher: 33–56."
chicago_citation.encoding
=> #<Encoding:UTF-8>
# the pages have some weird characters in the page separator
chicago_citation.bytes[-8..-2]
=> [51, 51, 226, 128, 147, 53, 54]
The modern-language-association-8th-edition style sorts by author
, and then title
. However, the author
has a substitution of title
. The style has the the title
quoted in some circumstances.
When citeproc-ruby is doing the sort comparison, it is rendering author
as a string to use in the sorting comparison. For sources with only a title
and container-title
the author is then rendered as "title"
which messes up the string comparison due to the leading "
.
I get tons of these kinds of errors when running under Ruby 2.0:
ERROR CiteProc : failed to format string "vols.": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode
ERROR CiteProc : failed to format string "vol.": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode
ERROR CiteProc : failed to format string "retrieved": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode
ERROR CiteProc : failed to format string "vols.": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode
ERROR CiteProc : failed to format string "vol.": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode
ERROR CiteProc : failed to format string "retrieved": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode
I see how I can create (Author, Year) citations, but how can I make Author (Year) citations?
require 'bibtex'
is needed.
When using that style I get this error: no CSL node:
coming from https://github.com/inukshuk/citeproc-ruby/blob/master/lib/citeproc/ruby/renderer.rb#L38
Any hints on how to fix this?
Is it possible to render more than one citation at the same time? I saw there is an items
property but not sure if implemented. I was looking for something like this:
cp.render :citation, items: [{ id: 'knuth' }, { id: 'knuth2' }] # output: (Knuth, 1968; Knuth2, 1968)
Is it possible to get only one field processed through the citation style. For example, suppose I want only the author names being processed ...
Hi @inukshuk . I'd like to PR a convenience API for rendererer, like we were talking about, that makes it easier for the use case "I have a citation, I want to format it on it's own, not as part of a bibliography".
The main fairly simple thing I think this needs, over what's there now, is a method that takes a ruby Hash with the json representation of a citation according to the csl-data.json schema.
(As an aside, I'm not sure what this Hash thing is called. I've seen it called "CSL-json", and "Citeproc-json", and then the schema has the word "data" in it suggesting "CSL Data Json". Or we could call it CSL Citation Json or CSL Reference Json, since it's a representation of a single citation/reference. But I've never seen it called that. Any idea what the current community popular thing to call this thing is?)
Anyway, adding this convenience API is fairly simple, but I can think of two ways to do it, and I'm not sure which is best.
def render_from_hash(csl_json_hash, style_mode)
citation_item = CiteProc::CitationItem.new() do |c|
c.data = CiteProc::Item.new(csl_json_hash)
end
render citation_item, style_mode
end
renderer.render_from_hash(csl_data_json_hash,
CSL::Style.load("chicago-bibliography-notes").bibliography)
Downsides maybe only that it's confusing ot figure out how to name it, confusing that there are two "render" methods, adds to the public API size.
CiteProc::CitationItem
(as it assumes now), or csl-json-hash that it converts into one. Something like: def render(item, node)
unless item.is_a?(CiteProc::CitationItem)
item = CiteProc::CitationItem.new() do |c|
c.data = CiteProc::Item.new(csl_json_hash)
end
end
raise ArgumentError, "no CSL node: #{node.inspect}" unless
node.respond_to?(:nodename)
specialize = "render_#{node.nodename.tr('-', '_')}"
raise ArgumentError, "#{specialize} not implemented" unless
respond_to?(specialize, true)
format! send(specialize, item, node), node
end
Disadvantages might be that it makes it kind of confusing that the same method can take different kinds of arguments, makes it maybe non-obvious that passing an actual CitationItem is the preferred simplest way when it is not inconvenient, and it might be a slightly at least potential performance hit to have to check #is_a?
every time you do #render
Any thoughts on which of these approaches is preferable @inukshuk ?
Based on the BibTeX standard, page numbers should be separated by a --
.
The CSL file that covers BibTeX does not specify this. Theoretically, the way to fix this is to apply a locale definition to the bibtex.csl file:
<locale>
<terms>
<term name="page-range-delimiter">--</term>
</terms>
</locale>
However, citeproc-ruby doesn't seem to pick this local locale
tag, and seems to continue to rely on the locale file. According to the 1.0.1 docs, the order of operations for choosing locale is to [let the style doc override the general locale definition](http://docs.citationstyles.org/en/latest/specification.html#locale.
Is this a known issue, or am I doing something incorrect?
The fixture data for apa.csl
was last updated 4 years ago. Is it time to pull in an update from
https://github.com/citation-style-language/styles/blob/master/apa.csl
Found this issue in the modern-language-association-8th-edition.csl
In the MLA8 style, if I don't provide an author, but have the title and container-title, then the container-title is not being put into the citation.
In the MLA8 csl the author names macro includes several substitutions, the last one calling to the "title" macro. The "title" macro in turn decides whether to use quotes around the "title" variable or to italicize it by checking if the "container-title" variable is empty. The use of "container-title" variable in this conditional in the substitution is causing it to be marked as suppressed and so it is not output later on. I believe this should not be the case. I've tried the same situation on citeproc-js and the container-title displays as I expected.
Here's a gist with a failing spec
https://gist.github.com/lightman76/d61ef640e9caa269bfe0ef0fe829c6e43
I'm pretty new to the csl/citeproc world, so trying to get my head around all of it. I'll try to provide a pull request. Please let me know though if you think I've misunderstood the cause of the problem I'm seeing with MLA8.
Hi,
I tried formatting some BibTeX files with bibtex-ruby and citeproc-ruby and encountered a problem when author names contain umlauts (ä, ö, ü). The problem seems to lie with citeproc-ruby (note the family name with an umlaut):
book = {
'author' => [{ 'given' => 'Edgar Allen', 'family' => 'Müller' }],
'title' => 'Poetry, Tales, and Selected Essays',
'type' => 'book',
'issued' => { 'date-parts' => [[1996]] },
'editor' => [{ 'family' => 'Quinn', 'given' => 'Patrick F.'}, { 'family' => 'Thompson', 'given' => 'G.R.' }],
'publisher' => 'Library of America',
'publisher-place' => 'New York'
}
>> CiteProc.process(book)
=> "M\303\274llerEdgar. (1996). Poetry, Tales, and Selected Essays. (P. F. Quinn & G. R. Thompson, Eds., , Tran.). New York: Library of America."
As you can see the family and given name are mangled. Without the umlaut everything is fine:
book = {
'author' => [{ 'given' => 'Edgar Allen', 'family' => 'Mueller' }],
'title' => 'Poetry, Tales, and Selected Essays',
'type' => 'book',
'issued' => { 'date-parts' => [[1996]] },
'editor' => [{ 'family' => 'Quinn', 'given' => 'Patrick F.'}, { 'family' => 'Thompson', 'given' => 'G.R.' }],
'publisher' => 'Library of America',
'publisher-place' => 'New York'
}
>> CiteProc.process(book)
=> "Mueller, E. A. (1996). Poetry, Tales, and Selected Essays. (P. F. Quinn & G. R. Thompson, Eds., , Tran.). New York: Library of America."
I wrote a simple script which I executed line for line in IRB and MacIRB:
require 'rubygems'
require 'bibtex'
require 'citeproc'
require 'yaml'
b = "@incollection{degroot2010teachers,
Author = {De Groot, Reuma},
Booktitle = {Educational technologies for teaching argumentation skills.},
Date-Added = {2011-06-05 19:53:31 +0800},
Date-Modified = {2011-06-16 18:01:44 +0800},
Editor = {Pinkwart, N. and McLaren, B. M.},
Publisher = {Sharjah: Bentham Science Publishers},
Title = {Use of the Argunaut system in the classroom},
Year = {2010}}"
bib = BibTeX.parse(b)
cit = bib.to_citeproc
CiteProc.process(cit)
With MRI, there is no surprise:
[~] irb 22:22:01
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'bibtex'
=> true
irb(main):003:0> require 'citeproc'
=> true
irb(main):004:0> require 'yaml'
=> false
irb(main):005:0>
irb(main):006:0* b = "@incollection{degroot2010teachers,
irb(main):007:0" Author = {De Groot, Reuma},
irb(main):008:0" Booktitle = {Educational technologies for teaching argumentation skills.},
irb(main):009:0" Date-Added = {2011-06-05 19:53:31 +0800},
irb(main):010:0" Date-Modified = {2011-06-16 18:01:44 +0800},
irb(main):011:0" Editor = {Pinkwart, N. and McLaren, B. M.},
irb(main):012:0" Publisher = {Sharjah: Bentham Science Publishers},
irb(main):013:0" Title = {Use of the Argunaut system in the classroom},
irb(main):014:0" Year = {2010}}"
=> "@incollection{degroot2010teachers,\nAuthor = {De Groot, Reuma},\nBooktitle = {Educational technologies for teaching argumentation skills.},\nDate-Added = {2011-06-05 19:53:31 +0800},\nDate-Modified = {2011-06-16 18:01:44 +0800},\nEditor = {Pinkwart, N. and McLaren, B. M.},\nPublisher = {Sharjah: Bentham Science Publishers},\nTitle = {Use of the Argunaut system in the classroom},\nYear = {2010}}"
irb(main):015:0>
irb(main):016:0* bib = BibTeX.parse(b)
=> #<BibTeX::Bibliography data=[1]>
irb(main):017:0> cit = bib.to_citeproc
=> [{"id"=>"degroot2010teachers", "type"=>"chapter", "author"=>[{"family"=>"De Groot", "given"=>"Reuma"}], "container-title"=>"Educational technologies for teaching argumentation skills.", "date-added"=>"2011-06-05 19:53:31 +0800", "date-modified"=>"2011-06-16 18:01:44 +0800", "editor"=>[{"family"=>"Pinkwart", "given"=>"N."}, {"family"=>"McLaren", "given"=>"B. M."}], "publisher"=>"Sharjah: Bentham Science Publishers", "title"=>"Use of the Argunaut system in the classroom", "issued"=>{"date-parts"=>[[2010]]}}]
irb(main):018:0> CiteProc.process(cit)
=> "De Groot, R. (2010). Use of the Argunaut system in the classroom. In N. Pinkwart & B. M. McLaren (Eds.), (Tran.), Educational technologies for teaching argumentation skills.. Sharjah: Bentham Science Publishers."
irb(main):019:0>
but with MacIRB, it spits out lots of stuff, takes a while, and the final citation is incomplete:
[~] macirb 22:22:17
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'bibtex'
=> true
irb(main):003:0> require 'citeproc'
WARNING: Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 2.7.3
=> true
irb(main):004:0> require 'yaml'
=> false
irb(main):005:0>
=> nil
irb(main):006:0> b = "@incollection{degroot2010teachers,
irb(main):007:1> Author = {De Groot, Reuma},
irb(main):008:1> Booktitle = {Educational technologies for teaching argumentation skills.},
irb(main):009:1> Date-Added = {2011-06-05 19:53:31 +0800},
irb(main):010:1> Date-Modified = {2011-06-16 18:01:44 +0800},
irb(main):011:1> Editor = {Pinkwart, N. and McLaren, B. M.},
irb(main):012:1> Publisher = {Sharjah: Bentham Science Publishers},
irb(main):013:1> Title = {Use of the Argunaut system in the classroom},
irb(main):014:0> Year = {2010}}"
=> "@incollection{degroot2010teachers,\n Author = {De Groot, Reuma},\n Booktitle = {Educational technologies for teaching argumentation skills.},\n Date-Added = {2011-06-05 19:53:31 +0800},\n Date-Modified = {2011-06-16 18:01:44 +0800},\n Editor = {Pinkwart, N. and McLaren, B. M.},\n Publisher = {Sharjah: Bentham Science Publishers},\n Title = {Use of the Argunaut system in the classroom},\nYear = {2010}}"
irb(main):015:0>
=> nil
irb(main):016:0> bib = BibTeX.parse(b)
=> #<BibTeX::Bibliography data=[1]>
irb(main):017:0> cit = bib.to_citeproc
=> [{"id"=>"degroot2010teachers", "type"=>"chapter", "author"=>"De Groot, Reuma", "container-title"=>"Educational technologies for teaching argumentation skills.", "date-added"=>"2011-06-05 19:53:31 +0800", "date-modified"=>"2011-06-16 18:01:44 +0800", "editor"=>"Pinkwart, N. and McLaren, B. M.", "publisher"=>"Sharjah: Bentham Science Publishers", "title"=>"Use of the Argunaut system in the classroom", "issued"=>{"date-parts"=>[[2010]]}}]
irb(main):018:0> CiteProc.process(cit)
ERROR CiteProc : failed to process item #<CiteProc::Item:0x400ddc660 @attributes={"id"=>#<CiteProc::Variable:0x400ddc9a0 @attributes={"value"=>"degroot2010teachers"} @key_filter={"value"=>"value"} @value_filter={"degroot2010teachers"=>"degroot2010teachers"}>, "type"=>#<CiteProc::Variable:0x400dc4860 @attributes={"value"=>"chapter"} @key_filter={"value"=>"value"} @value_filter={"chapter"=>"chapter"}>, "author"=>#<CiteProc::Name:0x400dc05e0 @attributes={"family"=>"De Groot", "given"=>"Reuma"} @key_filter={"family"=>"family", "given"=>"given"} @value_filter={"De Groot"=>"De Groot", "Reuma"=>"Reuma"}>, "container-title"=>#<CiteProc::Variable:0x400db7f20 @attributes={"value"=>"Educational technologies for teaching argumentation skills."} @key_filter={"value"=>"value"} @value_filter={"Educational technologies for teaching argumentation skills."=>"Educational technologies for teaching argumentation skills."}>, "date-added"=>#<CiteProc::Variable:0x400db7f80 @attributes={"value"=>"2011-06-05 19:53:31 +0800"} @key_filter={"value"=>"value"} @value_filter={"2011-06-05 19:53:31 +0800"=>"2011-06-05 19:53:31 +0800"}>, "date-modified"=>#<CiteProc::Variable:0x400db8280 @attributes={"value"=>"2011-06-16 18:01:44 +0800"} @key_filter={"value"=>"value"} @value_filter={"2011-06-16 18:01:44 +0800"=>"2011-06-16 18:01:44 +0800"}>, "editor"=>#<CiteProc::Name:0x400db0920 @attributes={"family"=>"Pinkwart", "given"=>"N. and McLaren"} @key_filter={"family"=>"family", "given"=>"given"} @value_filter={"Pinkwart"=>"Pinkwart", "N. and McLaren"=>"N. and McLaren"}>, "publisher"=>#<CiteProc::Name:0x400db0f00 @attributes={"family"=>"Sharjah: Bentham Science Publishers"} @key_filter={"family"=>"family"} @value_filter={"Sharjah: Bentham Science Publishers"=>"Sharjah: Bentham Science Publishers"}>, "title"=>#<CiteProc::Variable:0x400da96a0 @attributes={"value"=>"Use of the Argunaut system in the classroom"} @key_filter={"value"=>"value"} @value_filter={"Use of the Argunaut system in the classroom"=>"Use of the Argunaut system in the classroom"}>, "issued"=>#<CiteProc::Date:0x400da9ae0 @attributes={"date-parts"=>[[2010]]} @key_filter={"date-parts"=>"date-parts"} @value_filter={[[2010]]=>[[2010]]}>} @key_filter={"id"=>"id", "prefix"=>"prefix", "author"=>"author"} @observer_state=false>: undefined method `map' for #<CiteProc::Name:0x400dc05e0 ...>
ERROR CiteProc : failed to process item #<CiteProc::Item:0x400ddc660 @attributes={"id"=>#<CiteProc::Variable:0x400ddc9a0 @attributes={"value"=>"degroot2010teachers"} @key_filter={"value"=>"value"} @value_filter={"degroot2010teachers"=>"degroot2010teachers"}>, "type"=>#<CiteProc::Variable:0x400dc4860 @attributes={"value"=>"chapter"} @key_filter={"value"=>"value"} @value_filter={"chapter"=>"chapter"}>, "author"=>#<CiteProc::Name:0x400dc05e0 @attributes={"family"=>"De Groot", "given"=>"Reuma"} @key_filter={"family"=>"family", "given"=>"given"} @value_filter={"De Groot"=>"De Groot", "Reuma"=>"Reuma"}>, "container-title"=>#<CiteProc::Variable:0x400db7f20 @attributes={"value"=>"Educational technologies for teaching argumentation skills."} @key_filter={"value"=>"value"} @value_filter={"Educational technologies for teaching argumentation skills."=>"Educational technologies for teaching argumentation skills."}>, "date-added"=>#<CiteProc::Variable:0x400db7f80 @attributes={"value"=>"2011-06-05 19:53:31 +0800"} @key_filter={"value"=>"value"} @value_filter={"2011-06-05 19:53:31 +0800"=>"2011-06-05 19:53:31 +0800"}>, "date-modified"=>#<CiteProc::Variable:0x400db8280 @attributes={"value"=>"2011-06-16 18:01:44 +0800"} @key_filter={"value"=>"value"} @value_filter={"2011-06-16 18:01:44 +0800"=>"2011-06-16 18:01:44 +0800"}>, "editor"=>#<CiteProc::Name:0x400db0920 @attributes={"family"=>"Pinkwart", "given"=>"N. and McLaren"} @key_filter={"family"=>"family", "given"=>"given"} @value_filter={"Pinkwart"=>"Pinkwart", "N. and McLaren"=>"N. and McLaren"}>, "publisher"=>#<CiteProc::Name:0x400db0f00 @attributes={"family"=>"Sharjah: Bentham Science Publishers"} @key_filter={"family"=>"family"} @value_filter={"Sharjah: Bentham Science Publishers"=>"Sharjah: Bentham Science Publishers"}>, "title"=>#<CiteProc::Variable:0x400da96a0 @attributes={"value"=>"Use of the Argunaut system in the classroom"} @key_filter={"value"=>"value"} @value_filter={"Use of the Argunaut system in the classroom"=>"Use of the Argunaut system in the classroom"}>, "issued"=>#<CiteProc::Date:0x400da9ae0 @attributes={"date-parts"=>[[2010]]} @key_filter={"date-parts"=>"date-parts", "literal"=>"literal"} @value_filter={[[2010]]=>[[2010]]}>} @key_filter={"id"=>"id", "prefix"=>"prefix", "author"=>"author", "issued"=>"issued", "type"=>"type", "shortTitle"=>"shortTitle", "short-title"=>"short-title", "title"=>"title", "editor"=>"editor"} @observer_state=false @observer_peers={#<CSL::Nodes::Group:0x400cc9720 @style=#<CSL::Style:0x400edf800 @attributes={:citation=>#<CSL::Citation:0x400ec3360 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Style:0x400edf800 ...> @layout=#<CSL::Nodes::Layout:0x400c0a100 @style=#<CSL::Style:0x400edf800 ...> @attributes={} @children=[#<CSL::Nodes::Group:0x400c870c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Layout:0x400c0a100 ...> @attributes={"delimiter"=>", "} @children=[#<CSL::Nodes::Text:0x400dc4720 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400c870c0 ...> @attributes={"macro"=>"author-short", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400ea20c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400c870c0 ...> @attributes={"macro"=>"issued-year", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400f20a00 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400c870c0 ...> @attributes={"macro"=>"citation-locator", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"}>]> @children=[#<CSL::Sort:0x400ec26c0 @node_name="sort" @children=[#<CSL::Key:0x400e99960 @node_name="key" @attributes={"macro"=>"author"} @parent=#<CSL::Sort:0x400ec26c0 ...>>, #<CSL::Key:0x400e6b7e0 @node_name="key" @attributes={"variable"=>"issued"} @parent=#<CSL::Sort:0x400ec26c0 ...>>] @parent=#<CSL::Citation:0x400ec3360 ...>>] @attributes={"delimiter"=>"; ", "suffix"=>")", "prefix"=>"("} @key_filter={"delimiter"=>"delimiter", "suffix"=>"suffix", "prefix"=>"prefix"} @value_filter={"; "=>"; ", ")"=>")", "("=>"("}>, :bibliography=>#<CSL::Bibliography:0x400f46b80 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Style:0x400edf800 ...> @layout=#<CSL::Nodes::Layout:0x400ee4620 @style=#<CSL::Style:0x400edf800 ...> @attributes={"suffix"=>"."} @children=[#<CSL::Nodes::Text:0x400e62d80 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Layout:0x400ee4620 ...> @attributes={"macro"=>"author", "suffix"=>"."} @children=[] @key_filter={"value"=>"value", "macro"=>"macro", "quotes"=>"quotes"}>, #<CSL::Nodes::Text:0x400da0d40 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Layout:0x400ee4620 ...> @attributes={"macro"=>"issued", "suffix"=>" "} @children=[] @key_filter={"value"=>"value", "macro"=>"macro", "quotes"=>"quotes"}>, #<CSL::Nodes::Group:0x400cc9720 ...>, #<CSL::Nodes::Text:0x400d1e6e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Layout:0x400ee4620 ...> @attributes={"macro"=>"locators"} @children=[]>, #<CSL::Nodes::Group:0x400cff340 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Layout:0x400ee4620 ...> @attributes={"delimiter"=>". ", "prefix"=>". "} @children=[#<CSL::Nodes::Text:0x400cd6fc0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400cff340 ...> @attributes={"macro"=>"publisher", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400cba100 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400cff340 ...> @attributes={"macro"=>"access", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"}>]> @children=[#<CSL::Sort:0x400c30660 @node_name="sort" @children=[#<CSL::Key:0x400bf07e0 @node_name="key" @attributes={"macro"=>"author"} @parent=#<CSL::Sort:0x400c30660 ...>>, #<CSL::Key:0x400ec2280 @node_name="key" @attributes={"variable"=>"issued"} @parent=#<CSL::Sort:0x400c30660 ...>>] @parent=#<CSL::Bibliography:0x400f46b80 ...>>]>, :locales=>[], :info=>{"title"=>"American Psychological Association", "id"=>"http://www.zotero.org/styles/apa", "link"=>"", "author"=>"Simon [email protected]", "contributor"=>"Richard [email protected]://arc.nucapt.northwestern.edu/Richard_Karnesky", "category"=>"", "updated"=>""}, :options=>{"class"=>"in-text", "lang"=>"en"}, :macros=>{"container-contributors"=>#<CSL::Nodes::Macro:0x400e4cbe0 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"container-contributors"} @children=[#<CSL::Nodes::Choose:0x400d4a9c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400e4cbe0 ...> @children=[#<CSL::Nodes::If:0x400e89800 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400d4a9c0 ...> @attributes={"type"=>"chapter"} @children=[#<CSL::Nodes::Text:0x400e67da0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400e89800 ...> @attributes={"suffix"=>" ", "term"=>"in", "text-case"=>"capitalize-first"} @children=[] @key_filter={"value"=>"value", "macro"=>"macro", "term"=>"term", "quotes"=>"quotes"}>, #<CSL::Nodes::Names:0x400ec6b00 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400e89800 ...> @attributes={"delimiter"=>", ", "suffix"=>", ", "variable"=>"editor translator"} @children=[#<CSL::Nodes::Name:0x400c24ce0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400ec6b00 ...> @attributes={"and"=>"symbol", "delimiter"=>", ", "initialize-with"=>". ", "delimiter-precedes-last"=>"false", "et-al-min"=>nil, "et-al-use-first"=>"1", "et-al-subsequent-min"=>nil, "et-al-subsequent-use-first"=>nil, "name-as-sort-order"=>nil, "sort-separator"=>nil, "delimiter-precedes-et-al"=>nil, "form"=>nil, "demote-non-dropping-particle"=>nil, "initialize-with-hyphen"=>nil} @children=[] @key_filter={"and"=>"and", "delimiter-precedes-last"=>"delimiter-precedes-last", "et-al-min"=>"et-al-min", "et-al-use-first"=>"et-al-use-first", "et-al-subsequent-min"=>"et-al-subsequent-min", "et-al-subsequent-use-first"=>"et-al-subsequent-use-first", "initialize-with"=>"initialize-with", "name-as-sort-order"=>"name-as-sort-order", "sort-separator"=>"sort-separator", "delimiter-precedes-et-al"=>"delimiter-precedes-et-al", "form"=>"form", "delimiter"=>"delimiter", "demote-non-dropping-particle"=>"demote-non-dropping-particle", "initialize-with-hyphen"=>"initialize-with-hyphen"} @value_filter={nil=>nil}>, #<CSL::Nodes::Label:0x400ca63a0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400ec6b00 ...> @attributes={"form"=>"short", "prefix"=>" (", "suffix"=>".)", "text-case"=>"capitalize-first"} @children=[]>] @key_filter={"delimiter"=>"delimiter", "variable"=>"variable"}>] @key_filter={"disambiguate"=>"disambiguate", "is-numeric"=>"is-numeric", "is-uncertain-date"=>"is-uncertain-date", "locator"=>"locator", "position"=>"position", "type"=>"type", "match"=>"match"}>]>]>, "secondary-contributors"=>#<CSL::Nodes::Macro:0x400d453a0 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"secondary-contributors"} @children=[#<CSL::Nodes::Choose:0x400f4b3a0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400d453a0 ...> @children=[#<CSL::Nodes::If:0x400f3b620 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400f4b3a0 ...> @attributes={"match"=>"none", "type"=>"chapter"} @children=[#<CSL::Nodes::Names:0x400f1e440 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400f3b620 ...> @attributes={"delimiter"=>", ", "prefix"=>" (", "suffix"=>")", "variable"=>"editor translator"} @children=[#<CSL::Nodes::Name:0x400ee8cc0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400f1e440 ...> @attributes={"and"=>"symbol", "delimiter"=>", ", "initialize-with"=>". ", "delimiter-precedes-last"=>"false", "et-al-min"=>nil, "et-al-use-first"=>"1", "et-al-subsequent-min"=>nil, "et-al-subsequent-use-first"=>nil, "name-as-sort-order"=>nil, "sort-separator"=>nil, "delimiter-precedes-et-al"=>nil, "form"=>nil, "demote-non-dropping-particle"=>nil, "initialize-with-hyphen"=>nil} @children=[] @key_filter={"and"=>"and", "delimiter-precedes-last"=>"delimiter-precedes-last", "et-al-min"=>"et-al-min", "et-al-use-first"=>"et-al-use-first", "et-al-subsequent-min"=>"et-al-subsequent-min", "et-al-subsequent-use-first"=>"et-al-subsequent-use-first", "initialize-with"=>"initialize-with", "name-as-sort-order"=>"name-as-sort-order", "sort-separator"=>"sort-separator", "delimiter-precedes-et-al"=>"delimiter-precedes-et-al", "form"=>"form", "delimiter"=>"delimiter", "demote-non-dropping-particle"=>"demote-non-dropping-particle", "initialize-with-hyphen"=>"initialize-with-hyphen"} @value_filter={nil=>nil}>, #<CSL::Nodes::Label:0x400e437a0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400f1e440 ...> @attributes={"form"=>"short", "prefix"=>", ", "suffix"=>".", "text-case"=>"capitalize-first"} @children=[]>] @key_filter={"delimiter"=>"delimiter"}>]>]>]>, "author"=>#<CSL::Nodes::Macro:0x400dfde80 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"author"} @children=[#<CSL::Nodes::Names:0x400dcc3c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400dfde80 ...> @attributes={"variable"=>"author", "delimiter"=>nil} @children=[#<CSL::Nodes::Name:0x400db3340 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400dcc3c0 ...> @attributes={"and"=>"symbol", "delimiter"=>", ", "delimiter-precedes-last"=>"always", "initialize-with"=>". ", "name-as-sort-order"=>"all", "sort-separator"=>", ", "et-al-min"=>nil, "et-al-use-first"=>"1", "et-al-subsequent-min"=>nil, "et-al-subsequent-use-first"=>nil, "delimiter-precedes-et-al"=>nil, "form"=>nil, "demote-non-dropping-particle"=>nil, "initialize-with-hyphen"=>nil} @children=[] @key_filter={"and"=>"and", "delimiter-precedes-last"=>"delimiter-precedes-last", "et-al-min"=>"et-al-min", "et-al-use-first"=>"et-al-use-first", "et-al-subsequent-min"=>"et-al-subsequent-min", "et-al-subsequent-use-first"=>"et-al-subsequent-use-first", "initialize-with"=>"initialize-with", "name-as-sort-order"=>"name-as-sort-order", "sort-separator"=>"sort-separator", "delimiter-precedes-et-al"=>"delimiter-precedes-et-al", "form"=>"form", "delimiter"=>"delimiter", "demote-non-dropping-particle"=>"demote-non-dropping-particle", "initialize-with-hyphen"=>"initialize-with-hyphen"} @value_filter={nil=>nil}>, #<CSL::Nodes::Label:0x400cba0e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400dcc3c0 ...> @attributes={"form"=>"short", "prefix"=>" (", "suffix"=>".)", "text-case"=>"capitalize-first"} @children=[]>, #<CSL::Nodes::Substitute:0x400f52a00 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400dcc3c0 ...> @children=[#<CSL::Nodes::Names:0x400eb21e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Substitute:0x400f52a00 ...> @attributes={"variable"=>"editor", "delimiter"=>nil} @children=[] @key_filter={"delimiter"=>"delimiter"} @value_filter={nil=>nil}>, #<CSL::Nodes::Names:0x400d4c8e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Substitute:0x400f52a00 ...> @attributes={"variable"=>"translator", "delimiter"=>nil} @children=[] @key_filter={"delimiter"=>"delimiter"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400da9840 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Substitute:0x400f52a00 ...> @attributes={"macro"=>"title"} @children=[]>]>] @key_filter={"delimiter"=>"delimiter", "variable"=>"variable"} @value_filter={nil=>nil}>]>, "author-short"=>#<CSL::Nodes::Macro:0x400cc6540 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"author-short"} @children=[#<CSL::Nodes::Names:0x400d65040 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400cc6540 ...> @attributes={"variable"=>"author", "delimiter"=>nil} @children=[#<CSL::Nodes::Name:0x400f23ee0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400d65040 ...> @attributes={"and"=>"symbol", "delimiter"=>", ", "form"=>"short", "initialize-with"=>". ", "delimiter-precedes-last"=>"false", "et-al-min"=>nil, "et-al-use-first"=>"1", "et-al-subsequent-min"=>nil, "et-al-subsequent-use-first"=>nil, "name-as-sort-order"=>nil, "sort-separator"=>nil, "delimiter-precedes-et-al"=>nil, "demote-non-dropping-particle"=>nil, "initialize-with-hyphen"=>nil} @children=[] @key_filter={"and"=>"and", "delimiter-precedes-last"=>"delimiter-precedes-last", "et-al-min"=>"et-al-min", "et-al-use-first"=>"et-al-use-first", "et-al-subsequent-min"=>"et-al-subsequent-min", "et-al-subsequent-use-first"=>"et-al-subsequent-use-first", "initialize-with"=>"initialize-with", "name-as-sort-order"=>"name-as-sort-order", "sort-separator"=>"sort-separator", "delimiter-precedes-et-al"=>"delimiter-precedes-et-al", "form"=>"form", "delimiter"=>"delimiter", "demote-non-dropping-particle"=>"demote-non-dropping-particle", "initialize-with-hyphen"=>"initialize-with-hyphen"} @value_filter={nil=>nil}>, #<CSL::Nodes::Substitute:0x400ca6260 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400d65040 ...> @children=[#<CSL::Nodes::Names:0x400e22580 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Substitute:0x400ca6260 ...> @attributes={"variable"=>"editor", "delimiter"=>nil} @children=[] @key_filter={"delimiter"=>"delimiter"} @value_filter={nil=>nil}>, #<CSL::Nodes::Names:0x400e3b9e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Substitute:0x400ca6260 ...> @attributes={"variable"=>"translator", "delimiter"=>nil} @children=[] @key_filter={"delimiter"=>"delimiter"} @value_filter={nil=>nil}>, #<CSL::Nodes::Choose:0x400f33760 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Substitute:0x400ca6260 ...> @children=[#<CSL::Nodes::If:0x400e6c080 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400f33760 ...> @attributes={"type"=>"book"} @children=[#<CSL::Nodes::Text:0x400dc40a0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400e6c080 ...> @attributes={"font-style"=>"italic", "form"=>"short", "variable"=>"title"} @children=[]>]>, #<CSL::Nodes::Else:0x400c93540 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400f33760 ...> @children=[#<CSL::Nodes::Text:0x400458f20 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Else:0x400c93540 ...> @attributes={"form"=>"short", "quotes"=>"true", "variable"=>"title"} @children=[]>]>]>]>] @key_filter={"delimiter"=>"delimiter"} @value_filter={nil=>nil}>]>, "access"=>#<CSL::Nodes::Macro:0x400df2700 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"access"} @children=[#<CSL::Nodes::Choose:0x400cf77e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400df2700 ...> @children=[#<CSL::Nodes::If:0x400c93bc0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400cf77e0 ...> @attributes={"variable"=>"DOI"} @children=[#<CSL::Nodes::Text:0x400f55fc0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400c93bc0 ...> @attributes={"prefix"=>"doi: ", "variable"=>"DOI"} @children=[]>]>, #<CSL::Nodes::Else:0x400f27fa0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400cf77e0 ...> @children=[#<CSL::Nodes::Group:0x400f28080 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Else:0x400f27fa0 ...> @children=[#<CSL::Nodes::Text:0x400f10d20 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f28080 ...> @attributes={"suffix"=>" ", "term"=>"retrieved", "text-case"=>"capitalize-first", "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Date:0x400ea8960 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f28080 ...> @attributes={"suffix"=>", ", "variable"=>"accessed", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[#<CSL::Nodes::DatePart:0x400e53300 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Date:0x400ea8960 ...> @attributes={"name"=>"month", "suffix"=>" ", "range-delimiter"=>"–"} @children=[] @key_filter={"range-delimiter"=>"range-delimiter"} @value_filter={"–"=>"–"}>, #<CSL::Nodes::DatePart:0x400cdcdc0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Date:0x400ea8960 ...> @attributes={"name"=>"day", "suffix"=>", ", "range-delimiter"=>"–"} @children=[] @key_filter={"range-delimiter"=>"range-delimiter"} @value_filter={"–"=>"–"}>, #<CSL::Nodes::DatePart:0x400e57380 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Date:0x400ea8960 ...> @attributes={"name"=>"year", "range-delimiter"=>"–"} @children=[] @key_filter={"range-delimiter"=>"range-delimiter"} @value_filter={"–"=>"–"}>] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Group:0x400c528e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f28080 ...> @children=[#<CSL::Nodes::Text:0x400cb2180 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400c528e0 ...> @attributes={"suffix"=>" ", "term"=>"from", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400d4f480 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400c528e0 ...> @attributes={"variable"=>"URL", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @attributes={"text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @attributes={} @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"}>]>]>]>, "title"=>#<CSL::Nodes::Macro:0x400e46440 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"title"} @children=[#<CSL::Nodes::Choose:0x400f24ce0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400e46440 ...> @children=[#<CSL::Nodes::If:0x400d10f40 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400f24ce0 ...> @attributes={"match"=>"any", "type"=>"book thesis"} @children=[#<CSL::Nodes::Text:0x400c232c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400d10f40 ...> @attributes={"font-style"=>"italic", "variable"=>"title"} @children=[]>] @key_filter={"disambiguate"=>"disambiguate", "is-numeric"=>"is-numeric", "is-uncertain-date"=>"is-uncertain-date", "locator"=>"locator", "position"=>"position", "type"=>"type", "match"=>"match"}>, #<CSL::Nodes::Else:0x400d6d980 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400f24ce0 ...> @children=[#<CSL::Nodes::Text:0x400ea3840 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Else:0x400d6d980 ...> @attributes={"variable"=>"title", "form"=>nil} @children=[] @key_filter={"value"=>"value", "macro"=>"macro", "term"=>"term", "variable"=>"variable", "form"=>"form", "quotes"=>"quotes"} @value_filter={nil=>nil}>] @attributes={} @key_filter={"disambiguate"=>"disambiguate", "is-numeric"=>"is-numeric", "is-uncertain-date"=>"is-uncertain-date", "locator"=>"locator", "position"=>"position", "type"=>"type", "variable"=>"variable"}>]>]>, "publisher"=>#<CSL::Nodes::Macro:0x400e3a8c0 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"publisher"} @children=[#<CSL::Nodes::Text:0x400ed4480 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400e3a8c0 ...> @attributes={"suffix"=>", ", "variable"=>"genre"} @children=[]>, #<CSL::Nodes::Group:0x400f4be80 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400e3a8c0 ...> @attributes={"delimiter"=>": "} @children=[#<CSL::Nodes::Text:0x400da57a0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f4be80 ...> @attributes={"variable"=>"publisher-place", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400e8f6e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f4be80 ...> @attributes={"variable"=>"publisher", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"}>]>, "event"=>#<CSL::Nodes::Macro:0x400d58160 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"event"} @children=[#<CSL::Nodes::Text:0x400cea040 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400d58160 ...> @attributes={"variable"=>"event"} @children=[]>, #<CSL::Nodes::Text:0x400ca5d60 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400d58160 ...> @attributes={"prefix"=>", ", "variable"=>"event-place"} @children=[]>]>, "issued"=>#<CSL::Nodes::Macro:0x400e8d6a0 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"issued"} @children=[#<CSL::Nodes::Choose:0x400f7d620 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400e8d6a0 ...> @children=[#<CSL::Nodes::If:0x400f1b4c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400f7d620 ...> @attributes={"variable"=>"issued"} @children=[#<CSL::Nodes::Group:0x400e97780 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400f1b4c0 ...> @attributes={"prefix"=>" (", "suffix"=>").", "delimiter"=>nil} @children=[#<CSL::Nodes::Date:0x400f34e80 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400e97780 ...> @attributes={"variable"=>"issued", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil, "delimiter"=>nil} @children=[#<CSL::Nodes::DatePart:0x400e916a0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Date:0x400f34e80 ...> @attributes={"name"=>"year", "range-delimiter"=>"–", "form"=>nil} @children=[] @key_filter={"range-delimiter"=>"range-delimiter", "name"=>"name", "form"=>"form"} @value_filter={"–"=>"–", nil=>nil}>] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods", "variable"=>"variable", "form"=>"form", "delimiter"=>"delimiter"} @value_filter={nil=>nil}>, #<CSL::Nodes::Choose:0x400f2c4e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400e97780 ...> @children=[#<CSL::Nodes::If:0x400eaa020 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400f2c4e0 ...> @attributes={"match"=>"none", "type"=>"book chapter article-journal"} @children=[#<CSL::Nodes::Date:0x400e87380 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400eaa020 ...> @attributes={"variable"=>"issued"} @children=[#<CSL::Nodes::DatePart:0x400ea35e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Date:0x400e87380 ...> @attributes={"name"=>"month", "prefix"=>", ", "range-delimiter"=>"–"} @children=[] @key_filter={"range-delimiter"=>"range-delimiter"} @value_filter={"–"=>"–"}>, #<CSL::Nodes::DatePart:0x400e9f4c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Date:0x400e87380 ...> @attributes={"name"=>"day", "prefix"=>" ", "range-delimiter"=>"–"} @children=[] @key_filter={"range-delimiter"=>"range-delimiter"} @value_filter={"–"=>"–"}>]>] @key_filter={"disambiguate"=>"disambiguate", "is-numeric"=>"is-numeric", "is-uncertain-date"=>"is-uncertain-date", "locator"=>"locator", "position"=>"position", "type"=>"type", "match"=>"match"}>] @attributes={"text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods", "delimiter"=>"delimiter"} @variables=[["issued", #<CiteProc::Date:0x400da9ae0 @attributes={"date-parts"=>[[2010]]} @key_filter={"date-parts"=>"date-parts", "literal"=>"literal"} @value_filter={[[2010]]=>[[2010]]}>], ["type", #<CiteProc::Variable:0x400dc4860 @attributes={"value"=>"chapter"} @key_filter={"value"=>"value"} @value_filter={"chapter"=>"chapter"}>], ["type", #<CiteProc::Variable:0x400dc4860 @attributes={"value"=>"chapter"} @key_filter={"value"=>"value"} @value_filter={"chapter"=>"chapter"}>]] @value_filter={nil=>nil}>] @key_filter={"disambiguate"=>"disambiguate", "is-numeric"=>"is-numeric", "is-uncertain-date"=>"is-uncertain-date", "locator"=>"locator", "position"=>"position", "type"=>"type", "variable"=>"variable", "match"=>"match"}>, #<CSL::Nodes::Else:0x400dfbec0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400f7d620 ...> @children=[#<CSL::Nodes::Text:0x400e5ac80 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Else:0x400dfbec0 ...> @attributes={"prefix"=>" (", "suffix"=>").", "term"=>"no date"} @children=[]>]>]>]>, "issued-year"=>#<CSL::Nodes::Macro:0x400d16ae0 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"issued-year"} @children=[#<CSL::Nodes::Choose:0x400db3320 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400d16ae0 ...> @children=[#<CSL::Nodes::If:0x400f12380 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400db3320 ...> @attributes={"variable"=>"issued"} @children=[#<CSL::Nodes::Date:0x400c2ece0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400f12380 ...> @attributes={"variable"=>"issued"} @children=[#<CSL::Nodes::DatePart:0x400f48fa0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Date:0x400c2ece0 ...> @attributes={"name"=>"year", "range-delimiter"=>"–"} @children=[] @key_filter={"range-delimiter"=>"range-delimiter"} @value_filter={"–"=>"–"}>]>]>, #<CSL::Nodes::Else:0x400f26660 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400db3320 ...> @children=[#<CSL::Nodes::Text:0x400b25ec0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Else:0x400f26660 ...> @attributes={"form"=>"short", "term"=>"no date"} @children=[]>]>]>]>, "edition"=>#<CSL::Nodes::Macro:0x400dc11a0 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"edition"} @children=[#<CSL::Nodes::Choose:0x400eb3720 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400dc11a0 ...> @children=[#<CSL::Nodes::If:0x400e6cb60 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400eb3720 ...> @attributes={"is-numeric"=>"edition"} @children=[#<CSL::Nodes::Group:0x400dc48e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400e6cb60 ...> @attributes={"delimiter"=>" "} @children=[#<CSL::Nodes::Number:0x400f1fea0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400dc48e0 ...> @attributes={"form"=>"ordinal", "variable"=>"edition", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400efc8c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400dc48e0 ...> @attributes={"form"=>"short", "suffix"=>".", "term"=>"edition", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"}>]>, #<CSL::Nodes::Else:0x400e8d5c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400eb3720 ...> @children=[#<CSL::Nodes::Text:0x400e67ca0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Else:0x400e8d5c0 ...> @attributes={"suffix"=>".", "variable"=>"edition"} @children=[]>]>]>]>, "locators"=>#<CSL::Nodes::Macro:0x400f10880 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"locators"} @children=[#<CSL::Nodes::Choose:0x400f289e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400f10880 ...> @children=[#<CSL::Nodes::If:0x400f27880 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400f289e0 ...> @attributes={"match"=>"any", "type"=>"article-journal article-magazine article-newspaper"} @children=[#<CSL::Nodes::Group:0x400f2c9c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400f27880 ...> @attributes={"delimiter"=>", ", "prefix"=>", "} @children=[#<CSL::Nodes::Group:0x400fbc900 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f2c9c0 ...> @children=[#<CSL::Nodes::Text:0x400e96a40 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400fbc900 ...> @attributes={"font-style"=>"italic", "variable"=>"volume", "text-case"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400f89f40 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400fbc900 ...> @attributes={"prefix"=>"(", "suffix"=>")", "variable"=>"issue", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @attributes={"text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400f8b200 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f2c9c0 ...> @attributes={"variable"=>"page", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"}>]>, #<CSL::Nodes::ElseIf:0x400f957c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400f289e0 ...> @attributes={"match"=>"any", "type"=>"book chapter"} @children=[#<CSL::Nodes::Group:0x400f8ac20 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::ElseIf:0x400f957c0 ...> @attributes={"delimiter"=>", ", "prefix"=>" (", "suffix"=>")"} @children=[#<CSL::Nodes::Text:0x400fa3d40 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f8ac20 ...> @attributes={"macro"=>"edition", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Group:0x400f99a20 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f8ac20 ...> @children=[#<CSL::Nodes::Text:0x400f9a6e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f99a20 ...> @attributes={"form"=>"short", "plural"=>"true", "suffix"=>". ", "term"=>"volume", "text-case"=>"capitalize-first", "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Number:0x400edc060 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f99a20 ...> @attributes={"form"=>"numeric", "prefix"=>"1-", "variable"=>"number-of-volumes", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @attributes={"text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Group:0x400e51b80 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f8ac20 ...> @children=[#<CSL::Nodes::Text:0x400f0e4a0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400e51b80 ...> @attributes={"form"=>"short", "suffix"=>". ", "term"=>"volume", "text-case"=>"capitalize-first", "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Number:0x400ee9cc0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400e51b80 ...> @attributes={"form"=>"numeric", "variable"=>"volume", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @attributes={"text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Group:0x400e6cb40 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400f8ac20 ...> @children=[#<CSL::Nodes::Label:0x400f25c40 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400e6cb40 ...> @attributes={"form"=>"short", "strip-periods"=>"false", "suffix"=>" ", "variable"=>"page", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400fa3d20 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400e6cb40 ...> @attributes={"variable"=>"page", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @attributes={"text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"}>]>]>]>, "citation-locator"=>#<CSL::Nodes::Macro:0x400f47460 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"citation-locator"} @children=[#<CSL::Nodes::Group:0x400fa2340 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400f47460 ...> @children=[#<CSL::Nodes::Label:0x400f884c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400fa2340 ...> @attributes={"form"=>"short", "strip-periods"=>"false", "variable"=>"locator", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400f219e0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400fa2340 ...> @attributes={"prefix"=>" ", "variable"=>"locator", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @attributes={} @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"}>]>}}> @parent=#<CSL::Nodes::Layout:0x400ee4620 @style=#<CSL::Style:0x400edf800 @attributes={:citation=>#<CSL::Citation:0x400ec3360 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Style:0x400edf800 ...> @layout=#<CSL::Nodes::Layout:0x400c0a100 @style=#<CSL::Style:0x400edf800 ...> @attributes={} @children=[#<CSL::Nodes::Group:0x400c870c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Layout:0x400c0a100 ...> @attributes={"delimiter"=>", "} @children=[#<CSL::Nodes::Text:0x400dc4720 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400c870c0 ...> @attributes={"macro"=>"author-short", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400ea20c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400c870c0 ...> @attributes={"macro"=>"issued-year", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>, #<CSL::Nodes::Text:0x400f20a00 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Group:0x400c870c0 ...> @attributes={"macro"=>"citation-locator", "text-case"=>nil, "font-style"=>nil, "font-variant"=>nil, "font-weight"=>nil, "text-decoration"=>nil, "vertical-align"=>nil, "display"=>nil, "strip-periods"=>nil} @children=[] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"} @value_filter={nil=>nil}>] @key_filter={"text-case"=>"text-case", "font-style"=>"font-style", "font-variant"=>"font-variant", "font-weight"=>"font-weight", "text-decoration"=>"text-decoration", "vertical-align"=>"vertical-align", "display"=>"display", "strip-periods"=>"strip-periods"}>]> @children=[#<CSL::Sort:0x400ec26c0 @node_name="sort" @children=[#<CSL::Key:0x400e99960 @node_name="key" @attributes={"macro"=>"author"} @parent=#<CSL::Sort:0x400ec26c0 ...>>, #<CSL::Key:0x400e6b7e0 @node_name="key" @attributes={"variable"=>"issued"} @parent=#<CSL::Sort:0x400ec26c0 ...>>] @parent=#<CSL::Citation:0x400ec3360 ...>>] @attributes={"delimiter"=>"; ", "suffix"=>")", "prefix"=>"("} @key_filter={"delimiter"=>"delimiter", "suffix"=>"suffix", "prefix"=>"prefix"} @value_filter={"; "=>"; ", ")"=>")", "("=>"("}>, :bibliography=>#<CSL::Bibliography:0x400f46b80 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Style:0x400edf800 ...> @layout=#<CSL::Nodes::Layout:0x400ee4620 ...> @children=[#<CSL::Sort:0x400c30660 @node_name="sort" @children=[#<CSL::Key:0x400bf07e0 @node_name="key" @attributes={"macro"=>"author"} @parent=#<CSL::Sort:0x400c30660 ...>>, #<CSL::Key:0x400ec2280 @node_name="key" @attributes={"variable"=>"issued"} @parent=#<CSL::Sort:0x400c30660 ...>>] @parent=#<CSL::Bibliography:0x400f46b80 ...>>]>, :locales=>[], :info=>{"title"=>"American Psychological Association", "id"=>"http://www.zotero.org/styles/apa", "link"=>"", "author"=>"Simon [email protected]", "contributor"=>"Richard [email protected]://arc.nucapt.northwestern.edu/Richard_Karnesky", "category"=>"", "updated"=>""}, :options=>{"class"=>"in-text", "lang"=>"en"}, :macros=>{"container-contributors"=>#<CSL::Nodes::Macro:0x400e4cbe0 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"container-contributors"} @children=[#<CSL::Nodes::Choose:0x400d4a9c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400e4cbe0 ...> @children=[#<CSL::Nodes::If:0x400e89800 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400d4a9c0 ...> @attributes={"type"=>"chapter"} @children=[#<CSL::Nodes::Text:0x400e67da0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400e89800 ...> @attributes={"suffix"=>" ", "term"=>"in", "text-case"=>"capitalize-first"} @children=[] @key_filter={"value"=>"value", "macro"=>"macro", "term"=>"term", "quotes"=>"quotes"}>, #<CSL::Nodes::Names:0x400ec6b00 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400e89800 ...> @attributes={"delimiter"=>", ", "suffix"=>", ", "variable"=>"editor translator"} @children=[#<CSL::Nodes::Name:0x400c24ce0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400ec6b00 ...> @attributes={"and"=>"symbol", "delimiter"=>", ", "initialize-with"=>". ", "delimiter-precedes-last"=>"false", "et-al-min"=>nil, "et-al-use-first"=>"1", "et-al-subsequent-min"=>nil, "et-al-subsequent-use-first"=>nil, "name-as-sort-order"=>nil, "sort-separator"=>nil, "delimiter-precedes-et-al"=>nil, "form"=>nil, "demote-non-dropping-particle"=>nil, "initialize-with-hyphen"=>nil} @children=[] @key_filter={"and"=>"and", "delimiter-precedes-last"=>"delimiter-precedes-last", "et-al-min"=>"et-al-min", "et-al-use-first"=>"et-al-use-first", "et-al-subsequent-min"=>"et-al-subsequent-min", "et-al-subsequent-use-first"=>"et-al-subsequent-use-first", "initialize-with"=>"initialize-with", "name-as-sort-order"=>"name-as-sort-order", "sort-separator"=>"sort-separator", "delimiter-precedes-et-al"=>"delimiter-precedes-et-al", "form"=>"form", "delimiter"=>"delimiter", "demote-non-dropping-particle"=>"demote-non-dropping-particle", "initialize-with-hyphen"=>"initialize-with-hyphen"} @value_filter={nil=>nil}>, #<CSL::Nodes::Label:0x400ca63a0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400ec6b00 ...> @attributes={"form"=>"short", "prefix"=>" (", "suffix"=>".)", "text-case"=>"capitalize-first"} @children=[]>] @key_filter={"delimiter"=>"delimiter", "variable"=>"variable"}>] @key_filter={"disambiguate"=>"disambiguate", "is-numeric"=>"is-numeric", "is-uncertain-date"=>"is-uncertain-date", "locator"=>"locator", "position"=>"position", "type"=>"type", "match"=>"match"}>]>]>, "secondary-contributors"=>#<CSL::Nodes::Macro:0x400d453a0 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"secondary-contributors"} @children=[#<CSL::Nodes::Choose:0x400f4b3a0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400d453a0 ...> @children=[#<CSL::Nodes::If:0x400f3b620 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Choose:0x400f4b3a0 ...> @attributes={"match"=>"none", "type"=>"chapter"} @children=[#<CSL::Nodes::Names:0x400f1e440 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::If:0x400f3b620 ...> @attributes={"delimiter"=>", ", "prefix"=>" (", "suffix"=>")", "variable"=>"editor translator"} @children=[#<CSL::Nodes::Name:0x400ee8cc0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400f1e440 ...> @attributes={"and"=>"symbol", "delimiter"=>", ", "initialize-with"=>". ", "delimiter-precedes-last"=>"false", "et-al-min"=>nil, "et-al-use-first"=>"1", "et-al-subsequent-min"=>nil, "et-al-subsequent-use-first"=>nil, "name-as-sort-order"=>nil, "sort-separator"=>nil, "delimiter-precedes-et-al"=>nil, "form"=>nil, "demote-non-dropping-particle"=>nil, "initialize-with-hyphen"=>nil} @children=[] @key_filter={"and"=>"and", "delimiter-precedes-last"=>"delimiter-precedes-last", "et-al-min"=>"et-al-min", "et-al-use-first"=>"et-al-use-first", "et-al-subsequent-min"=>"et-al-subsequent-min", "et-al-subsequent-use-first"=>"et-al-subsequent-use-first", "initialize-with"=>"initialize-with", "name-as-sort-order"=>"name-as-sort-order", "sort-separator"=>"sort-separator", "delimiter-precedes-et-al"=>"delimiter-precedes-et-al", "form"=>"form", "delimiter"=>"delimiter", "demote-non-dropping-particle"=>"demote-non-dropping-particle", "initialize-with-hyphen"=>"initialize-with-hyphen"} @value_filter={nil=>nil}>, #<CSL::Nodes::Label:0x400e437a0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400f1e440 ...> @attributes={"form"=>"short", "prefix"=>", ", "suffix"=>".", "text-case"=>"capitalize-first"} @children=[]>] @key_filter={"delimiter"=>"delimiter"}>]>]>]>, "author"=>#<CSL::Nodes::Macro:0x400dfde80 @style=#<CSL::Style:0x400edf800 ...> @attributes={"name"=>"author"} @children=[#<CSL::Nodes::Names:0x400dcc3c0 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Macro:0x400dfde80 ...> @attributes={"variable"=>"author", "delimiter"=>nil} @children=[#<CSL::Nodes::Name:0x400db3340 @style=#<CSL::Style:0x400edf800 ...> @parent=#<CSL::Nodes::Names:0x400dcc3c0 ...> @attributes={"and"=>"symbol", "delimiter"=>", ", "delimiter-precedes-last"=>"always", "initialize-with"=>". ", "name-as-sort-order"=>"all", "sort-separator"=>", ", "et-al-min"=>nil, "et-al-use-first"=>"1", "et-al-subsequent-min"=>nil, "et-al-subsequent-use-first"=>nil, "delimiter-precedes-et-al"=>nil, "form"=>nil, "demote-non-dropping-particle"=>nil, "initialize-with-hyphen"=>nil} @children=[] @key_filter={"and"=>"and", "delimiter-precedes-last"=>"delimiter-precedes-last", "et-al-min"=>"et-al-min", "et-al-use-first"=>"et-al-use-first", "et-al-subsequent-min"=>"et-al-subsequent-min", "et-al-subsequent-use-first"=>"et-al-subsequent-use-first", "initialize-with"=>"initialize-with", "name-as-sort-order"=>"name-as-sort-order", "sort-separator"=>"sort-separator", "delimiter-precedes-et-al"=>"delimiter-precedes-et-al", "form"=>"form", "delimiter"=>"delimiter", "demote-non-dropping-particle"=>"demote-non-dropping-particle", "initialize-with
Dear all!
I am experiencing problems with CiteProc.process.
The following code works like a charme:
b = BibTeX.parse <<-END
@book{sample1,
author = {J. Brown and S. L\\'{e}ss},
title = {A book},
publisher = {Lawrence Erlbaum},
year = {2013}
}
END
b['sample1'].convert_latex
b['sample1'].author.to_s
With CiteProc.process
nothing “happens” at all:
b = BibTeX.parse <<-END
@book{sample1,
author = {J. Brown and S. L\\'{e}ss},
title = {A book},
publisher = {Lawrence Erlbaum},
year = {2013}
}
END
b['sample1'].convert_latex
CiteProc.process b['sample1'].to_citeproc
Hope, anyone can help me! Thank you very much. (Sorry: I don’t know, whether this really is an issue.)
Sylvester,
We have a project (created in 2013) using gem 'citeproc-ruby', '0.0.6'
and could really use some helpful advice on how to upgrade either to the latest 0.x
version or the latest 1.x
version. Our code uses the gem like this:
def cite(citation_data)
apa_csl_file = Rails.root.join('app', 'data', 'apa.csl')
CiteProc.process(citation_data, style: apa_csl_file, format: 'html')
end
csl_report = {
"id"=>"sulpub",
"type"=>"report",
"author"=>[{"family"=>"Imberman", "given"=>"S"}, {"family"=>"Kugler", "given"=>"A. D."}, {"family"=>"Sacerdote", "given"=>"B."}],
"title"=>"Katrina's children: evidence on the structure of peer effects from hurricane evacuees",
"issued"=>{"date-parts"=>[[2009], [1], [1]]},
"number"=>"15291",
"publisher"=>"National Bureau of Economic Research",
"URL"=>"http://www.nber.org/papers/w15291"
}
cite(csl_report)
#=> "Imberman, S., Kugler, A. D., & Sacerdote, B. (2009). <i>Katrina's children: evidence on the structure of peer effects from hurricane evacuees</i> (No. 15291). National Bureau of Economic Research. Retrieved from http://www.nber.org/papers/w15291"
BTW, I'm wondering what the order of date values should be for:
"issued"=>{"date-parts"=>[[2009], [1], [1]]},
Thanks in advance,
Darren
I have updated to citeproc-ruby 1.0.0 and run into a problem rendering articles in IEEE style, whereas other kinds of bibtex entry, such as 'inproceedings' or 'book', render correctly in both APA and IEEE styles.
The error message is:
NoMethodError: undefined method `deep_fetch' for nil:NilClass
from /home/peter/.rvm/gems/ruby-2.0.0-p247/gems/citeproc-1.0.0/lib/citeproc/abbreviate.rb:27:in `abbreviate'
This problem was not present in citeproc-ruby 0.0.6.
e.g. for the following biblio.bib
@article{Chase73,
author = {W. G. Chase and H. A. Simon},
title = {Perception in chess},
journal = {Cognitive Psychology},
volume = {4},
pages = {55-81},
year = {1973}
}
@book{Newell72,
author = {A. Newell and H. A. Simon},
title = {Human Problem Solving},
address = {Englewood Cliffs, NJ},
publisher = {Prentice-Hall},
year = {1972}
}
I get the following results in irb:
Everything works fine for apa style:
2.0.0p247 :037 > cp = CiteProc::Processor.new style: 'apa', format: 'text'
=> #<CiteProc::Processor style="apa" locale="en-US" items=[0]>
2.0.0p247 :038 > cp.import BibTeX.open('/home/peter/biblio.bib').to_citeproc
=> #<CiteProc::Processor style="apa" locale="en-US" items=[2]>
2.0.0p247 :039 > cp.render :bibliography, id: 'Newell72'
=> ["Newell, A., & Simon, H. A. (1972). Human Problem Solving. Englewood Cliffs, NJ: Prentice-Hall."]
2.0.0p247 :040 > cp.render :bibliography, id: 'Chase73'
=> ["Chase, W. G., & Simon, H. A. (1973). Perception in chess. Cognitive Psychology, 4, 55–81."]
But articles fail to render for ieee style:
2.0.0p247 :041 > cp2 = CiteProc::Processor.new style: 'ieee', format: 'text'
=> #<CiteProc::Processor style="ieee" locale="en-US" items=[0]>
2.0.0p247 :042 > cp2.import BibTeX.open('/home/peter/biblio.bib').to_citeproc
=> #<CiteProc::Processor style="ieee" locale="en-US" items=[2]>
2.0.0p247 :043 > cp2.render :bibliography, id: 'Newell72'
=> ["A. Newell and H. A. Simon, Human Problem Solving. Englewood Cliffs, NJ: Prentice-Hall, 1972."]
2.0.0p247 :044 > cp2.render :bibliography, id: 'Chase73'
NoMethodError: undefined method `deep_fetch' for nil:NilClass
from /home/peter/.rvm/gems/ruby-2.0.0-p247/gems/citeproc-1.0.0/lib/citeproc/abbreviate.rb:27:in `abbreviate'
The following code:
proc = CiteProc::Processor.new(style:'apa', format: 'text')
proc.import bx_bibliography.to_citeproc
proc.render(:bibliography, id: key)[0]
used to produce:
"Person, T. (1000). I am a soft valid article. Journal of test articles."
but now produces:
"Person, T. (1000). I am a soft valid article. Journal of test articles. article."
Can you tell me how to fix this? I need to get rid of the last "article."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.