Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle case where book contains no bibliography
  • Loading branch information
kthoden committed Sep 1, 2020
1 parent 2adf79c commit c51330d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/eoatex2imxml.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
# Time-stamp: <2020-05-20 20:12:38 (kthoden)>
# Time-stamp: <2020-09-01 14:12:52 (kthoden)>

"""
Converts Latex files into a customized DocBook XML file.
Expand Down Expand Up @@ -1484,7 +1484,8 @@ def add_bibliography_to_xml(
# <EOAciteyear><citekey>Renn2012a</citekey><page/></EOAciteyear>
# into
# <span rel="popover" class="citation" citekey="Renn2012a" data-toggle="popover" html="true" data-placement="bottom" data-title="Renn 2012" data-content="The Globalization of Knowledge in History">2012</span>
if bib_type == "anthology" or bib_type == "monograph":

if len(keyword_to_print_bibl_el.keys()) > 0 and (bib_type == "anthology" or bib_type == "monograph"):

if bib_type == "monograph":
tmp_citation_filename = "used_citations-monograph"
Expand Down Expand Up @@ -1628,6 +1629,9 @@ def add_bibliography_to_xml(

intChapterNumber += 1

else:
logging.debug("No bibliography to insert")

# If Bibliography-Type is monograph-numeric search for EOAbibliography and make it all
if bib_type == "monograph-numeric":
if xmlTree.find(".//EOAprintbibliography") is not None:
Expand Down

0 comments on commit c51330d

Please sign in to comment.