Sha256: 3cd7fa047623419e9284228efb8a7d1b59e670bdc94436488601904b440e8900
Contents?: true
Size: 785 Bytes
Versions: 25
Compression:
Stored size: 785 Bytes
Contents
module Bolognese module Writers module BibtexWriter def bibtex return nil unless valid? bib = { bibtex_type: bibtex_type.presence || "misc", bibtex_key: id, doi: doi, url: url, author: authors_as_string(author), keywords: Array.wrap(parse_attributes(keywords, content: "text")).join(", "), language: language, title: parse_attributes(title, content: "text", first: true), journal: container_title, volume: volume, issue: issue, pages: [first_page.to_s, last_page.to_s].join("-").presence, publisher: publisher, year: publication_year }.compact BibTeX::Entry.new(bib).to_s end end end end
Version data entries
25 entries across 25 versions & 1 rubygems