diff --git a/Skripten/EOAconvert.py b/Skripten/EOAconvert.py index 2b29051..4fa1689 100755 --- a/Skripten/EOAconvert.py +++ b/Skripten/EOAconvert.py @@ -1578,6 +1578,9 @@ def bring_footnote_down_epub(footnote, footnote_name, destination): """ captures reusable behavior from the existing code potentially, some of the old code could be replaced by calls to this helper + + usage: contentopf = bring_footnote_down_epub(my_footnote, "1", xmlNewFootnotes) + unfortunately, returning the result seemed like a better idea than mutating the global variable """ contentopf = replace_footnote_equations(footnote) # see usage note @@ -1587,7 +1590,7 @@ def bring_footnote_down_epub(footnote, footnote_name, destination): # we would like to prepend this footnote identifier to the footnote element if footnote.text is not None: # if the element starts with some text anyway, prepend it there - footnote.text = "%s %s" (prefix, footnote.text) + footnote.text = "%s %s" % (prefix, footnote.text) else: # if, however, the element begins with a child, prepend the text at the beginning of the first child instead if len(kids): @@ -1668,7 +1671,6 @@ class FootnoteError(Exception): if "lower-latin" == grouping: footnote_name = alph_footnote_index(index) para = etree.Element("p") - para.text = "[%s] %s" % (footnote_name, note.text) contentopf = bring_footnote_down_epub(note, footnote_name, para) xmlNewFootnotes.append(para) intFootnoteNumber = 1 @@ -2883,6 +2885,9 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe """ captures reusable behavior from the existing code potentially, some of the old code could be replaced by calls to this helper + + usage: intObjectNumber = bring_footnote_down_django(xmlFootnote, "fn"+str(intFootnoteNumber), str(intFootnoteNumber), intObjectNumber, tmpStrUID, xmlResult) + unfortunately, returning the result seemed like a better idea than mutating the global variable """ kids = list(footnote.getchildren())