def get_note(self, data): notices = ("erratum", "addendum") entries = [ entry for entry in get_value(data, "publication_info", []) if entry.get("material") in notices ] if not entries: return None note_strings = [ text_type("{field}: {journal} {volume}, {pages} {year}").format( field=entry["material"].title(), journal=entry.get("journal_title"), volume=entry.get("journal_volume"), pages=LiteratureReader.get_page_artid_for_publication_info( entry, "--"), year="({})".format(entry["year"]) if "year" in entry else "", ).strip() for entry in entries ] note_string = "[" + ", ".join(note_strings) + "]" note_string = re.sub(" +", " ", note_string) return latex_encode(re.sub(",,", ",", note_string))
def get_pages(self, data): return LiteratureReader.get_page_artid_for_publication_info( BibTexCommonSchema.get_best_publication_info(data), "--")