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