Skip to content

Commit

Permalink
Allow chapters without bibliography if no citekeys are found
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed May 20, 2020
1 parent d279447 commit 99f229a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/eoatex2imxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1229,16 +1229,20 @@ def find_print_bibliography(
print_bibl_elements = xml_context_element.findall(".//EOAprintbibliography")

if len(print_bibl_elements) == 0:
logging.error("No EOAprintbibliography found. Maybe you commented it out? Exiting")
sys.exit(0)
citations = xml_context_element.findall(".//citekey")
if len(citations) > 0:
logging.error("No EOAprintbibliography found, but there are citations. Maybe you commented it out? Exiting")
sys.exit(0)
else:
logging.info("Found chapter or publication without bibliography.")
else:
for print_bibl_el in print_bibl_elements:
keyword = print_bibl_el.get("keyword")
if keyword is not None:
ret_list[keyword] = print_bibl_el
else:
ret_list[''] = print_bibl_el
return ret_list
return ret_list

def bib_keywords_sanity_check(
keyword_to_print_bibl_el,
Expand Down

0 comments on commit 99f229a

Please sign in to comment.