diff --git a/src/tei2imxml.py b/src/tei2imxml.py index d299252..86ab4c5 100755 --- a/src/tei2imxml.py +++ b/src/tei2imxml.py @@ -1082,6 +1082,60 @@ def handle_refs_default(ref): for ref in eoa_ref: handle_refs_default(ref) + ############ + # Indexing # + ############ + # indexName="person">James Joyce" + index_entries = xml_tree.xpath("//t:body//t:index", namespaces=NS_MAP) + for entry in index_entries: + # hier weiter! + pass + + ######## + # Math # + ######## + + # + inline_equations = xml_tree.xpath("//t:body//t:formula[@rend='inline' and @notation='tex']", namespaces=NS_MAP) + for equation in inline_equations: + tex_formula = equation.text + formula_tail = equation.tail + equation.clear() + equation.tag = "EOAineq" + equation.set("TeX", tex_formula) + png_file = "oh dear" + equation.set("src", png_file) + equation.tail = formula_tail + + block_equations = xml_tree.xpath("//t:body//t:ab[@type='equation']", namespaces=NS_MAP) + for equation in block_equations: + # take care of nonumber, as well + equation.tag = "ACHTUNGstillsomeworktodo" + + sub_equations = xml_tree.xpath("//t:body//t:ab[@type='subequations']", namespaces=NS_MAP) + for equation in sub_equations: + # take care of nonumber, as well + equation.tag = "ACHTUNGstillsomeworktodo" + pass + + equationarrays = xml_tree.xpath("//t:body//t:ab[@type='equationarray']", namespaces=NS_MAP) + for equation in equationarrays: + # take care of nonumber, as well + equation.tag = "ACHTUNGstillsomeworktodo" + pass + + # My Theorem + # A statement. + # theorems = + + ############# + # Chemistry # + ############# + # 2HCO3^- + Ca^2+ <=> CaCO3 + CO2 + H2O + inline_chemo = xml_tree.xpath("//t:body//t:formula[@rend='inline' and @notation='mhchem']", namespaces=NS_MAP) + for chem in inline_chemo: + pass + return xml_tree # def transform_body ends here