From f522c7a926a5e7e0b8c7270fda156ba9756be362 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Mon, 26 Feb 2024 14:10:00 +0100 Subject: [PATCH] bib2html.py: Add incollection bibtype --- bib2html.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/bib2html.py b/bib2html.py index b1ba761..7557cce 100755 --- a/bib2html.py +++ b/bib2html.py @@ -103,6 +103,21 @@ def format_details_inproceedings(entry): line = filter(lambda l: l != "", line) return [where, ", ".join(line)] +def format_details_incollection(entry): + where = format_field(entry, 'booktitle') + + line = [] + line.append(format_field(entry, 'publisher')) + line.append(format_field(entry, 'pages', pre='pp. ')) + line.append(format_field(entry, 'address')) + line.append(format_field(entry, 'month', post=' ') + \ + format_field(entry, 'year')) + line.append(format_field(entry, 'isbn', pre='ISBN ')) + line.append(format_field(entry, 'note')) + + line = filter(lambda l: l != "", line) + return [where, ", ".join(line)] + def format_details_thesis(entry): line = [] line.append(format_field(entry, 'school')) @@ -153,6 +168,8 @@ def format_entry(entry): lines.extend(format_details_article(entry)) elif entry.type=='inproceedings': lines.extend(format_details_inproceedings(entry)) + elif entry.type=='incollection': + lines.extend(format_details_incollection(entry)) elif entry.type=='book': lines.extend(format_details_book(entry)) elif entry.type=='patent': -- 2.30.2