From 28f42e0c8874cb9d920c44ae6cf41b6ef681c20b Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 28 Mar 2019 15:03:48 +0100 Subject: [PATCH 001/132] executables must be in $PATH, fixed eoatex2imxml.py, changed dir structure --- config/eoaconvert.cfg | 28 +- eoatex2imxml.py | 313 +++++++++++---------- imxml2django.py | 68 +++-- imxml2epub.py | 71 ++++- tei2imxml.py | 56 +++- libeoabibitem.py => utils/libeoabibitem.py | 0 libeoaconvert.py => utils/libeoaconvert.py | 52 ++-- utils/load_config.py | 45 +++ 8 files changed, 381 insertions(+), 252 deletions(-) mode change 100644 => 100755 tei2imxml.py rename libeoabibitem.py => utils/libeoabibitem.py (100%) rename libeoaconvert.py => utils/libeoaconvert.py (87%) create mode 100644 utils/load_config.py diff --git a/config/eoaconvert.cfg b/config/eoaconvert.cfg index c2353da..0793ffa 100644 --- a/config/eoaconvert.cfg +++ b/config/eoaconvert.cfg @@ -1,20 +1,22 @@ [General] # logging -logfile: ./eoaconvert.log +# logfile: ./eoaconvert.log # choose between DEBUG, INFO, WARNING, ERROR, CRITICAL -loglevel: DEBUG +# loglevel: DEBUG [Executables] -graphicsmagic: /usr/local/bin/gm -texlive: /usr/local/texlive/2017/ -texbin: /Library/TeX/texbin/ -TRALICS_PATH_EXEC: /Users/kthoden/bin/tralics-2.15.4 +# graphicsmagic: gm +# texlive: /usr/local/texlive/2017/ +# texbin: /Library/TeX/texbin/ +# TRALICS_PATH_EXEC: /Users/kthoden/bin/tralics-2.15.4 [Auxiliaries] -TRALICS_PATH_LIB: /Users/kthoden/EOAKram/dev/EOASkripts/config/ -TEMPLATE_PATH: /Users/kthoden/EOAKram/dev/EOASkripts/data/aux/ -SUPPORT_PATH: /Users/kthoden/EOAKram/dev/EOASkripts/data/dtd_files/ -CSL_FILE: /Users/kthoden/EOAKram/dev/eoa-csl/chicago-author-date-custom.csl -TRANSLATIONS: /Users/kthoden/EOAKram/dev/EOASkripts/data/aux/translations.xml -TEI_GUIDELINES: /Users/kthoden/EOAKram/dev/thirdparty/TEI -TEI_STYLESHEETS: /Users/kthoden/EOAKram/dev/thirdparty/Stylesheets \ No newline at end of file +# relative to repo: +TRALICS_PATH_LIB: config/ +TEMPLATE_PATH: data/aux/ +SUPPORT_PATH: data/dtd_files/ +TRANSLATIONS: data/aux/translations.xml +CSL_FILE: bibformat/chicago-author-date-custom.csl + +# TEI_GUIDELINES: tei/TEI +# TEI_STYLESHEETS: tei/Stylesheets diff --git a/eoatex2imxml.py b/eoatex2imxml.py index ce61873..a247d37 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -19,12 +19,14 @@ # as described in http://infohost.nmt.edu/tcc/help/pubs/pylxml/web/soupparser.html # from lxml.html import soupparser +from utils.libeoabibitem import Bibitem +import utils.libeoaconvert as libeoaconvert +from utils.load_config import load_config + # imports import argparse from lxml import etree -from libeoabibitem import Bibitem from bs4 import BeautifulSoup -import libeoaconvert import glob import os import re @@ -35,34 +37,58 @@ import sys import shutil import time -import configparser import logging import pickle +from pathlib import Path -# current_directory = os.path.dirname(sys.argv[0]) -# is this better? -current_directory = os.path.realpath(__file__) +BASE_DIR = Path( os.path.realpath(__file__) ).parent -print("The script is run from {}".format(current_directory)) ############################################################### # Preperation of certain files and some checks in advance ############################################################### # Options for the command line: filename / configfile parser = argparse.ArgumentParser() -parser.add_argument("-c", "--config", help="Name of config file.") -group = parser.add_mutually_exclusive_group() -group.add_argument("-f", "--filename", help="Name of main EOATeX file.") -group.add_argument("-t", "--trash", help="Remove temporary files.") +parser.add_argument( + "-c", "--config", + default = BASE_DIR / "config" / "eoaconvert.cfg", + help="Name of config file" +) +parser.add_argument( + "-l", "--log-file", + default = "eoaconvert.log", + help="logfile" +) +parser.add_argument( + "--log-level", + default = "DEBUG", + help="log level: choose between DEBUG, INFO, WARNING, ERROR, CRITICAL" +) +parser.add_argument( + "--tei-guidelines", + default = "tei/TEI", + help="path to the https://github.com/TEIC/TEI" +) +parser.add_argument( + "--tei-stylesheets", + default = "tei/Stylesheets", + help="path to the https://github.com/TEIC/Stylesheets" +) +parser.add_argument( + "-f", "--filename", + required = True, + help="Name of main EOATeX file (without suffix!)." +) +parser.add_argument( + "-t", "--trash", + help="Remove temporary files." +) args = parser.parse_args() -if args.config is not None: - CONFIG_FILE = os.path.abspath(args.config) -else: - CONFIG_FILE = os.path.dirname(sys.argv[0]) + os.path.sep.join(["", "config", "eoaconvert.cfg"]) +config_file = args.config -logging.debug("The configfile is %s." % CONFIG_FILE) +logging.debug("The configfile is %s." % config_file) # current biber is not compatible with this code # switch TeX distribution to TeXLive2016, @@ -77,37 +103,44 @@ ################################## # Reading the configuration file # ################################## -CONFIG = configparser.ConfigParser() -CONFIG.read(CONFIG_FILE) -###################### -# Setting up logging # -###################### -LOGFILE = CONFIG['General']['logfile'] -LOGLEVEL = CONFIG['General']['loglevel'] - -# numeric_level = getattr(logging, LOGLEVEL.upper(), None) -# if not isinstance(numeric_level, int): -# raise ValueError('Invalid log level: %s' % loglevel) -logging.basicConfig(filename=LOGFILE, level=LOGLEVEL, format='%(asctime)s - %(levelname)s - %(message)s') +CONFIG = load_config( + config_file, + args.log_file, + args.log_level, +) ######################## # Paths to executables # ######################## -GM_PATH = CONFIG['Executables']['graphicsmagic'] -TL_PATH = CONFIG['Executables']['texlive'] -TEXBIN_PATH = CONFIG['Executables']['texbin'] -TRALICS_PATH_EXEC = CONFIG['Executables']['tralics_path_exec'] +GM_PATH = "gm" +TRALICS_PATH_EXEC = "tralics" +# (part of texlive distribution): +PDFCROP_EXEC = "pdfcrop" + +# TL_PATH = CONFIG['Executables']['texlive'] +# TEXBIN_PATH = CONFIG['Executables']['texbin'] ############################ # Paths to auxiliary files # ############################ -TRALICS_PATH_LIB = CONFIG['Auxiliaries']['TRALICS_PATH_LIB'] -TEMPLATE_PATH = CONFIG['Auxiliaries']['template_path'] -SUPPORT_PATH = CONFIG['Auxiliaries']['support_path'] -# AUX_TeX_FILES_PATH = CONFIG['Auxiliaries']['aux_tex_files_path'] +TRALICS_PATH_LIB = BASE_DIR / CONFIG['Auxiliaries']['TRALICS_PATH_LIB'] +TEMPLATE_PATH = BASE_DIR / CONFIG['Auxiliaries']['template_path'] +SUPPORT_PATH = BASE_DIR / CONFIG['Auxiliaries']['support_path'] -# interimResult = "" + +# sanity check: +print("PATH: {}".format( os.environ['PATH'] )) +Kommando = f"which {GM_PATH}" +Argumente = shlex.split(Kommando) +ret = subprocess.run(Argumente).returncode +if ret != 0: + raise( Exception( f"PROGRAM not found: {GM_PATH}" ) ) +Kommando = f"which {TRALICS_PATH_EXEC}" +Argumente = shlex.split(Kommando) +ret = subprocess.run(Argumente).returncode +if ret != 0: + raise( Exception( f"PROGRAM not found: {TRALICS_PATH_EXEC}" ) ) ######################################## # Certain functions for specific tasks # @@ -142,7 +175,7 @@ def TeX2PNG(LaTeXCode, Type, Chapter, Number): LaTeXCode = re.sub(strCommand, dictRebindedCommands[strCommand], LaTeXCode) # Open plain LaTeX-Template - tmp = open(TEMPLATE_PATH + "formula.tex", "r") + tmp = open(TEMPLATE_PATH / "formula.tex", "r") Template = tmp.read() tmp.close() # Get tmp-directory for this user account @@ -159,7 +192,7 @@ def TeX2PNG(LaTeXCode, Type, Chapter, Number): tmp = open(tmpFile, "w") tmp.write(e) tmp.close() - Kommando = TEXBIN_PATH + "xelatex --halt-on-error " + tmpFile + Kommando = "xelatex --halt-on-error " + tmpFile Argumente = shlex.split(Kommando) # Redirecting stderr to save XeLaTeX-Output Datei = open('tmp_files/xelatex-run.log', 'w') @@ -168,7 +201,7 @@ def TeX2PNG(LaTeXCode, Type, Chapter, Number): print("Successfully converted formula " + Type + str(Chapter) + "_" + str(Number)) if Ergebnis == 1: print("[ERROR]: Failed to convert formula " + Type + str(Chapter) + "_" + str(Number)) - Kommando = TL_PATH + "texmf-dist/scripts/pdfcrop/pdfcrop.pl " + formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + ".pdf " + formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + "a.pdf" + Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + ".pdf " + formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + "a.pdf" Argumente = shlex.split(Kommando) subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + "a.pdf " + os.getenv("PWD") + "/items/" + Type + "_" + str(Chapter) + "_" + str(Number) + ".png" @@ -186,11 +219,11 @@ def make_bibchecker(bib_database, set_citations): which is then also converted in the various formats. """ - tmp_latex = open(TEMPLATE_PATH + "largebib.tex", "r") + tmp_latex = open(TEMPLATE_PATH / "largebib.tex", "r") largebib_template = tmp_latex.read() tmp_latex.close() - tmp_xml = open(TEMPLATE_PATH + "largebib-xml.tex", "r") + tmp_xml = open(TEMPLATE_PATH / "largebib-xml.tex", "r") largebib_xml_template = tmp_xml.read() tmp_xml.close() @@ -399,7 +432,7 @@ def cleanup(): else: print("Found no publication.cfg. Exiting") sys.exit() -if not os.path.exists(CONVERT_DIR + os.path.sep + "cover.jpg"): +if not os.path.exists(CONVERT_DIR + os.path.sep + "Cover.jpg"): print("The file Cover.jpg in CONVERT directory is missing.") if os.path.exists(os.getcwd() + os.path.sep + "Cover.jpg"): shutil.copy("Cover.jpg", CONVERT_DIR + os.path.sep + "cover.jpg") @@ -411,14 +444,20 @@ def cleanup(): # print ("pre_xml fehlt") # sys.exit() + +def copy_dir_overwrite( src, dst ): + if os.path.exists( dst ): + shutil.rmtree( dst ) + shutil.copytree( src, dst) + # Copy Support-Files from /Library/MPIWG to current directory -shutil.copy(SUPPORT_PATH + "classes.dtd", os.getcwd()) -shutil.copy(SUPPORT_PATH + "mathml2-qname-1.mod", os.getcwd()) -shutil.copy(SUPPORT_PATH + "mathml2.dtd", os.getcwd()) -shutil.copytree(SUPPORT_PATH + "html", (os.getcwd() + "/html")) -shutil.copytree(SUPPORT_PATH + "iso8879", (os.getcwd() + "/iso8879")) -shutil.copytree(SUPPORT_PATH + "iso9573-13", (os.getcwd() + "/iso9573-13")) -shutil.copytree(SUPPORT_PATH + "mathml", (os.getcwd() + "/mathml")) +shutil.copy(SUPPORT_PATH / "classes.dtd", os.getcwd()) +shutil.copy(SUPPORT_PATH / "mathml2-qname-1.mod", os.getcwd()) +shutil.copy(SUPPORT_PATH / "mathml2.dtd", os.getcwd()) +copy_dir_overwrite(SUPPORT_PATH / "html", (os.getcwd() + "/html")) +copy_dir_overwrite(SUPPORT_PATH / "iso8879", (os.getcwd() + "/iso8879")) +copy_dir_overwrite(SUPPORT_PATH / "iso9573-13", (os.getcwd() + "/iso9573-13")) +copy_dir_overwrite(SUPPORT_PATH / "mathml", (os.getcwd() + "/mathml")) # shutil.copytree(SUPPORT_PATH + "mathml2", (os.getcwd() + "/mathml2")) ############################################################## @@ -803,7 +842,7 @@ def cleanup(): for strCommand in dictRebindedCommands.keys(): strTeXEquations = re.sub(strCommand, dictRebindedCommands[strCommand], strTeXEquations) - tmp = open(TEMPLATE_PATH + "formula.tex", "r") + tmp = open(TEMPLATE_PATH / "formula.tex", "r") Template = tmp.read() tmp.close() # Get tmp-directory for this user account @@ -821,7 +860,7 @@ def cleanup(): tmp.write(e) tmp.close() print("Typesetting all Inline Equations") - Kommando = TEXBIN_PATH + "xelatex --halt-on-error " + tmpFile + Kommando = "xelatex --halt-on-error " + tmpFile Argumente = shlex.split(Kommando) Datei = open('tmp_files/xelatex-run.log', 'w') Ergebnis = subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) @@ -832,7 +871,7 @@ def cleanup(): for intRunningOrder in dictEOAineqs.keys(): # provide more status information here in output! progress(counter_dictEOAineqs, len(dictEOAineqs.keys()),"Splitting all inline equations, image %s of %s" % (counter_dictEOAineqs, len(dictEOAineqs.keys()))) - Kommando = TL_PATH + "texmf-dist/scripts/pdfcrop/pdfcrop.pl " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAineqs[intRunningOrder] + ".pdf" + Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAineqs[intRunningOrder] + ".pdf" Argumente = shlex.split(Kommando) subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + dictEOAineqs[intRunningOrder] + ".pdf " + os.getenv("PWD") + "/items/" + dictEOAineqs[intRunningOrder] + ".png" @@ -884,7 +923,7 @@ def cleanup(): int_EOAchem_number +=1 intChapterNumber += 1 - tmp = open(TEMPLATE_PATH + "formula.tex", "r") + tmp = open(TEMPLATE_PATH / "formula.tex", "r") Template = tmp.read() tmp.close() # Get tmp-directory for this user account @@ -902,7 +941,7 @@ def cleanup(): tmp.write(e) tmp.close() print("Typesetting all inline Chemical formulas") - Kommando = TEXBIN_PATH + "xelatex --halt-on-error " + tmpFile + Kommando = "xelatex --halt-on-error " + tmpFile Argumente = shlex.split(Kommando) Datei = open('tmp_files/xelatex-run.log', 'w') Ergebnis = subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) @@ -913,7 +952,7 @@ def cleanup(): for intRunningOrder in dictEOAchems.keys(): # provide more status information here in output! progress(counter_dictEOAchems, len(dictEOAchems.keys()),"Splitting all inline equations, image %s of %s" % (counter_dictEOAchems, len(dictEOAchems.keys()))) - Kommando = TL_PATH + "texmf-dist/scripts/pdfcrop/pdfcrop.pl " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAchems[intRunningOrder] + ".pdf" + Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAchems[intRunningOrder] + ".pdf" Argumente = shlex.split(Kommando) subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + dictEOAchems[intRunningOrder] + ".pdf " + os.getenv("PWD") + "/items/" + dictEOAchems[intRunningOrder] + ".png" @@ -1002,9 +1041,6 @@ def cleanup(): # bigfoot needs to be integrated into # 'fndict': {'uid11': '2', 'uid12': '3', 'uid9': '1'}, -# the new-style footnotes that use LaTeX bigfoot show up in the following order: -footnote_groups = ["decimal", "lower-latin"] - print("-----------------------------------------------------") print("Numbering of Lists per Chapter") @@ -1179,71 +1215,72 @@ def cleanup(): make_bibchecker(bib_database, set_citations) +def print_bibliography( + print_bibl_element, + xml_context, + tmp_citation_filename +): + bibliography_keyword = print_bibl_element.get("keyword") + if bibliography_keyword: + logging.debug(f"Found bibliography keyword {bibliography_keyword}") + else: + logging.debug(f"No bibliography keyword found") + + print_bibl_element.getparent().tag = "div" + xmlBibliographyDiv = etree.Element("div") + xmlBibliography.addnext(xmlBibliographyDiv) + + citekeys = xml_context.xpath(".//citekey/text()") + nocite_elements = xml_context.xpath(".//nocite") + + # citekeys = xmlChapter.xpath(".//citekey/text()") + # nocite_elements = xmlChapter.xpath(".//nocite") + + if nocite_elements: + logging.debug(f"Found {libeoaconvert.plural(len(nocite_elements), 'nocite command')}.") + nocitekeys = [] + for nocite in nocite_elements: + keys = [x.strip() for x in nocite.text.split(",")] + nocitekeys += keys + nocite.tag = "elementtobestripped" + logging.debug(f"Found {libeoaconvert.plural(len(set(nocitekeys)), 'nocite key')}.") + logging.debug(f"Adding nocite keys to the other cite keys.") + citekeys += nocitekeys + + if bibliography_keyword: + logging.info("We want to collect the entries matching the keywords from the database.") + citations_to_format = [x["id"] for x in citations_json if x["keyword"] == bibliography_keyword] + logging.debug(f"Found {libeoaconvert.plural(len(citations_to_format), 'nocite citation')} in database.") + else: + citations_to_format = set(citekeys) + + print( "citekeys: ") + print( len( citekeys ) ) + csl_file = BASE_DIR / CONFIG['Auxiliaries']['CSL_FILE'] + formatted_references = libeoaconvert.format_citations( + citations_to_format, + bib_database + ".bib", + strLanguage, + tmp_citation_filename, + csl_file + )[0] + + fixed_entries = libeoaconvert.fix_bib_entries(formatted_references) + for entry in fixed_entries: + xmlBibliographyDiv.append(entry) + # If Bibliography-Type is monograph search for EOAbibliography and make it all if bib_type == "monograph": + tmp_citation_filename = "used_citations-monograph" if xmlTree.find(".//EOAprintbibliography") is not None: # to insert here: with keywords we can have multiple bibliographies xmlBibliography = xmlTree.find(".//EOAprintbibliography") - bibliography_keyword = xmlBibliography.get("keyword") - if bibliography_keyword: - logging.debug(f"Found bibliography keyword {bibliography_keyword}") - else: - logging.debug(f"No bibliography keyword found") - - xmlBibliography.clear() - xmlBibliography.tag = "div" - - bib_parent = xmlBibliography.getparent() - bib_parent.tag = "div" - - xmlBibliographyDiv = etree.Element("div") - xmlBibliography.addnext(xmlBibliographyDiv) - ############### - # new version # - ############### - tmp_citation_filename = "used_citations-monograph" - citations_to_format = [x["id"] for x in citations_json if x["keyword"] == bibliography_keyword] - formatted_references = libeoaconvert.format_citations(citations_to_format, bib_database + ".bib", strLanguage, tmp_citation_filename)[0] - - fixed_entries = libeoaconvert.fix_bib_entries(formatted_references) - for entry in fixed_entries: - xmlBibliographyDiv.append(entry) - ###################### - # end of new version # - ###################### - - ############### - # old version # - ############### - # xml_bib_entries = xmlBibTree.findall(".//entry") - # intNumberOfEntry = 0 - # for xmlEntry in xml_bib_entries: - # if intNumberOfEntry == 0: - # # Don't check for previous author if first entry of the Bibliography - # bibEntry = Bibitem(xmlEntry) - # strNewentry = "

" + createBibEntryAuthorYear(bibEntry, boolSameAuthor=False) + "

" - # else: - # bibEntry = Bibitem(xmlEntry) - # # Check if author of previous Entry is the same - # bibEntryPrevious = Bibitem(xml_bib_entries[intNumberOfEntry - 1]) - # if bibEntry.fullauthorlastfirst()[0] == bibEntryPrevious.fullauthorlastfirst()[0]: - # strNewentry = "

" + createBibEntryAuthorYear(bibEntry, boolSameAuthor=True) + "

" - # elif bibEntryPrevious.fullauthorlastfirst()[0] == bibEntry.fullauthorlastfirst()[0]: - # strNewentry = "

" + createBibEntryAuthorYear(bibEntry, boolSameAuthor=True) + "

" - # elif bibEntry.fullauthorlastfirst()[0] == bibEntryPrevious.fullauthorlastfirst()[0]: - # strNewentry = "

" + createBibEntryAuthorYear(bibEntry, boolSameAuthor=True) + "

" - # else: - # strNewentry = "

" + createBibEntryAuthorYear(bibEntry, boolSameAuthor=False) + "

" - - # xmlNew = etree.fromstring(strNewentry) - # next one writes the bibliography into the document - # xmlBibliography.append(xmlNew) - - # intNumberOfEntry += 1 - ###################### - # end of old version # - ###################### + print_bibliography( + xmlBibliography, + xmlTree, + tmp_citation_filename + ) # If Bibliography-Type is anthology search for EOAbibliography and make one per chapter @@ -1255,42 +1292,12 @@ def cleanup(): tmp_citation_filename = "used_citations-anthology-chapter_{:02d}".format(intChapterNumber) if xmlChapter.find(".//EOAprintbibliography") is not None: xmlBibliography = xmlChapter.find(".//EOAprintbibliography") - bibliography_keyword = xmlBibliography.get("keyword") - if bibliography_keyword: - logging.debug(f"Found bibliography keyword {bibliography_keyword}") - else: - logging.debug(f"No bibliography keyword found") - - xmlBibliography.getparent().tag = "div" - xmlBibliographyDiv = etree.Element("div") - xmlBibliography.addnext(xmlBibliographyDiv) - - citekeys = xmlChapter.xpath(".//citekey/text()") - - nocite_elements = xmlChapter.xpath(".//nocite") - - if nocite_elements: - logging.debug(f"Found {libeoaconvert.plural(len(nocite_elements), 'nocite command')}.") - nocitekeys = [] - for nocite in nocite_elements: - keys = [x.strip() for x in nocite.text.split(",")] - nocitekeys += keys - nocite.tag = "elementtobestripped" - logging.debug(f"Found {libeoaconvert.plural(len(set(nocitekeys)), 'nocite key')}.") - logging.debug(f"Adding nocite keys to the other cite keys.") - citekeys += nocitekeys - - if bibliography_keyword: - logging.info("We want to collect the entries matching the keywords from the database.") - citations_to_format = [x["id"] for x in citations_json if x["keyword"] == bibliography_keyword] - logging.debug(f"Found {libeoaconvert.plural(len(citations_to_format), 'nocite citation')} in database.") - else: - citations_to_format = set(citekeys) - formatted_references = libeoaconvert.format_citations(citations_to_format, bib_database + ".bib", strLanguage, tmp_citation_filename)[0] - fixed_entries = libeoaconvert.fix_bib_entries(formatted_references) - for entry in fixed_entries: - xmlBibliographyDiv.append(entry) + print_bibliography( + xmlBibliography, + xmlChapter, + tmp_citation_filename + ) else: # create an empty file diff --git a/imxml2django.py b/imxml2django.py index 64a437e..3f9f9d8 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -11,6 +11,9 @@ """ +from utils.load_config import load_config +import utils.libeoaconvert as libeoaconvert + import pickle import os import sys @@ -20,46 +23,61 @@ import subprocess import argparse import configparser -import libeoaconvert import logging from copy import deepcopy from lxml import etree +from pathlib import Path + +BASE_DIR = Path( os.path.realpath(__file__) ).parent ##################### # Parsing arguments # ##################### + parser = argparse.ArgumentParser() -parser.add_argument("-c", "--config", dest="CONFIG_FILE", help="Name of configuration file", metavar="CONFIGURATION") -parser.add_argument("-p", "--checkpublicationcfg", help="Check the publication.cfg for completeness.", action="store_true") +parser.add_argument( + "-c", "--config", + default = BASE_DIR / "config" / "eoaconvert.cfg", + dest="CONFIG_FILE", + help="Name of configuration file", + metavar="CONFIGURATION" +) +parser.add_argument( + "-l", "--log-file", + default = "eoaconvert.log", + help="logfile" +) +parser.add_argument( + "--log-level", + default = "DEBUG", + help="log level: choose between DEBUG, INFO, WARNING, ERROR, CRITICAL" +) +parser.add_argument( + "-p", "--checkpublicationcfg", + help="Check the publication.cfg for completeness.", + action="store_true" +) args = parser.parse_args() -if args.CONFIG_FILE is not None: - CONFIG_FILE = os.path.abspath(args.CONFIG_FILE) -else: - CONFIG_FILE = os.path.dirname(sys.argv[0]) + os.path.sep + "config" + os.path.sep + "eoaconvert.cfg" +config_file = args.CONFIG_FILE + +logging.debug("The configfile is %s." % config_file) ################################## # Reading the configuration file # ################################## -CONFIG = configparser.ConfigParser() -CONFIG.read(CONFIG_FILE) - -###################### -# Setting up logging # -###################### -LOGFILE = CONFIG['General']['logfile'] -LOGLEVEL = CONFIG['General']['loglevel'] - -logging.basicConfig(level=LOGLEVEL, format='%(asctime)s - %(levelname)s - %(message)s') - -logging.debug("The configfile is%s." % CONFIG_FILE) +CONFIG = load_config( + config_file, + args.log_file, + args.log_level, +) ######################## # Paths to executables # ######################## -GM_PATH = CONFIG['Executables']['graphicsmagic'] -TL_PATH = CONFIG['Executables']['texlive'] +GM_PATH = "gm" +PDFCROP_EXEC = "pdfcrop" ########################################### # Loading data from first conversion step # @@ -292,7 +310,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid # yellow if os.path.splitext(strImageFileName)[1].lower() == ".pdf": logging.debug("Found a PDF file") - strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName, GM_PATH, TL_PATH) + strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) xmlEOAfigure.set("file", strImageFileDir + strImageFileName.replace(".pdf", ".png")) logging.debug("The filename is %s" % xmlEOAfigure.get("file")) else: @@ -1077,6 +1095,10 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe debug_chapters(xmlEOAchapters) +TRANSLATION_FILE = BASE_DIR / CONFIG['Auxiliaries']['TRANSLATIONS'] +translation_xml = etree.parse( str( TRANSLATION_FILE ) ) +dictLangFootnotes = translation_xml.find("//entry[@name='footnotes']").attrib + for xmlEOAchapter in xmlEOAchapters: groupings = libeoaconvert.get_bigfoot_data(xmlEOAchapter) has_old = 0 != len(xmlEOAchapter.findall(".//note")) @@ -1108,7 +1130,7 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe intObjectNumber += 1 xmlHead = etree.Element("head") - xmlHead.text = libeoaconvert.dictLangFootnotes[libeoaconvert.two_letter_language(xmlEOAchapter.get("language"))] + xmlHead.text = dictLangFootnotes[libeoaconvert.two_letter_language(xmlEOAchapter.get("language"))] xmlEOAsection.append(xmlHead) xmlResult.append(xmlEOAsection) diff --git a/imxml2epub.py b/imxml2epub.py index fb3b6f6..15506e3 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -9,42 +9,84 @@ with eoatex2imxml or tei2imxml. """ +from utils.load_config import load_config +import utils.libeoaconvert as libeoaconvert + import os import sys import argparse import re import shutil -import configparser import pickle import shlex import subprocess import logging from copy import deepcopy from lxml import etree -import libeoaconvert +from pathlib import Path + +BASE_DIR = Path( os.path.realpath(__file__) ).parent +SCRIPT_NAME = Path( __file__).stem ##################### # Parsing arguments # ##################### + parser = argparse.ArgumentParser() -parser.add_argument("-c", "--config", dest="CONFIG_FILE", help="Name of configuration file", metavar="CONFIGURATION") -parser.add_argument("-f", "--font", help="Font to be used, default is TeX Gyre Termes", default="termes") -parser.add_argument("-nc", "--nocaption", help="No captions for figures.", action="store_true") +parser.add_argument( + "-c", "--config", + dest="CONFIG_FILE", + default = BASE_DIR / "config" / "eoaconvert.cfg", + help="Name of configuration file", + metavar="CONFIGURATION" +) +parser.add_argument( + "-l", "--log-file", + default = SCRIPT_NAME + ".log" , + help="logfile" +) +parser.add_argument( + "--log-level", + default = "DEBUG", + help="log level: choose between DEBUG, INFO, WARNING, ERROR, CRITICAL" +) +parser.add_argument( + "-f", "--font", + help="Font to be used, default is TeX Gyre Termes", + default="termes" +) +parser.add_argument( + "-nc", "--nocaption", + help="No captions for figures.", + action="store_true" +) + args = parser.parse_args() +config_file = args.CONFIG_FILE + +''' if args.CONFIG_FILE is not None: CONFIG_FILE = os.path.abspath(args.CONFIG_FILE) else: # CONFIG_FILE = "/Users/kthoden/EOAKram/dev/EOASkripts/Skripten/eoaconvert.cfg" CONFIG_FILE = os.path.dirname(sys.argv[0]) + "/config/eoaconvert.cfg" +''' -print("The config file is ", CONFIG_FILE) +print("The config file is ", config_file) ################################## # Reading the configuration file # ################################## -CONFIG = configparser.ConfigParser() -CONFIG.read(CONFIG_FILE) + +CONFIG = load_config( + config_file, + args.log_file, + args.log_level, +) + +# CONFIG = configparser.ConfigParser() +# CONFIG.read(CONFIG_FILE) # CONFIG = configparser.ConfigParser() # CONFIG.read("/Users/kthoden/EOAKram/dev/EOASkripts/Skripten/eoaconvert.cfg") @@ -55,8 +97,9 @@ EPUB_FILES = os.path.dirname(sys.argv[0]) + "/data/epub_files/" # TEMPLATE_PATH = CONFIG['Auxiliaries']['template_path'] -GM_PATH = CONFIG['Executables']['graphicsmagic'] -TL_PATH = CONFIG['Executables']['texlive'] +GM_PATH = "gm" +PDFCROP_EXEC = "pdfcrop" +# TL_PATH = CONFIG['Executables']['texlive'] # TEXBIN_PATH = CONFIG['Executables']['texbin'] # TRALICS_PATH_EXEC = CONFIG['Executables']['tralics_path_exec'] # TRALICS_PATH_LIB = CONFIG['Executables']['TRALICS_PATH_LIB'] @@ -361,7 +404,7 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): xmlItem.set("href", "images/cover.jpg") xmlItem.set("media-type", "image/jpeg") xmlManifest.append(xmlItem) -shutil.copy(os.getcwd() + "/CONVERT/cover.jpg", os.getcwd() + "/CONVERT/epub/OEBPS/images/") +shutil.copy(os.getcwd() + "/CONVERT/Cover.jpg", os.getcwd() + "/CONVERT/epub/OEBPS/images/") xmlItem = etree.Element("item") xmlItem.set("id", "cover") xmlItem.set("href", "cover.xhtml") @@ -511,7 +554,7 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): print("Found an unrecognized image suffix: %s" % strImageFileName_Suffix) sys.exit() - strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, TL_PATH) + strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) # Add copied file to contentopf content_opf_filename = "images" + os.path.sep + "{}{}.{}".format(strImageFileDir, strImageFileNamewoSuffix, extension_and_mime) content_opf_fileid = "{}{}{}".format(strImageFileDir, strImageFileNamewoSuffix, extension_and_mime) @@ -563,7 +606,7 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): strImageFileName = os.path.basename(strImageFileString) strImageFileNamewoSuffix = os.path.splitext(strImageFileName)[0] shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) - strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, TL_PATH) + strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) # Add copied file to contentopf contentopf = addToContentopf(contentopf, "images/" + strImageFileDir + strImageFileNamewoSuffix + ".jpg", strImageFileDir + strImageFileNamewoSuffix + "-nonumber-jpg", "jpg") logging.debug("Added a nonumber figure") @@ -1272,7 +1315,7 @@ class FootnoteError(Exception): # hier shutil.copy(os.getcwd() + "/" + strImageFile, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) - strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, TL_PATH) + strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) # Add copied file to contentopf img_base_file_name, img_file_extension = os.path.splitext(strImageFileName) diff --git a/tei2imxml.py b/tei2imxml.py old mode 100644 new mode 100755 index 2582a61..7593981 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- """A converter from TEI to customized DocBook XML. @@ -12,6 +12,9 @@ __date__ = "20180116" __author__ = "kthoden@mpiwg-berlin.mpg.de" +from utils.load_config import load_config +import utils.libeoaconvert as libeoaconvert + import os import sys import logging @@ -20,34 +23,27 @@ import pickle import shlex import argparse -import configparser -import libeoaconvert from datetime import datetime from bs4 import BeautifulSoup from lxml import etree, objectify from lxml.html import soupparser +from pathlib import Path # things to be done # assign ids top to bottom for the following elements: # div1 div2 div3 note item table EOAfigure EOAequation formula theorem -CONFIG_FILE = os.path.dirname(sys.argv[0]) + os.path.sep + "config" + os.path.sep +"eoaconvert.cfg" -# Reading the configuration file -CONFIG = configparser.ConfigParser() -CONFIG.read(CONFIG_FILE) - -logging.basicConfig(level=logging.INFO, format=' %(asctime)s - %(levelname)s - %(message)s') - -ns_tei = "http://www.tei-c.org/ns/1.0" -NS_MAP = {"t" : ns_tei} +BASE_DIR = Path( os.path.realpath(__file__) ).parent +SCRIPT_NAME = Path( __file__).stem TMP_DIR = os.path.expanduser("tmp_files") OUTPUT_DIR = os.path.expanduser("CONVERT") -CSL_FILE = CONFIG['Auxiliaries']['CSL_FILE'] - CSV_FILE = os.path.expanduser("hi_figures.csv") +ns_tei = "http://www.tei-c.org/ns/1.0" +NS_MAP = {"t" : ns_tei} + def get_publication_info(xml_tree): """Query the TEI document for metadata fields. @@ -977,13 +973,42 @@ def fix_bib_entries(div_snippet): def main(): """Main function""" + ### data_pickle = TMP_DIR + os.path.sep + 'data.pickle' + # parse args: parser = argparse.ArgumentParser() + parser.add_argument( + "-c", "--config", + dest="CONFIG_FILE", + default = BASE_DIR / "config" / "eoaconvert.cfg", + help="Name of configuration file", + metavar="CONFIGURATION" + ) + parser.add_argument( + "-l", "--log-file", + default = SCRIPT_NAME + ".log" , + help="logfile" + ) + parser.add_argument( + "--log-level", + default = "DEBUG", + help="log level: choose between DEBUG, INFO, WARNING, ERROR, CRITICAL" + ) parser.add_argument("-d", "--pickleddata", default=data_pickle, help="Pickled data file to be used.") parser.add_argument("-him", "--hyperimage", action="store_true") parser.add_argument("teifile", help="TEI XML file to convert into DocBook XML.") args = parser.parse_args() + config_file = args.CONFIG_FILE + print("The config file is ", config_file) + + # load config: + CONFIG = load_config( + config_file, + args.log_file, + args.log_level, + ) + CSL_FILE = BASE_DIR / CONFIG['Auxiliaries']['CSL_FILE'] if not os.path.exists(TMP_DIR): os.mkdir(os.path.expanduser(TMP_DIR)) @@ -1140,5 +1165,8 @@ def main(): # def main ends here if __name__ == '__main__': + + # run main: main() + # finis diff --git a/libeoabibitem.py b/utils/libeoabibitem.py similarity index 100% rename from libeoabibitem.py rename to utils/libeoabibitem.py diff --git a/libeoaconvert.py b/utils/libeoaconvert.py similarity index 87% rename from libeoaconvert.py rename to utils/libeoaconvert.py index 6290594..a5b0f48 100644 --- a/libeoaconvert.py +++ b/utils/libeoaconvert.py @@ -11,40 +11,11 @@ import configparser from lxml import etree from lxml.html import soupparser +from pathlib import Path -################################## -# Reading the configuration file # -################################## -CONFIG_FILE = os.path.dirname(os.path.realpath(__file__)) + os.path.sep + "config" + os.path.sep + "eoaconvert.cfg" -# CONFIG_FILE = os.path.abspath(os.path.dirname(sys.argv[0])) + "/config/ -CONFIG = configparser.ConfigParser() -CONFIG.read(CONFIG_FILE) - -###################### -# Setting up logging # -###################### -LOGFILE = CONFIG['General']['logfile'] -LOGLEVEL = CONFIG['General']['loglevel'] - -CSL_FILE = CONFIG['Auxiliaries']['CSL_FILE'] -TRANSLATION_FILE = CONFIG['Auxiliaries']['TRANSLATIONS'] - -logging.basicConfig(level=LOGLEVEL, format='%(asctime)s - %(levelname)s - %(message)s') - -# Setup of various dictionaries for localization of various elements -# dictLangFootnotes = {"it" : "Note a piè pagina", "fr" : "notes en bas de page", "de" : "Fußnoten", "en" : "Footnotes"} -# dict_and = {"en" : "and", "de" : "und", "fr" : "et", "it" : "e"} -# dict_ed = {"en" : "ed.", "de" : "Hrsg."} -# dict_eds = {"en" : "eds.", "de" : "Hrsg."} - -# use the translation file that is used also for XSL -translation_xml = etree.parse(TRANSLATION_FILE) -dictLangFootnotes = translation_xml.find("//entry[@name='footnotes']").attrib -dict_and = translation_xml.find("//entry[@name='and']").attrib -dict_ed = translation_xml.find("//entry[@name='editor-abbr']").attrib -dict_eds = translation_xml.find("//entry[@name='editors-abbr']").attrib # the new-style footnotes that use LaTeX bigfoot show up in the following order: +# global variables footnote_groups = ["decimal", "lower-latin"] ######################### @@ -76,7 +47,12 @@ def get_bigfoot_data(chapter): ] # def get_bigfoot_data ends here -def sanitizeImage(strImagepath, GM_PATH, TL_PATH): +def sanitizeImage( + strImagepath, + GM_PATH, + PDFCROP_EXEC, + # TL_PATH +): """Adjust and convert image for epub standard""" if not os.path.exists("tmp_files/tmp_images/"): @@ -129,7 +105,7 @@ def sanitizeImage(strImagepath, GM_PATH, TL_PATH): strNewImagepath = os.path.splitext(strImagepath)[0] clipped_file = strImagepath.replace(".pdf", "-clipped.pdf") - Kommando = TL_PATH + "texmf-dist/scripts/pdfcrop/pdfcrop.pl --margins 10 --clip --hires " + strImagepath + " " + clipped_file + Kommando = PDFCROP_EXEC + " --margins 10 --clip --hires " + strImagepath + " " + clipped_file logging.debug(Kommando) Argumente = shlex.split(Kommando) @@ -210,7 +186,13 @@ def format_citations_tex4ht(used_citekeys, bibdata, language, tmp_filename): return references # def format_citations_tex4ht ends here -def format_citations(used_citekeys, bibdata, language, tmp_filename): +def format_citations( + used_citekeys, + bibdata, + language, + tmp_filename, + csl_file +): """Return a formatted xmlstring of the used citations""" tmp_path_md = "tmp_files" + os.path.sep + tmp_filename + ".md" @@ -231,7 +213,7 @@ def format_citations(used_citekeys, bibdata, language, tmp_filename): # citation_formatter.write("@%s\n" % entry) citation_formatter.write("\n# References\n") - command = "pandoc -o %s -t html --filter=pandoc-citeproc --bibliography=%s --csl=%s %s" % (tmp_path_html, bibdata, CSL_FILE, tmp_path_md) + command = "pandoc -o %s -t html --filter=pandoc-citeproc --bibliography=%s --csl=%s %s" % (tmp_path_html, bibdata, csl_file, tmp_path_md) arguments = shlex.split(command) logging.info("Using external command pandoc with command %s" % command) subprocess.call(arguments) diff --git a/utils/load_config.py b/utils/load_config.py new file mode 100644 index 0000000..13c5877 --- /dev/null +++ b/utils/load_config.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8; mode: python -*- + +import configparser +import logging + +from pathlib import Path +import os + +################################## +# Reading the configuration file # +################################## + +def load_config( + cfg_file, + LOGFILE, + LOGLEVEL + ): + + BASE_DIR = Path( os.path.realpath(__file__) ).parent.parent + CONFIG = configparser.ConfigParser() + CONFIG.read( cfg_file ) + + ###################### + # Setting up logging # + ###################### + # LOGFILE = CONFIG['General']['logfile'] + # LOGLEVEL = CONFIG['General']['loglevel'] + + logging.basicConfig(level=LOGLEVEL, format='%(asctime)s - %(levelname)s - %(message)s') + + # Setup of various dictionaries for localization of various elements + # dictLangFootnotes = {"it" : "Note a piè pagina", "fr" : "notes en bas de page", "de" : "Fußnoten", "en" : "Footnotes"} + # dict_and = {"en" : "and", "de" : "und", "fr" : "et", "it" : "e"} + # dict_ed = {"en" : "ed.", "de" : "Hrsg."} + # dict_eds = {"en" : "eds.", "de" : "Hrsg."} + + # use the translation file that is used also for XSL + # translation_xml = etree.parse( str( TRANSLATION_FILE ) ) + # dictLangFootnotes = translation_xml.find("//entry[@name='footnotes']").attrib + # dict_and = translation_xml.find("//entry[@name='and']").attrib + # dict_ed = translation_xml.find("//entry[@name='editor-abbr']").attrib + # dict_eds = translation_xml.find("//entry[@name='editors-abbr']").attrib + + return CONFIG From 34a7dea5070484a647c22e29e905bf7a4fac2109 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 28 Mar 2019 15:41:40 +0100 Subject: [PATCH 002/132] docu: fix redundant/outdated information, dependencies, updated python deps --- INSTALL.md | 28 +++++++++++++++++++++++++--- README.md | 4 ++-- doc/COSMOS.md | 4 ++-- doc/INSTALL.md | 22 ---------------------- doc/eoaclassic-workflow.md | 4 ++-- requirements.txt | 7 ++++++- 6 files changed, 37 insertions(+), 32 deletions(-) delete mode 100644 doc/INSTALL.md diff --git a/INSTALL.md b/INSTALL.md index 3f509e4..8f5195d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,14 +1,33 @@ +# Installation instructions + +## Python Dependencies + All programs require the installation of Python 3, which can be obtained at or through package managers (depending on the operating system). Current installations already include `pip` which is used to install further packages. -In a terminal, run the command - - pip3 install lxml bibtexparser bs4 + $ pip install -r requirements.txt to install the required packages. +## Runtime Dependencies + +Additionally, you will need these extra tools installed ( = in your systems $PATH ): +* [graphicsmagick](http://www.graphicsmagick.org/) +* [tralics](https://www-sop.inria.fr/marelle/tralics/) +* [pandoc](https://pandoc.org/) +* curl +* from your latex distribution: + + - pdfcrop + - xelatex + +For a successful run of the whole conversion you will also need a +slightly older version (Version 2.1) of the biber tool. You can +download the source and/or binaries at +https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/2.1/ + In order to run the xsl scripts found in the [data](https://github.molgen.mpg.de/EditionOpenAccess/EOASkripts/tree/master/data) directory, an XSL processor like @@ -16,6 +35,9 @@ directory, an XSL processor like [doc/XSL.md](https://github.molgen.mpg.de/EditionOpenAccess/EOASkripts/blob/master/doc/XSL.md) for details. +In later versions, the file format was changed. We still need to adapt +to the new format. + ## TEI components Clone the repositories - https://github.com/TEIC/TEI.git diff --git a/README.md b/README.md index 882c719..71f1acb 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ See [doc/XSL.md](https://github.molgen.mpg.de/EditionOpenAccess/EOASkripts/blob/ To install the whole toolchain, clone at least this repository as well as the 'advanced' branch of [EOA sample project](https://github.molgen.mpg.de/EditionOpenAccess/eoa_sample_project). -Follow the installation instructions in [INSTALL.md](https://github.molgen.mpg.de/EditionOpenAccess/EOASkripts/blob/master/INSTALL.md). +Follow the installation instructions in [INSTALL.md](./INSTALL.md). In `eoa_sample_project`, run `xelatex`, `biber` (the version included in your TeX distribution) and `xelatex` two more times. This will give @@ -79,7 +79,7 @@ These scripts don't take any arguments and will produce output in the External dependencies --------------------- -See [INSTALL.md](https://github.molgen.mpg.de/EditionOpenAccess/EOASkripts/blob/master/INSTALL.md) for details. +See [INSTALL.md](./INSTALL.md) for details. - lxml () - bibtexparser () diff --git a/doc/COSMOS.md b/doc/COSMOS.md index f04f9da..09f5ab0 100644 --- a/doc/COSMOS.md +++ b/doc/COSMOS.md @@ -12,8 +12,8 @@ Contains the most important programs for the whole document conversion workflow. - `imxml2django.py` : Create an XML file that can be inserted into the Django database of an EOAv1 installation. - `imxml2epub.py` : Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. - `imxml2tei.py` : Unfinished program to convert a customized DocBook XML to TEI-XML. - - `libeoabibitem.py`: A library for the formatting of bibliographical references. - - `libeoaconvert.py` : A collection of functions for the different conversion steps + - `utils/libeoabibitem.py`: A library for the formatting of bibliographical references. + - `utils/libeoaconvert.py` : A collection of functions for the different conversion steps - `mkimage.py` : Create an automatically generated dummy cover to be used during testing. - `tei2eoatex.xsl` : An XSL converter from TEI-XML to EOATeX - `tei2imxml.py` : A converter from TEI to customized DocBook XML. diff --git a/doc/INSTALL.md b/doc/INSTALL.md deleted file mode 100644 index 2ef2a5e..0000000 --- a/doc/INSTALL.md +++ /dev/null @@ -1,22 +0,0 @@ -For running the tool you will need two additional Python modules. `lxml` -and `PyPDF2`. If you use pip for installing them, there's the -`requirements.txt` which you can run using the command - - pip install -r requirements.txt - -Additionally, you will need two extra tools: -* [graphicsmagick](http://www.graphicsmagick.org/) -* [tralics](https://www-sop.inria.fr/marelle/tralics/) - -Then, edit `config/eoaconvert.cfg` and adjust the paths accordingly. -_texbin_ is the directory that contains executables like _xelatex_. You -can use the which command (e.g. `which xelatex`) to find the correct -path. - -For a successful run of the whole conversion you will also need a -slightly older version (Version 2.1) of the biber tool. You can -download the source and/or binaries at -https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/2.1/ - -In later versions, the file format was changed. We still need to adapt -to the new format. diff --git a/doc/eoaclassic-workflow.md b/doc/eoaclassic-workflow.md index 8ebb561..cdcb588 100644 --- a/doc/eoaclassic-workflow.md +++ b/doc/eoaclassic-workflow.md @@ -25,8 +25,8 @@ This document documents the different parts of the *EOA classic* workflow, which ## imxml2epub.py ## imxml2tei.py ## Libraries -### libeoabibitem.py -### libeoaconvert.py +### utils/libeoabibitem.py +### utils/libeoaconvert.py ## Other files ### config ### debug diff --git a/requirements.txt b/requirements.txt index 18e0863..c61ecf8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,8 @@ lxml==3.8.0 +beautifulsoup4==4.7.1 +bibtexparser==1.1.0 +bs4==0.0.1 +future==0.17.1 +pyparsing==2.3.1 PyPDF2==1.26.0 - +soupsieve==1.9 From f506145ad9374b61eea10492e08f00a12fae1d82 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 28 Mar 2019 15:48:54 +0100 Subject: [PATCH 003/132] further fixing and updating docu --- INSTALL.md | 1 + README.md | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 8f5195d..586835d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -17,6 +17,7 @@ Additionally, you will need these extra tools installed ( = in your systems $PAT * [graphicsmagick](http://www.graphicsmagick.org/) * [tralics](https://www-sop.inria.fr/marelle/tralics/) * [pandoc](https://pandoc.org/) +- [pandoc-citeproc](https://hackage.haskell.org/package/pandoc-citeproc) * curl * from your latex distribution: diff --git a/README.md b/README.md index 71f1acb..395501c 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,3 @@ These scripts don't take any arguments and will produce output in the External dependencies --------------------- See [INSTALL.md](./INSTALL.md) for details. - -- lxml () -- bibtexparser () -- BeautifulSoup () -- pandoc () -- pandoc-citeproc () From 47ac7ee31568d43abfb584bf5b52065456f4f47b Mon Sep 17 00:00:00 2001 From: EsGeh Date: Mon, 1 Apr 2019 15:00:22 +0200 Subject: [PATCH 004/132] make the "mkimage.py" script usable --- mkimage.py | 2 +- requirements.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 mkimage.py diff --git a/mkimage.py b/mkimage.py old mode 100644 new mode 100755 index 277fc5d..bbfcb98 --- a/mkimage.py +++ b/mkimage.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- """Create an automatically generated dummy cover to be used during testing. diff --git a/requirements.txt b/requirements.txt index c61ecf8..36a792e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ future==0.17.1 pyparsing==2.3.1 PyPDF2==1.26.0 soupsieve==1.9 +Pillow==5.4.1 From 9ea919b5a23aae3fc5548d7910bbbfe66611574f Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 4 Apr 2019 11:45:00 +0200 Subject: [PATCH 005/132] scripts: seperate output dirs, improved logging, filename handling. These changes might brake some other scripts. Tested: eoatex2pdf.py: works eoatex2imxml.py: works, but needs `./bibformat` (not in repo) imxml2django.py: works imxml2epub.py: broken (propably is has been broken before?) Problems: `./bibformat/` is needed but not in the repo. It can be downloaded from NextCloud. Improvements: - scripts automatically enable the right latex preamble - remark: no preamble should be in the '.tex' file - improved command line interface - improved output to terminal and log files - scripts output files into seperate folders --- eoatex2imxml.py | 573 +++++++++++++++++++++++++---------------- eoatex2pdf.py | 89 +++++++ imxml2django.py | 321 +++++++++++++++++------ imxml2epub.py | 528 ++++++++++++++++++++++++------------- utils/libeoaconvert.py | 64 +++-- utils/load_config.py | 101 +++++++- 6 files changed, 1173 insertions(+), 503 deletions(-) create mode 100755 eoatex2pdf.py diff --git a/eoatex2imxml.py b/eoatex2imxml.py index a247d37..4e667f0 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -21,7 +21,7 @@ from utils.libeoabibitem import Bibitem import utils.libeoaconvert as libeoaconvert -from utils.load_config import load_config +from utils.load_config import load_config, exec_command, check_executable, copy_dir_overwrite # imports import argparse @@ -36,19 +36,22 @@ import subprocess import sys import shutil -import time import logging import pickle from pathlib import Path +import time -BASE_DIR = Path( os.path.realpath(__file__) ).parent +BASE_DIR = Path( __file__ ).resolve().parent +SCRIPT_PATH = Path( __file__ ) +SCRIPT_NAME = SCRIPT_PATH.stem -############################################################### -# Preperation of certain files and some checks in advance -############################################################### +##################### +# Parsing arguments # +##################### -# Options for the command line: filename / configfile -parser = argparse.ArgumentParser() +parser = argparse.ArgumentParser( + formatter_class=argparse.ArgumentDefaultsHelpFormatter +) parser.add_argument( "-c", "--config", default = BASE_DIR / "config" / "eoaconvert.cfg", @@ -56,12 +59,12 @@ ) parser.add_argument( "-l", "--log-file", - default = "eoaconvert.log", + default = Path("logs", SCRIPT_NAME).with_suffix(".log"), help="logfile" ) parser.add_argument( "--log-level", - default = "DEBUG", + default = "INFO", help="log level: choose between DEBUG, INFO, WARNING, ERROR, CRITICAL" ) parser.add_argument( @@ -79,6 +82,16 @@ required = True, help="Name of main EOATeX file (without suffix!)." ) +parser.add_argument( + "--latex-dir", + default = "./latex-out", + help="directory where to find the output generated by eoatex2pdf.py" +) +parser.add_argument( + "-o", "--output-dir", + default = "./imxml", + help="where to dump all output files" +) parser.add_argument( "-t", "--trash", help="Remove temporary files." @@ -86,28 +99,24 @@ args = parser.parse_args() -config_file = args.config -logging.debug("The configfile is %s." % config_file) +CONFIG_FILE = args.config + +print("The configfile is %s." % CONFIG_FILE) # current biber is not compatible with this code # switch TeX distribution to TeXLive2016, # run biber_2.1 -O biber2-1n.bbl $INPUT to obtain this file BIBERFILE = "biber2-1.bbl" -######################## -# Constant directories # -######################## -CONVERT_DIR = os.getcwd() + os.path.sep + "CONVERT" - ################################## # Reading the configuration file # ################################## CONFIG = load_config( - config_file, - args.log_file, + CONFIG_FILE, args.log_level, + args.log_file, ) ######################## @@ -115,8 +124,7 @@ ######################## GM_PATH = "gm" TRALICS_PATH_EXEC = "tralics" -# (part of texlive distribution): -PDFCROP_EXEC = "pdfcrop" +PDFCROP_EXEC = "pdfcrop" # (part of texlive distribution): # TL_PATH = CONFIG['Executables']['texlive'] # TEXBIN_PATH = CONFIG['Executables']['texbin'] @@ -128,19 +136,95 @@ TEMPLATE_PATH = BASE_DIR / CONFIG['Auxiliaries']['template_path'] SUPPORT_PATH = BASE_DIR / CONFIG['Auxiliaries']['support_path'] +############################ +# Paths: +############################ +INPUT_DIR = Path( args.filename ).resolve().parent +INPUT_PATH_NO_EXT = args.filename +OUTPUT_DIR = Path( args.output_dir ) +LATEX_DIR = Path ( args.latex_dir ) + +CONVERT_DIR = OUTPUT_DIR / "CONVERT" +# CONVERT_DIR = os.getcwd() + os.path.sep + "CONVERT" +TEMP_DIR = OUTPUT_DIR / "tmp_files" +DEBUG_DIR = OUTPUT_DIR / "debug" + +# where to output the xml file: +XML_FILE = OUTPUT_DIR / (INPUT_PATH_NO_EXT + ".xml") + + +################################################# +# Checking for existance of tools and libraries # +################################################# # sanity check: -print("PATH: {}".format( os.environ['PATH'] )) -Kommando = f"which {GM_PATH}" -Argumente = shlex.split(Kommando) -ret = subprocess.run(Argumente).returncode -if ret != 0: - raise( Exception( f"PROGRAM not found: {GM_PATH}" ) ) -Kommando = f"which {TRALICS_PATH_EXEC}" -Argumente = shlex.split(Kommando) -ret = subprocess.run(Argumente).returncode -if ret != 0: - raise( Exception( f"PROGRAM not found: {TRALICS_PATH_EXEC}" ) ) +logging.debug("PATH: {}".format( os.environ['PATH'] )) +check_executable( GM_PATH ) +check_executable( TRALICS_PATH_EXEC ) +check_executable( PDFCROP_EXEC ) + +if not os.path.exists(TRALICS_PATH_LIB): + logging.error(f"Cannot find the Tralics configuration at {TRALICS_PATH_LIB}. Exiting.") + sys.exit() + +################################## +# Setting up various directories # +################################## + +if not os.path.exists(OUTPUT_DIR): + os.mkdir( OUTPUT_DIR ) +if not os.path.exists(TEMP_DIR): + os.mkdir( TEMP_DIR ) +if not os.path.exists( TEMP_DIR / "formulas2png" ): + os.mkdir( TEMP_DIR / "formulas2png" ) +if not os.path.exists( DEBUG_DIR ): + os.mkdir( DEBUG_DIR ) + +''' +# Check for folder and necessary files +if not os.path.exists(CONVERT_DIR): + logging.info(f"The directory {CONVERT_DIR} has not been created yet. Creating it for you") + time.sleep(1) + os.makedirs(CONVERT_DIR) +if not os.path.exists(CONVERT_DIR / "publication.cfg"): + logging.info(f"The publication.cfg file is missing in {CONVERT_DIR} directory.") + if os.path.exists(INPUT_DIR / "publication.cfg"): + shutil.copy(INPUT_DIR / "publication.cfg", CONVERT_DIR) + logging.info(f"Copied from {INPUT_DIR}.") + else: + logging.error("Found no publication.cfg. Exiting") + sys.exit() +if not os.path.exists(CONVERT_DIR / "cover.jpg"): + logging.info(f"The file cover.jpg in {CONVERT_DIR} directory is missing.") + if os.path.exists(INPUT_DIR / "Cover.jpg"): + shutil.copy("Cover.jpg", CONVERT_DIR / "cover.jpg") + logging.info("Copied from current directory.") + else: + logging.error("No coverfile found. You can create a temporary one with the mkimage.py script") + sys.exit() +# if os.path.exists(os.getcwd() + "/pre_xml.tex") == False: +# print ("pre_xml fehlt") +# sys.exit() +''' + +# Copy Support-Files from /Library/MPIWG to current directory +shutil.copy(SUPPORT_PATH / "classes.dtd", OUTPUT_DIR) +shutil.copy(SUPPORT_PATH / "mathml2-qname-1.mod", OUTPUT_DIR) +shutil.copy(SUPPORT_PATH / "mathml2.dtd", OUTPUT_DIR) +copy_dir_overwrite(SUPPORT_PATH / "html", (OUTPUT_DIR / "html")) +copy_dir_overwrite(SUPPORT_PATH / "iso8879", (OUTPUT_DIR / "iso8879")) +copy_dir_overwrite(SUPPORT_PATH / "iso9573-13", (OUTPUT_DIR / "iso9573-13")) +copy_dir_overwrite(SUPPORT_PATH / "mathml", (OUTPUT_DIR / "mathml")) +''' +shutil.copy(SUPPORT_PATH / "classes.dtd", os.getcwd()) +shutil.copy(SUPPORT_PATH / "mathml2-qname-1.mod", os.getcwd()) +shutil.copy(SUPPORT_PATH / "mathml2.dtd", os.getcwd()) +copy_dir_overwrite(SUPPORT_PATH / "html", (os.getcwd() + "/html")) +copy_dir_overwrite(SUPPORT_PATH / "iso8879", (os.getcwd() + "/iso8879")) +copy_dir_overwrite(SUPPORT_PATH / "iso9573-13", (os.getcwd() + "/iso9573-13")) +copy_dir_overwrite(SUPPORT_PATH / "mathml", (os.getcwd() + "/mathml")) +# shutil.copytree(SUPPORT_PATH + "mathml2", (os.getcwd() + "/mathml2")) +''' ######################################## # Certain functions for specific tasks # @@ -154,6 +238,7 @@ def getchildren(xmlElement): def TeX2PNG(LaTeXCode, Type, Chapter, Number): """Function to render LaTeX-Code into PNG-Files, returns PNG-Filename (epub & django)""" + # logging.info( f"TeX2PNG({LaTeXCode}, {Type}, {Chapter}, {Number})" ) # Dictionary contains Type:begin/end Types = { "EOAineq" : ["$", "$"], @@ -181,33 +266,45 @@ def TeX2PNG(LaTeXCode, Type, Chapter, Number): # Get tmp-directory for this user account # tmpDir = os.getenv("TMPDIR") # use local tmpdir - formula_tmp_dir = os.getcwd() + "/tmp_files/formulas2png/" + formula_tmp_dir = TEMP_DIR / "formulas2png" # Make directory items if it doesn't already exist - if not os.path.exists(os.getcwd() + "/items"): - os.mkdir(os.getcwd() + "/items") + items_dir = OUTPUT_DIR / "items" + if not os.path.exists( items_dir ): + os.mkdir( items_dir ) s = string.Template(Template) e = s.substitute(DERINHALT=LaTeXCode) - tmpFile = formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + ".tex" + tmpFile = formula_tmp_dir / (Type + "_" + str(Chapter) + "_" + str(Number) + ".tex" ) tmp = open(tmpFile, "w") tmp.write(e) tmp.close() - Kommando = "xelatex --halt-on-error " + tmpFile + Kommando = "xelatex --halt-on-error " + str(tmpFile.absolute()) Argumente = shlex.split(Kommando) # Redirecting stderr to save XeLaTeX-Output - Datei = open('tmp_files/xelatex-run.log', 'w') + Datei = open(TEMP_DIR / 'xelatex-run.log', 'w') Ergebnis = subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) if Ergebnis == 0: - print("Successfully converted formula " + Type + str(Chapter) + "_" + str(Number)) + logging.info("Successfully converted formula " + Type + str(Chapter) + "_" + str(Number)) if Ergebnis == 1: - print("[ERROR]: Failed to convert formula " + Type + str(Chapter) + "_" + str(Number)) - Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + ".pdf " + formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + "a.pdf" + logging.error("Failed to convert formula " + Type + str(Chapter) + "_" + str(Number)) + Kommando = "{cmd} {arg1} {arg2}".format( + cmd=PDFCROP_EXEC, + arg1=(formula_tmp_dir / (Type + "_" + str(Chapter) + "_" + str(Number) + ".pdf")).absolute(), + arg2=(formula_tmp_dir / (Type + "_" + str(Chapter) + "_" + str(Number) + "a.pdf")).absolute() + ) + # Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + ".pdf " + formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + "a.pdf" Argumente = shlex.split(Kommando) subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) - Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + "a.pdf " + os.getenv("PWD") + "/items/" + Type + "_" + str(Chapter) + "_" + str(Number) + ".png" + Kommando = "{cmd} convert -density 144 {arg1} {arg2}".format( + cmd=GM_PATH, + arg1 = (formula_tmp_dir / (Type + "_" + str(Chapter) + "_" + str(Number) + "a.pdf")).absolute(), + arg2 = (items_dir / (Type + "_" + str(Chapter) + "_" + str(Number) + ".png")).absolute() + ) + # Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + Type + "_" + str(Chapter) + "_" + str(Number) + "a.pdf " + os.getenv("PWD") + "/items/" + Type + "_" + str(Chapter) + "_" + str(Number) + ".png" Argumente = shlex.split(Kommando) subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) + # logging.info("TeX2PNG done") return LaTeXCode # def TeX2PNG ends here @@ -235,12 +332,12 @@ def make_bibchecker(bib_database, set_citations): largebib_template_string_xml = string.Template(largebib_xml_template) largebib_replacement_xml = largebib_template_string_xml.substitute(INSERT_BIB_DATABASE = bib_database, INSERT_CITEKEYS = string_citations) - tmp_latex_file = "%s/debug/debug_onlybib.tex" % (os.getcwd()) + tmp_latex_file = DEBUG_DIR / "debug_onlybib.tex" tmp_latex = open(tmp_latex_file, "w") tmp_latex.write(largebib_replacement) tmp_latex.close() - tmp_xml_file = "%s/debug/debug_onlybib-xml.tex" % (os.getcwd()) + tmp_xml_file = DEBUG_DIR / "debug_onlybib-xml.tex" tmp_xml = open(tmp_xml_file, "w") tmp_xml.write(largebib_replacement_xml) tmp_xml.close() @@ -259,7 +356,7 @@ def createBibEntryAuthorYear(bibEntry, boolSameAuthor): """Function to create a complete Entry of a publication (epub & django) for author-year citation""" strBibEntry = "" if bibEntry.entrytype() not in libeoaconvert.allowed_bibentry_types: - print("[ERROR]: You cannot use the entry type %s in entry %s. Allowed entry types are: %s.\n" % (bibEntry.entrytype(), bibEntry.citekey() , ", ".join(libeoaconvert.allowed_bibentry_types))) + logging.error("You cannot use the entry type %s in entry %s. Allowed entry types are: %s.\n" % (bibEntry.entrytype(), bibEntry.citekey() , ", ".join(libeoaconvert.allowed_bibentry_types))) sys.exit() bool_edited_book = False @@ -319,7 +416,7 @@ def createBibEntryNumeric(bibEntry): strBibEntry = "" if bibEntry.entrytype() not in libeoaconvert.allowed_bibentry_types: - print("[ERROR]: You cannot use the entry type %s in entry %s. Allowed entry types are: %s.\n" % (bibEntry.entrytype(), bibEntry.citekey() , ", ".join(libeoaconvert.allowed_bibentry_types))) + logging.error("You cannot use the entry type %s in entry %s. Allowed entry types are: %s.\n" % (bibEntry.entrytype(), bibEntry.citekey() , ", ".join(libeoaconvert.allowed_bibentry_types))) sys.exit() strAuthor = bibEntry.fullauthorfirstlast() @@ -349,14 +446,14 @@ def pdf_burst(input_file, tmpDir): """Split PDF file into single pages""" from PyPDF2 import PdfFileWriter, PdfFileReader - input1 = PdfFileReader(open(tmpDir + input_file, "rb")) + input1 = PdfFileReader(open(tmpDir / input_file, "rb")) logging.debug("Input is %s and has %d pages." % (input_file, input1.getNumPages())) for pageno in range(input1.getNumPages()): output = PdfFileWriter() output.addPage(input1.getPage(pageno)) - output_filename = tmpDir + "EOAformulas_%d.pdf" % (pageno + 1) + output_filename = tmpDir / ("EOAformulas_%d.pdf" % (pageno + 1)) output_stream = open(output_filename, 'wb') output.write(output_stream) output_stream.close() @@ -382,18 +479,18 @@ def progress(count, total, status=''): def cleanup(): """Remove support files""" try: - os.remove((os.getcwd() + "/classes.dtd")) - os.remove((os.getcwd() + "/mathml2-qname-1.mod")) - os.remove((os.getcwd() + "/mathml2.dtd")) - shutil.rmtree((os.getcwd() + "/html")) - shutil.rmtree((os.getcwd() + "/iso8879")) - shutil.rmtree((os.getcwd() + "/iso9573-13")) - shutil.rmtree((os.getcwd() + "/mathml")) + os.remove(OUTPUT_DIR / "classes.dtd") + os.remove(OUTPUT_DIR / "mathml2-qname-1.mod") + os.remove(OUTPUT_DIR / "mathml2.dtd") + shutil.rmtree(OUTPUT_DIR / "html") + shutil.rmtree(OUTPUT_DIR / "iso8879") + shutil.rmtree(OUTPUT_DIR / "iso9573-13") + shutil.rmtree(OUTPUT_DIR / "mathml") # shutil.rmtree((os.getcwd() + "/mathml2")) logging.debug("Removed support files.") except: - print("No temporary files were found.") + logging.info("No temporary files were found.") # def cleanup ends here # Remove temporary files, neccessary for troubleshooting @@ -401,96 +498,89 @@ def cleanup(): cleanup() sys.exit() -################################################# -# Checking for existance of tools and libraries # -################################################# -if not os.path.exists(TRALICS_PATH_LIB): - print("Cannot find the Tralics configuration at %s. Exiting." % TRALICS_PATH_LIB) - sys.exit() - -################################## -# Setting up various directories # -################################## - -if not os.path.exists("tmp_files"): - os.mkdir(os.path.expanduser("tmp_files")) -if not os.path.exists("tmp_files/formulas2png/"): - os.mkdir(os.path.expanduser("tmp_files/formulas2png/")) -if not os.path.exists(os.getcwd() + "/debug"): - os.mkdir(os.getcwd() + "/debug") - -# Check for folder and necessary files -if not os.path.exists(CONVERT_DIR): - print("The directory CONVERT has not been created yet. Creating it for you") - time.sleep(1) - os.makedirs(CONVERT_DIR) -if not os.path.exists(CONVERT_DIR + os.path.sep + "publication.cfg"): - print("The publication.cfg file is missing in CONVERT directory.") - if os.path.exists(os.getcwd() + os.path.sep + "publication.cfg"): - shutil.copy("publication.cfg", CONVERT_DIR) - print("Copied from current directory.") - else: - print("Found no publication.cfg. Exiting") - sys.exit() -if not os.path.exists(CONVERT_DIR + os.path.sep + "Cover.jpg"): - print("The file Cover.jpg in CONVERT directory is missing.") - if os.path.exists(os.getcwd() + os.path.sep + "Cover.jpg"): - shutil.copy("Cover.jpg", CONVERT_DIR + os.path.sep + "cover.jpg") - print("Copied from current directory.") - else: - print("No coverfile found. You can create a temporary one with the mkimage.py script") - sys.exit() -# if os.path.exists(os.getcwd() + "/pre_xml.tex") == False: -# print ("pre_xml fehlt") -# sys.exit() - - -def copy_dir_overwrite( src, dst ): - if os.path.exists( dst ): - shutil.rmtree( dst ) - shutil.copytree( src, dst) - -# Copy Support-Files from /Library/MPIWG to current directory -shutil.copy(SUPPORT_PATH / "classes.dtd", os.getcwd()) -shutil.copy(SUPPORT_PATH / "mathml2-qname-1.mod", os.getcwd()) -shutil.copy(SUPPORT_PATH / "mathml2.dtd", os.getcwd()) -copy_dir_overwrite(SUPPORT_PATH / "html", (os.getcwd() + "/html")) -copy_dir_overwrite(SUPPORT_PATH / "iso8879", (os.getcwd() + "/iso8879")) -copy_dir_overwrite(SUPPORT_PATH / "iso9573-13", (os.getcwd() + "/iso9573-13")) -copy_dir_overwrite(SUPPORT_PATH / "mathml", (os.getcwd() + "/mathml")) -# shutil.copytree(SUPPORT_PATH + "mathml2", (os.getcwd() + "/mathml2")) - ############################################################## # Preparing the main document # ############################################################## -# Convert TeX to XML via Tralics -Kommando = "%s -log_file %s -confdir %s/tralics_conf -config %s/tralics.tcf -utf8 -utf8output %s.tex" % (TRALICS_PATH_EXEC, args.filename + "-tralics.log", TRALICS_PATH_LIB, TRALICS_PATH_LIB, args.filename) -Argumente = shlex.split(Kommando) -Prozess = subprocess.call(Argumente) -logging.debug(f"Tralics command: {Kommando}") - -# Fix underscore und fix EOAtranscripted -tmpFile = open ((args.filename) + ".xml", "r") -tmpText = tmpFile.read() -tmpFile.close() +# .tex -> .xml +def run_tralics( + input_file, + TRALICS_PATH_LIB, + TRALICS_LOG_PATH, + output_dir = OUTPUT_DIR, +): + fixed_tex_file_path = output_dir / Path(input_file).name + libeoaconvert.enable_preamble( + input_file, + fixed_tex_file_path, + "xml" + ) + # other possible tralics options: + # -output_dir DIR + # -output_file FILENAME + + # Convert TeX to XML via Tralics + + logging.info( f"executing {TRALICS_PATH_EXEC}. log file: {TRALICS_LOG_PATH}" ) + # input_dir = Path(input_file).absolute().parent + exec_command( + "{cmd} -log_file {log_file} -confdir {conf_dir}/tralics_conf -config {conf_dir}/tralics.tcf -utf8 -utf8output -output_dir={output_dir} -input_dir={input_dir} -input_file={input_file}".format( + cmd = TRALICS_PATH_EXEC, + log_file = TRALICS_LOG_PATH, + conf_dir = TRALICS_PATH_LIB, + output_dir = output_dir, + input_dir = output_dir, + input_file = input_file, + ), + ignore_fail = True # :-D + ) + ''' + exec_command( + f"{TRALICS_PATH_EXEC} -log_file {TRALICS_LOG_PATH} -confdir {TRALICS_PATH_LIB}/tralics_conf -config {TRALICS_PATH_LIB}/tralics.tcf -utf8 -utf8output -output_dir={output_dir} -input_dir={input_dir} -input_file={input_file}", + ignore_fail = True # :-D + ) + Kommando = \ + f"{TRALICS_PATH_EXEC} -log_file {TRALICS_LOG_PATH} -confdir {TRALICS_PATH_LIB}/tralics_conf -config {TRALICS_PATH_LIB}/tralics.tcf -utf8 -utf8output {input_file}" + Argumente = shlex.split(Kommando) + Prozess = subprocess.call(Argumente) + logging.debug(f"Tralics command: {Kommando}") + ''' + +run_tralics( + input_file = INPUT_PATH_NO_EXT + '.tex', + TRALICS_PATH_LIB = TRALICS_PATH_LIB, + TRALICS_LOG_PATH = (INPUT_PATH_NO_EXT + "-tralics.log"), + output_dir = OUTPUT_DIR +) -tmpText = re.sub(r"", "_", tmpText) -tmpText = re.sub(r"", "", tmpText) -tmpFile = open ((args.filename) + ".xml", "w") -tmpFile.write(tmpText) -tmpFile.close() +def fix_underscore_and_eoatranscripted( + xml_file +): + # Fix underscore und fix EOAtranscripted + tmpFile = open (xml_file, "r") + tmpText = tmpFile.read() + tmpFile.close() + + tmpText = re.sub(r"", "_", tmpText) + tmpText = re.sub(r"", "", tmpText) + tmpFile = open (xml_file, "w") + tmpFile.write(tmpText) + tmpFile.close() + +fix_underscore_and_eoatranscripted( + xml_file = XML_FILE +) # Complete XML-Document in xmlTree xmlParser = etree.XMLParser(no_network=False,load_dtd=True) #resolve_entities=False -xmlTree = etree.parse((args.filename + ".xml"), xmlParser) +xmlTree = etree.parse(str(XML_FILE), xmlParser) xmlChapters = xmlTree.findall("//div1") # Cleanup of not needed tags in advance. To be cleaned: etree.strip_elements(xmlTree, with_tail=False, *['error']) -print("-----------------------------------------------------") -print("Move EOAlanguage from into attribute of EOAchapter") +logging.info("-----------------------------------------------------") +logging.info("Move EOAlanguage from into attribute of EOAchapter") intChapterNumber = 1 for xmlChapter in xmlChapters: xmlLanguage = xmlChapter.find(".//EOAlanguage") @@ -498,7 +588,7 @@ def copy_dir_overwrite( src, dst ): strLanguage = xmlLanguage.text or "english" xmlChapter.set("language", strLanguage) xmlLanguage.text = None - print("The language of Chapter %d is %s." % (intChapterNumber, strLanguage)) + logging.info("The language of Chapter %d is %s." % (intChapterNumber, strLanguage)) xmlChapter = etree.strip_tags(xmlChapter, "EOAlanguage") intChapterNumber += 1 @@ -510,7 +600,7 @@ def copy_dir_overwrite( src, dst ): try: strSerie = xmlTree.find(".//EOAseries").text or "regular" except AttributeError: - print("\n\nYou are most probably using the preamble for the PDF output. Exiting.") + logging.error("\n\nYou are most probably using the preamble for the PDF output. Exiting.") sys.exit() if strSerie == "Essay": @@ -531,8 +621,8 @@ def copy_dir_overwrite( src, dst ): set_citations = set() -print("-----------------------------------------------------") -print("Numbering Chapters") +logging.info("-----------------------------------------------------") +logging.info("Numbering Chapters") Chapternumber = 1 for xmlChapter in xmlChapters: if xmlChapter.get('rend') != "nonumber": @@ -542,12 +632,12 @@ def copy_dir_overwrite( src, dst ): # EOAequation, EOAsubequation and EOAequationarray Numbering per Chapter intChapterNumber = 1 -print("-----------------------------------------------------") -print("Processing .//EOAequation | .//EOAequationarray | .//EOAsubequations") +logging.info("-----------------------------------------------------") +logging.info("Processing .//EOAequation | .//EOAequationarray | .//EOAsubequations") for xmlChapter in xmlChapters: intEquationnumber = 1 xmlDinge = xmlChapter.xpath(".//EOAequation | .//EOAequationarray | .//EOAsubequations") - print("Working on Chapter %d which contains %d formulæ." % (intChapterNumber, len(xmlDinge))) + logging.info("Working on Chapter %d which contains %d formulæ." % (intChapterNumber, len(xmlDinge))) for xmlDing in xmlDinge: if xmlDing.tag == "EOAequationarray": # tmpNumberinArray is only being used for filename @@ -620,9 +710,9 @@ def copy_dir_overwrite( src, dst ): if xmlChapter.get("rend") == "nonumber": strTempKey = str(tmpNumberinArray) if strTempKey in tmpDictNumberLabel: - print(strTempKey) - print(tmpDictNumberLabel) - print(dictChapters) + logging.info(strTempKey) + logging.info(tmpDictNumberLabel) + logging.info(dictChapters) tmpXML.set("label", tmpDictNumberLabel[strTempKey]) xmlNew.append(tmpXML) xmlDing.getparent().replace(xmlDing, xmlNew) @@ -637,7 +727,7 @@ def copy_dir_overwrite( src, dst ): tmpI = 0 # Insert Number of this Subequation into dictEquations xmlAnchor = xmlDing.find(".//anchor") - print(xmlAnchor) + logging.info(xmlAnchor) if xmlChapter.get("rend") != "nonumber": dictEquations[xmlAnchor.get('id')] = dictChapters[xmlChapter.get('id')] + "." + str(intEquationnumber) if xmlChapter.get("rend") == "nonumber": @@ -716,12 +806,12 @@ def copy_dir_overwrite( src, dst ): intChapterNumber += 1 intChapterNumber = 1 -print("-----------------------------------------------------") -print("Processing .//EOAequationnonumber | .//EOAequationarraynonumber") +logging.info("-----------------------------------------------------") +logging.info("Processing .//EOAequationnonumber | .//EOAequationarraynonumber") for xmlChapter in xmlChapters: tempImagenumber = 1 xmlDinge = xmlChapter.xpath(".//EOAequationnonumber | .//EOAequationarraynonumber") - print("Working on Chapter %d which contains %d formulæ." % (intChapterNumber, len(xmlDinge))) + logging.info("Working on Chapter %d which contains %d formulæ." % (intChapterNumber, len(xmlDinge))) # print ("Working on Chapter " + str(intChapterNumber)) # print ("Es wurden " + str(len(xmlDinge)) + " Formeln gefunden") for xmlDing in xmlDinge: @@ -788,8 +878,8 @@ def copy_dir_overwrite( src, dst ): continue intChapterNumber += 1 -print("-----------------------------------------------------") -print("Converting EOAineq") +logging.info("-----------------------------------------------------") +logging.info("Converting EOAineq") intChapterNumber = 1 intEOAineqRunningOrder = 1 dictEOAineqs = {} @@ -797,10 +887,10 @@ def copy_dir_overwrite( src, dst ): all_ineq = xmlTree.findall(".//EOAineq") # if all_ineq is not None: if len(all_ineq) > 0: - print("Found " + str(len(all_ineq)) + " formulas") + logging.info("Found " + str(len(all_ineq)) + " formulas") for xmlChapter in xmlChapters: - print("Chapter " + str(intChapterNumber)) + logging.info("Chapter " + str(intChapterNumber)) xmlEOAineqs = xmlChapter.findall(".//EOAineq") intEOAineqnumber = 1 for xmlEOAineq in xmlEOAineqs: @@ -848,46 +938,58 @@ def copy_dir_overwrite( src, dst ): # Get tmp-directory for this user account # tmpDir = os.getenv("TMPDIR") # use local tmpdir - formula_tmp_dir = os.getcwd() + "/tmp_files/formulas2png/" + formula_tmp_dir = TEMP_DIR / "formulas2png" # Make directory items if it doesn't already exist - if not os.path.exists(os.getcwd() + "/items"): - os.mkdir(os.getcwd() + "/items") + items_dir = OUTPUT_DIR / "items" + if not os.path.exists( items_dir): + os.mkdir( items_dir ) s = string.Template(Template) e = s.substitute(DERINHALT=strTeXEquations) - tmpFile = formula_tmp_dir + "EOAinline.tex" + tmpFile = formula_tmp_dir / "EOAinline.tex" tmp = open(tmpFile, "w") tmp.write(e) tmp.close() - print("Typesetting all Inline Equations") - Kommando = "xelatex --halt-on-error " + tmpFile + logging.info("Typesetting all Inline Equations") + Kommando = "xelatex --halt-on-error " + str(tmpFile.absolute()) Argumente = shlex.split(Kommando) - Datei = open('tmp_files/xelatex-run.log', 'w') + Datei = open(TEMP_DIR / 'xelatex-run.log', 'w') Ergebnis = subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) - print("Splitting all Inline Equations") + logging.info("Splitting all Inline Equations") pdf_burst("EOAinline.pdf", formula_tmp_dir) - print("Converting %s split pages into PNG-Images" % len(dictEOAineqs.keys())) + logging.info("Converting %s split pages into PNG-Images" % len(dictEOAineqs.keys())) counter_dictEOAineqs = 1 for intRunningOrder in dictEOAineqs.keys(): # provide more status information here in output! progress(counter_dictEOAineqs, len(dictEOAineqs.keys()),"Splitting all inline equations, image %s of %s" % (counter_dictEOAineqs, len(dictEOAineqs.keys()))) - Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAineqs[intRunningOrder] + ".pdf" + Kommando = "{cmd} {arg1} {arg2}".format( + cmd = PDFCROP_EXEC, + arg1 = (formula_tmp_dir / ("EOAformulas_" + str(intRunningOrder) + ".pdf")).absolute(), + arg2 = (formula_tmp_dir / (dictEOAineqs[intRunningOrder] + ".pdf")).absolute() + ) + # Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAineqs[intRunningOrder] + ".pdf" Argumente = shlex.split(Kommando) subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) - Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + dictEOAineqs[intRunningOrder] + ".pdf " + os.getenv("PWD") + "/items/" + dictEOAineqs[intRunningOrder] + ".png" + + Kommando = "{cmd} convert -density 144 {arg1} {arg2}".format( + cmd = GM_PATH, + arg1 = (formula_tmp_dir / (dictEOAineqs[intRunningOrder] + ".pdf")).absolute(), + arg2 = (items_dir / (dictEOAineqs[intRunningOrder] + ".png")).absolute() + ) + #Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + dictEOAineqs[intRunningOrder] + ".pdf " + os.getenv("PWD") + "/items/" + dictEOAineqs[intRunningOrder] + ".png" Argumente = shlex.split(Kommando) subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) counter_dictEOAineqs += 1 else: - print("Found no EOAineq. Continuing") + logging.info("Found no EOAineq. Continuing") ########### # Formula # ########### -print("-----------------------------------------------------") -print("Converting EOAchem") +logging.info("-----------------------------------------------------") +logging.info("Converting EOAchem") intChapterNumber = 1 int_EOAchem_running_order = 1 dictEOAchems = {} @@ -895,10 +997,10 @@ def copy_dir_overwrite( src, dst ): all_chem = xmlTree.findall(".//EOAchem") # if all_chem is not None: if len(all_chem) > 0: - print("Found " + str(len(all_chem)) + " chemical formulas") + logging.info("Found " + str(len(all_chem)) + " chemical formulas") for xmlChapter in xmlChapters: - print("Chapter " + str(intChapterNumber)) + logging.info("Chapter " + str(intChapterNumber)) xmlEOAchems = xmlChapter.findall(".//EOAchem") int_EOAchem_number = 1 for xml_EOAchem in xmlEOAchems: @@ -929,46 +1031,58 @@ def copy_dir_overwrite( src, dst ): # Get tmp-directory for this user account # tmpDir = os.getenv("TMPDIR") # use local tmpdir - formula_tmp_dir = os.getcwd() + "/tmp_files/formulas2png/" + formula_tmp_dir = TEMP_DIR / "formulas2png/" # Make directory items if it doesn't already exist - if not os.path.exists(os.getcwd() + "/items"): - os.mkdir(os.getcwd() + "/items") + items_dir = OUTPUT_DIR / "items" + if not os.path.exists( items_dir ): + os.mkdir( items_dir ) s = string.Template(Template) e = s.substitute(DERINHALT=str_tex_chem) - tmpFile = formula_tmp_dir + "EOAchem.tex" + tmpFile = formula_tmp_dir / "EOAchem.tex" tmp = open(tmpFile, "w") tmp.write(e) tmp.close() - print("Typesetting all inline Chemical formulas") - Kommando = "xelatex --halt-on-error " + tmpFile + logging.info("Typesetting all inline Chemical formulas") + Kommando = "xelatex --halt-on-error " + str(tmpFile.absolute()) Argumente = shlex.split(Kommando) - Datei = open('tmp_files/xelatex-run.log', 'w') + Datei = open(TEMP_DIR / 'xelatex-run.log', 'w') Ergebnis = subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) - print("Splitting all Inline Chemical formulas") + logging.info("Splitting all Inline Chemical formulas") pdf_burst("EOAchem.pdf", formula_tmp_dir) - print("Converting %s split pages into PNG-Images" % len(dictEOAchems.keys())) + logging.info("Converting %s split pages into PNG-Images" % len(dictEOAchems.keys())) counter_dictEOAchems = 1 for intRunningOrder in dictEOAchems.keys(): # provide more status information here in output! progress(counter_dictEOAchems, len(dictEOAchems.keys()),"Splitting all inline equations, image %s of %s" % (counter_dictEOAchems, len(dictEOAchems.keys()))) - Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAchems[intRunningOrder] + ".pdf" + Kommando = "{cmd} {arg1} {arg2}".format( + cmd=PDFCROP_EXEC, + arg1=(formula_tmp_dir / ("EOAformulas_" + str(intRunningOrder) + ".pdf")).absolute(), + arg2=(formula_tmp_dir / (dictEOAchems[intRunningOrder] + ".pdf")).absolute() + ) + # Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAchems[intRunningOrder] + ".pdf" Argumente = shlex.split(Kommando) subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) - Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + dictEOAchems[intRunningOrder] + ".pdf " + os.getenv("PWD") + "/items/" + dictEOAchems[intRunningOrder] + ".png" + + Kommando = "{cmd} convert -density 144 {arg1} {arg2}".format( + cmd=GM_PATH, + arg1 = (formula_tmp_dir / (dictEOAchems[intRunningOrder] + ".pdf")).absolute(), + arg2 = (items_dir / (dictEOAchems[intRunningOrder] + ".png")).absolute() + ) + # Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + dictEOAchems[intRunningOrder] + ".pdf " + os.getenv("PWD") + "/items/" + dictEOAchems[intRunningOrder] + ".png" Argumente = shlex.split(Kommando) subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) counter_dictEOAchems += 1 else: - print("Found no EOAchem. Continuing") + logging.info("Found no EOAchem. Continuing") ############### # Formula end # ############### -print("-----------------------------------------------------") -print("EOAFigure Numbering per Chapter") +logging.info("-----------------------------------------------------") +logging.info("EOAFigure Numbering per Chapter") for xmlChapter in xmlChapters: Figurenumber = 1 xmlFigures = xmlChapter.xpath(".//EOAfigure | .//EOAlsfigure") @@ -984,8 +1098,8 @@ def copy_dir_overwrite( src, dst ): xmlFigure.set("id", xmlAnchor.get("id")) Figurenumber += 1 -print("-----------------------------------------------------") -print("Numbering Theorems") +logging.info("-----------------------------------------------------") +logging.info("Numbering Theorems") for xmlChapter in xmlChapters: xmlTheorems = xmlChapter.findall(".//theorem") for xmlTheorem in xmlTheorems: @@ -993,8 +1107,8 @@ def copy_dir_overwrite( src, dst ): strNumber = xmlTheorem.get("id-text") dictTheorems[strUID] = strNumber -print("-----------------------------------------------------") -print("Section, Subsection,... Numbering per Chapter") +logging.info("-----------------------------------------------------") +logging.info("Section, Subsection,... Numbering per Chapter") intChapterNumber = 1 for xmlChapter in xmlChapters: strUID = xmlChapter.get("id") @@ -1024,8 +1138,8 @@ def copy_dir_overwrite( src, dst ): if xmlChapter.get("rend") != "nonumber": intChapterNumber += 1 -print("-----------------------------------------------------") -print("Numbering of Footnotes per Chapter") +logging.info("-----------------------------------------------------") +logging.info("Numbering of Footnotes per Chapter") intChapterNumber = 1 for xmlChapter in xmlChapters: intNoteNumber = 1 @@ -1042,8 +1156,8 @@ def copy_dir_overwrite( src, dst ): # 'fndict': {'uid11': '2', 'uid12': '3', 'uid9': '1'}, -print("-----------------------------------------------------") -print("Numbering of Lists per Chapter") +logging.info("-----------------------------------------------------") +logging.info("Numbering of Lists per Chapter") for xmlChapter in xmlChapters: xmlListitems = xmlChapter.findall(".//item") for xmlListitem in xmlListitems: @@ -1051,9 +1165,9 @@ def copy_dir_overwrite( src, dst ): strItemNumber = xmlListitem.get("id-text") dictLists[strUID] = strItemNumber -print("-----------------------------------------------------") -print("Working on Page Numbers for References") -listAuxFiles = glob.glob(os.getcwd() + "/*.aux") +logging.info("-----------------------------------------------------") +logging.info("Working on Page Numbers for References") +listAuxFiles = glob.glob( str(LATEX_DIR /"*.aux") ) if len(listAuxFiles) == 0: logging.error("No aux file found. Exiting") sys.exit(1) @@ -1077,11 +1191,11 @@ def copy_dir_overwrite( src, dst ): if matched_citation is not None: set_citations.add(matched_citation.group(1)) -print(dictPagelabels) -print(set_citations) +logging.info(dictPagelabels) +logging.info(set_citations) -print("-----------------------------------------------------") -print("Numbering of Tables per Chapter") +logging.info("-----------------------------------------------------") +logging.info("Numbering of Tables per Chapter") intChapterNumber = 1 for xmlChapter in xmlChapters: intTableNumber = 1 @@ -1120,7 +1234,7 @@ def copy_dir_overwrite( src, dst ): sys.exit() # the new solution: pandoc-citeproc -interim_bib_json_file = (args.filename) + "-bib.json" +interim_bib_json_file = INPUT_PATH_NO_EXT + "-bib.json" citeproc_command = "pandoc-citeproc --bib2json %s" % bib_database + ".bib" logging.debug(f"Running citeproc with the following command: {citeproc_command}") citeproc_arguments = shlex.split(citeproc_command) @@ -1140,11 +1254,11 @@ def copy_dir_overwrite( src, dst ): # the old solution # #################### # # Copy interim .bbl-File to interim bib.tex file -# interim_bibtex_file = (args.filename) + "bib.tex" +# interim_bibtex_file = INPUT_PATH_NO_EXT + "bib.tex" # try: # shutil.copy(BIBERFILE, interim_bibtex_file) # except FileNotFoundError: -# print("%s has not been created yet. Switch TeX distribution to TeXLive2016, run biber_2.1 -O biber2-1.bbl %s to obtain this file" % (BIBERFILE, args.filename)) +# print("%s has not been created yet. Switch TeX distribution to TeXLive2016, run biber_2.1 -O biber2-1.bbl %s to obtain this file" % (BIBERFILE, INPUT_PATH_NO_EXT)) # # Read all lines of Bibliographic TeX # tmpFile = open(interim_bibtex_file, "r") # tmpLines = tmpFile.readlines() @@ -1161,11 +1275,11 @@ def copy_dir_overwrite( src, dst ): # tmpFile.close() # # TeX has been sanitized, now tralics to make it intermediate XML # print("TeX has been sanitized, now tralics to make it intermediate XML") -# Kommando = "%s -log_file %s -confdir %s/tralics_conf -config %s/tralics.tcf -utf8 -utf8output -entnames=false %sbib.tex" % (TRALICS_PATH_EXEC, args.filename + "-bib-tralics.log", TRALICS_PATH_LIB, TRALICS_PATH_LIB, args.filename) +# Kommando = "%s -log_file %s -confdir %s/tralics_conf -config %s/tralics.tcf -utf8 -utf8output -entnames=false %sbib.tex" % (TRALICS_PATH_EXEC, INPUT_PATH_NO_EXT + "-bib-tralics.log", TRALICS_PATH_LIB, TRALICS_PATH_LIB, INPUT_PATH_NO_EXT) # Argumente = shlex.split(Kommando) # Prozess = subprocess.call(Argumente) # # Sanitize XML to make it useable -# tmpFile = open((args.filename) + "bib.xml", "r") +# tmpFile = open((INPUT_PATH_NO_EXT) + "bib.xml", "r") # tmpContent = tmpFile.read() # tmpFile.close() # listReplace = [ r"", @@ -1200,13 +1314,13 @@ def copy_dir_overwrite( src, dst ): # # Put back Ampersand # tmpContent = re.sub(r"&", "&", tmpContent) -# tmpFile = open((args.filename) + "bib.xml", "w") +# tmpFile = open((INPUT_PATH_NO_EXT) + "bib.xml", "w") # tmpFile.write(tmpContent) # tmpFile.close() # # TeXML has been sanitized, now load xml-Tree # xmlParser2 = etree.XMLParser(no_network=False,load_dtd=False) -# xmlBibTree = etree.parse((args.filename + "bib.xml"), xmlParser2) +# xmlBibTree = etree.parse((INPUT_PATH_NO_EXT + "bib.xml"), xmlParser2) # xml_bib_entries = xmlBibTree.findall(".//entry") ########################### @@ -1254,8 +1368,8 @@ def print_bibliography( else: citations_to_format = set(citekeys) - print( "citekeys: ") - print( len( citekeys ) ) + logging.info( "citekeys: ") + logging.info( len( citekeys ) ) csl_file = BASE_DIR / CONFIG['Auxiliaries']['CSL_FILE'] formatted_references = libeoaconvert.format_citations( citations_to_format, @@ -1272,7 +1386,7 @@ def print_bibliography( # If Bibliography-Type is monograph search for EOAbibliography and make it all if bib_type == "monograph": - tmp_citation_filename = "used_citations-monograph" + tmp_citation_filename = TEMP_DIR / "used_citations-monograph" if xmlTree.find(".//EOAprintbibliography") is not None: # to insert here: with keywords we can have multiple bibliographies xmlBibliography = xmlTree.find(".//EOAprintbibliography") @@ -1289,7 +1403,7 @@ def print_bibliography( intChapterNumber = 1 for xmlChapter in xmlChapters: logging.debug(f"Looking at chapter {intChapterNumber}.") - tmp_citation_filename = "used_citations-anthology-chapter_{:02d}".format(intChapterNumber) + tmp_citation_filename = TEMP_DIR / ("used_citations-anthology-chapter_{:02d}".format(intChapterNumber)) if xmlChapter.find(".//EOAprintbibliography") is not None: xmlBibliography = xmlChapter.find(".//EOAprintbibliography") @@ -1302,7 +1416,7 @@ def print_bibliography( else: # create an empty file logging.debug("No bibliography found.") - open("tmp_files" + os.path.sep + tmp_citation_filename + "_nocitations", 'a').close() + open(TEMP_DIR / (tmp_citation_filename + "_nocitations"), 'a').close() """ @@ -1364,19 +1478,19 @@ def print_bibliography( if bib_type == "monograph": tmp_citation_filename = "used_citations-monograph" - tmp_path_html = "tmp_files" + os.path.sep + tmp_citation_filename + ".html" + tmp_path_html = TEMP_DIR / (tmp_citation_filename + ".html") with open(tmp_path_html, "r") as formatted_citations: form_cit = BeautifulSoup(formatted_citations, "html.parser") for xmlChapter in xmlChapters: - print("-----------------------------------------------------") - print("Processing References for Chapter " + str(intChapterNumber)) + logging.info("-----------------------------------------------------") + logging.info("Processing References for Chapter " + str(intChapterNumber)) xmlCitations = xmlChapter.xpath(".//EOAciteauthoryear | .//EOAciteyear | .//EOAcitemanual") if bib_type == "anthology": tmp_citation_filename = "used_citations-anthology-chapter_{:02d}".format(intChapterNumber) - tmp_path_html = "tmp_files" + os.path.sep + tmp_citation_filename + ".html" - no_cite_path = "tmp_files" + os.path.sep + tmp_citation_filename + "_nocitations" + tmp_path_html = TEMP_DIR / (tmp_citation_filename + ".html") + no_cite_path = TEMP_DIR / (tmp_citation_filename + "_nocitations") if os.path.exists(tmp_path_html): with open(tmp_path_html, "r") as formatted_citations: form_cit = BeautifulSoup(formatted_citations, "html.parser") @@ -1460,7 +1574,7 @@ def print_bibliography( try: citeauthoryear_value = form_cit.select("#citeauthoryear ~ p > span[data-cites='%s']" % string_citekey)[0].text[1:-1] except IndexError: - print("Could not find {}. Exiting.".format(string_citekey)) + logging.error("Could not find {}. Exiting.".format(string_citekey)) sys.exit() data_title_value = citeauthoryear_value if xmlCitation.tag == "EOAciteauthoryear": @@ -1535,7 +1649,7 @@ def print_bibliography( # Now for the references via EOAcitenumeric xmlCitenumerics = xmlTree.findall(".//EOAcitenumeric") for xmlCitenumeric in xmlCitenumerics: - print(etree.tostring(xmlCitenumeric)) + logging.info(etree.tostring(xmlCitenumeric)) strPopover = "" tmpCitekeys = xmlCitenumeric.find(".//citekey").text tmpCitekeys = re.sub(" ", "", tmpCitekeys) @@ -1595,7 +1709,7 @@ def print_bibliography( if bib_type == "anthology-numeric": intChapterNumber = 1 for xmlChapter in xmlChapters: - print("Processing Bibliography") + logging.info("Processing Bibliography") if xmlChapter.find(".//EOAprintbibliography") is not None: dictCitekeysNumbers = {} dictCitekeysTitles = {} @@ -1621,17 +1735,17 @@ def print_bibliography( intNumberOfEntry += 1 # Now for the references via EOAcitenumeric xmlCitenumerics = xmlChapter.xpath(".//EOAcitenumeric | .//EOAciteauthoryear | .//EOAciteyear") - print("Found numeric citation in chapter " + str(intChapterNumber)) + logging.info("Found numeric citation in chapter " + str(intChapterNumber)) for xmlCitenumeric in xmlCitenumerics: strPopover = "" tmpCitekeys = xmlCitenumeric.find(".//citekey").text tmpCitekeys = re.sub(" ", "", tmpCitekeys) tmpCitekeys = re.sub("\n", "", tmpCitekeys) - print(tmpCitekeys) + logging.info(tmpCitekeys) listCitekeys = re.split("\,", tmpCitekeys) listCitenumbers = [] for strCitekey in listCitekeys: - print(strCitekey) + logging.info(strCitekey) listCitenumbers.append(dictCitekeysNumbers[strCitekey]) # Create Text to be used on the website in a popover strPopover = strPopover + "[" + dictCitekeysNumbers[strCitekey] + "] " + dictCitekeysTitles[strCitekey] + " " @@ -1693,8 +1807,8 @@ def print_bibliography( # here followed the conversion to epub and the conversion to django.xml # both parts were removed and put into separate files. -intermediate_file_pre = "tmp_files/IntermediateXMLFile_pre.xml" -intermediate_file = "tmp_files/IntermediateXMLFile.xml" +intermediate_file_pre = TEMP_DIR / "IntermediateXMLFile_pre.xml" +intermediate_file = TEMP_DIR / "IntermediateXMLFile.xml" ergebnisdatei = open(intermediate_file_pre, "w") ergebnis = etree.tostring(xmlTree, pretty_print=True, encoding="unicode") ergebnisdatei.write(ergebnis) @@ -1726,20 +1840,23 @@ def print_bibliography( 'pagelabeldict' : dictPagelabels } -with open('tmp_files/data.pickle', 'wb') as f: +with open(TEMP_DIR / 'data.pickle', 'wb') as f: # Pickle the 'data' dictionary using the highest protocol available. pickle.dump(data_to_pickle, f, pickle.HIGHEST_PROTOCOL) -grep_command = "grep -A1 -B2 'argument of \\\EOAfn' %s-tralics.log" % args.filename +grep_command = "grep -A1 -B2 'argument of \\\EOAfn' {}".format( + # INPUT_PATH_NO_EXT + OUTPUT_DIR / (INPUT_PATH_NO_EXT + "-tralics.log") +) grep_command_arguments = shlex.split(grep_command) grep_result = subprocess.Popen(grep_command_arguments, stdout=subprocess.PIPE) grep_output = grep_result.stdout.read() if len(grep_output) > 0: - print("\n===\nFootnotes with paragraphs were found. They have to be replaced by the \EOAfnpar command.\n") - print(grep_output.decode("utf-8")) - print("===\n") + logging.info("\n===\nFootnotes with paragraphs were found. They have to be replaced by the \EOAfnpar command.\n") + logging.info(grep_output.decode("utf-8")) + logging.info("===\n") -print("Removing temporary files.") +logging.info("Removing temporary files.") cleanup() -print("Done!") +logging.info("Done!") sys.exit() diff --git a/eoatex2pdf.py b/eoatex2pdf.py new file mode 100755 index 0000000..f07a9e8 --- /dev/null +++ b/eoatex2pdf.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python3 + +from utils.load_config import load_config, check_executable, exec_command, copy_dir_overwrite +import utils.libeoaconvert as libeoaconvert + +import argparse +from pathlib import Path +import logging +import os +import shutil +import pathlib + + +BASE_DIR = Path( __file__ ).resolve().parent +SCRIPT_PATH = Path( __file__ ) +SCRIPT_NAME = SCRIPT_PATH.stem + +def main( + input_file, + output_dir +): + check_executable( "xelatex" ) + if( not os.path.exists( output_dir ) ): + os.makedirs( output_dir ) + fixed_file_path = Path(output_dir) / input_file + libeoaconvert.enable_preamble( + input_file, + fixed_file_path, + "pdf" + ) + copy_dir_overwrite( + Path(input_file).parent / "texfiles", + Path(output_dir) / "texfiles" + ) + + exec_command( + f"xelatex --output-directory={output_dir} {fixed_file_path}", + ) + exec_command( + "biber {}".format( Path(input_file).stem ), + wd = output_dir + ) + exec_command( + f"xelatex --output-directory={output_dir} {fixed_file_path}", + ) + exec_command( + f"xelatex --output-directory={output_dir} {fixed_file_path}", + ) + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + formatter_class=argparse.ArgumentDefaultsHelpFormatter + ) + parser.add_argument( + "-f", "--filename", + required = True, + help="Name of main EOATeX file" + ) + parser.add_argument( + "-o", "--output-dir", + default = "./latex-out" + ) + parser.add_argument( + "-c", "--config", + default = BASE_DIR / "config" / "eoaconvert.cfg", + help="Name of config file" + ) + parser.add_argument( + "-l", "--log-file", + default = Path("logs", SCRIPT_NAME).with_suffix(".log"), + help="logfile" + ) + parser.add_argument( + "--log-level", + default = "INFO", + help="log level: choose between DEBUG, INFO, WARNING, ERROR, CRITICAL" + ) + args = parser.parse_args() + + load_config( + args.config, + args.log_level, + args.log_file + ) + + main( + input_file = args.filename, + output_dir = args.output_dir + ) diff --git a/imxml2django.py b/imxml2django.py index 3f9f9d8..d56d24e 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -11,7 +11,7 @@ """ -from utils.load_config import load_config +from utils.load_config import load_config, exec_command, check_executable import utils.libeoaconvert as libeoaconvert import pickle @@ -27,14 +27,19 @@ from copy import deepcopy from lxml import etree from pathlib import Path +import time -BASE_DIR = Path( os.path.realpath(__file__) ).parent +BASE_DIR = Path( __file__ ).resolve().parent +SCRIPT_PATH = Path( __file__ ) +SCRIPT_NAME = SCRIPT_PATH.name ##################### # Parsing arguments # ##################### -parser = argparse.ArgumentParser() +parser = argparse.ArgumentParser( + formatter_class=argparse.ArgumentDefaultsHelpFormatter +) parser.add_argument( "-c", "--config", default = BASE_DIR / "config" / "eoaconvert.cfg", @@ -44,12 +49,12 @@ ) parser.add_argument( "-l", "--log-file", - default = "eoaconvert.log", + default = Path("logs", SCRIPT_NAME).with_suffix(".log"), help="logfile" ) parser.add_argument( "--log-level", - default = "DEBUG", + default = "INFO", help="log level: choose between DEBUG, INFO, WARNING, ERROR, CRITICAL" ) parser.add_argument( @@ -57,32 +62,103 @@ help="Check the publication.cfg for completeness.", action="store_true" ) +parser.add_argument( + "--publication-dir", + default = ".", + help="directory containing publication.cfg and the Cover.jpg" +) +parser.add_argument( + "-i", "--input-dir", + default = "./imxml", + help="directory containing the intermediate xml generated by eoatex2imxml.py" +) +parser.add_argument( + "-o", "--output-dir", + default = "./django", + help="where to dump all output files" +) args = parser.parse_args() config_file = args.CONFIG_FILE -logging.debug("The configfile is %s." % config_file) +print("The configfile is %s." % config_file) ################################## # Reading the configuration file # ################################## CONFIG = load_config( config_file, - args.log_file, args.log_level, + args.log_file, ) ######################## # Paths to executables # ######################## GM_PATH = "gm" -PDFCROP_EXEC = "pdfcrop" +PDFCROP_EXEC = "pdfcrop" # (part of texlive distribution): + +############################ +# Paths: +############################ +INPUT_DIR = Path( args.input_dir ) +OUTPUT_DIR = Path( args.output_dir ) +PUBLICATION_DIR = Path( args.publication_dir ) +TEMP_DIR = OUTPUT_DIR / "tmp_files" +CONVERT_DIR = OUTPUT_DIR / "CONVERT" +DEBUG_DIR = OUTPUT_DIR / "debug" + +############################ +# Paths to auxiliary files # +############################ +TRANSLATION_FILE = BASE_DIR / CONFIG['Auxiliaries']['TRANSLATIONS'] + +# prepare: +logging.debug("PATH: {}".format( os.environ['PATH'] )) +check_executable( GM_PATH ) +check_executable( PDFCROP_EXEC ) + +if not TEMP_DIR.exists(): + os.makedirs( TEMP_DIR ) +if not CONVERT_DIR.exists(): + os.makedirs( CONVERT_DIR ) +if not DEBUG_DIR.exists(): + os.makedirs( DEBUG_DIR ) + +# Check for folder and necessary files +if not os.path.exists(CONVERT_DIR): + logging.info(f"The directory {CONVERT_DIR} has not been created yet. Creating it for you") + time.sleep(1) + os.makedirs(CONVERT_DIR) +if not os.path.exists(CONVERT_DIR / "publication.cfg"): + logging.info(f"The publication.cfg file is missing in {CONVERT_DIR} directory.") + if os.path.exists(PUBLICATION_DIR / "publication.cfg"): + shutil.copy(PUBLICATION_DIR / "publication.cfg", CONVERT_DIR) + logging.info(f"Copied from {PUBLICATION_DIR}.") + else: + logging.error("Found no publication.cfg. Exiting") + sys.exit( 1 ) +if not os.path.exists(CONVERT_DIR / "cover.jpg"): + logging.info(f"The file cover.jpg in {CONVERT_DIR} directory is missing.") + if os.path.exists(PUBLICATION_DIR / "Cover.jpg"): + shutil.copy(PUBLICATION_DIR / "Cover.jpg", CONVERT_DIR / "cover.jpg") + logging.info("Copied from current directory.") + else: + logging.error("No coverfile found. You can create a temporary one with the mkimage.py script") + sys.exit( 1 ) +# if os.path.exists(os.getcwd() + "/pre_xml.tex") == False: +# print ("pre_xml fehlt") +# sys.exit() + +# if os.path.exists(os.getcwd() + "/pre_xml.tex") == False: +# print ("pre_xml fehlt") +# sys.exit() ########################################### # Loading data from first conversion step # ########################################### -with open('tmp_files' + os.path.sep + 'data.pickle', 'rb') as f: +with open(INPUT_DIR / "tmp_files" / 'data.pickle', 'rb') as f: data = pickle.load(f) dictChapters = data["chapterdict"] @@ -95,12 +171,16 @@ dictTables = data["tabdict"] dictPagelabels = data["pagelabeldict"] -if not os.path.exists(os.getcwd() + os.path.sep + "debug"): - os.mkdir(os.getcwd() + os.path.sep + "debug") +if not os.path.exists(DEBUG_DIR): + os.mkdir(DEBUG_DIR) -xmlTree = etree.parse("tmp_files" + os.path.sep + "IntermediateXMLFile.xml") +xmlTree = etree.parse( str(INPUT_DIR / "tmp_files" / "IntermediateXMLFile.xml") ) -libeoaconvert.debug_xml_here(xmlTree, "fresh") +libeoaconvert.debug_xml_here( + xmlTree, + "fresh", + DEBUG_DIR +) print(""" ############################################################################ @@ -108,11 +188,11 @@ ############################################################################ """) # Create django File Structure -if os.path.exists(os.getcwd() + os.path.sep + "CONVERT" + os.path.sep + "django") == False: - os.mkdir(os.getcwd() + os.path.sep + "CONVERT" + os.path.sep + "django") - os.mkdir(os.getcwd() + os.path.sep + "CONVERT" + os.path.sep + "django" + os.path.sep + "images") - os.mkdir(os.getcwd() + os.path.sep + "CONVERT" + os.path.sep + "django" + os.path.sep + "images" + os.path.sep + "embedded") - os.mkdir(os.getcwd() + os.path.sep + "CONVERT" + os.path.sep + "django" + os.path.sep + "files") +if not os.path.exists(CONVERT_DIR / "django"): + os.mkdir(CONVERT_DIR / "django") + os.mkdir(CONVERT_DIR / "django" / "images") + os.mkdir(CONVERT_DIR / "django" / "images" / "embedded") + os.mkdir(CONVERT_DIR / "django" / "files") # Create empty xmlTree xmlEOAdocument = etree.Element("EOAdocument") @@ -120,9 +200,13 @@ etree.strip_attributes(xmlTree, "noindent") # Remove temp-Tag etree.strip_tags(xmlTree, "temp") -libeoaconvert.debug_xml_here(xmlTree, "afterstriptags") +libeoaconvert.debug_xml_here( + xmlTree, + "afterstriptags", + DEBUG_DIR +) # Write Temporary XML-Maintree -ergebnisdatei = open("tmp_files" + os.path.sep + "Devel_django.xml", "w") +ergebnisdatei = open(TEMP_DIR / "Devel_django.xml", "w") ergebnis = etree.tostring(xmlTree, pretty_print=True, encoding="unicode") ergebnisdatei.write(ergebnis) ergebnisdatei.close() @@ -174,7 +258,7 @@ def debug_chapters(xmlEOAchapters): chap_num = 1 for chapter in xmlEOAchapters: - tmp_filename = "%s/debug/debug-chapter-%02d.xml" % (os.getcwd(), chap_num) + tmp_filename = DEBUG_DIR / ("debug-chapter-%02d.xml" % chap_num) tmp_file = open (tmp_filename, "w") tmp_result = etree.tostring(chapter, pretty_print=True, encoding="unicode") tmp_file.write(tmp_result) @@ -242,13 +326,20 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid logging.debug(xmlFigures) if xmlFigures is not None: for xmlFigure in xmlFigures: + # example 'images/1.jpg' strImageFileString = xmlFigure.find(".//file").text strImageFileString = strImageFileString.rstrip("\n") strImageFileDir = os.path.dirname(strImageFileString) strImageFileDir = re.sub("/", "", strImageFileDir) strImageFileName = os.path.basename(strImageFileString) strImageFileNamewoSuffix = os.path.splitext(strImageFileName)[0] - strCommand = GM_PATH + " convert " + os.getcwd() + "/" + strImageFileString + " -resize 250x250\\> " + os.getcwd() + "/CONVERT/django/images/embedded/" + strImageFileDir + strImageFileName + strCommand = "{cmd} convert {arg1} -resize 250x250\\> {arg2}".format( + cmd = GM_PATH, + arg1 = PUBLICATION_DIR / strImageFileString, + arg2 = CONVERT_DIR / "django/images/embedded" / (strImageFileDir + strImageFileName), + ) + + # strCommand = GM_PATH + " convert " + os.getcwd() + "/" + strImageFileString + " -resize 250x250\\> " + os.getcwd() + "/CONVERT/django/images/embedded/" + strImageFileDir + strImageFileName listArguments = shlex.split(strCommand) subprocess.check_output(listArguments, shell=False) tmpStrTail = xmlFigure.tail @@ -284,7 +375,11 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid strImageFileDir = re.sub("/", "", strImageFileDir) strImageFileName = os.path.basename(strImageFileString) strImageFileNamewoSuffix = os.path.splitext(strImageFileName)[0] - shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName) + shutil.copy( + PUBLICATION_DIR / strImageFileString, + CONVERT_DIR / "django/images" / (strImageFileDir + strImageFileName) + ) + # shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName) xmlEOAfigure.set("file", strImageFileDir + strImageFileName) xmlEOAfigure.set("width", xmlElement.find(".//width").text + "px;") xmlEOAfigure.set("order", str(intObjectNumber)) @@ -305,12 +400,21 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid strImageFileDir = re.sub("/", "", strImageFileDir) strImageFileName = os.path.basename(strImageFileString) strImageFileNamewoSuffix = os.path.splitext(strImageFileName)[0] - shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName) + shutil.copy( + PUBLICATION_DIR / strImageFileString, + CONVERT_DIR / "django/images" / (strImageFileDir + strImageFileName) + ) logging.debug("Django figure %s." % strImageFileName) # yellow if os.path.splitext(strImageFileName)[1].lower() == ".pdf": logging.debug("Found a PDF file") - strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) + strImageFilepath = libeoaconvert.sanitizeImage( + CONVERT_DIR / "django/images" / (strImageFileDir + strImageFileName), + TEMP_DIR, + # os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName, + GM_PATH, + PDFCROP_EXEC + ) xmlEOAfigure.set("file", strImageFileDir + strImageFileName.replace(".pdf", ".png")) logging.debug("The filename is %s" % xmlEOAfigure.get("file")) else: @@ -546,7 +650,11 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid xmlEOAequation.set("filename", xmlEquation.get("filename")) if xmlEquation.get("label") is not None: xmlEOAequation.set("label", xmlEquation.get("label")) - shutil.copy(os.getcwd() + "/items/" + xmlEquation.get("filename"), os.getcwd() + "/CONVERT/django/images/") + shutil.copy( + INPUT_DIR / "items" /xmlEquation.get("filename"), + CONVERT_DIR / "django/images/" + ) + # shutil.copy(os.getcwd() + "/items/" + xmlEquation.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlEOAequation.set("TeX", xmlEquation.get("TeX")) if xmlEquation.get("label") is not None: xmlEOAequation.set("label", xmlEquation.get("label")) @@ -559,7 +667,11 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid intObjectNumber += 1 xmlEOAequation.set("number", "") xmlEOAequation.set("filename", xmlEquation.get("filename")) - shutil.copy(os.getcwd() + "/items/" + xmlEquation.get("filename"), os.getcwd() + "/CONVERT/django/images/") + shutil.copy( + INPUT_DIR / "items" / xmlEquation.get("filename"), + CONVERT_DIR / "django/images/" + ) + # shutil.copy(os.getcwd() + "/items/" + xmlEquation.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlEOAequation.set("TeX", xmlEquation.get("TeX")) xmlResult.append(xmlEOAequation) elif xmlElement.tag == "EOAequationnonumber": @@ -569,7 +681,11 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid intObjectNumber += 1 xmlResult.set("filename", xmlElement.get("filename")) xmlResult.set("TeX", xmlElement.get("TeX")) - shutil.copy(os.getcwd() + "/items/" + xmlElement.get("filename"), os.getcwd() + "/CONVERT/django/images/") + shutil.copy( + INPUT_DIR / "items" / xmlElement.get("filename"), + CONVERT_DIR / "django/images/" + ) + # shutil.copy(os.getcwd() + "/items/" + xmlElement.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlResult.set("number", "") elif xmlElement.findall(".//EOAequation"): # Process various Equations which may be encapsulated within

@@ -584,7 +700,11 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid xmlEOAequation.set("TeX", xmlEquation.get("TeX")) if xmlEquation.get("uid") is not None: xmlEOAequation.set("uid", xmlEquation.get("uid")) - shutil.copy(os.getcwd() + "/items/" + xmlEquation.get("filename"), os.getcwd() + "/CONVERT/django/images/") + shutil.copy( + INPUT_DIR / "items" / xmlEquation.get("filename"), + CONVERT_DIR / "django/images/" + ) + # shutil.copy(os.getcwd() + "/items/" + xmlEquation.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlEOAequation.set("filename", xmlEquation.get("filename")) xmlResult.append(xmlEOAequation) elif xmlElement.tag == "EOAequation": @@ -596,7 +716,11 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid xmlResult.set("TeX", xmlElement.get("TeX")) if xmlElement.get("uid") is not None: xmlResult.set("uid", xmlElement.get("uid")) - shutil.copy(os.getcwd() + "/items/" + xmlElement.get("filename"), os.getcwd() + "/CONVERT/django/images/") + shutil.copy( + INPUT_DIR / "items" / xmlElement.get("filename"), + CONVERT_DIR / "django/images/" + ) + # shutil.copy(os.getcwd() + "/items/" + xmlElement.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlResult.set("filename", xmlElement.get("filename")) elif xmlElement.tag == "div3": xmlResult = etree.Element("EOAsubsection") @@ -669,7 +793,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid intObjectNumber += 1 xmlResult = xmlElement else: - print("SPECIAL: %s - %s" % (xmlElement, xmlElement.text)) + logging.info("SPECIAL: %s - %s" % (xmlElement, xmlElement.text)) xmlResult = xmlElement if indent==True: @@ -751,7 +875,7 @@ def make_index(index_hits, index_type): xmlEOAindexentry.set("display", dictIndex[strSortedKey]["display_string"]) for xmlMainelement in dictIndex[strSortedKey]["listMainentries"]: - print(xmlMainelement.get("chapterorder") + ":" + xmlMainelement.get("elementorder")) + logging.info(xmlMainelement.get("chapterorder") + ":" + xmlMainelement.get("elementorder")) xmlEOAindexlink = etree.Element("EOAindexlink") xmlEOAindexlink.set("chapterorder", xmlMainelement.get("chapterorder")) @@ -822,7 +946,7 @@ def check_publication_cfg(configuration_file): config = configparser.ConfigParser() try: - config.read("CONVERT" + os.path.sep + configuration_file) + config.read(configuration_file) except configparser.ParsingError as err: logging.error(err) @@ -869,8 +993,8 @@ def check_publication_cfg(configuration_file): xmlEOAchapter.set("number", dictChapters[xmlChapter.get("id")]) else: xmlEOAchapter.set("number", "") - print("-----------------------------------------------------") - print(gettext(xmlChapterHeadline)) + logging.info("-----------------------------------------------------") + logging.info(gettext(xmlChapterHeadline)) xmlEOAchapter.append(djangoParseHeadline(xmlChapterHeadline)) # Deal with EOAauthor if xmlChapter.find(".//EOAauthor") is not None: @@ -959,10 +1083,14 @@ def check_publication_cfg(configuration_file): xmlEOAchapter.append(djangoParseObject(xmlChapterChild)) intChapterNumber += 1 -libeoaconvert.debug_xml_here(xmlTree, "afterchapter") +libeoaconvert.debug_xml_here( + xmlTree, + "afterchapter", + DEBUG_DIR +) -print("----------------------------------------------") -print("Processing Facsimile Parts") +logging.info("----------------------------------------------") +logging.info("Processing Facsimile Parts") listModes = ["text", "textPollux", "xml"] strBasicURL = "http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/interface/page-fragment.xql?document=" @@ -998,7 +1126,11 @@ def check_publication_cfg(configuration_file): strImageFileDir = os.path.dirname(strImageFile) strImageFileDir = re.sub("/", "", strImageFileDir) strImageFileName = os.path.basename(strImageFile) - shutil.copy(os.getcwd() + "/" + strImageFile, os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName) + shutil.copy( + INPUT_DIR / strImageFile, + CONVERT_DIR / "django/images" / (strImageFileDir + strImageFileName) + ) + # shutil.copy(os.getcwd() + "/" + strImageFile, os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName) intObjectNumber += 1 # Download transcription for this Page if xmlFacsimilepage.find(".//fulltext").text is not None: @@ -1023,7 +1155,12 @@ def check_publication_cfg(configuration_file): intFacImgNumber = 1 for xmlImage in xmlImages: strImageSrc = xmlImage.get("src") - strCommand = "curl " + strImageSrc + " -o CONVERT/django/images/facsupplements_" + str(intFacNumber) + "_" + str(intFacPageNumber) + "_" + str(intFacImgNumber) + ".jpg" + strCommand = "{cmd} {src} -o {dst}".format( + cmd = curl, + src = strImageSrc, + dst = CONVERT_DIR / "django/images" / ("facsupplements_" + str(intFacNumber) + "_" + str(intFacPageNumber) + "_" + str(intFacImgNumber) + ".jpg") + ) + # strCommand = "curl " + strImageSrc + " -o CONVERT/django/images/facsupplements_" + str(intFacNumber) + "_" + str(intFacPageNumber) + "_" + str(intFacImgNumber) + ".jpg" listArguments = shlex.split(strCommand) try: exeShell = subprocess.check_output(listArguments, shell=False, universal_newlines=True) @@ -1041,8 +1178,8 @@ def check_publication_cfg(configuration_file): xmlEOAfacsimilepart.append(xmlEOAfacsimilepage) intFacNumber =+ 1 etree.strip_tags(xmlDjangoTree, "temp") -print("----------------------------------------------") -print("Processing and linking Footnotes for django") +logging.info("----------------------------------------------") +logging.info("Processing and linking Footnotes for django") def bring_footnote_down_django(footnote, fragment, footnote_number, object_number, unique_id, destination): """ @@ -1095,7 +1232,6 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe debug_chapters(xmlEOAchapters) -TRANSLATION_FILE = BASE_DIR / CONFIG['Auxiliaries']['TRANSLATIONS'] translation_xml = etree.parse( str( TRANSLATION_FILE ) ) dictLangFootnotes = translation_xml.find("//entry[@name='footnotes']").attrib @@ -1172,7 +1308,11 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe xmlEOAfootnote.text = strFootnoteText for xmlElement in xmlFootnoteContent: if xmlElement.tag == "EOAequationnonumber": - shutil.copy(os.getcwd() + "/items/" + xmlElement.get("filename"), os.getcwd() + "/CONVERT/django/images/") + shutil.copy( + PUBLICATION_DIR / "items" / xmlElement.get("filename"), + CONVERT_DIR / "django/images/" + ) + # shutil.copy(os.getcwd() + "/items/" + xmlElement.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlEOAfootnote.append(xmlElement) xmlResult.append(xmlEOAfootnote) intFootnoteNumber += 1 @@ -1181,15 +1321,15 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe # Remove temp-Tag etree.strip_tags(xmlDjangoTree, "temp") -# print("----------------------------------------------") -# print("Processing Verses") +# logging.info("----------------------------------------------") +# logging.info("Processing Verses") # for xmlEOAchapter in xmlEOAchapters: # verses = xmlEOAchapter.findall(".//EOAverse") -# print("Found lotsa verses: ", len(verses)) +# logging.info("Found lotsa verses: ", len(verses)) -print("----------------------------------------------") -print("Processing various Elements") +logging.info("----------------------------------------------") +logging.info("Processing various Elements") for xmlEOAchapter in xmlEOAchapters: xmlEmphasized = xmlEOAchapter.findall(".//hi") @@ -1243,7 +1383,11 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe xmlInlineEquation.tag = "img" xmlInlineEquation.set("class", "EOAineq") xmlInlineEquation.set("alt", xmlInlineEquation.get("TeX")) - shutil.copy(os.getcwd() + "/items/" + xmlInlineEquation.get("src"), os.getcwd() + "/CONVERT/django/images/" + xmlInlineEquation.get("src")) + shutil.copy( + INPUT_DIR / "items" / xmlInlineEquation.get("src"), + CONVERT_DIR / "django/images" / xmlInlineEquation.get("src") + ) + # shutil.copy(os.getcwd() + "/items/" + xmlInlineEquation.get("src"), os.getcwd() + "/CONVERT/django/images/" + xmlInlineEquation.get("src")) # Convert EOAchem into appropriate IMG-Tags xml_inline_chems = xmlEOAchapter.findall(".//EOAchem") @@ -1251,7 +1395,11 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe xml_inline_chem.tag = "img" xml_inline_chem.set("class", "EOAineq") xml_inline_chem.set("alt", xml_inline_chem.get("TeX")) - shutil.copy(os.getcwd() + "/items/" + xml_inline_chem.get("src"), os.getcwd() + "/CONVERT/django/images/" + xml_inline_chem.get("src")) + shutil.copy( + INPUT_DIR / "items" / xml_inline_chem.get("src"), + CONVERT_DIR / "django/images" / xml_inline_chem.get("src") + ) + # shutil.copy(os.getcwd() + "/items/" + xml_inline_chem.get("src"), os.getcwd() + "/CONVERT/django/images/" + xml_inline_chem.get("src")) # Convert EOAinline into appropriate IMG-Tags xmlInlineElements = xmlEOAchapter.findall(".//EOAinline") @@ -1265,9 +1413,14 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe strInlineElementDirName = os.path.dirname(strInlineElementFilePath) xmlInlineElement.text = None xmlInlineElement.set("src", strInlineElementDirName + strInlineElementFileName) - shutil.copy(os.getcwd() + "/" + strInlineElementDirName + "/" + strInlineElementFileName, os.getcwd() + "/CONVERT/django/images/embedded/" + strInlineElementDirName + strInlineElementFileName) - strNewImagePath = os.getcwd() + "/CONVERT/django/images/embedded/" + strInlineElementDirName + strInlineElementFileName - strCommand = GM_PATH + " convert " + strNewImagePath + " -resize 20x20 " + strNewImagePath + shutil.copy( + PUBLICATION_DIR / strInlineElementDirName / strInlineElementFileName, + CONVERT_DIR / "django/images/embedded" / (strInlineElementDirName + strInlineElementFileName) + ) + # shutil.copy(os.getcwd() + "/" + strInlineElementDirName + "/" + strInlineElementFileName, os.getcwd() + "/CONVERT/django/images/embedded/" + strInlineElementDirName + strInlineElementFileName) + strNewImagePath = CONVERT_DIR / "django/images/embedded" / (strInlineElementDirName + strInlineElementFileName) + # strNewImagePath = os.getcwd() + "/CONVERT/django/images/embedded/" + strInlineElementDirName + strInlineElementFileName + strCommand = GM_PATH + " convert " + str(strNewImagePath) + " -resize 20x20 " + str(strNewImagePath) listArguments = shlex.split(strCommand) subprocess.check_output(listArguments, shell=False) # Change EOAcitenumeric into a span to create approriate link @@ -1295,8 +1448,8 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe xmlEOAcitemanual.set("class", "citation") xmlEOAcitemanual.set("rel", "popover") -print("----------------------------------------------") -print("Processing Cross References") +logging.info("----------------------------------------------") +logging.info("Processing Cross References") # Substitute References with their targets (wit links) for xmlEOAchapter in xmlEOAchapters: @@ -1425,8 +1578,8 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe xmlReference.tag = "a" xmlReference.set("href", "../" + strChapterOrder + "/index.html#" + strObjectOrder) -print("----------------------------------------------") -print("Processing Page References") +logging.info("----------------------------------------------") +logging.info("Processing Page References") for xmlEOAchapter in xmlEOAchapters: xmlPageReferences = xmlEOAchapter.findall(".//EOApageref") @@ -1454,8 +1607,8 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe logging.debug(strFacsimileOrder) xmlReference.set("href", "../" + strPartOrder + "/" + strFacsimileOrder + ".html") -print("----------------------------------------------") -print("Normalizing Index Entries") +logging.info("----------------------------------------------") +logging.info("Normalizing Index Entries") for xmlEOAchapter in xmlEOAchapters: xml_EOA_indices = xmlEOAchapter.xpath(".//EOAindex | .//EOAindexperson | .//EOAindexlocation") @@ -1515,12 +1668,12 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe xmlEOAindex.set("elementorder", xmlParent.get("order")) if xmlParent.get("order") != None and xmlParent.tag == "EOAchapter": xmlEOAindex.set("chapterorder", xmlParent.get("order")) - # print(etree.tostring(xmlEOAindex)) + # logging.info(etree.tostring(xmlEOAindex)) etree.strip_tags(xmlDjangoTree, "temp") -print("----------------------------------------------") -print("Removing Duplicate Index Entries") +logging.info("----------------------------------------------") +logging.info("Removing Duplicate Index Entries") for xmlEOAchapter in xmlEOAchapters: for xmlChild in xmlEOAchapter.iterchildren(): @@ -1539,8 +1692,8 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe else: dictEntries[strEntry] = listEntry -print("----------------------------------------------") -print("Removing Index Entries in Footnotes") +logging.info("----------------------------------------------") +logging.info("Removing Index Entries in Footnotes") for xmlEOAchapter in xmlEOAchapters: for xmlChild in xmlEOAchapter.iterchildren(): @@ -1552,31 +1705,43 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe xmlEOAindex.tag = "temp" logging.debug("Found index in footnote") -print("----------------------------------------------") -print("Sorting and Creating Regular Index") +logging.info("----------------------------------------------") +logging.info("Sorting and Creating Regular Index") xml_regular_EOAindices = xmlDjangoTree.findall("//EOAindex") if len(xml_regular_EOAindices) != 0:# is not None: logging.debug("Sorting %s entries for regular index." % str(len(xml_regular_EOAindices))) xml_eoa_print_regular_index = make_index(xml_regular_EOAindices, index_type = "regular") -libeoaconvert.debug_xml_here(xmlDjangoTree, "djangotree") -libeoaconvert.debug_xml_here(xmlEOAdocument, "xmleoadocument") -libeoaconvert.debug_xml_here(xmlTree, "xmltree") +libeoaconvert.debug_xml_here( + xmlDjangoTree, + "djangotree", + DEBUG_DIR +) +libeoaconvert.debug_xml_here( + xmlEOAdocument, + "xmleoadocument", + DEBUG_DIR +) +libeoaconvert.debug_xml_here( + xmlTree, + "xmltree", + DEBUG_DIR +) # If EOAprintindex is found, append xml_eoa_print_regular_index to xmlEOAdocument xmlPrintindex = xmlTree.find(".//EOAprintindex") if xmlPrintindex is not None != 0: # Remove

from xmlDjangoTree - print("found an index") + logging.info("found an index") xmlPrintindex.tag = "temp" xmlPrintindex.getparent().tag = "temp" xmlEOAdocument.append(xml_eoa_print_regular_index) else: - print("found no index") + logging.info("found no index") -print("----------------------------------------------") -print("Sorting and Creating Person Index") +logging.info("----------------------------------------------") +logging.info("Sorting and Creating Person Index") xml_person_EOAindices = xmlDjangoTree.findall("//EOAindexperson") if len(xml_person_EOAindices) != 0:# is not None: @@ -1592,8 +1757,8 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe xmlEOAdocument.append(xml_eoa_print_person_index) # doing the same for location index -print("----------------------------------------------") -print("Sorting and Creating Location Index") +logging.info("----------------------------------------------") +logging.info("Sorting and Creating Location Index") xml_location_EOAindices = xmlDjangoTree.findall("//EOAindexlocation") if len(xml_location_EOAindices) != 0:# is not None: @@ -1619,13 +1784,13 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe # Save xmlDjangoTree # ############################################################################ -tmpFile = open("CONVERT/django/Django.xml", "w") +tmpFile = open( CONVERT_DIR / "django/Django.xml", "w") tmpResult = etree.tostring(xmlDjangoTree, pretty_print=True, encoding="unicode") tmpFile.write(tmpResult) tmpFile.close() logging.debug("Wrote Django.xml") if args.checkpublicationcfg: - check_publication_cfg("publication.cfg") + check_publication_cfg(PUBLICATION_DIR / "publication.cfg") else: pass diff --git a/imxml2epub.py b/imxml2epub.py index 15506e3..67c33d0 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -24,15 +24,19 @@ from copy import deepcopy from lxml import etree from pathlib import Path +import configparser -BASE_DIR = Path( os.path.realpath(__file__) ).parent -SCRIPT_NAME = Path( __file__).stem +BASE_DIR = Path( __file__ ).resolve().parent +SCRIPT_PATH = Path( __file__ ) +SCRIPT_NAME = SCRIPT_PATH.stem ##################### # Parsing arguments # ##################### -parser = argparse.ArgumentParser() +parser = argparse.ArgumentParser( + formatter_class=argparse.ArgumentDefaultsHelpFormatter +) parser.add_argument( "-c", "--config", dest="CONFIG_FILE", @@ -42,7 +46,7 @@ ) parser.add_argument( "-l", "--log-file", - default = SCRIPT_NAME + ".log" , + default = Path( "logs", SCRIPT_NAME).with_suffix( ".log" ), help="logfile" ) parser.add_argument( @@ -50,6 +54,23 @@ default = "DEBUG", help="log level: choose between DEBUG, INFO, WARNING, ERROR, CRITICAL" ) + +parser.add_argument( + "--publication-dir", + default = ".", + help="directory containing publication.cfg and the Cover.jpg" +) +parser.add_argument( + "-i", "--input-dir", + default = "./imxml", + help="directory containing the intermediate xml generated by eoatex2imxml.py" +) +parser.add_argument( + "-o", "--output-dir", + default = "./epub", + help="where to dump all output files" +) + parser.add_argument( "-f", "--font", help="Font to be used, default is TeX Gyre Termes", @@ -65,14 +86,6 @@ config_file = args.CONFIG_FILE -''' -if args.CONFIG_FILE is not None: - CONFIG_FILE = os.path.abspath(args.CONFIG_FILE) -else: - # CONFIG_FILE = "/Users/kthoden/EOAKram/dev/EOASkripts/Skripten/eoaconvert.cfg" - CONFIG_FILE = os.path.dirname(sys.argv[0]) + "/config/eoaconvert.cfg" -''' - print("The config file is ", config_file) ################################## @@ -81,22 +94,16 @@ CONFIG = load_config( config_file, - args.log_file, args.log_level, + args.log_file, ) -# CONFIG = configparser.ConfigParser() -# CONFIG.read(CONFIG_FILE) - -# CONFIG = configparser.ConfigParser() -# CONFIG.read("/Users/kthoden/EOAKram/dev/EOASkripts/Skripten/eoaconvert.cfg") - ######################## # Paths to executables # ######################## -EPUB_FILES = os.path.dirname(sys.argv[0]) + "/data/epub_files/" +EPUB_FILES = BASE_DIR / "data/epub_files/" +# EPUB_FILES = os.path.dirname(sys.argv[0]) + "/data/epub_files/" -# TEMPLATE_PATH = CONFIG['Auxiliaries']['template_path'] GM_PATH = "gm" PDFCROP_EXEC = "pdfcrop" # TL_PATH = CONFIG['Executables']['texlive'] @@ -106,16 +113,58 @@ # SUPPORT_PATH = CONFIG['Executables']['support_path'] # AUX_TeX_FILES_PATH = CONFIG['Executables']['aux_tex_files_path'] -print(GM_PATH) +############################ +# Paths: +############################ +INPUT_DIR = Path( args.input_dir ) +OUTPUT_DIR = Path( args.output_dir ) +PUBLICATION_DIR = Path( args.publication_dir ) +TEMP_DIR = OUTPUT_DIR / "tmp_files" +CONVERT_DIR = OUTPUT_DIR / "CONVERT" +# DEBUG_DIR = OUTPUT_DIR / "debug" + +if not TEMP_DIR.exists(): + os.makedirs( TEMP_DIR ) +if not CONVERT_DIR.exists(): + os.makedirs( CONVERT_DIR ) + +# Check for folder and necessary files +if not os.path.exists(CONVERT_DIR): + logging.info(f"The directory {CONVERT_DIR} has not been created yet. Creating it for you") + time.sleep(1) + os.makedirs(CONVERT_DIR) +if not os.path.exists(CONVERT_DIR / "publication.cfg"): + logging.info(f"The publication.cfg file is missing in {CONVERT_DIR} directory.") + if os.path.exists(PUBLICATION_DIR / "publication.cfg"): + shutil.copy(PUBLICATION_DIR / "publication.cfg", CONVERT_DIR) + logging.info(f"Copied from {PUBLICATION_DIR}.") + else: + logging.error("Found no publication.cfg. Exiting") + sys.exit( 1 ) +if not os.path.exists(CONVERT_DIR / "cover.jpg"): + logging.info(f"The file cover.jpg in {CONVERT_DIR} directory is missing.") + if os.path.exists(PUBLICATION_DIR / "Cover.jpg"): + shutil.copy(PUBLICATION_DIR / "Cover.jpg", CONVERT_DIR / "cover.jpg") + logging.info("Copied from current directory.") + else: + logging.error("No coverfile found. You can create a temporary one with the mkimage.py script") + sys.exit( 1 ) +# if os.path.exists(os.getcwd() + "/pre_xml.tex") == False: +# print ("pre_xml fehlt") +# sys.exit() + lang_dict = {"fig" : {"en" : "Fig.", "de" : "Abb."}} +Datei = open( TEMP_DIR / 'intermediate.log', 'w') +''' tmpDir = os.getcwd() + "/tmp_files/" Datei = open('tmp_files/intermediate.log', 'w') +''' -xmlTree = etree.parse("tmp_files/IntermediateXMLFile.xml") +xmlTree = etree.parse( str(INPUT_DIR / "tmp_files" / "IntermediateXMLFile.xml") ) -with open('tmp_files/data.pickle', 'rb') as f: +with open(INPUT_DIR / "tmp_files" / 'data.pickle', 'rb') as f: data = pickle.load(f) dictSections = data["secdict"] @@ -219,7 +268,7 @@ def addToContentopf(contentopf, Filename, FileID, Mediatype): xmlItem = etree.Element("item") xmlItem.set("id", FileID) xmlItem.set("media-type", dictMediatypes[Mediatype]) - xmlItem.set("href", Filename) + xmlItem.set("href", str(Filename)) xmlManifest.append(xmlItem) # logging.debug("Added %s, with FileID %s" % (Filename, FileID)) @@ -260,20 +309,25 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): ############################################################## # Create folder structure for ebook -if os.path.exists(os.getcwd() + "/CONVERT/epub") == False: - os.mkdir(os.getcwd() + "/CONVERT/epub") - os.mkdir(os.getcwd() + "/CONVERT/epub/META-INF") - os.mkdir(os.getcwd() + "/CONVERT/epub/OEBPS") - os.mkdir(os.getcwd() + "/CONVERT/epub/OEBPS/images") - os.mkdir(os.getcwd() + "/CONVERT/epub/OEBPS/fonts") +if not os.path.exists(CONVERT_DIR / "epub"): + os.mkdir(CONVERT_DIR / "epub") + os.mkdir(CONVERT_DIR / "epub" / "META-INF" ) + os.mkdir(CONVERT_DIR / "epub" / "OEBPS" ) + os.mkdir(CONVERT_DIR / "epub" / "OEBPS" / "images" ) + os.mkdir(CONVERT_DIR / "epub" / "OEBPS" / "fonts" ) +# Copy containter.xml and mimetype +shutil.copy(EPUB_FILES / "epubcontainer.xml", CONVERT_DIR / "epub/META-INF/container.xml") +shutil.copy(EPUB_FILES / "epubmimetype", CONVERT_DIR / "epub/mimetype") +''' # Copy containter.xml and mimetype shutil.copy(EPUB_FILES + "epubcontainer.xml", os.getcwd() + "/CONVERT/epub/META-INF/container.xml") shutil.copy(EPUB_FILES + "epubmimetype", os.getcwd() + "/CONVERT/epub/mimetype") +''' # Preparing content.opf xmlContentopfParser = etree.XMLParser(no_network=False,load_dtd=False) -contentopf = etree.parse(EPUB_FILES + "epubcontentopf.xml", xmlContentopfParser) +contentopf = etree.parse( str(EPUB_FILES/"epubcontentopf.xml"), xmlContentopfParser) # This list includes all files which have already been included to avoid duplicates listContentopf = [] @@ -286,30 +340,56 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): if args.font == "termes": font_files = termes_fonts - shutil.copy(EPUB_FILES + "eoa-epub-termes.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") + shutil.copy( + EPUB_FILES / "eoa-epub-termes.css", + CONVERT_DIR / "epub/OEBPS/eoa-epub.css" + ) + # shutil.copy(EPUB_FILES + "eoa-epub-termes.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") elif args.font == "libertine": - shutil.copy(EPUB_FILES + "eoa-epub-libertine.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") + shutil.copy( + EPUB_FILES / "eoa-epub-libertine.css", + CONVERT_DIR / "epub/OEBPS/eoa-epub.css" + ) + # shutil.copy(EPUB_FILES + "eoa-epub-libertine.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") font_files = libertine_fonts else: logging.info("Font not recognized, falling back to default.") - shutil.copy(EPUB_FILES + "eoa-epub-termes.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") + shutil.copy( + EPUB_FILES / "eoa-epub-termes.css", + CONVERT_DIR / "epub/OEBPS/eoa-epub.css" + ) + # shutil.copy(EPUB_FILES + "eoa-epub-termes.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") otf_id_counter = 1 txt_id_counter = 1 for fontfile in font_files: - shutil.copy(EPUB_FILES + fontfile, os.getcwd() + "/CONVERT/epub/OEBPS/fonts/") + shutil.copy( + EPUB_FILES / fontfile, + CONVERT_DIR / "epub/OEBPS/fonts/" + ) + # shutil.copy(EPUB_FILES + fontfile, os.getcwd() + "/CONVERT/epub/OEBPS/fonts/") base_file_name, file_extension = os.path.splitext(fontfile) if file_extension == ".otf": - contentopf = addToContentopf(contentopf, "fonts/" + fontfile, "otf-font" + str(otf_id_counter), file_extension[1:]) + contentopf = addToContentopf( + contentopf, + Path("fonts") / fontfile, + "otf-font" + str(otf_id_counter), + file_extension[1:] + ) otf_id_counter += 1 elif file_extension == ".txt": - contentopf = addToContentopf(contentopf, "fonts/" + fontfile, "font-txt" + str(txt_id_counter), file_extension[1:]) + contentopf = addToContentopf( + contentopf, + Path("fonts") / fontfile, + "font-txt" + str(txt_id_counter), + file_extension[1:] + ) txt_id_counter += 1 else: - print("Other file found. Exiting") + logging.error("Other file found. Exiting") sys.exit() # shutil.copy(EPUB_FILES + "texgyretermes-bold.otf", os.getcwd() + "/CONVERT/epub/OEBPS/fonts/") @@ -325,14 +405,16 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): # Preparing toc.ncx xmlTocncxParser = etree.XMLParser(no_network=False,load_dtd=False) -tocncx = etree.parse(EPUB_FILES + "epubtocncx.xml", xmlTocncxParser) +tocncx = etree.parse(str(EPUB_FILES / "epubtocncx.xml"), xmlTocncxParser) + -print("-----------------------------------------------------") -print("Preparing content.opf") + +logging.info("-----------------------------------------------------") +logging.info("Preparing content.opf") xmlMetadata = contentopf.find(".//{http://www.idpf.org/2007/opf}metadata") # Prepare Metadata based on Publication.cfg cfgPublication = configparser.RawConfigParser() -cfgPublication.read(os.getcwd() + "/CONVERT/publication.cfg") +cfgPublication.read(CONVERT_DIR / "publication.cfg") # Prepare Author String strAuthorString = cfgPublication.get("Authors", "Author1") if cfgPublication.get("Authors", "Author2") != "": @@ -404,20 +486,25 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): xmlItem.set("href", "images/cover.jpg") xmlItem.set("media-type", "image/jpeg") xmlManifest.append(xmlItem) -shutil.copy(os.getcwd() + "/CONVERT/Cover.jpg", os.getcwd() + "/CONVERT/epub/OEBPS/images/") +shutil.copy( + CONVERT_DIR / "cover.jpg", + CONVERT_DIR / "epub/OEBPS/images/" +) +# shutil.copy(os.getcwd() + "/CONVERT/Cover.jpg", os.getcwd() + "/CONVERT/epub/OEBPS/images/") xmlItem = etree.Element("item") xmlItem.set("id", "cover") xmlItem.set("href", "cover.xhtml") xmlItem.set("media-type", "application/xhtml+xml") xmlManifest.append(xmlItem) -shutil.copy(EPUB_FILES + "epubcover.xhtml", os.getcwd() + "/CONVERT/epub/OEBPS/cover.xhtml") -print("-------------------") -print("Preparing intro.xhtml") -print("-------------------") +shutil.copy(EPUB_FILES / "epubcover.xhtml", CONVERT_DIR / "epub/OEBPS/cover.xhtml") +# shutil.copy(EPUB_FILES + "epubcover.xhtml", os.getcwd() + "/CONVERT/epub/OEBPS/cover.xhtml") +logging.info("-------------------") +logging.info("Preparing intro.xhtml") +logging.info("-------------------") if cfgPublication.get("Technical", "Serie") == "Sources": - tmpFilePath = EPUB_FILES + "epubintro-sources.xhtml" + tmpFilePath = EPUB_FILES / "epubintro-sources.xhtml" else: - tmpFilePath = EPUB_FILES + "epubintro.xhtml" + tmpFilePath = EPUB_FILES / "epubintro.xhtml" tmpFile = open(tmpFilePath, "r") strIntroHTML = tmpFile.read() tmpFile.close() @@ -437,12 +524,13 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): # else: # strIntroHTML = re.sub("AdditionalInformation", "", strIntroHTML) -tmpFilePath = os.getcwd() + "/CONVERT/epub/OEBPS/intro.xhtml" +tmpFilePath = CONVERT_DIR / "epub/OEBPS/intro.xhtml" +# tmpFilePath = os.getcwd() + "/CONVERT/epub/OEBPS/intro.xhtml" tmpFile = open(tmpFilePath, "w") tmpFile.write(strIntroHTML) -print("-------------------") -print("Preparing toc.ncx") -print("-------------------") +logging.info("-------------------") +logging.info("Preparing toc.ncx") +logging.info("-------------------") xmlHead = tocncx.find("//{http://www.daisy.org/z3986/2005/ncx/}head") xmlMeta = etree.Element("meta") xmlMeta.set("name", "dtb:uid") @@ -472,14 +560,14 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): # Convert Chapters, Sections, Subsections and Subsubsections to h1, h2, h3, h4 # Insert Number from Dictionary where needed -print("-----------------------------------------------------") -print("Convert EOAChapter to H1") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAChapter to H1") for xmlChapter in xmlChapters: xmlChapter.find("head").tag = "h1" if xmlChapter.get("rend") != "nonumber": idChapter = xmlChapter.get("id") - # print(idChapter + " konvertierung into h1") - # print(dictChapters[idChapter]) + # logging.info(idChapter + " konvertierung into h1") + # logging.info(dictChapters[idChapter]) strHeadline = xmlChapter.find("h1").text or "" xmlChapter.find("h1").text = str(dictChapters[idChapter]) + ". " + strHeadline if xmlChapter.find(".//EOAauthor") is not None: @@ -491,32 +579,32 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): xmlChapter.find(".//EOAauthor").text = "" xmlChapter = etree.strip_tags(xmlChapter, "EOAauthor") -# print(dictSections) +# logging.info(dictSections) -print("-----------------------------------------------------") -print("Convert EOAsection to H2") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAsection to H2") xmlSections = xmlEbookTree.findall(".//div2") for xmlSection in xmlSections: xmlSection.find("head").tag = "h2" if xmlSection.get("rend") != "nonumber": idSection = xmlSection.get("id") strHeadline = xmlSection.find("h2").text or "" - print(strHeadline) + logging.info(strHeadline) xmlSection.find("h2").text = str(dictSections[idSection]) + " " + strHeadline -print("-----------------------------------------------------") -print("Convert EOAsubsection to H3") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAsubsection to H3") xmlSubsections = xmlEbookTree.findall(".//div3") for xmlSubsection in xmlSubsections: xmlSubsection.find("head").tag = "h3" if xmlSubsection.get("rend") != "nonumber": idSection = xmlSubsection.get("id") strHeadline = xmlSubsection.find("h3").text or "" - print(strHeadline) + logging.info(strHeadline) xmlSubsection.find("h3").text = str(dictSections[idSection]) + " " + strHeadline -print("-----------------------------------------------------") -print("Convert EOAsubsubsection to H4") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAsubsubsection to H4") xmlSubsubsections = xmlEbookTree.findall(".//div4") for xmlSubsubsection in xmlSubsubsections: xmlSubsubsection.find("head").tag = "h4" @@ -525,15 +613,15 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): #strHeadline = xmlSubsection.find("h4").text #xmlSubsection.find("h3").text = str(dictSections[idSection]) + " " + strHeadline -print("-----------------------------------------------------") -print("Convert EOAparagraph to H5") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAparagraph to H5") xmlParagraphs = xmlEbookTree.findall(".//div5") for xmlParagraph in xmlParagraphs: - print("Found a paragraph.") + logging.info("Found a paragraph.") xmlParagraph.find("head").tag = "h5" -print("-----------------------------------------------------") -print("Preparing Figures") +logging.info("-----------------------------------------------------") +logging.info("Preparing Figures") xmlFigures = xmlEbookTree.xpath(".//EOAfigure[not(@type='hionly')] | .//EOAlsfigure[not(@type='hionly')]") for xmlFigure in xmlFigures: # Copy File of the Image @@ -545,21 +633,42 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): strImageFileDir = re.sub("/", "", strImageFileDir) strImageFileName = os.path.basename(strImageFileString) strImageFileNamewoSuffix, strImageFileName_Suffix = os.path.splitext(strImageFileName) - shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) + shutil.copy( + PUBLICATION_DIR / strImageFileString, + CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName) + ) + # shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) if strImageFileName_Suffix.lower() == ".jpg": extension_and_mime = "jpg" elif strImageFileName_Suffix.lower() in [".png", ".pdf"]: extension_and_mime = "png" else: - print("Found an unrecognized image suffix: %s" % strImageFileName_Suffix) + logging.info("Found an unrecognized image suffix: %s" % strImageFileName_Suffix) sys.exit() - strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) + strImageFilepath = libeoaconvert.sanitizeImage( + CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName), + TEMP_DIR, + GM_PATH, + PDFCROP_EXEC, + ) + # strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) # Add copied file to contentopf + content_opf_filename = Path ("images") / "{}{}.{}".format(strImageFileDir, strImageFileNamewoSuffix, extension_and_mime) + content_opf_fileid = "{}{}{}".format(strImageFileDir, strImageFileNamewoSuffix, extension_and_mime) + + contentopf = addToContentopf( + contentopf, + content_opf_filename, + content_opf_fileid, + extension_and_mime + ) + ''' content_opf_filename = "images" + os.path.sep + "{}{}.{}".format(strImageFileDir, strImageFileNamewoSuffix, extension_and_mime) content_opf_fileid = "{}{}{}".format(strImageFileDir, strImageFileNamewoSuffix, extension_and_mime) contentopf = addToContentopf(contentopf, content_opf_filename, content_opf_fileid, extension_and_mime) + ''' idFigure = xmlFigure.find(".//anchor").get("id") intFigureNumber = dictFigures[idFigure] @@ -593,8 +702,8 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): for fig in xml_figures_hyperimage: fig.tag = "EOAhifigure" -print("-----------------------------------------------------") -print("Preparing not numbered Figures") +logging.info("-----------------------------------------------------") +logging.info("Preparing not numbered Figures") xmlFigures = xmlEbookTree.findall(".//EOAfigurenonumber") for xmlFigure in xmlFigures: # Copy File of the Image @@ -605,10 +714,26 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): strImageFileDir = re.sub("/", "", strImageFileDir) strImageFileName = os.path.basename(strImageFileString) strImageFileNamewoSuffix = os.path.splitext(strImageFileName)[0] - shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) - strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) + shutil.copy( + PUBLICATION_DIR / strImageFileString, + CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName) + ) + strImageFilepath = libeoaconvert.sanitizeImage( + CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName), + TEMP_DIR, + GM_PATH, + PDFCROP_EXEC + ) + # shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) + # strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) # Add copied file to contentopf - contentopf = addToContentopf(contentopf, "images/" + strImageFileDir + strImageFileNamewoSuffix + ".jpg", strImageFileDir + strImageFileNamewoSuffix + "-nonumber-jpg", "jpg") + contentopf = addToContentopf( + contentopf, + "images/" + strImageFileDir + strImageFileNamewoSuffix + ".jpg", + strImageFileDir + strImageFileNamewoSuffix + "-nonumber-jpg", + "jpg" + ) + # contentopf = addToContentopf(contentopf, "images/" + strImageFileDir + strImageFileNamewoSuffix + ".jpg", strImageFileDir + strImageFileNamewoSuffix + "-nonumber-jpg", "jpg") logging.debug("Added a nonumber figure") strImageWidth = xmlFigure.find(".//width").text strImageWidth = strImageWidth.rstrip("\n") @@ -620,8 +745,8 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): xmlFigureImage.set("style", "width: " + strImageWidth + "%") xmlFigure.append(xmlFigureImage) -print("-----------------------------------------------------") -print("Preparing Footnotes") +logging.info("-----------------------------------------------------") +logging.info("Preparing Footnotes") def alph_footnote_index(fndex): """ @@ -662,11 +787,23 @@ def replace_footnote_equations(footnote): equation.tag = "p" img = etree.Element("img", src="images/%s" % filename, alt="") equation.append(img) + shutil.copy( + PUBLICATION_DIR / "items" / filename, + CONVERT_DIR / "epub/DEBPS/images" / filename + ) + result = addToContentopf( + result, + "images/" + filename, + filename, + "png" + ) + ''' cwd = os.getcwd() shutil.copy("%s/items/%s" % (cwd, filename), "%s/CONVERT/epub/DEBPS/images/%s" % (cwd, filename)) result = addToContentopf(result, "images/" + filename, filename, "png") + ''' - print("einmal durch replace_footnote_equations") + logging.info("einmal durch replace_footnote_equations") return result # def replace_footnote_equations ends here @@ -769,7 +906,7 @@ class FootnoteError(Exception): for xmlChapter in xmlChapters: groupings = libeoaconvert.get_bigfoot_data(xmlChapter) xmlFootnotes = list(xmlChapter.findall(".//note")) - print("here come the footnotes. found", len(xmlFootnotes)) + logging.info("here come the footnotes. found" + str(len(xmlFootnotes))) has_old = 0 != len(xmlFootnotes) has_new = 0 != len( [ # flatten the association list whose values are lists, so we can take the length @@ -820,7 +957,11 @@ class FootnoteError(Exception): xmlEquationnonumber.tag = "p" xmlIMG = etree.Element("img", src="images/"+ strFilename, alt="") xmlEquationnonumber.append(xmlIMG) - shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) + shutil.copy( + PUBLICATION_DIR / "items" / strFilename, + CONVERT_DIR / "epub/OEBPS/images" / strFilename + ) + # shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) contentopf = addToContentopf(contentopf, "images/" + strFilename, strFilename, "png") tmp_fnstring = "fn" + str(intFootnoteNumber) @@ -865,8 +1006,8 @@ class FootnoteError(Exception): intTechnicalChapterNumber += 1 -print("-----------------------------------------------------") -print("Preparing Lists") +logging.info("-----------------------------------------------------") +logging.info("Preparing Lists") for xmlChapter in xmlChapters: xmlLists = xmlChapter.findall(".//list") for xmlList in xmlLists: @@ -885,8 +1026,8 @@ class FootnoteError(Exception): for xmlListItem in xmlListItems: xmlListItem.tag = "li" -print("-----------------------------------------------------") -print("Preparing Descriptions") +logging.info("-----------------------------------------------------") +logging.info("Preparing Descriptions") for xmlChapter in xmlChapters: xmlDescriptions = xmlChapter.findall(".//list") for xmlDescription in xmlDescriptions: @@ -900,8 +1041,8 @@ class FootnoteError(Exception): del xmlChild.attrib["id"] del xmlChild.attrib["id-text"] -print("-----------------------------------------------------") -print("Preparing Blockquotes") +logging.info("-----------------------------------------------------") +logging.info("Preparing Blockquotes") xmlParagraphs = xmlEbookTree.findall(".//p") for xmlParagraph in xmlParagraphs: if xmlParagraph.get("rend") == "quoted": @@ -920,8 +1061,8 @@ class FootnoteError(Exception): xmlNew.tail = strParagraphTail xmlParagraph.append(xmlNew) -print("-----------------------------------------------------") -print("Preparing Theorems") +logging.info("-----------------------------------------------------") +logging.info("Preparing Theorems") for xmlChapter in xmlChapters: xmlTheorems = xmlChapter.findall(".//theorem") for xmlTheorem in xmlTheorems: @@ -939,8 +1080,8 @@ class FootnoteError(Exception): del xmlTheorem.attrib["id"] etree.strip_tags(xmlTheorem, "p") -print("-----------------------------------------------------") -print("Preparing Hyperlinks") +logging.info("-----------------------------------------------------") +logging.info("Preparing Hyperlinks") for xmlChapter in xmlChapters: xmlHyperlinks = xmlChapter.findall(".//xref") for xmlHyperlink in xmlHyperlinks: @@ -954,8 +1095,8 @@ class FootnoteError(Exception): etree.strip_elements(xmlHyperlink, with_tail=True, *['allowbreak']) xmlHyperlink.text = strURL -print("-----------------------------------------------------") -print("Convert emphasized text") +logging.info("-----------------------------------------------------") +logging.info("Convert emphasized text") for xmlChapter in xmlChapters: xmlItalics = xmlChapter.findall(".//hi") for xmlItalic in xmlItalics: @@ -963,8 +1104,8 @@ class FootnoteError(Exception): xmlItalic.tag = "em" del xmlItalic.attrib["rend"] -print("-----------------------------------------------------") -print("Convert bold text") +logging.info("-----------------------------------------------------") +logging.info("Convert bold text") for xmlChapter in xmlChapters: xmlBolds = xmlChapter.findall(".//hi") for xmlBold in xmlBolds: @@ -972,38 +1113,38 @@ class FootnoteError(Exception): xmlBold.tag = "b" del xmlBold.attrib["rend"] -print("-----------------------------------------------------") -print("Convert EOAup to ") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAup to ") for xmlChapter in xmlChapters: xmlUps = xmlChapter.findall(".//EOAup") for xmlUp in xmlUps: xmlUp.tag = "sup" -print("-----------------------------------------------------") -print("Convert EOAdown to ") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAdown to ") for xmlChapter in xmlChapters: xmlDowns = xmlChapter.findall(".//EOAdown") for xmlDown in xmlDowns: xmlDown.tag = "sub" -print("-----------------------------------------------------") -print("Convert EOAst to ") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAst to ") for xmlChapter in xmlChapters: xmlStrikeouts = xmlChapter.findall(".//EOAst") for xmlStrikeout in xmlStrikeouts: xmlStrikeout.tag = "span" xmlStrikeout.set("style", "text-decoration: line-through;") -print("-----------------------------------------------------") -print("Convert EOAls to something nice") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAls to something nice") for xmlChapter in xmlChapters: xmlLetterspaceds = xmlChapter.findall(".//EOAls") for xmlLetterspaced in xmlLetterspaceds: xmlLetterspaced.tag = "span" xmlLetterspaced.set("style", "letter-spacing: 0.5em;") -print("-----------------------------------------------------") -print("Convert EOAcaps to something nice") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAcaps to something nice") for xmlChapter in xmlChapters: xmlLetterspaceds = xmlChapter.findall(".//EOAcaps") for xmlLetterspaced in xmlLetterspaceds: @@ -1011,32 +1152,40 @@ class FootnoteError(Exception): xmlLetterspaced.set("style", "font-variant:small-caps;") -print("-----------------------------------------------------") -print("Convert EOAineq into appropriate IMG-Tags") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAineq into appropriate IMG-Tags") for xmlChapter in xmlChapters: xmlInlineEquations = xmlChapter.findall(".//EOAineq") for xmlInlineEquation in xmlInlineEquations: xmlInlineEquation.tag = "img" xmlInlineEquation.set("alt", xmlInlineEquation.get("TeX")) del xmlInlineEquation.attrib["TeX"] - shutil.copy(os.getcwd() + "/items/" + xmlInlineEquation.get("src"), os.getcwd() + "/CONVERT/epub/OEBPS/images/" + xmlInlineEquation.get("src")) + shutil.copy( + PUBLICATION_DIR / "items" / xmlInlineEquation.get("src"), + CONVERT_DIR / "epub/OEBPS/images" / xmlInlineEquation.get("src") + ) + # shutil.copy(os.getcwd() + "/items/" + xmlInlineEquation.get("src"), os.getcwd() + "/CONVERT/epub/OEBPS/images/" + xmlInlineEquation.get("src")) xmlInlineEquation.set("src", "images/" + xmlInlineEquation.get("src")) contentopf = addToContentopf(contentopf, xmlInlineEquation.get("src"), xmlInlineEquation.get("src"), "png") -print("-----------------------------------------------------") -print("Convert EOAchem into appropriate IMG-Tags") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAchem into appropriate IMG-Tags") for xmlChapter in xmlChapters: xml_inline_chems = xmlChapter.findall(".//EOAchem") for xml_inline_chem in xml_inline_chems: xml_inline_chem.tag = "img" xml_inline_chem.set("alt", xml_inline_chem.get("TeX")) del xml_inline_chem.attrib["TeX"] - shutil.copy(os.getcwd() + "/items/" + xml_inline_chem.get("src"), os.getcwd() + "/CONVERT/epub/OEBPS/images/" + xml_inline_chem.get("src")) + shutil.copy( + PUBLICATION_DIR / "items" / xml_inline_chem.get("src"), + CONVERT_DIR / "epub/OEBPS/images" / xml_inline_chem.get("src") + ) + # shutil.copy(os.getcwd() + "/items/" + xml_inline_chem.get("src"), os.getcwd() + "/CONVERT/epub/OEBPS/images/" + xml_inline_chem.get("src")) xml_inline_chem.set("src", "images/" + xml_inline_chem.get("src")) contentopf = addToContentopf(contentopf, xml_inline_chem.get("src"), xml_inline_chem.get("src"), "png") -print("-----------------------------------------------------") -print("Convert EOAinline into appropriate IMG-Tags") +logging.info("-----------------------------------------------------") +logging.info("Convert EOAinline into appropriate IMG-Tags") for xmlChapter in xmlChapters: xmlInlineElements = xmlChapter.findall(".//EOAinline") for xmlInlineElement in xmlInlineElements: @@ -1050,11 +1199,16 @@ class FootnoteError(Exception): strInlineElementFileName = os.path.basename(strInlineElementFilePath) strInlineElementDirName = os.path.dirname(strInlineElementFilePath) - strNewImagePath = os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strInlineElementDirName + strInlineElementFileName + strNewImagePath = CONVERT_DIR / "epub/OEBPS/images" / (strInlineElementDirName + strInlineElementFileName) + # strNewImagePath = os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strInlineElementDirName + strInlineElementFileName # trouble when there are subdirectories in Image path! # some thing goes wrong here: Images/png_300dpi/A.png - shutil.copy(os.getcwd() + "/" + strInlineElementDirName + "/" + strInlineElementFileName, strNewImagePath) + shutil.copy( + PUBLICATION_DIR / strInlineElementDirName / strInlineElementFileName, + strNewImagePath + ) + # shutil.copy(os.getcwd() + "/" + strInlineElementDirName + "/" + strInlineElementFileName, strNewImagePath) # strNewImagePath = os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strInlineElementDirName + strInlineElementFileName strCommand = GM_PATH + " convert " + strNewImagePath + " -resize 20x20 " + strNewImagePath listArguments = shlex.split(strCommand) @@ -1068,11 +1222,11 @@ class FootnoteError(Exception): contentopf = addToContentopf(contentopf, "images/" + strInlineElementDirName + strInlineElementFileName, xmlInlineElement.text, extension) xmlInlineElement.text = "" -print("-----------------------------------------------------") -print("Preparing Verses") +logging.info("-----------------------------------------------------") +logging.info("Preparing Verses") for xmlChapter in xmlChapters: xml_verses = xmlChapter.findall(".//EOAverse") - print(len(xml_verses)) + logging.info(len(xml_verses)) for xml_verse in xml_verses: xml_verse_children = xml_verse.getchildren() for line in xml_verse_children[:-1]: @@ -1082,15 +1236,19 @@ class FootnoteError(Exception): xml_verse.tag = "p" xml_verse.set("class", "verse") -print("-----------------------------------------------------") -print("Preparing Equations") +logging.info("-----------------------------------------------------") +logging.info("Preparing Equations") for xmlChapter in xmlChapters: xmlEquations = xmlChapter.findall(".//EOAequation") for xmlEquation in xmlEquations: strNumber = xmlEquation.get("number") strFilename = xmlEquation.get("filename") # Copy image of Equation - shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) + shutil.copy( + PUBLICATION_DIR / "items" / strFilename, + CONVERT_DIR / "epub/OEBPS/images" / strFilename + ) + # shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) contentopf = addToContentopf(contentopf, "images/" + strFilename, strFilename, "png") # Find out Number of Equation to be appended in the last step strEquationNumber = xmlEquation.get("number") @@ -1112,7 +1270,11 @@ class FootnoteError(Exception): for xmlEquation in xmlEquations: strFilename = xmlEquation.get("filename") # Copy image of Equation - shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) + shutil.copy( + PUBLICATION_DIR / "items" / strFilename, + CONVERT_DIR / "epub/OEBPS/images" / strFilename + ) + # shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) contentopf = addToContentopf(contentopf, "images/" + strFilename, strFilename, "png") # Rework XML xmlEquation.clear() @@ -1132,8 +1294,8 @@ class FootnoteError(Exception): xmlEquationarray.tag = "div" -print("-----------------------------------------------------") -print("Preparing Letterheads") +logging.info("-----------------------------------------------------") +logging.info("Preparing Letterheads") for xmlChapter in xmlChapters: xmlLetterheads = xmlChapter.xpath(".//EOAletterhead") for xmlLetterhead in xmlLetterheads: @@ -1154,20 +1316,20 @@ class FootnoteError(Exception): xmlLetterhead.insert(0, xmlHR) xmlLetterhead.insert(5, xmlHR2) -print("-----------------------------------------------------") -print("Preparing Transcriptions") +logging.info("-----------------------------------------------------") +logging.info("Preparing Transcriptions") # TODO: May need rework concerning the right Column for xmlChapter in xmlChapters: etree.strip_elements(xmlChapter, "Facsimilelink") xmlTranscriptions = xmlChapter.xpath(".//EOAtranscripted") for xmlTranscription in xmlTranscriptions: - print("Processing Transcription") - #print (etree.tostring(xmlTranscription)) + logging.info("Processing Transcription") + #logging.info (etree.tostring(xmlTranscription)) xmlTranscription.tag = "table" xmlHeader = xmlTranscription.find(".//EOAtranscriptedheader") xmlHeader.tag = "tr" xmlLeftHeader = xmlTranscription.find(".//Leftheader") - # print(xmlLeftHeader.text) + # logging.info(xmlLeftHeader.text) xmlLeftHeader.tag = "td" xmlLeftHeader.set("style", "width: 50%") xmlRightHeader = xmlTranscription.find(".//Rightheader") @@ -1186,7 +1348,7 @@ class FootnoteError(Exception): for xmlElement in xmlTemp.iterchildren(): if xmlElement.tag == "pagebreak": boolRightColumn = True - print("Spaltenwechsel!") + logging.info("Spaltenwechsel!") continue if boolRightColumn == False: xmlLeftColumn.append(xmlElement) @@ -1200,15 +1362,15 @@ class FootnoteError(Exception): # Remove -print("-----------------------------------------------------") -print("Preparing Tables") +logging.info("-----------------------------------------------------") +logging.info("Preparing Tables") intChapterNumber = 1 for xmlChapter in xmlChapters: xmlTables = xmlChapter.findall(".//EOAtable") for xmlTable in xmlTables: xmlRawTable = xmlTable.find(".//table") strTableCaption = xmlTable.find(".//EOAtablecaption").text or "" - # print("Working on ", strTableCaption) + # logging.info("Working on ", strTableCaption) if strTableCaption != "nonumber": intTableNumber = dictTables[xmlTable.find(".//EOAtablelabel").text] xmlTableCaption = etree.Element("p") @@ -1218,7 +1380,7 @@ class FootnoteError(Exception): xmlTableCaption.append(xmlChild) xmlRawTable.addnext(xmlTableCaption) else: - print("Table has no caption") + logging.info("Table has no caption") xmlTable.find(".//EOAtablecaption").clear() xmlTable.remove(xmlTable.find(".//EOAtablecaption")) xmlTable.find(".//EOAtablelabel").clear() @@ -1268,7 +1430,7 @@ class FootnoteError(Exception): for xmlTableRow in xmlTableRows: xmlTableCells = xmlTableRow.findall(".//cell") intCurrentColumn = 1 - print(listColumnAlignments) + logging.info(listColumnAlignments) for xmlTableCell in xmlTableCells: xmlTableCell.tag = "td" xmlTableCell.set("align",listColumnAlignments[intCurrentColumn]) @@ -1293,11 +1455,11 @@ class FootnoteError(Exception): # libeoaconvert.deb_var(xtp) xmlTableParent.getparent().remove(xmlTableParent) - print("Finished with that table.") + logging.info("Finished with that table.") intChapterNumber += 1 -print("-----------------------------------------------------") -print("Preparing Facsimiles") +logging.info("-----------------------------------------------------") +logging.info("Preparing Facsimiles") xmlParts = xmlEbookTree.findall(".//div0") for xmlPart in xmlParts: xmlFacsimiles = xmlPart.findall(".//EOAfacsimilepage") @@ -1313,9 +1475,19 @@ class FootnoteError(Exception): strImageFileDir = re.sub("/", "", strImageFileDir) strImageFileName = os.path.basename(strImageFile) # hier - shutil.copy(os.getcwd() + "/" + strImageFile, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) - - strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) + shutil.copy( + PUBLICATION_DIR / strImageFile, + CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName) + ) + # shutil.copy(os.getcwd() + "/" + strImageFile, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) + + strImageFilepath = libeoaconvert.sanitizeImage( + CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName), + TEMP_DIR, + GM_PATH, + PDFCROP_EXEC + ) + # strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) # Add copied file to contentopf img_base_file_name, img_file_extension = os.path.splitext(strImageFileName) @@ -1339,8 +1511,8 @@ class FootnoteError(Exception): facsimile_image_element.set("alt", "Facsimile page " + facsimile_pagenumber) xmlFacsimile.getparent().replace(xmlFacsimile, facsimile_image_element) -print("-----------------------------------------------------") -print("Preparing Cross-References") +logging.info("-----------------------------------------------------") +logging.info("Preparing Cross-References") for xmlChapter in xmlChapters: xmlReferences = xmlChapter.findall(".//EOAref") @@ -1354,7 +1526,7 @@ class FootnoteError(Exception): # corresponding_eoa_id_element = xmlTree.xpath("//*[@xml:id='{}']".format(label_text)) # if len(corresponding_eoa_id_element) > 1: - # print("The xml:id %s has been assigned more than once. This is not allowed. Exiting." % corresponding_eoa_id_element) + # logging.info("The xml:id %s has been assigned more than once. This is not allowed. Exiting." % corresponding_eoa_id_element) # sys.exit() # else: # eoa_id_element = corresponding_eoa_id_element[0] @@ -1363,7 +1535,7 @@ class FootnoteError(Exception): # end of the new stuff - print("XXXXXXXX") + logging.info("XXXXXXXX") strResult = "!!! Cross Reference !!!" xmlReferenceLabel = xmlReference.find("Label") @@ -1373,35 +1545,35 @@ class FootnoteError(Exception): xmlReferenceRefTarget = xmlReferenceRef.get("target") if xmlReferenceLabelText in dictEquations: - print("Verweis auf Array gefunden:" + xmlReferenceLabelText) + logging.info("Verweis auf Array gefunden:" + xmlReferenceLabelText) strResult = dictEquations[xmlReferenceLabelText] if xmlReferenceRefTarget in dictEquations: - print("Verweis auf Equation gefunden:" + xmlReferenceRefTarget) + logging.info("Verweis auf Equation gefunden:" + xmlReferenceRefTarget) strResult = dictEquations[xmlReferenceRefTarget] if xmlReferenceRefTarget in dictLists: - print("Verweis auf Liste gefunden") + logging.info("Verweis auf Liste gefunden") strResult = dictLists[xmlReferenceRefTarget] if xmlReferenceRefTarget in dictChapters: - print("Verweis auf Kapitel gefunden") + logging.info("Verweis auf Kapitel gefunden") strResult = dictChapters[xmlReferenceRefTarget] if xmlReferenceRefTarget in dictSections: - print("Verweis auf Section gefunden") + logging.info("Verweis auf Section gefunden") strResult = dictSections[xmlReferenceRefTarget] if xmlReferenceRefTarget in dictFigures: - print("Verweis auf Abbildung gefunden") + logging.info("Verweis auf Abbildung gefunden") strResult = dictFigures[xmlReferenceRefTarget] if xmlReferenceRefTarget in dictFootnotes: - print("Verweis auf Fussnote gefunden") + logging.info("Verweis auf Fussnote gefunden") strResult = dictFootnotes[xmlReferenceRefTarget] if xmlReferenceRefTarget in dictTheorems: - print("Verweis auf Theorem gefunden") + logging.info("Verweis auf Theorem gefunden") strResult = dictTheorems[xmlReferenceRefTarget] if xmlReferenceLabelText in dictTables: - print("Verweis auf Tabelle gefunden") + logging.info("Verweis auf Tabelle gefunden") strResult = dictTables[xmlReferenceLabelText] tmpTail = xmlReference.tail or "" #tmpTail = tmpTail.strip() - print("XXXXXXXX") + logging.info("XXXXXXXX") xmlReference.clear() xmlReference.text = strResult xmlReference.tail = tmpTail @@ -1413,11 +1585,11 @@ class FootnoteError(Exception): strResult = "!!! Page Reference !!!" xmlReferenceLabel = xmlReference.find("Label") xmlReferenceLabelText = xmlReferenceLabel.text - print(xmlReferenceLabelText) + logging.info(xmlReferenceLabelText) xmlReferenceRef = xmlReference.find("ref") xmlReferenceRefTarget = xmlReferenceRef.get("target") if xmlReferenceLabelText in dictPagelabels: - print("Verweis auf Seite gefunden: " + xmlReferenceLabelText) + logging.info("Verweis auf Seite gefunden: " + xmlReferenceLabelText) strResult = dictPagelabels[xmlReferenceLabelText] tmpTail = xmlReference.tail or "" xmlReference.clear() @@ -1437,8 +1609,8 @@ class FootnoteError(Exception): # Finish ePub Conversion, save File # ############################################################## -print("-----------------------------------------------------") -print("Cleaning up XML") +logging.info("-----------------------------------------------------") +logging.info("Cleaning up XML") xmlIndexentries = xmlEbookTree.xpath(".//EOAindex | .//EOAindexperson | .//EOAindexlocation") for xmlIndexentry in xmlIndexentries: tmpTail = xmlIndexentry.tail or "" @@ -1454,7 +1626,7 @@ class FootnoteError(Exception): intTechnicalChapterNumber = 1 for xmlChapter in xmlChapters: # Load xmlHTMLTemplate - htmlChapter = etree.parse(EPUB_FILES + "epubchapter.xml", xmlChapterParser) + htmlChapter = etree.parse( str(EPUB_FILES / "epubchapter.xml"), xmlChapterParser) # Find out, if it's inside a part. If Part has not been worked on, then do it xmlChapterParent = xmlChapter.getparent() if xmlChapterParent.tag == "div0" and xmlChapterParent.get("id") not in listParts: @@ -1465,7 +1637,8 @@ class FootnoteError(Exception): xmlNew.text = strPartTitle htmlChapter.find(".//" + htmlns + "body").append(xmlNew) # Save Part - tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" + tmpFileName = CONVERT_DIR / ("epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") + # tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(htmlChapter, pretty_print=True, encoding="unicode") tmpFile.write(tmpResult) @@ -1475,14 +1648,15 @@ class FootnoteError(Exception): contentopf = addToContentopf(contentopf, "chapter" + str(intTechnicalChapterNumber) + ".xhtml", "chapter" + str(intTechnicalChapterNumber), "xml") intTechnicalChapterNumber += 1 # Reset htmlChapter - htmlChapter = etree.parse(EPUB_FILES + "epubchapter.xml", xmlChapterParser) + htmlChapter = etree.parse(str(EPUB_FILES / "epubchapter.xml"), xmlChapterParser) # Aus div1 alle kinder auslesen und an htmlChapter dran hängen xmlChildren = xmlChapter.getchildren() for xmlChild in xmlChildren: # Using Deepcopy, coz a simple append will delete the original htmlChapter.find(".//" + htmlns + "body").append(deepcopy(xmlChild)) # Save Chapter - tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" + tmpFileName = CONVERT_DIR / ("epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") + # tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(htmlChapter, pretty_print=True, encoding="unicode") tmpFile.write(tmpResult) @@ -1496,9 +1670,9 @@ class FootnoteError(Exception): # Convert Facsimile-Parts xmlParts = xmlEbookTree.findall("//div0") for xmlPart in xmlParts: - print("-------------") - print("Working on Facsimile-Part") - print("-------------") + logging.info("-------------") + logging.info("Working on Facsimile-Part") + logging.info("-------------") # check if it has a child element EOAfacsimilepart if bool(xmlPart.findall(".//EOAfacsimilepart")): htmlChapter = etree.parse(EPUB_FILES + "epubchapter.xml", xmlChapterParser) @@ -1512,13 +1686,15 @@ class FootnoteError(Exception): # Using Deepcopy, coz a simple append will delete the original htmlChapter.find(".//" + htmlns + "body").append(deepcopy(xmlChild)) # Save Chapter - tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" + tmpFileName = CONVERT / ("epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") + # tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(htmlChapter, pretty_print=True, encoding="unicode") tmpFile.write(tmpResult) tmpFile.close() # Save Chapter - tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" + tmpFileName = CONVERT_DIR / ("epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") + # tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(htmlChapter, pretty_print=True, encoding="unicode") tmpFile.write(tmpResult) @@ -1530,14 +1706,16 @@ class FootnoteError(Exception): intTechnicalChapterNumber += 1 # Saving toc.ncx -tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/toc.ncx" +tmpFileName = CONVERT_DIR / "epub/OEBPS/toc.ncx" +# tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/toc.ncx" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(tocncx, pretty_print=True, encoding="unicode") tmpFile.write(tmpResult) tmpFile.close() # Saving content.opf -tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/content.opf" +tmpFileName = CONVERT_DIR / "epub/OEBPS/content.opf" +# tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/content.opf" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(contentopf, pretty_print=True, encoding="unicode") tmpFile.write(tmpResult) @@ -1548,7 +1726,7 @@ class FootnoteError(Exception): ############################################################################ # Write Temporary XML-Tree -ergebnisdatei = open("tmp_files/Devel_ebook.xml", "w") +ergebnisdatei = open(TEMP_DIR / "Devel_ebook.xml", "w") ergebnis = etree.tostring(xmlEbookTree, pretty_print=True, encoding="unicode") ergebnisdatei.write(ergebnis) ergebnisdatei.close() diff --git a/utils/libeoaconvert.py b/utils/libeoaconvert.py index a5b0f48..6c5c117 100644 --- a/utils/libeoaconvert.py +++ b/utils/libeoaconvert.py @@ -23,6 +23,20 @@ ######################### allowed_bibentry_types = ["book", "booklet", "report", "thesis", "misc", "incollection", "inproceedings", "article", "newspaper"] +def enable_preamble( + input_file, + output_file, + pdf_or_xml +): + with open( input_file, "r" ) as i: + with open( output_file, "w" ) as o: + if( pdf_or_xml == "pdf" ): + o.write( "\input{preambel/pre_eoa}\n" ) + else: + o.write( "\input{preambel/pre_xml}\n" ) + o.write( i.read() ) + + def get_bigfoot_data(chapter): """ footnotes are per-chapter @@ -49,36 +63,37 @@ def get_bigfoot_data(chapter): def sanitizeImage( strImagepath, + tmp_dir, GM_PATH, PDFCROP_EXEC, # TL_PATH ): """Adjust and convert image for epub standard""" - if not os.path.exists("tmp_files/tmp_images/"): - os.makedirs(os.path.expanduser("tmp_files/tmp_images/")) + if not os.path.exists(Path(tmp_dir) / "tmp_images/"): + os.makedirs(os.path.expanduser(Path(tmp_dir) / "tmp_images/")) - tmp_image_dir = os.getcwd() + "/tmp_files/tmp_images/" - xelatex_sanitizeimage_logfile = open('tmp_files/xelatex-run-images.log', 'w') + tmp_image_dir = Path(tmp_dir) / "tmp_images/" + xelatex_sanitizeimage_logfile = open( Path(tmp_dir) / 'xelatex-run-images.log', 'w') logging.debug(strImagepath) - strCommand = GM_PATH + " identify -format \"%w\" " + strImagepath + strCommand = GM_PATH + " identify -format \"%w\" " + str(strImagepath) listArguments = shlex.split(strCommand) exeShell = subprocess.check_output(listArguments, shell=False, universal_newlines=True) intImageWidth = int(exeShell) if intImageWidth > 700: - strCommand = GM_PATH + " convert " + strImagepath + " -resize 700x\\> " + strImagepath + strCommand = GM_PATH + " convert " + str(strImagepath) + " -resize 700x\\> " + str(strImagepath) listArguments = shlex.split(strCommand) subprocess.check_output(listArguments, shell=False) - strCommand = GM_PATH + " identify -format \"%h\" " + strImagepath + strCommand = GM_PATH + " identify -format \"%h\" " + str(strImagepath) listArguments = shlex.split(strCommand) exeShell = subprocess.check_output(listArguments, shell=False, universal_newlines=True) intImageHeight = int(exeShell) if intImageHeight > 1000: - strCommand = GM_PATH + " convert " + strImagepath + " -resize x1000\\> " + strImagepath + strCommand = GM_PATH + " convert " + str(strImagepath) + " -resize x1000\\> " + str(strImagepath) listArguments = shlex.split(strCommand) subprocess.check_output(listArguments, shell=False) - strCommand = GM_PATH + " identify -format \"%m\" " + strImagepath + strCommand = GM_PATH + " identify -format \"%m\" " + str(strImagepath) listArguments = shlex.split(strCommand) exeShell = subprocess.check_output(listArguments, shell=False, universal_newlines=True) strFileFormat = str(exeShell) @@ -102,10 +117,10 @@ def sanitizeImage( # os.remove(strImagepath) # strImagepath = strNewImagepath + ".png" elif strFileFormat == "PDF": - strNewImagepath = os.path.splitext(strImagepath)[0] + strNewImagepath = os.path.splitext(str(strImagepath))[0] clipped_file = strImagepath.replace(".pdf", "-clipped.pdf") - Kommando = PDFCROP_EXEC + " --margins 10 --clip --hires " + strImagepath + " " + clipped_file + Kommando = PDFCROP_EXEC + " --margins 10 --clip --hires " + str(strImagepath) + " " + clipped_file logging.debug(Kommando) Argumente = shlex.split(Kommando) @@ -177,11 +192,17 @@ def plural(num, noun, plural=None): # def plural ends here -def format_citations_tex4ht(used_citekeys, bibdata, language, tmp_filename): +def format_citations_tex4ht( + used_citekeys, + bibdata, + language, + tmp_filename, + tmp_dir +): """Return a formatted xmlstring of the used citations""" - tmp_path_md = "tmp_files" + os.path.sep + tmp_filename + ".tex" - tmp_path_html = "tmp_files" + os.path.sep + tmp_filename + ".html" + tmp_path_md = Path(tmp_dir) / (tmp_filename + ".tex") + tmp_path_html = Path(tmp_dir) / (tmp_filename + ".html") return references # def format_citations_tex4ht ends here @@ -195,8 +216,12 @@ def format_citations( ): """Return a formatted xmlstring of the used citations""" + tmp_path_md = tmp_filename.with_suffix(".md") + tmp_path_html = tmp_filename.with_suffix(".html") + ''' tmp_path_md = "tmp_files" + os.path.sep + tmp_filename + ".md" tmp_path_html = "tmp_files" + os.path.sep + tmp_filename + ".html" + ''' md_file_header = "---\nlang: %s\ntitle: Citations\n...\n\n" % two_letter_language(language) @@ -242,20 +267,27 @@ def fix_bib_entries(div_snippet): return div_snippet # def fix_bib_entries ends here -def debug_xml_here(xml_tree, xml_filename): +def debug_xml_here( + xml_tree, + xml_filename, + output_dir +): """Dump current state of an XML tree into a file for inspection""" + ''' if not os.path.exists("debug"): os.makedirs(os.path.expanduser("debug")) xml_path = "%s/debug/debug_%s.xml" % (os.getcwd(), xml_filename) + ''' + xml_path = (Path(output_dir) / xml_filename).with_suffix( ".xml") if isinstance(xml_tree, etree._ElementTree): pass else: xml_tree = etree.ElementTree(xml_tree) - xml_tree.write(xml_path, pretty_print=True, xml_declaration=True,encoding="utf-8") + xml_tree.write( str(xml_path), pretty_print=True, xml_declaration=True,encoding="utf-8") logging.info("Wrote %s." % xml_path) # def debug_xml_here ends here diff --git a/utils/load_config.py b/utils/load_config.py index 13c5877..f1d3ebd 100644 --- a/utils/load_config.py +++ b/utils/load_config.py @@ -4,8 +4,76 @@ import configparser import logging +import subprocess +from subprocess import PIPE, STDOUT from pathlib import Path import os +import shlex +import time +import shutil + +import tempfile + +def copy_file_overwrite( src, dst ): + if os.path.exists( dst ): + shutil.rmtree( dst ) + shutil.copy( src, dst) + +def copy_dir_overwrite( src, dst ): + if os.path.exists( dst ): + shutil.rmtree( dst ) + shutil.copytree( src, dst) + +def exec_command( + command, + error_msg = "ERROR while running {command}", + wd = None, + log_level = "INFO", + ignore_fail = False + ): + logging.log( + getattr(logging,log_level), + f"executing '{command}'", + ) + + arguments = shlex.split(command) + process = subprocess.Popen( + arguments, + cwd = wd, + stdout=PIPE, + stderr=PIPE + ) + + def check_io(): + while True: + output = process.stdout.readline() + if output: + logging.debug( output.decode().strip() ) + else: + break + + # keep checking stdout/stderr until the child exits + while process.poll() is None: + check_io() + + ret = process.wait() # 0 means success + if (not ignore_fail) and ret != 0: + raise( Exception( error_msg.format( command=command ) ) ) + +def check_executable( executable_name ): + logging.info(f"checking executable {executable_name}...") + exec_command( + f"which {executable_name}", + f"PROGRAM not found: {executable_name}", + log_level = "NOTSET" + ) + logging.info("ok :-)") + +def check_file( filename ): + logging.info(f"checking '{filename}'...") + if not os.path.exists( filename ): + raise( Exception( f"'{filename}' is missing!" ) ) + logging.info("ok :-)") ################################## # Reading the configuration file # @@ -13,21 +81,42 @@ def load_config( cfg_file, - LOGFILE, - LOGLEVEL + log_level, # log level in the terminal + log_file, + log_level_file = logging.DEBUG ): - BASE_DIR = Path( os.path.realpath(__file__) ).parent.parent CONFIG = configparser.ConfigParser() CONFIG.read( cfg_file ) ###################### # Setting up logging # ###################### - # LOGFILE = CONFIG['General']['logfile'] - # LOGLEVEL = CONFIG['General']['loglevel'] - logging.basicConfig(level=LOGLEVEL, format='%(asctime)s - %(levelname)s - %(message)s') + log_dir = Path(log_file).absolute().parent + if not (log_dir.exists() and log_dir.is_dir()): + os.makedirs( log_dir ) + time.sleep( 1 ) + + # always log to file: + logging.basicConfig( + level=logging.DEBUG, + format='%(asctime)s - %(levelname)s - %(message)s', + filename = log_file, + filemode = "w" + ) + + rootLogger = logging.getLogger() + + # set up logging to terminal: + terminal_formatter = \ + logging.Formatter( + "%(levelname)s - %(message)s" + ) + consoleHandler = logging.StreamHandler() + consoleHandler.setFormatter(terminal_formatter) + consoleHandler.setLevel( log_level ) + rootLogger.addHandler(consoleHandler) # Setup of various dictionaries for localization of various elements # dictLangFootnotes = {"it" : "Note a piè pagina", "fr" : "notes en bas de page", "de" : "Fußnoten", "en" : "Footnotes"} From 1a7800e4bba7e66e2bc082b77e0410888711341c Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 4 Apr 2019 12:14:00 +0200 Subject: [PATCH 006/132] added `./bibformat/` dir from NextCloud to repo. --- bibformat/4ht/auto/fo.el | 630 +++ bibformat/4ht/bibliography4ht.tex | 68 + bibformat/4ht/eoa.cfg | 6 + bibformat/4ht/fo.bib | 5740 ++++++++++++++++++++++ bibformat/4ht/htform.py | 168 + bibformat/4ht/older/fo.4ct | 64 + bibformat/4ht/older/fo.4tc | 63 + bibformat/4ht/older/fo.aux | 210 + bibformat/4ht/older/fo.bbl | 671 +++ bibformat/4ht/older/fo.bcf | 2058 ++++++++ bibformat/4ht/older/fo.css | 124 + bibformat/4ht/older/fo.dvi | Bin 0 -> 34460 bytes bibformat/4ht/older/fo.ent | 3 + bibformat/4ht/older/fo.html | 483 ++ bibformat/4ht/older/fo.idv | Bin 0 -> 433 bytes bibformat/4ht/older/fo.lg | 153 + bibformat/4ht/older/fo.odt | Bin 0 -> 10546 bytes bibformat/4ht/older/fo.run.xml | 85 + bibformat/4ht/older/fo.tex | 287 ++ bibformat/4ht/older/fo.tmp | 2 + bibformat/4ht/older/fo.xml | 885 ++++ bibformat/4ht/older/fo.xref | 65 + bibformat/4ht/older/folbl.tex | 287 ++ bibformat/4ht/older/sam.tex | 16 + bibformat/4ht/tmp.html | 12 + bibformat/4ht/tmp_files/test.4ct | 64 + bibformat/4ht/tmp_files/test.4tc | 63 + bibformat/4ht/tmp_files/test.aux | 151 + bibformat/4ht/tmp_files/test.bbl | 675 +++ bibformat/4ht/tmp_files/test.bcf | 2079 ++++++++ bibformat/4ht/tmp_files/test.blg | 20 + bibformat/4ht/tmp_files/test.css | 124 + bibformat/4ht/tmp_files/test.dvi | Bin 0 -> 33156 bytes bibformat/4ht/tmp_files/test.html | 461 ++ bibformat/4ht/tmp_files/test.idv | Bin 0 -> 429 bytes bibformat/4ht/tmp_files/test.lg | 153 + bibformat/4ht/tmp_files/test.run.xml | 85 + bibformat/4ht/tmp_files/test.tex | 188 + bibformat/4ht/tmp_files/test.tmp | 2 + bibformat/4ht/tmp_files/test.xref | 65 + bibformat/chicago-author-date-custom.csl | 645 +++ 41 files changed, 16855 insertions(+) create mode 100644 bibformat/4ht/auto/fo.el create mode 100644 bibformat/4ht/bibliography4ht.tex create mode 100644 bibformat/4ht/eoa.cfg create mode 100644 bibformat/4ht/fo.bib create mode 100644 bibformat/4ht/htform.py create mode 100644 bibformat/4ht/older/fo.4ct create mode 100644 bibformat/4ht/older/fo.4tc create mode 100644 bibformat/4ht/older/fo.aux create mode 100644 bibformat/4ht/older/fo.bbl create mode 100644 bibformat/4ht/older/fo.bcf create mode 100644 bibformat/4ht/older/fo.css create mode 100644 bibformat/4ht/older/fo.dvi create mode 100644 bibformat/4ht/older/fo.ent create mode 100644 bibformat/4ht/older/fo.html create mode 100644 bibformat/4ht/older/fo.idv create mode 100644 bibformat/4ht/older/fo.lg create mode 100644 bibformat/4ht/older/fo.odt create mode 100644 bibformat/4ht/older/fo.run.xml create mode 100644 bibformat/4ht/older/fo.tex create mode 100644 bibformat/4ht/older/fo.tmp create mode 100644 bibformat/4ht/older/fo.xml create mode 100644 bibformat/4ht/older/fo.xref create mode 100644 bibformat/4ht/older/folbl.tex create mode 100644 bibformat/4ht/older/sam.tex create mode 100644 bibformat/4ht/tmp.html create mode 100644 bibformat/4ht/tmp_files/test.4ct create mode 100644 bibformat/4ht/tmp_files/test.4tc create mode 100644 bibformat/4ht/tmp_files/test.aux create mode 100644 bibformat/4ht/tmp_files/test.bbl create mode 100644 bibformat/4ht/tmp_files/test.bcf create mode 100644 bibformat/4ht/tmp_files/test.blg create mode 100644 bibformat/4ht/tmp_files/test.css create mode 100644 bibformat/4ht/tmp_files/test.dvi create mode 100644 bibformat/4ht/tmp_files/test.html create mode 100644 bibformat/4ht/tmp_files/test.idv create mode 100644 bibformat/4ht/tmp_files/test.lg create mode 100644 bibformat/4ht/tmp_files/test.run.xml create mode 100644 bibformat/4ht/tmp_files/test.tex create mode 100644 bibformat/4ht/tmp_files/test.tmp create mode 100644 bibformat/4ht/tmp_files/test.xref create mode 100644 bibformat/chicago-author-date-custom.csl diff --git a/bibformat/4ht/auto/fo.el b/bibformat/4ht/auto/fo.el new file mode 100644 index 0000000..0672c5c --- /dev/null +++ b/bibformat/4ht/auto/fo.el @@ -0,0 +1,630 @@ +(TeX-add-style-hook + "fo" + (lambda () + (LaTeX-add-bibitems + "Appadurai_1986" + "Arasse_2000" + "Bal_2003" + "Batchen_1997" + "Batchen_2008" + "Baxandall_1972" + "Belting_2001" + "Belting_2011" + "Berger_1974" + "Berger_1980" + "Boehm_1994" + "BolterGrusin_1999" + "Bourdieu_1965" + "Bourdieu_1972" + "Bourdieu_1977" + "Bourdieu_1990" + "Burgin_1982" + "CallonLatour_1981" + "Campt_2012" + "Campt_2017" + "Caraffa_2011" + "Caraffa_2017" + "Caraffa_forthcoming" + "Conze_1902" + "Crary_1990" + "Crimp_1989" + "DastonGalison_1992" + "DastonGalison_2007" + "Dennis_2009" + "Edwards_1992" + "Edwards_1999" + "Edwards_2005" + "Edwards_2009" + "Edwards_2012" + "Edwards_2015" + "Edwards_2016" + "EdwardsHart_2004" + "Favero_2013" + "Favero_2014" + "Favero_2017" + "Favero_2018" + "Freedberg_1989" + "Frosh_2015" + "Gabrys_2011" + "Geertz_1973" + "Geimer_2010" + "Geismar_2006" + "GeismarMorton_2015" + "Gell_1992" + "Ginzburg_1993" + "Gumbrecht_2004" + "HahnWeiss_2013" + "Haraway_1991" + "Hevia_2009" + "Hodder_2012" + "Hoskins_1998" + "Hubner_2004" + "HuhtamoParikka_2011" + "Kastner_2011" + "Klamm_2017" + "Knappett_2011" + "Kopytoff_1986" + "Krumme_2008" + "Langford_2001" + "Latour_2005" + "Lehmann-BraunsSichauTrischler_2010" + "MaxwellRaundalenVestberg_2015" + "McCauley_1994" + "McQuire_2013" + "Miller_1987" + "Miller_1998" + "Miller_2015" + "MillerSinanan_2017" + "Mirzoeff_2003" + "Mitchell_1992" + "Mitchell_1994" + "Mitchell_1996" + "Mitchell_2005a" + "Mitchell_2005b" + "MitmanWilder_2016" + "Olin_2012" + "Pinney:1997aa" + "Pinney_2003" + "Pinney_2004" + "Pinney_2006" + "PinneyPeterson_2003" + "Poole_1997" + "Poole_2005" + "Rose_2000" + "Rose_2010" + "Rosler_1989" + "Ruchatz_2012" + "Sandweiss_2007" + "Sassoon_2004" + "SchleheHidayah_2014" + "Schneider_2017" + "Schneider_forthcoming" + "Schwartz_1995" + "Schwartz_2011" + "Schwartz_2012" + "SchwartzRyan_2003" + "Sekula_1982" + "Sekula_1989" + "Smith_1999" + "Solomon-Godeau_1984" + "Stafford_1999" + "Tagg_1988" + "Tucker_2005" + "VanDijck_2007" + "Walton_2016" + "WereFavero_2013" + "Winter_1908" + "Wright_2013" + "Ball2013" + "Barthes1981" + "Benedict2001" + "Caraffa2011" + "Castro2015" + "CookSchwartz_2002" + "CookSchwartz_all_2002" + "Daston1995" + "DastonPark1998" + "Daston2005" + "Edwards2013" + "Kenney2004" + "AlexandridisHeilmeyer_2004" + "Auigner_2016" + "Berling_1910" + "Bie_1908" + "Blask_1997" + "BlaskFriedrich_2005" + "BlaskRedlin_2005" + "Bode_1907" + "Brulls_2016" + "Buchli_2008" + "Burkhardt_2015" + "Candi_2014" + "Caraffa_2012" + "CaraffaSerena_2015" + "Clifford_1988" + "Conze_2013" + "Conze_2015" + "DastonGalison_2010" + "Davidovic-WaltherWelz_2010" + "Derenthal_2008" + "Derenthal_2010" + "DerenthalKuhn_2010a" + "Dilly_1975" + "Edwards_2011a" + "Edwards_2011b" + "Edwards_2014" + "Evers_1994" + "Geimer_2009" + "GeismarHerle_2010" + "GeneralVerwaltung_1896" + "Gianferro_forthcoming" + "Hagele_2001" + "Hagele_2005" + "Hagele_2007" + "HageleKonig_1999" + "HahneNiehoff_1935" + "Herkenrath_1902" + "Hingley_2005" + "Humann_1904" + "Jessen_1916" + "Jessen_19161917" + "Jung_2015" + "Justnik_2012" + "Kern_1900" + "KielSchneider_1995" + "KlammWodtke_2017" + "Knappett_2005" + "Krajewski_2002" + "Kuhn_1994" + "Kuhn_2010" + "Lehnert_19071910" + "Locher_2011" + "Locher_2012" + "Loiacono_2008" + "Loiacono_2011" + "Mancini_1999" + "Martin_2010" + "Mason_2009" + "Mattingly_1997" + "Mendel_1966" + "Morton_2005" + "MortonNewbury_2015" + "Mundt_1974" + "PageMason_2004" + "Pinney_1992" + "Sachse_2003" + "Schulte_1963" + "Schorner_2005" + "SteberGottoEd_2014" + "Stricker_2010" + "teHeesenMichels_2007" + "Tschirner_2010" + "Umbach_2015" + "Vogelsang_1989" + "Webster_1997" + "Wodtke_2016" + "Wohrer_2015" + "Yaylali_1976" + "Ziehe_1996" + "Riggs_2014" + "Reeves1992" + "Pinney:2017aa" + "noire:1953ab" + "Fotogeschichte_2016" + "Thomas:1977aa" + "Spieker:2008aa" + "Serena:2011aa" + "Sekula:2003aa" + "Ruchatz:2012aa" + "Phillips:2003aa" + "Moniot:1979aa" + "Krauss:1977aa" + "Krauss:1998aa" + "Kramer:1977aa" + "Hugunin:1977aa" + "Heinecken:1977aa" + "Geimer:2015aa" + "Crimp:1989aa" + "Shapin:1989aa" + "Schwartz:2002aa" + "Riggs:2016ab" + "Riggs:2016aa" + "Riggs:2017aa" + "Ridley:2013aa" + "Reid:2015aa" + "Reid:2002aa" + "Reid:1997aa" + "Mak:2012aa" + "McConnell:2004aa" + "Kerbouef:2005aa" + "Johnson:1997aa" + "James:2001aa" + "Hornung:1991aa" + "Hagen:2016aa" + "Goode:2007aa" + "Fox:1951aa" + "Edwards:1972aa" + "Edwards:2015aa" + "Driaux:2016aa" + "Cone:1976aa" + "Collins:2014ab" + "Carter:1933aa" + "Capart:1943aa" + "Museum:1975aa" + "Museum:1973aa" + "Museum:1971aa" + "Museum:1957aa" + "Museum:1951aa" + "Allen:2006aa" + "Adams:2013aa" + "Zdenek:1939aa" + "Wirth:1939aa" + "Groll:1865aa" + "Uhlikova:2010aa" + "Trnkova:2015aa" + "Trnkova:2010aa" + "Schwarz:1931aa" + "Schwartz:1995aa" + "Schlosser:1934aa" + "Rohacek:2010aa" + "Noll:1992aa" + "Lachnit:2005aa" + "Frodl:1988aa" + "Faber:2015ab" + "Faber:2015aa" + "Eitelberger:1863ab" + "Edwards:2017aa" + "Bruckler:2001aa" + "Toure:2000aa" + "Sekula:1981aa" + "Mitman:2016aa" + "Mauuarin:2017aa" + "Mauuarin:2015aa" + "LEstoile:2007aa" + "LEstoile:2005aa" + "Lauriere:2008aa" + "Lacoste:2017ab" + "Kracauer:1995aa" + "Frosh:2003aa" + "Frizot:2009aa" + "Fabian:1983aa" + "Edwards:2002aa" + "Edwards:2001aa" + ":1992aa" + "Denoyelle:1997aa" + "Delpuech:2017aa" + "Daston:2007aa" + "Brunet:1993aa" + "Bouillon:2012aa" + "Boast:2001aa" + "Blaschke:2016aa" + "Blaschke:2011aa" + "Blaschke:2009aa" + "Blanckaert:2015aa" + "Blanckaert:2001aa" + "Benjamin:2008aa" + "Barthe:2000aa" + "AckermanMustardoMurataCole_2016" + "Marchesi_2014" + "ClarkBarger_2016" + "Geismar2006" + "Geismar_2015" + "Liboiron_2016" + "Shapiro_2015" + "Strassler_2002" + "Poole1997" + "Pinney1998" + "Penichon_2013" + "Ingold_2013" + "HenareHolbraadWastell_2005" + "Goodman_1976" + "Gell1998" + "Edwards2004" + "Edwards2010" + "Bennett_2010" + "Appadurai1986" + "Buskirk2003" + "CurrieAllart_2012" + "DrazinKuchler_2015" + "DrazinKuchler-preface_2015" + "Drazin_2015" + "Dubois_2009" + "Fiske_2009" + "Hicks_2010" + "KennedyReissSanderson_2016" + "Krauss_1986" + "Latour_1996" + "Laurenson_2006" + "Pillow_2003" + "Stigter_2014" + "VallHoellingScholteStigter_2011" + "Vall_2015" + "Wharton_2006" + "Wharton_2015" + "GaleLakeLearnerLevinSterrett_2009" + "JenningsPenichon_2011" + "Manchester_2002" + "Brigland2014" + "shoemakers2017" + "Yass2015" + "YassAdamsHilty_2000" + "Tekiner:2010aa" + "Seker:2009aa" + "Sekula:2002aa" + "Ozyurek:2004aa" + "Oral:2011aa" + "Erim:2011aa" + "bozdogan:1997aa" + "Benazus:2009aa" + "Bali:2014aa" + "Assmann:2011aa" + "Arendt:1958aa" + "Aksit:2006aa" + ":2013aa" + ":1973aa" + ":2008aa" + ":1952aa" + "Taskiran:1972aa" + "Oztuncay:2003aa" + "Ozlen:2014aa" + "Necipoglu:2005aa" + "Osman:1873aa" + "Evens:1995aa" + "Celik:2008aa" + "Celik:2015aa" + "treml_warburg_2010" + "Stoichita:1997aa" + "sykoraschrader_2016" + "Sierek:2007aa" + "Rumberg:2011aa" + "Pollock:2011aa" + "Michaud:2004aa" + "Mazzucco:2013aa" + "Warburg:1927aa" + "Levi-Strauss:1966aa" + "Kimpel:2001aa" + "bredekamp_2002" + "dercks_and-because_2014" + "dercks_ulrich_2013" + "medina_2004" + "Hueck:aa" + "Hubert:1997aa" + "Hensel:2013aa" + "David:2010aa" + "Edwards:2011aa" + "Edwards:2004ab" + "Edwards:2004aa" + "Didi-Hubermann:2010aa" + "Carew-Reid:1993aa" + "Caraffa:2011aa" + "Barthes:1984aa" + "Barta-Fliedl:1992aa" + "Agamben:2005aa" + "Abel:2013aa" + "Seppanen:2017aa" + "Rubenstein:2013aa" + "Price:1997aa" + "Pradhan:2015aa" + "Pinney:2008aa" + "Pinney:2004aa" + "Marx:1977aa" + "Meyer:2012aa" + "Dalrymple:2014aa" + "Barthes:1982aa" + "SchechnerSliski_2016" + "Rubio_2016" + "Roberts_18931899" + "Roberts_1888" + "Rees_1906" + "Pickering_1895" + "Olin:2012aa" + "Nasim_forthcoming_b" + "Nasim_forthcoming_a" + "Moxey_2008" + "JonesBoyd_1971" + "Jacoby_1904" + "Jacoby_1892" + "Ingold_2012" + "Ingold_2007" + "Hinks_1901" + "Heidegger_1985" + "Heidegger_1968" + ":1907aa" + "Harpham_1900" + "Gould_1892" + "Brown_2004" + "Brown_2001" + "Breitbach_2011" + "Boyle:2011aa" + "Otlet:1906fu" + "Humboldt:1874it" + "Larfeld:1907ir" + "Winterhalter:1889xz" + "Wilder:2009bc" + "Wickert:1962kl" + "White:1988jx" + "Weimer:1987et" + "Weimer:1988yb" + "Urban:1998ft" + "Turner:1983ca" + "Tucker:2005il" + "Snow:1959tw" + "Rebenich:1999by" + "Rebenich:2005th" + "Poincare:1968ph" + "Ortolano:2009la" + "Norman:1938oq" + "Nasim:2013nx" + "Nadeau:2008cr" + "Mommsen:1905pd" + "Mommsen:1847eu" + "Mommsen:1976qf" + "Mommsen:1905li" + "Lemov:2015dq" + "Lankford:1984ph" + "Lamy:2008ui" + "Kelsey:2008vz" + "Jones:2000jf" + "Hudec:1999jy" + "Huebner:1881xi" + "Hoffleit:1950jb" + "Harnack:1900xz" + "Geimer:2011oa" + "Flammarion:1887cr" + "Edwards:2012lo" + "Sobel:2016zv" + "Draper:1864ft" + "Grau:1993ud" + "Diels:1993wu" + "Debarat:1988mt" + "Daston:2017sc" + "Bruch:2005vl" + "Aristotle:2fr" + "Aristotle:1ga" + "Amad:2010ij" + "Daston:2012dp" + "Bader2013" + "Beyrodt1975" + "Caraffa2009" + "Dilly1975" + "Dilly1995" + "Dilly2009" + "Eisenhauer2006" + "Fawcett1983" + "Grimm1897" + "Haffner2007" + "Hess1999" + "Hotz1965" + "Lankheit1966" + "Leighton1984" + "Malraux1987" + "Marcy1877" + "Matyssek2005" + "McLuhan2015" + "Meyer1879" + "Meyer1883" + "Nelson2000" + "Papenbrock2006" + "Reichle2002" + "Reichle2005" + "Roessler2010" + "Ruchatz2000" + "Ruchatz2003" + "Thuerlemann2013" + "Ullrich2009" + "Wenk1999" + "Wyss1996" + "Batchen_2004" + "Guha-Thakurta_2011" + "Hirsch_1997" + "Karlekar_2005" + "Dhawan_2011" + "Sundaram_2008" + "Tola_1988" + "Derrida_1996" + "Hamber_1996" + "Kratz_2011" + "Crane_2013" + "EdwardsLien_2014" + "EdwardsMorton_2015" + "Daston_2015" + "Edwards_2017" + "Strathern_1996" + "Pinney_2005" + "Alpers_1991" + "Rose_2001" + "Morgan_2011" + "Domanska_2006" + "Gell_1998" + "Foucault_1970" + "Malraux_1965" + "Amao_2015" + "Willumson_2004" + "Crimp_1993" + "Spyer_1998" + "Ingold_2011" + "Haworth-BoothMcCauley_1998" + "Browne_2016" + "Riegl_1982" + "Hooper-Greenhill_1992" + "Faria_2016" + "Jacobi:2017aa" + "Hiller-Norouzi2009" + "hotz_aktenauszuge_1965" + "lankheit_kunstgeschichte_1966" + "leighton_the-lantern_1984" + "malraux_das-imaginare_1987" + "marcy_the-sciopticon_1877" + "matyssek_entdecker_2005" + "mcluhan_understanding_2015" + "meyer_die-photographie_1879" + "meyer_glasphotogramme_1883" + "nelson_the-slide_2000" + "papenbrock_der-lehrstuhl_2006" + "Peters2009" + "reichle_medienbruche_2002" + "reichle_fotografie_2005" + "Rogers2003" + "rosler_erlebnisbegriff_2010" + "ruchatz_the-magic_2000" + "ruchatz_licht_2003" + "stoedtner_photo_1925" + "thurlemann_mehr_2013" + "ullrich_raffinierte_2009" + "wenk_zeigen_1999" + "wyss_der-wille_1996" + "eisenhauer_next_2006" + "fawcett_visual_1983" + "karlsruhe_GLA52Nokk131" + "karlsruhe_GLA2354422" + "grimm_die-umgestaltung_1897" + "haffner_die-kunstgeschichte_2007" + "hes_der-kunstverlag_1999" + "dilly_lichtprojektion._1975" + "dilly_bildwerfer._1995" + "dilly_weder_2009" + "_fotografie_2009" + "beyrodt_diareihen_1975" + "bader_bild-prozesse_2013" + "Anonymous_1975" + "Daston_2004" + "EdwardsMorton_2017" + "Schwartz_2014" + "Sekula_2003" + "StulikKaplan_2013" + "Wilder_2011" + "Blodget_1857" + "CliffordMarcus_1986" + "Hunter_2004" + "MarcusFischer_1986" + "Nye_1994" + "Schlereth_1980" + "Schwartz_2003" + "Klamm_2016" + "SteberGotto_2014" + "Jessen_1896" + "DerenthalKuhn_2010b" + "Hubner:1881xi" + "Buskirk_2003" + "Miller_1986" + "Coupaye_2009" + "Wright_2004" + "Laurenson_2009" + "Adams_2002" + "Dias_1991" + "Lauriere_2015" + "Mauss_1947" + "Peltier_2007" + "Preziosi1989" + "Bohrer_2011" + "Goode_1997" + "Baird2011" + "Shanks1997" + "Colla_2007" + "Woelfflin1915") + (LaTeX-add-environments + '("EOAtable" LaTeX-env-args ["argument"] 4) + '("EOAlist" LaTeX-env-args ["argument"] 0) + '("EOAtranscripted" LaTeX-env-args ["argument"] 2))) + :bibtex) + diff --git a/bibformat/4ht/bibliography4ht.tex b/bibformat/4ht/bibliography4ht.tex new file mode 100644 index 0000000..5172190 --- /dev/null +++ b/bibformat/4ht/bibliography4ht.tex @@ -0,0 +1,68 @@ +\documentclass{scrartcl} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[$language]{babel} +\newcommand{\EOAbibtweaks}{ +% Remove pp from references +\DeclareFieldFormat{postnote}{##1} +% Remove quotation marks from certain titles +\DeclareFieldFormat[thesis]{title}{\mkbibemph{##1}} +\DeclareFieldFormat[article]{title}{##1} +\DeclareFieldFormat[incollection]{title}{##1} +\DeclareFieldFormat[inproceedings]{title}{##1} +\DeclareFieldFormat[inbook]{title}{\mkbibemph{##1}} +\DeclareFieldFormat{title}{\mkbibemph{##1}} +% Remove pp from bibliography at all +\DeclareFieldFormat{pages}{##1}% +% Remove "In:" from articles +\renewbibmacro{in:}{% + \ifentrytype{article}{}{% + \printtext{\bibstring{in}\intitlepunct}}} +% Delete Vol. as praefix +\DeclareFieldFormat*{volume}{##1} +% Use : for pages of an article, use . for the rest +\renewcommand*{\bibpagespunct}{% +\ifentrytype{article}% +{% +\iffieldundef{Number}% +{\addcolon\hspace{0pt}}% +{}% +}% +{,\space}% +} +% Group Volume and Issue in {Brackets} +\renewbibmacro*{journal+issuetitle}{% + \usebibmacro{journal}% + \setunit*{\addspace}% + \iffieldundef{series} + {} + {\newunit + \printfield{series}% + \setunit{\addspace}}% + \printfield{volume}% + \iffieldundef{number} + {} + {\mkbibparens{\printfield{number}}}% + \setunit{\addcomma\space}% + \printfield{eid}% + \setunit{\addspace}% + \usebibmacro{issue+date}% + \setunit{\addcolon\space}% + \usebibmacro{issue}% + \newunit} +% Bug fix for Windows +\defbibheading{none}[]{} +} +\usepackage[autostyle]{csquotes} +\usepackage[mincitenames=1,maxcitenames=3,maxbibnames=100,style=authoryear,backend=biber,autolang=hyphen]{biblatex} +\EOAbibtweaks +\bibliography{$bibfile} +\begin{document} +% \maketitle + +\section{Dummy} + +$citations + +\printbibliography +\end{document} \ No newline at end of file diff --git a/bibformat/4ht/eoa.cfg b/bibformat/4ht/eoa.cfg new file mode 100644 index 0000000..4de5235 --- /dev/null +++ b/bibformat/4ht/eoa.cfg @@ -0,0 +1,6 @@ +\Preamble{xhtml} +\Configure{textit}{\HCode{}\NoFonts} +{\EndNoFonts\HCode{}} +\Css{.textit{font-style:italic;}} +\begin{document} +\EndPreamble \ No newline at end of file diff --git a/bibformat/4ht/fo.bib b/bibformat/4ht/fo.bib new file mode 100644 index 0000000..fe056c3 --- /dev/null +++ b/bibformat/4ht/fo.bib @@ -0,0 +1,5740 @@ +%% This BibTeX bibliography file was created using BibDesk. +%% http://bibdesk.sourceforge.net/ + + +%% Created for ☞ at 2018-04-18 12:31:15 +0200 + + +%% Saved with string encoding Unicode (UTF-8) + + + +@book{Appadurai_1986, + Address = {Cambridge, UK}, + Editor = {Appadurai, Arjun}, + Keywords = {Caraffa}, + Publisher = {Cambridge University Press}, + Title = {The Social Life of Things: Commodities in Cultural Perspective}, + Year = {1986}} + +@book{Arasse_2000, + Address = {Paris}, + Author = {Arasse, Daniel}, + Keywords = {Caraffa}, + Publisher = {Descriptions}, + Title = {On n’y voit rien}, + Year = {2000}} + +@article{Bal_2003, + Author = {Bal, Mieke}, + Journal = {Journal of Visual Culture}, + Keywords = {Caraffa}, + Number = {1}, + Pages = {5–32}, + Title = {Visual Essentialism and the Object of Visual Culture}, + Volume = {2}, + Year = {2003}} + +@book{Batchen_1997, + Address = {Albuquerque, NM}, + Author = {Batchen, Geoffrey}, + Keywords = {Caraffa}, + Publisher = {University of New Mexico Art Museum}, + Title = {Photography’s Objects}, + Year = {1997}} + +@article{Batchen_2008, + Author = {Batchen, Geoffrey}, + Journal = {Photographies}, + Keywords = {Caraffa}, + Number = {2}, + Pages = {121–142}, + Title = {Snapshots: Art History and the Ethnographic Turn}, + Volume = {1}, + Year = {2008}} + +@book{Baxandall_1972, + Address = {Oxford}, + Author = {Baxandall, Michael}, + Keywords = {Caraffa}, + Publisher = {Clarendon Press}, + Title = {Painting and Experience in Fifteenth Century Italy: A Primer in the Social History of Pictorial Style}, + Year = {1972}} + +@book{Belting_2001, + Address = {München}, + Author = {Belting, Hans}, + Keywords = {Caraffa}, + Publisher = {Fink}, + Title = {Bild-Anthropologie : Entwürfe für eine Bildwissenschaft}, + Year = {2001}} + +@book{Belting_2011, + Address = {Princeton, NJ}, + Author = {Belting, Hans}, + Keywords = {Caraffa}, + Publisher = {Princeton University Press}, + Title = {An anthropology of Images: Picture, Medium, Body, trans. T. Dunlap}, + Year = {2011}} + +@incollection{Berger_1974, + Address = {London}, + Author = {Berger, John}, + Booktitle = {The Look of Things}, + Editor = {Berger, John}, + Keywords = {Caraffa}, + Publisher = {Viking}, + Title = {Understanding a Photograph}, + Year = {1974}} + +@incollection{Berger_1980, + Address = {New York}, + Author = {Berger, John}, + Booktitle = {About Looking}, + Editor = {Berger, John}, + Keywords = {Caraffa}, + Pages = {27–63}, + Publisher = {Pantheon Books}, + Title = {Uses of Photography}, + Year = {1980}} + +@book{Boehm_1994, + Address = {München}, + Editor = {Boehm, G.}, + Keywords = {Caraffa}, + Publisher = {Wilhelm Fink Verlag}, + Title = {Was ist ein Bild?}, + Year = {1994}} + +@book{BolterGrusin_1999, + Address = {Cambridge, MA}, + Author = {Bolter, J. D. and R. Grusin}, + Keywords = {Caraffa}, + Publisher = {MIT Press}, + Title = {Remediation: Understanding New Media}, + Year = {1999}} + +@book{Bourdieu_1965, + Address = {Paris}, + Editor = {Bourdieu, Pierre}, + Keywords = {Caraffa}, + Publisher = {Ed. de Minuit}, + Title = {Un art moyen, Essai sur les usages sociaux de la photographie}, + Year = {1965}} + +@book{Bourdieu_1972, + Address = {Paris}, + Author = {Bourdieu, Pierre}, + Keywords = {Caraffa}, + Publisher = {Librairie Droz}, + Title = {Esquisse d'une théorie de la pratique}, + Year = {1972}} + +@book{Bourdieu_1977, + Address = {Cambridge, UK}, + Author = {Bourdieu, Pierre}, + Keywords = {Caraffa}, + Publisher = {Cambridge University Press}, + Title = {Outline of a theory of practice}, + Year = {1977}} + +@book{Bourdieu_1990, + Address = {Stanford, CA}, + Date-Modified = {2018-03-28 12:53:16 +0000}, + Editor = {Bourdieu, Pierre}, + Keywords = {Caraffa}, + Publisher = {Stanford University Press}, + Title = {Photography: A Middle-brow Art, trans. Shaun Whiteside}, + Year = {1990}} + +@book{Burgin_1982, + Address = {London}, + Editor = {Burgin, Victor}, + Keywords = {Caraffa}, + Publisher = {Macmillan}, + Title = {Thinking Photography}, + Year = {1982}} + +@incollection{CallonLatour_1981, + Address = {London}, + Author = {Callon, Michel and Bruno Latour}, + Booktitle = {Advances in Social Theory and Methodology}, + Editor = {K. Knorr-Cetina and A. V. Cicourel}, + Keywords = {Caraffa}, + Pages = {277–303}, + Publisher = {Routledge and Kegan Paul}, + Title = {Unscrewing the big Leviathan; or How Actors Macrostructure Reality and how sociologists help them to do so}, + Year = {1981}} + +@book{Campt_2012, + Address = {Durham, NC}, + Author = {Campt, Tina M.}, + Keywords = {Caraffa}, + Publisher = {Duke University Press}, + Title = {Image matters: archive, photography, and the African diaspora in Europe}, + Year = {2012}} + +@book{Campt_2017, + Address = {Durham, NC}, + Author = {Campt, Tina M.}, + Keywords = {Caraffa}, + Publisher = {Duke University Press}, + Title = {Listening to images}, + Year = {2017}} + +@incollection{Caraffa_2011, + Address = {Berlin and Munich}, + Author = {Caraffa, Costanza}, + Booktitle = {Photo Archives and the Photographic Memory of Art History}, + Date-Modified = {2017-11-01 14:01:27 +0000}, + Editor = {Caraffa, Costanza}, + Keywords = {Sykora; Trnkova; Caraffa}, + Pages = {11--44}, + Publisher = {Deutscher Kunstverlag}, + Title = {From Photo Libraries to Photo Archives: On the Epistemological Potential of Art-Historical Photo Collections}, + Year = {2011}} + +@incollection{Caraffa_2017, + Address = {Prague}, + Author = {Caraffa, Costanza}, + Booktitle = {Instant Presence: Representing Art in Photography}, + Editor = {Hana Buddeus, Vojtěch Lahoda and Katarína Mašterová}, + Keywords = {Caraffa}, + Pages = {122–137}, + Publisher = {Artefactum}, + Title = {Manzoni in the Photothek. Photographic Archives as Ecosystems}, + Year = {2017}} + +@incollection{Caraffa_forthcoming, + Author = {Caraffa, Costanza}, + Booktitle = {Handbook of Photography Studies}, + Date-Modified = {2018-04-16 09:32:17 +0000}, + Editor = {Gil Pasternak}, + Keywords = {Caraffa}, + Publisher = {Bloomsbury Academic}, + Title = {Photographic Itineraries in Time and Space. Photographs as Material Objects}, + Year = {forthcoming}} + +@incollection{Conze_1902, + Author = {Conze, Alexander}, + Booktitle = {Mitteilungen des Deutschen Archäologischen Instituts, Athenische Abteilung, vol. 27}, + Keywords = {Caraffa}, + Title = {Vorbericht über die Arbeiten zu Pergamon 1900–1901}, + Year = {1902}} + +@book{Crary_1990, + Address = {Cambridge, MA}, + Author = {Crary, Jonathan}, + Keywords = {Caraffa}, + Publisher = {MIT Press}, + Title = {Techniques of the observer: On vision and modernity in the nineteenth century}, + Year = {1990}} + +@incollection{Crimp_1989, + Address = {Cambridge, MA}, + Author = {Crimp, Douglas}, + Booktitle = {The Contest of Meaning: Critical Histories of Photography}, + Editor = {R. Bolton}, + Keywords = {Caraffa}, + Pages = {3–14}, + Publisher = {MIT Press}, + Title = {The Museum’s Old/ The Library’s New Subjects}, + Year = {1989}} + +@article{DastonGalison_1992, + Author = {Daston, Lorraine and Peter Galison}, + Journal = {Representations}, + Keywords = {Caraffa}, + Pages = {81–128}, + Publisher = {University of California Press}, + Title = {The Image of Objectivity}, + Volume = {40}, + Year = {1992}} + +@book{DastonGalison_2007, + Address = {New York}, + Author = {Daston, Lorraine and Peter Galison}, + Keywords = {Caraffa}, + Publisher = {Zone Books}, + Title = {Objectivity}, + Year = {2007}} + +@incollection{Dennis_2009, + Address = {New York, NY [u.a.]}, + Author = {Dennis, Kelly}, + Booktitle = {Photography : theoretical snapshots}, + Editor = {J. J. Long, Andrea Noble, and Edward Welch}, + Keywords = {Caraffa}, + Pages = {112–124}, + Publisher = {Routledge}, + Title = {Benjamin, Atget and the "readymade" politics of postmodern photography studies}, + Year = {2009}} + +@book{Edwards_1992, + Address = {New Haven, CT}, + Editor = {Edwards, Elizabeth}, + Keywords = {Caraffa}, + Publisher = {Yale University Press}, + Title = {Anthropology and Photography, 1860–1920}, + Year = {1992}} + +@incollection{Edwards_1999, + Address = {Oxford}, + Author = {Edwards, Elizabeth}, + Booktitle = {Material Memories}, + Editor = {Marius Kwint, Christopher Breward and Jeremy Aynsley}, + Keywords = {Caraffa}, + Pages = {221–236}, + Publisher = {Berg}, + Title = {Photographs as Objects of Memory}, + Year = {1999}} + +@article{Edwards_2005, + Author = {Edwards, Elizabeth}, + Journal = {Visual Anthropology Review}, + Keywords = {Caraffa}, + Number = {1-2}, + Pages = {27–46}, + Title = {Photographs and the Sound of History}, + Volume = {21}, + Year = {2005}} + +@incollection{Edwards_2009, + Address = {London}, + Author = {Edwards, Elizabeth}, + Booktitle = {Photography: theoretical snapshots}, + Editor = {J. J. Long, Andrea Noble and Edward Welch}, + Keywords = {Caraffa}, + Pages = {31–48}, + Publisher = {Routledge}, + Title = {Thinking photography beyond the visual}, + Year = {2009}} + +@article{Edwards_2012, + Author = {Edwards, Elizabeth}, + Journal = {Annual Review of Anthropology}, + Keywords = {Caraffa}, + Pages = {221–234}, + Title = {Objects of Affect: Photography Beyond the Image}, + Volume = {41}, + Year = {2012}} + +@book{Edwards_2015, + Address = {London}, + Editor = {Edwards, Elizabeth and Christopher Morton}, + Keywords = {Caraffa}, + Publisher = {Bloomsbury}, + Title = {Photographs, Museums, Collections: Between Art and Information}, + Year = {2015}} + +@incollection{Edwards_2016, + Address = {Berlin}, + Author = {Edwards, Elizabeth}, + Booktitle = {Zeigen und/oder Beweisen? Die Fotografie als Kulturtechnik und Medium des Wissens}, + Editor = {Herta Wolf}, + Keywords = {Caraffa}, + Pages = {305–326}, + Publisher = {De Gruyter}, + Title = {Der Geschichte ins Antlitz blicken: Fotografie und die Herausforderung der Präsenz}, + Year = {2016}} + +@book{EdwardsHart_2004, + Address = {London}, + Editor = {Elizabeth Edwards and Janice Hart}, + Keywords = {Caraffa}, + Publisher = {Routledge}, + Title = {Photographs Objects Histories: On the Materiality of Images}, + Year = {2004}} + +@article{Favero_2013, + Author = {Favero, Paolo S. H.}, + Journal = {Journal of Material Culture}, + Keywords = {Caraffa}, + Number = {3}, + Pages = {259–277}, + Title = {Getting our hands dirty (again): Interactive documentaries and the meaning of images in a digital age}, + Volume = {18}, + Year = {2013}} + +@article{Favero_2014, + Author = {Favero, Paolo S. H.}, + Journal = {Visual Studies}, + Keywords = {Caraffa}, + Number = {2}, + Pages = {166–179}, + Title = {Learning to look beyond the frame: reflections on the changing meaning of images in the age of digital media practices}, + Volume = {29}, + Year = {2014}} + +@book{Favero_2017, + Address = {London}, + Author = {Favero, Paolo S. H.}, + Publisher = {Royal Anthropological Institute}, + Series = {Anthropology \& Photography}, + Title = {The Transparent Photograph: Reflections on the Ontology of Photographs in a Changing Digital Landscape}, + Volume = {7}, + Year = {2017}} + +@book{Favero_2018, + Address = {London}, + Author = {Favero, Paolo S. H.}, + Keywords = {Caraffa}, + Publisher = {Palgrave Macmillan}, + Title = {The Present Image. Visible Stories in a Digital Habitat}, + Year = {2018}} + +@book{Freedberg_1989, + Address = {Chicago, IL}, + Author = {Freedberg, David}, + Keywords = {Caraffa}, + Publisher = {The University of Chicago Press}, + Title = {The power of images: studies in the history and theory of response}, + Year = {1989}} + +@article{Frosh_2015, + Author = {Frosh, Paul}, + Journal = {International Journal of Communication}, + Keywords = {Caraffa}, + Pages = {1607–1628}, + Title = {The Gestural Image: The Selfie, Photography Theory and Kinesthetic Sociability}, + Volume = {9}, + Year = {2015}} + +@book{Gabrys_2011, + Address = {Ann Arbor}, + Author = {Gabrys, Jennifer}, + Keywords = {Caraffa}, + Publisher = {University of Michigan Press}, + Title = {Digital Rubbish: A Natural History of Electronics}, + Year = {2011}} + +@book{Geertz_1973, + Address = {New York}, + Author = {Geertz, Clifford}, + Keywords = {Caraffa}, + Publisher = {Basic Books}, + Title = {The Interpretation of Cultures: Selected Essays}, + Year = {1973}} + +@book{Geimer_2010, + Address = {Hamburg}, + Author = {Geimer, Peter}, + Keywords = {Caraffa}, + Publisher = {Philo Fine Arts}, + Title = {Bilder aus Versehen}, + Year = {2010}} + +@article{Geismar_2006, + Author = {Geismar, Haidy}, + Journal = {Comparative Studies in Society and History}, + Keywords = {Caraffa}, + Number = {3}, + Pages = {520–563}, + Publisher = {Cambridge University Press}, + Title = {Malakula: A Photographic Collection}, + Volume = {48}, + Year = {2006}} + +@article{GeismarMorton_2015, + Author = {Geismar, Haidy and Christopher Morton}, + Journal = {Photographies}, + Keywords = {Caraffa}, + Month = {9}, + Number = {3}, + Pages = {253–270}, + Title = {Reasserting presence, Reclamation and Desire}, + Volume = {8}, + Year = {2015}} + +@incollection{Gell_1992, + Address = {Oxford}, + Author = {Gell, Alfred}, + Booktitle = {Anthropology, Art and Aesthetics}, + Editor = {J. Coote and A. Shelton}, + Keywords = {Caraffa}, + Pages = {40–66}, + Publisher = {Clarendon}, + Title = {The technology of Enchantment and the Enchantment of Technology}, + Year = {1992}} + +@article{Ginzburg_1993, + Author = {Ginzburg, Carlo}, + Journal = {Critical Inquiry}, + Keywords = {Caraffa}, + Number = {1}, + Pages = {10–35}, + Title = {Microhistory: Two or Three Things That I Know about It}, + Volume = {20}, + Year = {1993}} + +@book{Gumbrecht_2004, + Address = {Stanford, CA}, + Author = {Gumbrecht, Hans Ulrich}, + Keywords = {Caraffa}, + Publisher = {Stanford University Press}, + Title = {Production of Presence: What Meaning Cannot Convey}, + Year = {2004}} + +@book{HahnWeiss_2013, + Address = {Oxford}, + Editor = {Hahn, Hans Peter and Hadas Weiss}, + Keywords = {Caraffa}, + Title = {Mobility, Meaning and the Transformations of Things. Shifting Contexts of Material Culture through Time and Space}, + Year = {2013}} + +@book{Haraway_1991, + Address = {London}, + Author = {Haraway, Donna J.}, + Keywords = {Caraffa}, + Publisher = {Routledge}, + Title = {Simians, Cyborgs, and Women: The Reinvention of Nature}, + Year = {1991}} + +@incollection{Hevia_2009, + Address = {Durham, NC}, + Author = {Hevia, James L.}, + Booktitle = {Photographies East: The Camera and Its Histories in East and Southeast Asia}, + Editor = {Morris, Rosalind C.}, + Keywords = {Caraffa}, + Pages = {79–121}, + Publisher = {Duke University Press}, + Title = {The Photography Complex: Exposing Boxer-Era China (1900 – 1901), Making Civilization}, + Year = {2009}} + +@book{Hodder_2012, + Address = {Malden}, + Author = {Hodder, Ian}, + Keywords = {Caraffa}, + Publisher = {Wiley-Blackwell}, + Title = {Entangled. An Archaeology of the Relationships between Humans and Things}, + Year = {2012}} + +@book{Hoskins_1998, + Address = {London}, + Author = {Hoskins, Janet}, + Keywords = {Caraffa}, + Publisher = {Routledge}, + Title = {Biographical Objects: How Things Tell the Stories of People's Lives}, + Year = {1998}} + +@article{Hubner_2004, + Author = {Hübner, Gerhild}, + Journal = {Istanbuler Mitteilungen}, + Keywords = {Caraffa}, + Pages = {83–111}, + Title = {Zu den Anfängen der Photographie in der deutschsprachigen Klassischen Archäologie. Ihre Anwendung während der ersten zwei Jahrzehnte der Pergamongrabung}, + Volume = {54}, + Year = {2004}} + +@book{HuhtamoParikka_2011, + Editor = {Huhtamo, Erkki and Jussi Parikka}, + Keywords = {Caraffa}, + Publisher = {University of California Press}, + Title = {Media Archaeology. Approaches, Applications, and Implications}, + Year = {2011}} + +@incollection{Kastner_2011, + Address = {Petersberg}, + Author = {Kästner, Ursula}, + Booktitle = {Pergamon. Panorama der antiken Metropole, exhib. cat. Antikensammlung der Staatlichen Museen zu Berlin}, + Keywords = {Caraffa}, + Pages = {36–44}, + Publisher = {Imhof}, + Title = {‘Ein Werk, so groß und herrlich ... war der Welt wiedergeschenkt!‘ - Geschichte der Ausgrabungen in Pergamon bis 1900}, + Year = {2011}} + +@book{Klamm_2017, + Address = {Berlin}, + Author = {Klamm, Stefanie}, + Keywords = {Caraffa}, + Publisher = {Gebr. Mann Verlag}, + Title = {Bilder des Vergangenen: Visualisierung in der Archäologie im 19. Jahrhundert - Fotografie, Zeichnung und Abguss}, + Year = {2017}} + +@book{Knappett_2011, + Address = {Oxford}, + Author = {Knappett, Carl}, + Keywords = {Caraffa}, + Publisher = {Oxford University Press}, + Title = {An Archaeology of Interaction: Network Perspectives on Material Culture and Society}, + Year = {2011}} + +@incollection{Kopytoff_1986, + Address = {Cambridge, UK}, + Author = {Kopytoff, Igor}, + Booktitle = {The Social Life of Things: Commodities in Cultural Perspective}, + Editor = {Appadurai, Arjun}, + Keywords = {Caraffa}, + Pages = {64–91}, + Publisher = {Cambridge University Press}, + Title = {The cultural biography of things: commodification as process}, + Year = {1986}} + +@incollection{Krumme_2008, + Address = {Patra}, + Author = {Krumme, Michael}, + Booktitle = {Διεθνές Συνέδριο Αφιερωμένο στον Wilhelm Dörpfeld: υπό την Αιγίδα του Υπουργείου Πολιτισμού, Λευκάδα 6-11 Αυγούστου 2006}, + Editor = {Chara Papadatou-Giannopoulou}, + Keywords = {Caraffa}, + Pages = {61–78}, + Publisher = {Peri Technōn}, + Title = {Der Beginn der archäologischen Fotografie am DAI Athen}, + Year = {2008}} + +@book{Langford_2001, + Address = {Montreal}, + Author = {Langford, Marta}, + Keywords = {Caraffa}, + Publisher = {McGill-Queen’s University Press}, + Title = {Suspended Conversations}, + Year = {2001}} + +@book{Latour_2005, + Address = {Oxford}, + Author = {Latour, Bruno}, + Keywords = {Caraffa}, + Publisher = {Oxford University Press}, + Title = {Reassembling the Social: An Introduction to Actor-Network-Theory}, + Year = {2005}} + +@book{Lehmann-BraunsSichauTrischler_2010, + Address = {Berlin}, + Editor = {Susanne Lehmann-Brauns and Christian Sichau and Helmuth Trischler}, + Keywords = {Caraffa}, + Title = {The Exhibition as Product and Generator of Scholarship}, + Year = {2010}} + +@book{MaxwellRaundalenVestberg_2015, + Address = {London}, + Editor = {Maxwell, Richard, Jon Raundalen and Nina Lager Vestberg}, + Keywords = {Caraffa}, + Publisher = {Routledge}, + Title = {Media and the Ecological Crisis}, + Year = {2015}} + +@book{McCauley_1994, + Address = {New Haven, CT}, + Author = {McCauley, Elisabeth Anne}, + Keywords = {Caraffa}, + Publisher = {Yale University Press}, + Title = {Industrial Madness: Commercial Photography in Paris, 1848 –1871}, + Year = {1994}} + +@article{McQuire_2013, + Author = {McQuire, Scott}, + Journal = {Journal of Material Culture}, + Keywords = {Caraffa}, + Number = {3}, + Pages = {223–241}, + Title = {Photography’s Afterlife: Documentary Images and the Operational Archive}, + Volume = {18}, + Year = {2013}} + +@book{Miller_1987, + Address = {Oxford}, + Author = {Miller, Daniel}, + Keywords = {Caraffa}, + Publisher = {Basil Blackwell}, + Title = {Material culture and mass consumption}, + Year = {1987}} + +@book{Miller_1998, + Address = {London}, + Editor = {Miller, Daniel}, + Keywords = {Caraffa}, + Publisher = {UCL Press}, + Title = {Material Cultures: Why Some Things Matter}, + Year = {1998}} + +@book{Miller_2015, + Address = {London}, + Author = {Miller, Daniel}, + Publisher = {Royal Anthropological Institute}, + Series = {Anthropology \& Photography}, + Title = {Photography in the Age of Snapchat}, + Volume = {1}, + Year = {2015}} + +@book{MillerSinanan_2017, + Address = {London}, + Author = {Miller, Daniel and Jolynna Sinanan}, + Keywords = {Caraffa}, + Publisher = {UCL Press}, + Title = {Visualising Facebook}, + Year = {2017}} + +@incollection{Mirzoeff_2003, + Address = {New York}, + Author = {Mirzoeff, N.}, + Booktitle = {Only Skin Deep: Changing Visions of the American Self}, + Editor = {Coco Fusco and Brian Wallis}, + Keywords = {Caraffa}, + Pages = {111–128}, + Publisher = {International Center for Photography/Harry N. Abrams}, + Title = {The Shadow and the Substance: Photography and Indexicality in American Photography}, + Year = {2003}} + +@book{Mitchell_1992, + Address = {Cambridge, MA}, + Author = {Mitchell, W. J. T.}, + Keywords = {Caraffa}, + Publisher = {MIT Press}, + Title = {The Reconfigured Eye: Visual Truth in the Post-Photographic Era}, + Year = {1992}} + +@book{Mitchell_1994, + Address = {Chicago, IL}, + Author = {Mitchell, W. J. T.}, + Keywords = {Caraffa}, + Publisher = {The University of Chicago Press}, + Title = {Picture Theory: Essays on Verbal and Visual Representation}, + Year = {1994}} + +@article{Mitchell_1996, + Author = {Mitchell, W. J. T.}, + Journal = {October}, + Keywords = {Caraffa}, + Pages = {71–82}, + Title = {What do Pictures “Really” Want?}, + Volume = {77}, + Year = {1996}} + +@book{Mitchell_2005a, + Address = {Chicago, IL}, + Author = {Mitchell, W. J. T.}, + Keywords = {Caraffa}, + Publisher = {The University of Chicago Press}, + Title = {What do pictures want?: The Lives and Loves of Images}, + Year = {2005}} + +@article{Mitchell_2005b, + Author = {Mitchell, W. J. T.}, + Journal = {Journal of Visual Culture}, + Keywords = {Caraffa}, + Number = {2}, + Pages = {257–266}, + Title = {There are no visual media}, + Volume = {4}, + Year = {2005}} + +@book{MitmanWilder_2016, + Address = {Chicago, IL}, + Editor = {Mitman, Gregg and Kelley Wilder}, + Keywords = {Caraffa}, + Publisher = {The University of Chicago Press}, + Title = {Documenting the World: Film, Photography, and the Scientific Record}, + Year = {2016}} + +@book{Olin_2012, + Address = {Chicago, IL}, + Author = {Olin, Margaret}, + Keywords = {Caraffa}, + Publisher = {The University of Chicago Press}, + Title = {Touching photographs}, + Year = {2012}} + +@book{Pinney:1997aa, + Address = {London}, + Author = {Christopher Pinney}, + Date-Modified = {2017-11-01 13:43:59 +0000}, + Keywords = {Pinney, Caraffa}, + Publisher = {Reaktion}, + Title = {Camera Indica: The Social Life of Indian Photographs}, + Year = {1997}} + +@book{Pinney_2003, + Author = {Pinney}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, Caraffa}, + Title = {Title and other data still missing}, + Year = {2003}} + +@book{Pinney_2004, + Address = {London}, + Author = {Pinney, Christopher}, + Keywords = {Caraffa}, + Publisher = {Reaktion Books}, + Title = {“Photos of the Gods.” The Printed Image and Political Struggle in India}, + Year = {2004}} + +@incollection{Pinney_2006, + Address = {London}, + Author = {Pinney, Christopher}, + Booktitle = {Handbook of Material Culture}, + Editor = {Christopher Tilley and Keane Webb and Susanne Küchler and Mike Rowlands and Patricia Spyer}, + Keywords = {Caraffa}, + Pages = {131–144}, + Publisher = {Sage}, + Title = {Four Types of Visual Culture}, + Year = {2006}} + +@book{PinneyPeterson_2003, + Address = {Durham, NC}, + Editor = {Pinney, Christopher and Nicolas Peterson}, + Keywords = {Caraffa}, + Publisher = {Duke University Press}, + Title = {Photography's Other Histories}, + Year = {2003}} + +@book{Poole_1997, + Address = {Princeton, NJ}, + Author = {Poole, Deborah}, + Keywords = {Caraffa}, + Publisher = {Princeton University Press}, + Title = {Vision, Race and Modernity: A Visual Economy of the Andean Image World}, + Year = {1997}} + +@article{Poole_2005, + Author = {Poole, Deborah}, + Journal = {Annual Review of Anthropology}, + Keywords = {Caraffa}, + Pages = {159–179}, + Title = {An Excess of Description: Ethnography, Race, and Visual Technologies}, + Volume = {34}, + Year = {2005}} + +@article{Rose_2000, + Author = {Rose, Gillian}, + Journal = {Journal of Historical Geography}, + Keywords = {Caraffa}, + Pages = {555–571}, + Title = {Practising Photography: An Archive, a Study, Some Photographs and a Researcher}, + Volume = {26}, + Year = {2000}} + +@book{Rose_2010, + Address = {Farnham}, + Author = {Rose, Gillian}, + Keywords = {Caraffa}, + Publisher = {Ashgate}, + Title = {Doing Family Photography: The Domestic, The Public and The Politics of Sentiment}, + Year = {2010}} + +@incollection{Rosler_1989, + Address = {Cambridge, MA}, + Author = {Rosler, Martha}, + Booktitle = {The Contest of Meaning: Critical Histories of Photography}, + Editor = {Bolton, Richard}, + Keywords = {Caraffa}, + Pages = {303–341}, + Publisher = {MIT Press}, + Title = {in, around, and afterthoughts (on documentary photography)}, + Year = {1989}} + +@article{Ruchatz_2012, + Author = {Ruchatz, Jens}, + Journal = {Fotogeschichte}, + Keywords = {Caraffa}, + Pages = {19–28}, + Title = {Kontexte der Präsentation. Zur Materialität und Medialität des fotografischen Bildes}, + Volume = {124}, + Year = {2012}} + +@article{Sandweiss_2007, + Author = {Sandweiss, Martha A.}, + Journal = {The Journal of American History}, + Keywords = {Caraffa}, + Number = {1}, + Pages = {193–202}, + Title = {Image and Artifact: The Photograph as Evidence in the Digital Age}, + Volume = {94}, + Year = {2007}} + +@incollection{Sassoon_2004, + Address = {London}, + Author = {Sassoon, Joanna}, + Booktitle = {Photographs, Objects, Histories}, + Editor = {Edwards, Elizabeth and Hart, Janice}, + Keywords = {Caraffa}, + Pages = {186–202}, + Publisher = {Routledge}, + Title = {Photographic Materiality in the Age of Digital Reproduction}, + Year = {2004}} + +@incollection{SchleheHidayah_2014, + Address = {London}, + Author = {Schlehe, Judith and Sita Hidayah}, + Booktitle = {Methodology and Research Practice in Southeast Asian Studies}, + Editor = {Mikko Huotari, Jürgen Rüland and Judith Schlehe}, + Keywords = {Caraffa}, + Pages = {253–272}, + Publisher = {Palgrave Macmillan}, + Title = {Transcultural Ethnography: Reciprocity in Indonesian-German Tandem Research}, + Year = {2014}} + +@incollection{Schneider_2017, + Address = {Münster}, + Author = {Franka Schneider and Julia Bärnighausen and Stefanie Klamm and Petra Wodtke}, + Booktitle = {Eine Fotografie. Über die transdisziplinären Möglichkeiten der Bildforschung}, + Editor = {Irene Ziehe and Ulrich Hägele}, + Keywords = {Caraffa}, + Pages = {217–241}, + Publisher = {Waxmann}, + Title = {Die Materialität des punctum. Zum Potential ko-laborativer Objekt- und Sammlunsanalysen in Foto-Archiven}, + Year = {2017}} + +@incollection{Schneider_forthcoming, + Address = {Bielefeld}, + Author = {Schneider, Franka}, + Booktitle = {Zusammenarbeit(en). Praktiken der Koordination, Kooperation und Repräsentation in kollaborativen Prozessen}, + Date-Modified = {2018-04-16 10:55:00 +0000}, + Editor = {Stefan Groth and Christian Ritter}, + Keywords = {Caraffa}, + Publisher = {transcript}, + Title = {Tandemforschung im Foto-Archiv}, + Year = {forthcoming}} + +@article{Schwartz_1995, + Author = {Schwartz, Joan M.}, + Journal = {Archivaria: The Journal of the Association of Canadian Archivists}, + Pages = {40–74}, + Title = {‘We Make Our Tools and Our Tools Make Us”: Lessons from Photographs for the Practice, Politics, and Poetics of Diplomatics’}, + Volume = {40}, + Year = {1995}} + +@incollection{Schwartz_2011, + Address = {Chicago, IL}, + Author = {Schwartz, Joan M.}, + Booktitle = {Controlling the Past: Documenting Society and Institutions}, + Editor = {Cook, Terry}, + Keywords = {Caraffa}, + Pages = {69–110}, + Publisher = {Society of American Archivists}, + Title = {The Archival Garden: Photographic Plantings, Interpretive Choices, and Alternative Narratives}, + Year = {2011}} + +@incollection{Schwartz_2012, + Address = {Rome}, + Author = {Schwartz, {Joan M.}}, + Booktitle = {Archivi fotografici: spazi del sapere, luoghi della ricerca}, + Date-Modified = {2017-11-01 13:56:58 +0000}, + Editor = {Costanza Caraffa and Tiziana Serena}, + Keywords = {Caraffa; Sykora; Holbein}, + Pages = {7–24}, + Publisher = {Carocci editore}, + Series = {Ricerche di storia dell'arte 106}, + Title = {`To speak again with a full distinct voice': Diplomatics, Archives, and Photographs}, + Year = {2012}} + +@book{SchwartzRyan_2003, + Address = {London}, + Editor = {Schwartz, Joan M. and Ryan, James}, + Keywords = {Caraffa}, + Publisher = {I. B. Tauris}, + Title = {Picturing Place: Photography and the Geographical Imagination}, + Year = {2003}} + +@incollection{Sekula_1982, + Address = {London}, + Author = {Sekula, Allan}, + Booktitle = {Thinking Photography}, + Editor = {Burgin, Victor}, + Keywords = {Caraffa}, + Pages = {84–109}, + Publisher = {Macmillan}, + Title = {On the Inventions of Photographic Meaning}, + Year = {1982}} + +@incollection{Sekula_1989, + Address = {Cambridge, MA}, + Author = {Sekula, Allan}, + Booktitle = {The Contest of Meaning. Critical Histories of Photography}, + Editor = {Bolton, Richard}, + Keywords = {Caraffa}, + Pages = {343–389}, + Publisher = {MIT Press}, + Title = {The Body and the Archive}, + Year = {1989}} + +@book{Smith_1999, + Address = {Princeton, NJ}, + Author = {Smith, Shawn Michelle}, + Keywords = {Caraffa}, + Publisher = {Princeton University Press}, + Title = {American Archives: Gender, Race, and Class in Visual Culture}, + Year = {1999}} + +@book{Solomon-Godeau_1984, + Address = {Durham, NC}, + Author = {Solomon-Godeau, A.}, + Keywords = {Caraffa}, + Publisher = {Duke University Press}, + Title = {Photography after Art Photography: Gender, Genre, History}, + Year = {1984}} + +@book{Stafford_1999, + Address = {Cambridge, MA}, + Author = {Stafford, Barbara M.}, + Keywords = {Caraffa}, + Publisher = {MIT Press}, + Title = {Visual Analogy: Consciousness as the Art of Connecting}, + Year = {1999}} + +@book{Tagg_1988, + Address = {London}, + Author = {Tagg, John}, + Keywords = {Caraffa}, + Publisher = {Macmillan}, + Title = {The Burden of Representation: Essays on Photography and Histories}, + Year = {1988}} + +@book{Tucker_2005, + Address = {Baltimore}, + Author = {Tucker, Jennifer}, + Keywords = {Caraffa}, + Publisher = {Johns Hopkins University Press}, + Title = {Nature Exposed: Photography as Eyewitness in Victorian Science}, + Year = {2005}} + +@book{VanDijck_2007, + Address = {Stanford, CA}, + Author = {VanDijck, Jose}, + Keywords = {Caraffa}, + Publisher = {Stanford University Press}, + Title = {Mediated Memories in the Digital Age}, + Year = {2007}} + +@book{Walton_2016, + Address = {London}, + Author = {Walton, Shireen}, + Publisher = {Royal Anthropological Institute}, + Series = {Anthropology \& Photography}, + Title = {Photographic Truth in Motion: The Case of Iranian Photoblogs}, + Volume = {4}, + Year = {2016}} + +@book{WereFavero_2013, + Editor = {Were, Graeme and Paolo Favero}, + Keywords = {Caraffa}, + Title = {Special Issue on ‘Imaging digital lives: Participation, Politics and Identity in Indigenous, Diaspora, and Marginal Communities. Journal of Material Culture}, + Volume = {18(3)}, + Year = {2013}} + +@book{Winter_1908, + Address = {Berlin}, + Editor = {Winter, Franz}, + Keywords = {Caraffa}, + Title = {Altertümer von Pergamon, Vol. 7,2: Die Skulpturen mit Ausnahme des Altarreliefs}, + Year = {1908}} + +@book{Wright_2013, + Address = {Durham, NC}, + Author = {Wright, Christopher}, + Keywords = {Caraffa}, + Publisher = {Duke University Press}, + Title = {The Echo of Things: The Lives of Photographs in the Solomon Islands}, + Year = {2013}} + +@book{Ball2013, + Author = {Ball, Philip}, + Keywords = {Baernighausen}, + Publisher = {University of Chicago Press}, + Title = {Curiosity: How Science Became Interested in Everything}, + Year = {2013}} + +@book{Barthes1981, + Address = {New York}, + Author = {Roland Barthes}, + Keywords = {Baernighausen}, + Publisher = {Macmillan}, + Title = {Camera Lucida: Reflections on Photography}, + Year = {1981}} + +@book{Benedict2001, + Address = {Chicago}, + Author = {Barbara M. Benedict}, + Keywords = {Baernighausen}, + Publisher = {University of Chicago Press}, + Title = {Curiosity: A Cultural History of Early Modern Inquiry}, + Year = {2001}} + +@book{Caraffa2011, + Address = {Deutscher Kunstverlag}, + Editor = {Costanza Caraffa}, + Keywords = {Baernighausen}, + Publisher = {Munich}, + Title = {Photo Archives and the Photographic Memory of Art History}, + Year = {2011}} + +@article{Castro2015, + Author = {Francesca di Castro}, + Journal = {Strenna dei Romanisti}, + Keywords = {Baernighausen}, + Pages = {203–216}, + Title = {Il gusto di un’epoca e la Galleria Sangiorgi}, + Volume = {76}, + Year = {2015}} + +@article{CookSchwartz_2002, + Author = {Schwartz, Joan M. and Cook, Terry}, + Day = {01}, + Doi = {10.1007/BF02435628}, + Issn = {1573-7519}, + Journal = {Archival Science}, + Keywords = {Caraffa, Cetin}, + Month = {Mar}, + Number = {1}, + Pages = {1--19}, + Title = {Archives, records, and power: The making of modern memory}, + Url = {https://doi.org/10.1007/BF02435628}, + Volume = {2}, + Year = {2002}, + Bdsk-Url-1 = {https://doi.org/10.1007/BF02435628}} + +@book{CookSchwartz_all_2002, + Date-Modified = {2018-04-16 09:35:51 +0000}, + Editor = {Terry Cook and Joan M. Schwartz}, + Keywords = {Caraffa}, + Publisher = {International Journal on Recorded Information}, + Title = {Archives, Records, and Power: Monographic Issue of Archival Science}, + Volume = {Vol.\ 1 (issues 1–2), vol.\ 2 (issues 3–4)}, + Year = {2002}} + +@article{Daston1995, + Author = {Lorraine Daston}, + Journal = {Word \& Image. A Journal of Verbal/Visual Enquiry}, + Keywords = {Baernighausen}, + Number = {4}, + Pages = {391–404}, + Title = {Curiosity in Early Modern Science}, + Volume = {11}, + Year = {1995}} + +@book{DastonPark1998, + Address = {New York}, + Author = {Lorraine Daston and Katharine Park}, + Keywords = {Baernighausen}, + Publisher = {Zone Books}, + Title = {Wonders and the Order of Nature 1150–1750}, + Year = {1998}} + +@article{Daston2005, + Author = {Lorraine Daston}, + Journal = {London Review of Books}, + Keywords = {Baernighausen}, + Number = {12}, + Pages = {37–38}, + Title = {All Curls and Pearls, review of Neil Kenney, \emph{The Uses of Curiosity in Early Modern France and Germany}, Oxford 2004}, + Volume = {27}, + Year = {2005}} + +@incollection{Edwards2013, + Address = {New York}, + Author = {Elizabeth Edwards}, + Booktitle = {Distance and Desire: Encounters with the African Archive}, + Editor = {Tamar Garb}, + Keywords = {Baernighausen}, + Pages = {48–54}, + Publisher = {Steidl}, + Title = {Looking at Photographs: Between Contemplation, Curiosity and Gaze}, + Year = {2013}} + +@book{Kenney2004, + Address = {Oxford}, + Author = {Neil Kenney}, + Keywords = {Baernighausen}, + Publisher = {Oxford University Press}, + Title = {The Uses of Curiosity in Early Modern France and Germany}, + Year = {2004}} + +@book{AlexandridisHeilmeyer_2004, + Address = {Mainz}, + Author = {Annetta Alexandridis and Wolf-Dieter Heilmeyer}, + Date-Modified = {2018-04-12 11:14:03 +0000}, + Keywords = {Baernighausen}, + Publisher = {Zabern}, + Title = {Archäologie der Photographie: Bilder aus der Photothek der Antikensammlung Berlin}, + Year = {2004}} + +@article{Auigner_2016, + Author = {Johanna Auinger}, + Date-Modified = {2018-04-12 11:16:04 +0000}, + Journal = {Antike Welt}, + Keywords = {Baernighausen}, + Pages = {35–37}, + Title = {Die Kopie-Bücher Carl Humanns: Ein aktuelles Projekt zur Erschließung seiner Briefe der Jahre 1884 bis 1895 im Archiv der Antikensammlung Berlin}, + Volume = {4}, + Year = {2016}} + +@book{Berling_1910, + Address = {Leipzig}, + Author = {Karl Berling}, + Date-Modified = {2018-04-12 11:19:20 +0000}, + Keywords = {Baernighausen}, + Publisher = {K.\ W.\ Hiersemann}, + Title = {Kunstgewerbliche Stilproben: Ein Leitfaden zur Untersuchung der Kunststile für Schulen und zum Selbstunterrichte}, + Year = {1910}} + +@book{Bie_1908, + Address = {Frankfurt am Main}, + Author = {Oscar Bie}, + Date-Modified = {2018-04-12 11:22:29 +0000}, + Editor = {Martin Buber}, + Keywords = {Baernighausen}, + Publisher = {Rütten \& Loening}, + Series = {Die Gesellschaft: Sammlung sozialpsychologischer Monographien 20}, + Title = {Das Kunstgewerbe}, + Year = {1908}} + +@book{Blask_1997, + Address = {Halle}, + Editor = {Falk Blask and Uwe Meißner}, + Keywords = {Baernighausen}, + Publisher = {Technisches Halloren- und Salinemuseum}, + Title = {Das unheimliche Idyll. Fotografien aus Mitteldeutschland 1928-1943}, + Year = {1997}} + +@book{BlaskFriedrich_2005, + Author = {BlaskFriedrich}, + Keywords = {FILLMEIN, Baernighausen}, + Title = {Title and other data still missing}, + Year = {2005}} + +@book{BlaskRedlin_2005, + Address = {Berlin}, + Date-Modified = {2018-04-12 11:23:47 +0000}, + Editor = {Blask, Falk and Jane Redlin}, + Keywords = {Baernighausen}, + Publisher = {LIT Verlag}, + Title = {Lichtbild—Abbild—Vorbild: Zur Praxis volks- und völkerkundlicher Fotografie}, + Year = {2005}} + +@book{Bode_1907, + Address = {Berlin}, + Author = {Wilhelm von Bode}, + Keywords = {Baernighausen}, + Publisher = {Cassirer}, + Title = {Kunst und Kunstgewerbe}, + Year = {1907}} + +@book{Brulls_2016, + Address = {Halle (Saale)}, + Author = {Brülls, Holger}, + Keywords = {Baernighausen}, + Publisher = {Landesamt für Denkmalpflege und Archäologie Sachsen-Anhalt}, + Title = {Moderne und Monumentalität. Das Landesmuseum für Vorgeschichte in Halle von Wilhelm Kreis und seine expressionistischen Wandbilder}, + Year = {2016}} + +@incollection{Buchli_2008, + Address = {Hoboken, New Jersey}, + Author = {Victor Buchli}, + Booktitle = {A Companion to Social Archaeology}, + Date-Modified = {2018-04-16 09:18:31 +0000}, + Keywords = {Baernighausen}, + Pages = {179–194}, + Publisher = {Wiley-Blackwell}, + Title = {Material Culture: Current Problems}, + Year = {2008}} + +@book{Burkhardt_2015, + Address = {Bielefeld}, + Author = {Marcus Burkhardt}, + Date-Modified = {2018-04-16 09:18:52 +0000}, + Keywords = {Baernighausen}, + Publisher = {transcript}, + Title = {Digitale Datenbanken: Eine Medientheorie im Zeitalter von Big Data}, + Year = {2015}} + +@incollection{Candi_2014, + Address = {Bologna}, + Author = {Francesca Candi}, + Booktitle = {I colori del bianco e nero. Fotografie storiche nella Fototeca Zeri}, + Editor = {Andrea Bacchi}, + Keywords = {Baernighausen}, + Pages = {99–106}, + Title = {Fotografie di archaeologia dal fondo Sangiorgi}, + Year = {2014}} + +@article{Caraffa_2012, + Author = {Costanza Caraffa}, + Journal = {Rundbrief Fotografie}, + Keywords = {Baernighausen}, + Pages = {8–13}, + Title = {Cimelia Photographica. Zum Umgang mit historischen Fotografien im Archiv}, + Volume = {74}, + Year = {2012}} + +@book{CaraffaSerena_2015, + Address = {Berlin}, + Editor = {Caraffa, Costanza and Serena, Tiziana}, + Keywords = {Baernighausen}, + Publisher = {De Gruyter}, + Title = {Photo Archives and the Idea of Nation}, + Year = {2015}} + +@book{Clifford_1988, + Address = {Cambridge, Mass., and London}, + Author = {Clifford, James}, + Keywords = {Baernighausen}, + Publisher = {Harvard University Press}, + Title = {The Predicament of Culture. Twentieth Century Ethnography, Literature and Art}, + Year = {1988}} + +@incollection{Conze_2013, + Address = {Göttingen}, + Author = {Conze, Linda and Ulrich Prehn and Michael Wildt}, + Booktitle = {Fotografien im 20. Jahrhundert. Verbreitung und Vermittlung}, + Editor = {Annelie Ramsbrock and Annette Vowinckel and Malte Zierenberg}, + Keywords = {Baernighausen}, + Pages = {270-298}, + Publisher = {Wallstein}, + Title = {Sitzen, baden, durch die Straßen laufen. Überlegungen zu fotografischen Repräsentationen von »Alltäglichem« und »Unalltäglichem« im Nationalsozialismus}, + Year = {2013}} + +@article{Conze_2015, + Author = {Conze, Linda}, + Journal = {Zeithistorische Forschungen}, + Keywords = {Baernighausen}, + Number = {2, Themenheft: Fotografie in Diktaturen}, + Pages = {210–235}, + Title = {Die Ordnung des Festes / Die Ordnung des Bildes. Fotografische Blicke auf Festumzüge in Schwaben (1926–1934)}, + Volume = {12}, + Year = {2015}} + +@book{DastonGalison_2010, + Address = {New York}, + Author = {Lorraine Daston and Peter Galison}, + Keywords = {Baernighausen}, + Publisher = {MIT Press}, + Title = {Objectivity}, + Year = {2010}} + +@article{Davidovic-WaltherWelz_2010, + Author = {Davidovic-Walther, Antonia and Gisela Welz}, + Journal = {Journal of Folklore Research}, + Keywords = {Baernighausen}, + Number = {1–2, Special Double Issue: Ethnological Knowledges}, + Pages = {89–112}, + Title = {Community Studies as an Ethnographic Knowledge Format}, + Volume = {47}, + Year = {2010}} + +@book{Derenthal_2008, + Author = {Ludger Derenthal}, + Keywords = {Baernighausen}, + Title = {Museum für Fotografie. Kunstbibliothek – Sammlung Fotografie, Vortrag auf dem Symposium „Fotografie im Museum,“ 21. bis 23. November 2008}, + Url = {http://www.smb.museum/fileadmin/website/Museen_und_Sammlungen/Museum_fuer_Fotografie/13_Derenthal.pdf}, + Urldate = {2017-01-25}, + Year = {2008}, + Bdsk-Url-1 = {http://www.smb.museum/fileadmin/website/Museen_und_Sammlungen/Museum_fuer_Fotografie/13_Derenthal.pdf}} + +@incollection{Derenthal_2010, + Address = {Tübingen/Berlin}, + Author = {Ludger Derenthal}, + Booktitle = {Ein neuer Blick. Architekturfotografie aus den Staatlichen Museen zu Berlin, Katalog zur Ausstellung im Museum für Fotografie}, + Editor = {Ludger Derenthal and Christine Kühn}, + Keywords = {Baernighausen}, + Pages = {10–17}, + Title = {Bau im Bild}, + Year = {2010}} + +@book{DerenthalKuhn_2010a, + Address = {Leipzig}, + Editor = {Ludger Derenthal and Christine Kühn}, + Keywords = {Baernighausen}, + Publisher = {Helmut Newton Stiftung}, + Title = {Museum für Fotografie: Kunstbibliothek – Sammlung Fotografie}, + Year = {2010a}} + +@incollection{Dilly_1975, + Address = {Gießen}, + Author = {Dilly, Heinrich}, + Booktitle = {Kunstwissenschaft und Kunstvermittlung}, + Editor = {Irene Below}, + Keywords = {Baernighausen}, + Pages = {153–172}, + Publisher = {Anabas-Verlag}, + Title = {Lichtbildprojektion—Prothese der Kunstbetrachtung}, + Year = {1975}} + +@incollection{Edwards_2011a, + Address = {Chicago}, + Author = {Edwards, Elizabeth}, + Booktitle = {Made to be seen. Perspectives on the History of Visual Anthropology}, + Editor = {Banks, Marcus and Jay Ruby}, + Keywords = {Baernighausen}, + Pages = {159–189}, + Publisher = {University of Chicago Press}, + Title = {Tracing Photography}, + Year = {2011a}} + +@incollection{Edwards_2011b, + Address = {Munich/Berlin}, + Author = {Edwards, Elizabeth}, + Booktitle = {Photo Archives and the Photographic Memory of Art History}, + Editor = {Costanza Caraffa}, + Keywords = {Baernighausen}, + Pages = {45–56}, + Publisher = {Deutscher Kunstverlag}, + Title = {Photographs: Material Form and the Dynamic Archive}, + Year = {2011b}} + +@article{Edwards_2014, + Author = {Edwards, Elizabeth}, + Journal = {Interdisciplinary Studies in the Long Nineteenth Century}, + Keywords = {Baernighausen}, + Pages = {1–9}, + Title = {Photographs, Mounts, and the Tactile Archive}, + Volume = {19}, + Year = {2014}} + +@book{Evers_1994, + Address = {Berlin}, + Editor = {Evers, Bernd}, + Keywords = {Baernighausen}, + Title = {Kunst in der Bibliothek. Zur Geschichte der Kunstbibliothek und ihrer Sammlungen}, + Year = {1994}} + +@incollection{Geimer_2009, + Address = {Berlin/München}, + Author = {Geimer, Peter}, + Booktitle = {Fotografie als Instrument und Medium der Kunstgeschichte}, + Editor = {Costanza Caraffa}, + Keywords = {Baernighausen}, + Pages = {77–89}, + Title = {The Art of Resurrection Malraux’s Musée imaginaire}, + Year = {2009}} + +@book{GeismarHerle_2010, + Address = {Honolulu}, + Author = {Geismar, Haidy and Herle, Anita}, + Keywords = {Baernighausen}, + Publisher = {University of Hawai'i Press}, + Title = {Moving images. John Layard, fieldwork and photography on Malakula since 1914}, + Year = {2010}} + +@book{GeneralVerwaltung_1896, + Address = {Berlin}, + Edition = {2}, + Editor = {General-Verwaltung der Königlichen Museen}, + Keywords = {Baernighausen}, + Title = {Führer durch die Bibliothek des Kunstgewerbe-Museums}, + Year = {1896}} + +@book{Gianferro_forthcoming, + Author = {Patrizio Gianferro}, + Keywords = {Baernighausen}, + Note = {Italian presentation at the conference: Faktizität und Gebrauch früher Fotografie, Bibliotheca Hertziana – Max-Planck-Institut für Kunstgeschichte and Deutsches Archäologisches Institut, Rom, 22.–24.3.2017.}, + Title = {The Exchange Society 1896–1901. Photography as a Vehicle for the Circulation of Illuminated Manuscripts in Europe}, + Year = {forthcoming}} + +@article{Hagele_2001, + Author = {Hägele, Ulrich}, + Journal = {Fotogeschichte. Beiträge zur Geschichte und Ästhetik der Fotografie}, + Keywords = {Baernighausen}, + Pages = {5–20}, + Title = {Die Visualisierung des „Volkskörpers“. Fotografie und Volkskunde in der NS-Zeit}, + Volume = {21}, + Year = {2001}} + +@incollection{Hagele_2005, + Address = {Münster u.a.}, + Author = {Hägele, Ulrich}, + Booktitle = {Ort. Arbeit. Körper. Ethnografie europäischer Modernen (34. Kongress der dgv, Berlin 2003)}, + Editor = {Binder, Beate}, + Keywords = {Baernighausen}, + Pages = {499–513}, + Publisher = {Waxmann}, + Title = {East meets West. Zu einer Foto-Ikonographie zwischen volkskundlicher Sinnstiftung und transnationaler Rezeption in den 1960er Jahren}, + Year = {2005}} + +@book{Hagele_2007, + Address = {Tübingen}, + Author = {Hägele, Ulrich}, + Keywords = {Baernighausen}, + Publisher = {Tübinger Vereinigung für Volkskunde e.V.}, + Title = {Foto-Ethnographie. Die visuelle Methode in der volkskundlichen Kulturwissenschaft}, + Year = {2007}} + +@book{HageleKonig_1999, + Address = {Marburg}, + Editor = {Hägele, Ulrich and Gudrun König}, + Keywords = {Baernighausen}, + Publisher = {Jonas-Verl. für Kunst und Literatur}, + Title = {Völkische Posen, volkskundliche Dokumente. Hans Retzlaffs Fotografien 1930 bis 1945}, + Year = {1999}} + +@book{HahneNiehoff_1935, + Address = {Halle (Saale)}, + Author = {Hahne, Hans and Heinz Julius Niehoff}, + Keywords = {Baernighausen}, + Publisher = {Landesanstalt für Volksheitskunde}, + Title = {Deutsche Bräuche im Jahreslauf}, + Year = {1935}} + +@book{Herkenrath_1902, + Address = {Berlin}, + Author = {Herkenrath, Emil}, + Keywords = {Baernighausen}, + Title = {Der Fries des Artemisions von Magnesia a. M.}, + Year = {1902}} + +@book{Hingley_2005, + Address = {London}, + Author = {Hingley, Richard}, + Keywords = {Baernighausen}, + Publisher = {Routledge}, + Title = {Globalizing Roman Culture. Unity, Diversity and Empire}, + Year = {2005}} + +@book{Humann_1904, + Address = {Berlin}, + Author = {Carl Humann, Julius Kohte, Carl Watzinger}, + Keywords = {Baernighausen}, + Title = {Magnesia am Mäander. Bericht über die Ergebnisse der Ausgrabungen der Jahre 1891–1893}, + Year = {1904}} + +@article{Jessen_1916, + Author = {Jessen, Peter}, + Journal = {Kunstgewerbeblatt NF}, + Keywords = {Baernighausen}, + Number = {3}, + Pages = {41–48}, + Title = {Reisestudien. III. Der amerikanische Kolonialstil}, + Volume = {28}, + Year = {1916}} + +@article{Jessen_19161917, + Author = {Jessen, Peter}, + Journal = {Kunstgewerbeblatt NF 27/12, 28/2, 28/3, 28/5, 28/6, 28/8, 28/9, 28/10, 28/12}, + Keywords = {Baernighausen}, + Title = {Reisestudien. I.-IX.}, + Year = {1916–1917}} + +@incollection{Jung_2015, + Address = {Paderborn}, + Author = {Matthias Jung}, + Booktitle = {Biography of Objects. Aspekte eines kulturhistorischen Konzepts}, + Editor = {Dietrich Boschung, Patric Alexander Kreuz, Tobias Kienlin}, + Keywords = {Baernighausen}, + Number = {31}, + Pages = {35–65}, + Publisher = {Fink}, + Series = {Morphomata}, + Title = {Das Konzept der Objektbiographie im Lichte einer Hermeneutik materieller Kultur}, + Year = {2015}} + +@incollection{Justnik_2012, + Address = {Dresden}, + Author = {Justnik, Herbert}, + Booktitle = {Visualisierte Minderheiten: Probleme und Möglichkeiten der musealen Präsentation von ethnischen bzw. nationalen Minderheiten}, + Editor = {Lozoviuk, Petr}, + Keywords = {Baernighausen}, + Pages = {109–136}, + Publisher = {Thelem}, + Title = {"Volkstypen" - Kategorisierendes Sehen und bestimmende Bilder}, + Year = {2012}} + +@book{Kern_1900, + Address = {Berlin}, + Author = {Kern, Otto}, + Keywords = {Baernighausen}, + Title = {Die Inschriften von Magnesia am Maeander}, + Year = {1900}} + +@book{KielSchneider_1995, + Address = {Questenberg}, + Author = {Kiel, Ernst and Alfred Schneider}, + Keywords = {Baernighausen}, + Publisher = {Questenberg e.V.}, + Title = {Das Questenfest. Gegenwart und Vergangenheit}, + Year = {1995}} + +@article{KlammWodtke_2017, + Author = {Stefanie Klamm, Petra Wodtke}, + Journal = {Fotogeschichte}, + Keywords = {Baernighausen}, + Number = {144}, + Pages = {39–50}, + Title = {Vom Versammeln und Archivieren. Konzepte archäologischer Fotosammlungen im Vergleich}, + Volume = {37}, + Year = {2017}} + +@book{Knappett_2005, + Address = {Pennsylvania}, + Author = {Carl Knappett}, + Keywords = {Baernighausen}, + Title = {Thinking Through Material Culture. An Interdisciplinary Perspective}, + Year = {2005}} + +@book{Krajewski_2002, + Address = {Berlin}, + Author = {Markus Krajewski}, + Keywords = {Baernighausen}, + Publisher = {Kadmos}, + Title = {Zettelwirtschaft. Die Geburt der Kartei aus dem Geiste der Bibliothek}, + Year = {2002}} + +@incollection{Kuhn_1994, + Address = {Berlin}, + Author = {Christine Kühn}, + Booktitle = {Kunst in der Bibliothek. Zur Geschichte der Kunstbibliothek und ihrer Sammlungen}, + Editor = {Bernd Evers}, + Keywords = {Baernighausen}, + Pages = {322–333}, + Title = {„für solche andächtige Betrachtung gesammelt …“ Fotografie in der Kunstbibliothek}, + Year = {1994}} + +@incollection{Kuhn_2010, + Address = {Leipzig}, + Author = {Christine Kühn}, + Booktitle = {Museum für Fotografie: Kunstbibliothek – Sammlung Fotografie}, + Editor = {Ludger Derenthal and Christine Kühn}, + Keywords = {Baernighausen}, + Pages = {28–71}, + Publisher = {Helmut Newton Stiftung}, + Title = {Die Sammlung Fotografie der Kunstbibliothek}, + Year = {2010}} + +@book{Lehnert_19071910, + Address = {Berlin}, + Editor = {Lehnert, Georg H. and Braun, E.W. and Behncke, W. and Dreger, M. and von Falke, O. and Folnesics, J. and Kümmel, O. and Pernice, E.A. and Swarzenski, G.}, + Publisher = {M. Oldenbourg}, + Title = {Illustrierte Geschichte des Kunstgewerbes}, + Year = {1907-1910}} + +@incollection{Locher_2011, + Address = {Berlin/Munich}, + Author = {Hubert Locher}, + Booktitle = {Photo Archives and the Photographic Memory of Art History}, + Editor = {Costanza Caraffa}, + Keywords = {Baernighausen}, + Pages = {297–312}, + Title = {Hamann’s Canon: The Illustration of the Geschichte der Kunst (1933) and the Photo Archive of the Kunstgeschichtliches Seminar in Marburg}, + Year = {2011}} + +@incollection{Locher_2012, + Address = {Leiden/Boston}, + Author = {Hubert Locher}, + Booktitle = {Art History and Visual Studies in Europe: transnational discourses and national frameworks}, + Editor = {Matthew Rampley and Thierry Lenain and Hubert Locher and Andrea Pinotti and Charlotte Schoell-Glass and Kitty Zijlmans}, + Keywords = {Baernighausen}, + Number = {4}, + Pages = {29–40}, + Series = {Brill's studies on art, art history, and intellectual history}, + Title = {The Idea of the Canon and Canon Formation in Art History}, + Year = {2012}} + +@mastersthesis{Loiacono_2008, + Author = {Debora Loiacono}, + Keywords = {Baernighausen}, + Note = {Supervisor: Alberto Cottino, Bologna}, + School = {Bologna}, + Title = {Collezionismo e mercato artistico a Roma tra '800 e '900: La Galleria Sangiorgi. Tesi di laurea in metodologia della ricerca storico-artistica}, + Year = {2008}} + +@article{Loiacono_2011, + Author = {Debora Loiacono}, + Journal = {Vallori Tattili}, + Keywords = {Baernighausen}, + Pages = {105–116}, + Title = {Gli arredi ‘in stile’ della Galleria Sangiorgi di Roma e qualche appunto su Umberto Giunti alias Falsario in Calcinaccio}, + Year = {2011}} + +@article{Mancini_1999, + Author = {Claudio Maria Mancini}, + Journal = {L’Urbe. Rivista Romana}, + Keywords = {Baernighausen}, + Number = {4}, + Pages = {109–132}, + Title = {Giuseppe Sangiorgi, antiquario e filantropo}, + Volume = {59}, + Year = {1999}} + +@article{Martin_2010, + Author = {Matthew Martin}, + Journal = {Journal of Art Historiography}, + Keywords = {Baernighausen}, + Pages = {7–21}, + Title = {Relics of Another Age. Art history, the ‘Decorative Arts’ and the Museum}, + Year = {2010}} + +@book{Mason_2009, + Address = {Minneapolis}, + Author = {Randall Mason}, + Keywords = {Baernighausen}, + Title = {The Once and Future New York. Historic Preservation and the Modern City}, + Year = {2009}} + +@incollection{Mattingly_1997, + Address = {Portsmouth}, + Author = {David. J. Mattingly}, + Booktitle = {Dialogues in Roman Imperialism. Power, Discourse, and Discrepant Experience in the Roman Empire}, + Editor = {D. J. Mattingly and S. E. Alcock}, + Keywords = {Baernighausen}, + Number = {23}, + Pages = {7–24}, + Publisher = {Oxbow}, + Series = {Journal of Roman Archaeology. Supplementary Series}, + Title = {Introduction. Dialogues of Power and Experience in the Roman Empire}, + Year = {1997}} + +@book{Mendel_1966, + Address = {Rome}, + Author = {Gustave G. Mendel}, + Keywords = {Baernighausen}, + Title = {Catalogue des sculptures grecques, romaines et byzantines, Musées Impériaux Ottomans. Partl 1}, + Year = {1966 [reprint of 1912 edition]}} + +@article{Morton_2005, + Author = {Morton, Christopher}, + Journal = {Visual Anthropology}, + Keywords = {Baernighausen}, + Number = {4}, + Pages = {389–405}, + Title = {The Anthropologist as Photographer. Reading the Monograph and Reading the Archive}, + Volume = {18}, + Year = {2005}} + +@incollection{MortonNewbury_2015, + Address = {London}, + Author = {Morton, Christopher and Darren Newbury}, + Booktitle = {The African Photographic Archive. Research and Curatorial Strategies}, + Editor = {Morton, Christopher and Darren Newbury}, + Keywords = {Baernighausen}, + Pages = {1–16}, + Publisher = {Bloomsbury}, + Title = {Introduction. Relocating the African photographic archive}, + Year = {2015}} + +@book{Mundt_1974, + Address = {Munich}, + Author = {Mundt, Barbara}, + Keywords = {Baernighausen}, + Number = {22}, + Series = {Studien zur Kunst des 19. Jahrhundert}, + Title = {Die deutschen Kunstgewerbemuseen im 19. Jahrhundert}, + Year = {1974}} + +@book{PageMason_2004, + Address = {New York/London}, + Author = {Max Page and Randall Mason}, + Keywords = {Baernighausen}, + Title = {Giving Preservation a History. Histories of Historic Preservation in the United States}, + Year = {2004}} + +@incollection{Pinney_1992, + Address = {New Haven/London}, + Author = {Pinney, Christopher}, + Booktitle = {Anthropology and Photography 1860-1920}, + Editor = {Edwards, Elizabeth}, + Keywords = {Baernighausen}, + Pages = {74–95}, + Publisher = {Yale University Press}, + Title = {The Parallel Histories of Anthropology and Photography}, + Year = {1992}} + +@book{Sachse_2003, + Address = {Dresden}, + Author = {Sachse, Rolf}, + Keywords = {Baernighausen}, + Publisher = {Philo Fine Arts}, + Title = {Die Erziehung zum Wegsehen. Fotografie im NS-Staat}, + Year = {2003}} + +@book{Schulte_1963, + Address = {Dortmund}, + Editor = {Eduard Schulte}, + Keywords = {Baernighausen}, + Title = {Chronik der Ausgrabung von Pergamon 1871 - 1886. Aus Berichten und Briefen des Humann-Kreises}, + Year = {1963}} + +@incollection{Schorner_2005, + Address = {Oxford}, + Author = {Günther Schörner}, + Booktitle = {Romanisierung – Romanisation. Theoretische Modelle und praktische Fallbeispiele}, + Editor = {BAR International Series}, + Keywords = {Baernighausen}, + Number = {1427}, + Pages = {25–34}, + Publisher = {Archaeopress}, + Title = {Imperialismus, Kolonialismus und Postkolonialismus in der Romanisierungsforschung}, + Year = {2005}} + +@book{SteberGottoEd_2014, + Address = {Oxford}, + Author = {Steber, Martina and Bernhard Gotto}, + Keywords = {Baernighausen}, + Publisher = {Oxford University Press}, + Title = {Visions of Community in Nazi Germany. Social Engineering and Private Lives}, + Year = {2014}} + +@book{Stricker_2010, + Author = {Martin Stricker}, + Keywords = {Baernighausen}, + School = {Magisterarbeit am Institut für Europäische Ethnologie der HU Berlin}, + Title = {Imaginierte Volkheit. Das Fotoarchiv der Landesanstalt für Volkheitskunde, Halle (Saale) 1927-1943}, + Year = {2010}} + +@book{teHeesenMichels_2007, + Address = {Berlin}, + Editor = {Te Heesen, Anke and Anette Michels}, + Keywords = {Baernighausen}, + Publisher = {Akademie Verlag}, + Title = {auf/zu. Der Schrank in den Wissenschaften}, + Year = {2007}} + +@incollection{Tschirner_2010, + Address = {Bielefeld}, + Author = {Ulfert Tschirner}, + Booktitle = {Museum revisited: transdisziplinäre Perspektiven auf eine Institution im Wandel}, + Editor = {Dröge, Kurt}, + Keywords = {Baernighausen}, + Pages = {97–112}, + Publisher = {transcript Verlag}, + Title = {Sammlungsarchäologie. Annäherung an eine Ruine der Museumsgeschichte}, + Year = {2010}} + +@article{Umbach_2015, + Author = {Maiken Umbach}, + Journal = {Central European History}, + Keywords = {Baernighausen}, + Pages = {335–365}, + Title = {Selfhood, Place, and Ideology in German Photo Albums, 1933–1945}, + Volume = {48}, + Year = {2015}} + +@incollection{Vogelsang_1989, + Address = {Köln}, + Author = {Bernd Vogelsang}, + Booktitle = {Silber und Salz, Zur Frühzeit der Photographie im deutschen Sprachraum 1839–1860, Katalog zur gleichnamigen Ausstellung im Wallraff-Richartz-Museum/Museum Ludwig, Köln}, + Editor = {Bodo von Dewitz and Reinhard Matz}, + Keywords = {Baernighausen}, + Pages = {522–547}, + Title = {Das Museum im Kästchen oder Die Erfindung des Kunstgewerbemuseums als Photosammlung durch den Freiherrn von Minutoli (1806–1887)}, + Year = {1989}} + +@article{Webster_1997, + Author = {Jane Webster}, + Journal = {World Archaeology}, + Keywords = {Baernighausen}, + Number = {3}, + Pages = {324–338}, + Title = {Necessary Comparisons: A Post-Colonial Approach to Religious Syncretism in the Roman Provinces}, + Volume = {28}, + Year = {1997}} + +@article{Wodtke_2016, + Author = {Petra Wodtke}, + Journal = {Antike Welt}, + Keywords = {Baernighausen}, + Pages = {35–37}, + Title = {„Foto-Objekte“. Ein neues Forschungsprojekt in der Antikensammlung}, + Volume = {3}, + Year = {2016}} + +@incollection{Wohrer_2015, + Address = {Berlin}, + Author = {Renate Wöhrer}, + Booktitle = {Wie Bilder Dokumente wurden. Zur Genealogie dokumentarischer Darstellungspraktiken}, + Editor = {Renate Wöhrer}, + Keywords = {Baernighausen}, + Pages = {7–24}, + Publisher = {Kadmos}, + Title = {Einleitung}, + Year = {2015}} + +@book{Yaylali_1976, + Address = {Tübingen}, + Author = {Abdullah Yaylali}, + Keywords = {Baernighausen}, + Title = {Der Fries des Artemisions von Magnesia am Mäander}, + Year = {1976}} + +@book{Ziehe_1996, + Address = {Halle (Saale)}, + Author = {Ziehe, Irene}, + Date-Modified = {2018-04-16 09:11:27 +0000}, + Keywords = {Baernighausen}, + Publisher = {Landesmuseum für Vorgeschichte}, + Title = {Hans Hahne (1875 bis 1935), sein Leben und Wirken. Biographie eines völkischen Wissenschaftlers}, + Year = {1996}} + +@book{Riggs_2014, + Address = {London}, + Author = {Riggs, Christina}, + Keywords = {Riggs}, + Publisher = {Bloomsbury}, + Title = {Unwrapping Ancient Egypt}, + Year = {2014}} + +@book{Reeves1992, + Address = {London}, + Author = {Reeves, C.\ N. and John H. Taylor}, + Date-Added = {2017-11-01 14:17:00 +0000}, + Date-Modified = {2017-11-01 14:18:01 +0000}, + Keywords = {Riggs}, + Publisher = {British Museum Press}, + Title = {Howard Carter before Tutankhamun}, + Year = {1992}} + +@article{Pinney:2017aa, + Author = {Christopher Pinney}, + Date-Added = {2017-11-01 13:45:00 +0000}, + Date-Modified = {2017-11-01 13:48:25 +0000}, + Journal = {Marg: A Magazine of the Arts}, + Keywords = {Pinney}, + Number = {3}, + Title = {Exotic India in Global Circulation: The Case of the Liebig Trade Cards}, + Volume = {86}, + Year = {2017}} + +@book{noire:1953ab, + Address = {Dakar}, + Author = {{Institut français d’Afrique noire}}, + Date-Added = {2017-11-01 13:29:37 +0000}, + Date-Modified = {2017-11-01 13:33:12 +0000}, + Keywords = {Mauuarin}, + Publisher = {IFAN}, + Title = {Institut français d’Afrique noire: Instructions sommaires}, + Year = {1953}} + +@article{Fotogeschichte_2016, + Date-Added = {2017-11-01 13:27:53 +0000}, + Date-Modified = {2017-11-01 13:28:44 +0000}, + Journal = {Fotogeschichte}, + Keywords = {Mauuarin}, + Number = {142}, + Title = {Business Mit Bildern. Geschichte Und Gegenwart Der Fotoagenturen}, + Volume = {36}, + Year = {2016}} + +@article{Thomas:1977aa, + Author = {Lew Thomas}, + Journal = {Art Contemporary}, + Keywords = {Holbein}, + Pages = {44--45}, + Title = {Photography \& Ideology: Theory, Review and Correspondence}, + Volume = {8}, + Year = {1977}} + +@book{Spieker:2008aa, + Address = {Cambridge und London}, + Author = {Sven Spieker}, + Date-Modified = {2017-11-01 13:57:44 +0000}, + Keywords = {Holbein}, + Publisher = {MIT Press}, + Title = {The Big Archive: Art from Bureaucracy}, + Year = {2008}} + +@incollection{Serena:2011aa, + Address = {Berlin und München}, + Author = {Tiziana Serena}, + Booktitle = {Photo Archives and the Photographic Memory of Art History}, + Editor = {Constanza Caraffa}, + Keywords = {Holbein}, + Pages = {57--71}, + Publisher = {Deutscher Kunstbuchverlag}, + Title = {The Words of the Photo Archive}, + Year = {2011}} + +@incollection{Sekula:2003aa, + Address = {London u.a.}, + Author = {Allan Sekula}, + Booktitle = {The Photography Reader}, + Editor = {Liz Wells}, + Keywords = {Holbein}, + Pages = {443--452}, + Publisher = {Routledge}, + Title = {Reading an Archive: Photography Between Labour and Capital}, + Year = {2003}} + +@article{Ruchatz:2012aa, + Author = {Jens Ruchatz}, + Journal = {Fotogeschichte}, + Keywords = {Holbein}, + Number = {124}, + Pages = {19--28}, + Title = {Kontexte der Präsentation: Zur Materialität und Medialität des fotografischen Bildes}, + Year = {2012}} + +@incollection{Phillips:2003aa, + Address = {New York}, + Author = {Sandra S. Phillips}, + Booktitle = {Evidence}, + Date-Modified = {2017-11-01 13:55:25 +0000}, + Keywords = {Holbein}, + Publisher = {Art Publ.}, + Title = {A History of Evidence}, + Year = {2003}} + +@article{Moniot:1979aa, + Author = {Drew Moniot}, + Journal = {Studies in the Anthropolgy of Visual Communication}, + Keywords = {Holbein}, + Pages = {73--76}, + Publisher = {Temple University}, + Title = {Untitled Review on Evidence}, + Year = {1979}} + +@article{Krauss:1977aa, + Author = {Rosalind Krauss}, + Journal = {October}, + Keywords = {Holbein}, + Pages = {68--81}, + Title = {Notes on the Index: Seventies Art in America}, + Volume = {3}, + Year = {1977}} + +@incollection{Krauss:1998aa, + Address = {München}, + Author = {Rosalind Krauss}, + Booktitle = {Das Photographische}, + Keywords = {Holbein}, + Publisher = {Fink}, + Title = {Die diskursiven Räume der Photographie}, + Year = {1998}} + +@article{Kramer:1977aa, + Author = {Hilton Kramer}, + Journal = {The New York Times}, + Keywords = {Holbein}, + Month = {11}, + Pages = {35}, + Title = {The Paradoxical Museumization of Photography}, + Year = {1977}} + +@article{Hugunin:1977aa, + Author = {James Hugunin}, + Journal = {The Dumb Ox}, + Keywords = {Holbein}, + Number = {5}, + Title = {Evidence}, + Year = {1977}} + +@article{Heinecken:1977aa, + Author = {Robert Heinecken}, + Date-Modified = {2017-11-01 13:51:25 +0000}, + Journal = {Afterimage}, + Keywords = {Holbein}, + Month = {05/06}, + Pages = {6}, + Title = {Open and Shut Case}, + Year = {1977}} + +@incollection{Geimer:2015aa, + Address = {Frankfurt a.M. and New York}, + Author = {Peter Geimer}, + Booktitle = {Auf die Wirklichkeit zeigen. Zum Problem der Evidenz in den Kulturwissenschaften. Ein Reader}, + Editor = {Helmut Lethen and Ludwig Jäger and Albrecht Koschorke}, + Keywords = {Holbein}, + Pages = {181--218}, + Publisher = {Campus Verlag}, + Title = {Vom Schein, der übrig bleibt. Bild-Evidenz und ihre Kritik}, + Year = {2015}} + +@incollection{Crimp:1989aa, + Address = {Cambridge, Mass.}, + Author = {Douglas Crimp}, + Booktitle = {From the Contest of Meaning: Critical Histories of Photography}, + Editor = {Richard Bolton}, + Keywords = {Holbein}, + Pages = {3--14}, + Publisher = {MIT Press}, + Title = {The Museum's Old/The Library's New Subject}, + Year = {1989}} + +@article{Shapin:1989aa, + Author = {Shapin, Steven}, + Journal = {American Scientist}, + Keywords = {Riggs}, + Number = {6}, + Pages = {554--563}, + Title = {The Invisible Technician}, + Volume = {77}, + Year = {1989}} + +@article{Schwartz:2002aa, + Author = {Schwartz, Joan M.}, + Journal = {Archivaria: The Journal of the Association of Canadian Archivists}, + Keywords = {Caraffa, Riggs}, + Number = {54}, + Pages = {142--171}, + Title = {Coming to Terms with Photographs: Descriptive Standards, Linguistic 'Othering', and the Margins of Archivy}, + Year = {2002}} + +@incollection{Riggs:2016ab, + Author = {Riggs, Christina}, + Booktitle = {History of Science}, + Keywords = {Riggs}, + Pages = {(online first, awaiting pagination)}, + Title = {Shouldering the Past: Photography, Archaeology, and Collective Effort at the Tomb of Tutankhamun}, + Webpage = {https://doi.org/10.1177/0073275316676282}, + Year = {2016}} + +@article{Riggs:2016aa, + Author = {Riggs, Christina}, + Date-Modified = {2017-11-01 14:06:01 +0000}, + Journal = {History of Photography}, + Keywords = {Riggs; Trnkova}, + Number = {3}, + Pages = {267--282}, + Title = {Photography and Antiquity in the Archive, or How Howard Carter Moved the Road to the Valley of the Kings}, + Volume = {40}, + Year = {2016}} + +@article{Riggs:2017aa, + Author = {Riggs, Christina}, + Journal = {Archival Science}, + Keywords = {Riggs}, + Number = {2}, + Pages = {125--150}, + Title = {The Body in the Box: Archiving the Egyptian Mummy}, + Volume = {17}, + Year = {2017}} + +@article{Ridley:2013aa, + Author = {Ridley, Ronald T.}, + Journal = {Journal of Egyptian Archaeology}, + Keywords = {Riggs}, + Number = {1}, + Pages = {117--130}, + Title = {The Dean of Archaeological Photographers: Harry Burton}, + Volume = {99}, + Year = {2013}} + +@book{Reid:2015aa, + Address = {Cairo and New York}, + Author = {Reid, Donald Malcolm}, + Keywords = {Riggs}, + Publisher = {American University in Cairo Press}, + Title = {Contesting Antiquity in Egypt: Archaeologies, Museums and the Struggle for Identities from World War 1 to Nasser}, + Year = {2015}} + +@book{Reid:2002aa, + Address = {Berkeley}, + Author = {Reid, Donald Malcolm}, + Keywords = {Riggs}, + Publisher = {University of California Press}, + Title = {Whose Pharaohs? Archaeology, Museums, and Egyptian National Identity from Napoleon to World War I}, + Year = {2002}} + +@incollection{Reid:1997aa, + Address = {New York}, + Author = {Reid, Donald Malcolm}, + Booktitle = {Rethinking Nationalism in the Arab Middle East}, + Editor = {James P. Jankowski and Israel Gershoni}, + Keywords = {Riggs}, + Pages = {127--149}, + Publisher = {Columbia University Press}, + Title = {Nationalizing the Pharaonic Past: Egyptology, Imperialism, and Egyptian Nationalism, 1922--1952}, + Year = {1997}} + +@book{Mak:2012aa, + Address = {London and New York}, + Author = {Mak, Lanver}, + Keywords = {Riggs}, + Publisher = {I.B. Tauris}, + Title = {The British in Egypt: Community, Crime and Crises 1822–1922}, + Year = {2012}} + +@incollection{McConnell:2004aa, + Author = {Anita McConnell}, + Booktitle = {Oxford Dictionary of National Biography}, + Keywords = {Riggs}, + Lastchecked = {26.05.2017}, + Publisher = {Oxford University Press}, + Title = {Letts, Thomas (1803--1873)}, + Webpage = {http://www.oxforddnb.com/view/article/16526}, + Year = {2004}} + +@incollection{Kerbouef:2005aa, + Address = {Cairo and New York}, + Author = {Kerbouef, Anne-Claire}, + Booktitle = {Re-Envisioning Egypt 1919--1952}, + Editor = {Arthur Goldschmidt and Amy J. Johnson and Barak A. Salmoni}, + Keywords = {Riggs}, + Pages = {194--216}, + Publisher = {American University in Cairo Press}, + Title = {The Cairo Fire of 26 January 1952 and the Interpretations of History}, + Year = {2005}} + +@article{Johnson:1997aa, + Author = {Johnson, George B.}, + Journal = {KMT 8}, + Keywords = {Riggs}, + Number = {2}, + Pages = {58--77}, + Title = {Painting with Light: The Work of Archaeology Photographer Harry Burton}, + Year = {1997}} + +@book{James:2001aa, + Address = {London and New York}, + Author = {James, T.\ G.\ H.}, + Date-Modified = {2017-11-01 14:15:40 +0000}, + Keywords = {Riggs}, + Publisher = {Tauris Parke}, + Title = {Howard Carter: The Path to Tutankhamun}, + Year = {2001 [first edition 1992]}} + +@book{Hornung:1991aa, + Address = {Zürich and Munich}, + Author = {Hornung, Erik, and Marsha Hill}, + Keywords = {Riggs}, + Publisher = {Artemis}, + Title = {The Tomb of Pharaoh Seti I}, + Year = {1991}} + +@book{Hagen:2016aa, + Address = {Copenhagen}, + Author = {Hagen, Fredrik and Kim Ryholt}, + Keywords = {Riggs}, + Publisher = {Royal Danish Academy of Science and Letters}, + Title = {The Antiquities Trade in Egypt 1880–1930: The H.O.\ Lange Papers}, + Year = {2016}} + +@book{Goode:2007aa, + Address = {Austin}, + Author = {Goode, James F.}, + Keywords = {Riggs}, + Publisher = {University of Texas Press}, + Title = {Negotiating for the Past: Archaeology, Nationalism, and Diplomacy in the Middle East, 1919–1941}, + Year = {2007}} + +@book{Fox:1951aa, + Address = {London and New York and Toronto}, + Author = {Fox, Penelope}, + Keywords = {Riggs}, + Publisher = {Oxford University Press and Geoffrey Cumberlege}, + Title = {Tutankhamun's Treasure}, + Year = {1951}} + +@book{Edwards:1972aa, + Address = {London}, + Author = {Edwards, IIorwerth E.\ S.}, + Date-Modified = {2017-11-01 14:14:11 +0000}, + Keywords = {Riggs}, + Publisher = {Thames and Hudson}, + Title = {Treasures of Tutankhamun}, + Year = {1972}} + +@incollection{Edwards:2015aa, + Address = {London}, + Author = {Edwards, Elizabeth, and Christopher Morton}, + Booktitle = {Photographs, Museums, Collections: Between Art and Information}, + Editor = {Elizabeth Edwards and Christopher Morton}, + Keywords = {Riggs}, + Pages = {3--23}, + Publisher = {Bloomsbury}, + Title = {Between Art and Information: Towards a Collecting History of Photographs}, + Year = {2015}} + +@book{Driaux:2016aa, + Address = {Cairo}, + Author = {Driaux, Delphine and Marie-Lys Arnette}, + Keywords = {Riggs}, + Publisher = {l'Institut Français d'Archéologie Orietnale}, + Title = {Instantanés d'Égypte: Trésors photographiques de l'Institut Français d'Archéologie Orietnale}, + Year = {2016}} + +@book{Cone:1976aa, + Address = {New York}, + Editor = {Cone, Polly}, + Keywords = {Riggs}, + Publisher = {Metropolitan Museum of Art}, + Title = {Wonderful Things: The Discovery of Tutankhamun's Tomb}, + Year = {1976}} + +@book{Collins:2014ab, + Address = {Oxford}, + Author = {Collins, Paul, and Liam McNamara}, + Keywords = {Riggs}, + Publisher = {Ashmolean Museum}, + Title = {Discovering Tutankhamun}, + Year = {2014}} + +@book{Carter:1933aa, + Address = {London}, + Author = {Carter, Howard}, + Keywords = {Riggs}, + Publisher = {Cassell}, + Title = {The Tomb of Tut.Ankh.Amen, Volume III}, + Year = {1933}} + +@book{Capart:1943aa, + Address = {Brussels}, + Author = {Capart, Jean}, + Keywords = {Riggs}, + Publisher = {Vromant}, + Title = {Tout-Ankh-Amon}, + Year = {1943}} + +@book{Museum:1975aa, + Address = {Oxford}, + Author = {{Ashmolean Museum}}, + Date-Modified = {2017-11-01 14:12:51 +0000}, + Keywords = {Riggs}, + Publisher = {Oxford University Press}, + Title = {Report of the Visitors, 1975--6}, + Year = {1975-1976}} + +@book{Museum:1973aa, + Address = {Oxford}, + Author = {{Ashmolean Museum}}, + Date-Modified = {2017-11-01 14:12:44 +0000}, + Keywords = {Riggs}, + Publisher = {Oxford University Press}, + Title = {Report of the Visitors, 1973--4}, + Year = {1973-1974}} + +@book{Museum:1971aa, + Address = {Oxford}, + Author = {{Ashmolean Museum}}, + Date-Modified = {2017-11-01 14:12:38 +0000}, + Edition = {Vivian Ridler}, + Keywords = {Riggs}, + Publisher = {Oxford University Press}, + Title = {Report of the Visitors, 1971--2}, + Year = {1971-1972}} + +@book{Museum:1957aa, + Address = {Oxford}, + Author = {{Ashmolean Museum}}, + Date-Modified = {2017-11-01 14:12:32 +0000}, + Edition = {Charles Batey}, + Keywords = {Riggs}, + Publisher = {Oxford University Press}, + Title = {Report of the Visitors, 1957}, + Year = {1957}} + +@book{Museum:1951aa, + Address = {Oxford}, + Author = {{Ashmolean Museum}}, + Date-Modified = {2017-11-01 14:12:28 +0000}, + Edition = {Charles Batey}, + Keywords = {Riggs}, + Publisher = {Oxford University Press}, + Title = {Report of the Visitors, 1951}, + Year = {1951}} + +@book{Allen:2006aa, + Address = {New York and New Haven and London}, + Author = {Allen, Susan J.}, + Keywords = {Riggs}, + Publisher = {Metropolitan Museum of Art and Yale University Press}, + Title = {Tutankhamun's Tomb: The Thrill of Discovery}, + Year = {2006}} + +@book{Adams:2013aa, + Address = {New York}, + Author = {Adams, John M.}, + Keywords = {Riggs}, + Publisher = {St Martin's Press}, + Title = {The Millionaire and the Mummies: Theodore Davis's Gilded Age in the Valley of the Kings}, + Year = {2013}} + +@book{Zdenek:1939aa, + Address = {Prague}, + Editor = {Wirth, Zdeněk}, + Keywords = {Trnkova}, + Publisher = {Umělecko-průmyslové museum}, + Title = {Sto let české fotografie 1839–1939}, + Year = {1939}} + +@article{Wirth:1939aa, + Author = {Wirth, Zdenĕk}, + Journal = {Umění}, + Keywords = {Trnkova}, + Pages = {361--376}, + Title = {První fotograf Prahy}, + Volume = {12}, + Year = {1939--1940}} + +@book{Groll:1865aa, + Keywords = {Trnkova}, + Title = {Verlags-Catalog von Andreas Groll, Photograph in Wien}, + Year = {1865 [Vienna 1864]}} + +@book{Uhlikova:2010aa, + Address = {Prague}, + Author = {Uhlíková, Kristina}, + Keywords = {Trnkova}, + Publisher = {Národní památkový ústav}, + Title = {Zdeněk Wirth, první dvě životní etapy (1878–1939)}, + Year = {2010}} + +@incollection{Trnkova:2015aa, + Address = {Salzburg}, + Author = {Trnková, Petra}, + Booktitle = {Andreas Groll: Wiens erster moderner Fotograf. 1812–1872}, + Keywords = {Trnkova}, + Pages = {237--245}, + Publisher = {Fotohof edition}, + Title = {Archäologischer Frühling: Aufnahmen historischer Baudenkmäler in Böhmen}, + Year = {2015}} + +@book{Trnkova:2010aa, + Address = {Prague}, + Editor = {Trnková, Petra}, + Keywords = {Trnkova}, + Publisher = {Artefactum}, + Title = {Oudadate Pix: Revealing a Photographic Archive}, + Year = {2010}} + +@book{Schwarz:1931aa, + Address = {Leipzig}, + Author = {Schwarz, Heinrich}, + Keywords = {Trnkova}, + Publisher = {Insel-Verlag}, + Title = {David Octavius Hill: der Meister der Photographie}, + Year = {1931}} + +@article{Schwartz:1995aa, + Author = {Schwartz, Joan M.}, + Date-Modified = {2017-11-01 14:20:02 +0000}, + Journal = {Archivaria}, + Keywords = {Trnkova; Riggs}, + Pages = {40--74}, + Title = {`We make our tools and our tools make us': Lessons from Photographs for the Practice, Politics, and Poetics of Diplomatics}, + Volume = {40}, + Year = {1995}} + +@article{Schlosser:1934aa, + Address = {Innsbruck}, + Author = {Schlosser, Julius von}, + Date-Modified = {2017-11-01 14:07:43 +0000}, + Journal = {Mitteilungen des Instituts für Österreichische Geschichtsforschung}, + Keywords = {Trnkova}, + Number = {2}, + Pages = {141--228}, + Title = {Die Wiener Schule der Kunstgeschichte: Rückblick auf ein Säkulum deutscher Gelehrtenarbeit in Österreich}, + Volume = {13}, + Year = {1934}} + +@book{Rohacek:2010aa, + Address = {Prague}, + Editor = {Roháček Jiří and Kristina Uhlíková}, + Keywords = {Trnkova}, + Publisher = {Artefactum}, + Title = {Zdeněk Wirth pohledem dnešní doby}, + Year = {2010}} + +@book{Noll:1992aa, + Address = {Prague}, + Author = {Noll, Jindřich}, + Keywords = {Trnkova}, + Publisher = {Národní galerie}, + Title = {Josef Schulz 1840–1917}, + Year = {1992}} + +@book{Lachnit:2005aa, + Address = {Vienna and Cologne and Weimar}, + Author = {Lachnit, Edwin}, + Keywords = {Trnkova}, + Publisher = {Böhlau}, + Title = {Die Wiener Schule der Kunstgeschichte und die Kunst ihrer Zeit: zum Verhältnis von Methode und Forschungsgegenstand am Beginn der Moderne}, + Year = {2005}} + +@book{Frodl:1988aa, + Address = {Wien and Köln and Graz}, + Author = {Frodl, Walter}, + Keywords = {Mausi}, + Publisher = {Böhlau}, + Title = {Idee und Verwirklichung: Das Werden der staatlichen Denkmalpflege in Österreich}, + Year = {1988}} + +@incollection{Faber:2015ab, + Address = {Salzburg}, + Author = {Faber, Monika}, + Booktitle = {Andreas Groll: Wiens erster moderner Fotograf. 1812–1872}, + Date-Modified = {2017-11-01 14:04:51 +0000}, + Editor = {Faber, Monika}, + Keywords = {Trnkova}, + Pages = {27–95}, + Publisher = {Fotohof edition}, + Title = {‘… mit aller Kraft auf die Photographie verlegt …’: Annäherungen an das Berufsbild eines frühen Fotografen}, + Year = {2015}} + +@book{Faber:2015aa, + Address = {Salzburg}, + Date-Modified = {2017-11-01 14:03:58 +0000}, + Editor = {Monika Faber}, + Keywords = {Trnkova}, + Publisher = {Fotohof edition}, + Title = {Andreas Groll: Wiens erster moderner Fotograf. 1812–1872}, + Year = {2015}} + +@article{Eitelberger:1863ab, + Author = {Eitelberger, Rudolf von}, + Journal = {Zeitschrift fur Fotografie und Stereoskopie}, + Keywords = {Trnkova}, + Pages = {123--126}, + Title = {Der Kupferstich und die Fotografie}, + Volume = {7}, + Year = {1863}} + +@misc{Edwards:2017aa, + Addendum = {Keynote lecture presented at the conference Photo-Objects. On the Materiality of Photographs and Photoarchives in the Humanities and Sciences, Kunsthistorisches Institut, Florence, February 15–17, 2017}, + Author = {Edwards, Elizabeth}, + Keywords = {Trnkova}, + Title = {Thoughts on the `NonCollections' of the Archival Ecosystem}, + Year = {2017}} + +@book{Bruckler:2001aa, + Address = {Horn}, + Author = {Brückler, Theodor, and Ulrike Nimeth}, + Date-Modified = {2017-11-01 14:00:47 +0000}, + Keywords = {Trnkova}, + Publisher = {Berger}, + Title = {Personenlexikon zur Österreichischen Denkmlapflege}, + Volume = {Vol.\ 7}, + Year = {2001}} + +@article{Toure:2000aa, + Author = {Touré, Khady Kane}, + Journal = {Documentaliste, Sciences de l'information}, + Keywords = {Mauuarin}, + Month = {09}, + Number = {3--4}, + Pages = {174--181}, + Title = {Pour Valoriser Les Fonds de La Photothèque de l'IFAN}, + Volume = {37}, + Year = {2000}} + +@article{Sekula:1981aa, + Author = {Sekula, Allan}, + Journal = {Art Journal}, + Keywords = {Mauuarin}, + Number = {1}, + Pages = {15--25}, + Title = {The Traffic in Photographs}, + Volume = {41}, + Year = {1981}} + +@book{Mitman:2016aa, + Address = {Chicago}, + Author = {Mitman, Gregg, and Kelley Wilder}, + Keywords = {Mauuarin}, + Publisher = {University of Chicago Press}, + Title = {Documenting the World: Film, Photography, and the Scientific Record}, + Year = {2016}} + +@incollection{Mauuarin:2017aa, + Address = {Paris}, + Author = {Mauuarin, Anaïs}, + Booktitle = {Un nouveau Musée d'ethnographie. Trocadéro 1928–1935}, + Keywords = {Mauuarin}, + Publisher = {Publications scientifiques du Muséum national d'Histoire naturelle}, + Title = {La Photographie multiple. Collections et circulation des images au Trocadéro}, + Year = {2017}} + +@article{Mauuarin:2015aa, + Author = {Mauuarin, Anaïs}, + Date-Modified = {2017-11-01 13:36:52 +0000}, + Journal = {Études photographiques}, + Keywords = {Mauuarin}, + Lastchecked = {12.04.2017}, + Number = {33}, + Pages = {21--41}, + Title = {De « beaux documents » pour l'ethnologie}, + Url = {https://etudesphotographiques.revues.org/3559}, + Urldate = {2017-04-12}, + Year = {2015}, + Bdsk-Url-1 = {https://etudesphotographiques.revues.org/3559}} + +@book{LEstoile:2007aa, + Address = {Paris}, + Author = {L'Estoile, Benoît de}, + Date-Modified = {2017-11-01 13:36:14 +0000}, + Keywords = {Mauuarin}, + Publisher = {Flammarion}, + Title = {Le Goût des autres: de l'Exposition coloniale aux arts premiers.}, + Year = {2007}} + +@article{LEstoile:2005aa, + Author = {L'Estoile, Benoît de}, + Date-Modified = {2017-11-01 13:35:55 +0000}, + Journal = {Les Cahiers du Centre de Recherches Historiques. Archives}, + Keywords = {Mauuarin}, + Lastchecked = {12.04.2017}, + Month = {06}, + Number = {36}, + Title = {Une petite armée de travailleurs auxiliaires}, + Url = {http://ccrh.revues.org/3037}, + Urldate = {2017-04-12}, + Year = {2005}, + Bdsk-Url-1 = {http://ccrh.revues.org/3037}} + +@book{Lauriere:2008aa, + Address = {Paris}, + Author = {Laurière, Christine}, + Keywords = {Mauuarin}, + Publisher = {Publications scientifiques du Muséum national d'Histoire naturelle}, + Title = {Paul Rivet : le savant et le politique}, + Year = {2008}} + +@article{Lacoste:2017ab, + Date-Modified = {2017-11-01 13:34:45 +0000}, + Editor = {Lacoste, Anne and Olivier Lugon and Estelle Sohier}, + Journal = {Transbordeur}, + Keywords = {Mauuarin}, + Number = {1}, + Pages = {8--17}, + Title = {Musées de Photographies Documentaires: Introduction}, + Year = {2017}} + +@incollection{Kracauer:1995aa, + Address = {Cambridge (Mass.) and London}, + Author = {Kracauer, Siegfried}, + Booktitle = {The Mass Ornament: Weimar Essays}, + Editor = {Thomas Y. Levin}, + Keywords = {Mauuarin}, + Publisher = {Harvard University press}, + Title = {On Photography}, + Year = {1995 [first edition 1927]}} + +@book{Frosh:2003aa, + Address = {London und New York}, + Author = {Frosh, Paul}, + Keywords = {Mauuarin}, + Publisher = {Berg}, + Title = {The Image Factory Consumer Culture, Photography and the Visual Content Industry}, + Year = {2003}} + +@book{Frizot:2009aa, + Address = {Paris}, + Author = {Frizot, Michel and Cédric de Veigy}, + Keywords = {Mauuarin}, + Publisher = {Ed.\ de La Martinière}, + Title = {Vu : le magazine photographique, 1928--1940}, + Year = {2009}} + +@book{Fabian:1983aa, + Address = {New York}, + Author = {Fabian, Johannes}, + Keywords = {Mauuarin}, + Publisher = {Columbia University Press}, + Title = {Time and the Other: How Anthropology Makes its Object}, + Year = {1983}} + +@article{Edwards:2002aa, + Author = {Edwards, Elizabeth}, + Journal = {Visual Studies}, + Keywords = {Mauuarin}, + Number = {1}, + Pages = {67--75}, + Title = {Material Beings: Objecthood And Ethnographic Photographs}, + Volume = {17}, + Year = {2002}} + +@book{Edwards:2001aa, + Address = {Oxford and New York}, + Author = {Edwards, Elizabeth}, + Keywords = {Mauuarin, Caraffa}, + Publisher = {Berg}, + Title = {Raw Histories: Photographs, Anthropology and Museums}, + Year = {2001}} + +@book{:1992aa, + Address = {New Haven and London}, + Editor = {Edwards, Elizabeth}, + Keywords = {Mauuarin}, + Publisher = {Yale University Press in association with Royal Anthropological Institute, London}, + Title = {Anthropology and Photography 1860--1920}, + Year = {1992}} + +@book{Denoyelle:1997aa, + Address = {Paris}, + Author = {Denoyelle, Françoise}, + Keywords = {Mauuarin}, + Publisher = {L'Harmattan}, + Title = {La lumière de Paris. Tome 1 : Les usages de la photographie}, + Year = {1997}} + +@book{Delpuech:2017aa, + Address = {Paris}, + Editor = {Delpuech, André and Christine Laurière and Carine Peltier-Caroff}, + Keywords = {Mauuarin}, + Publisher = {Publications scientifiques du Muséum national d'Histoire naturelle}, + Title = {Un Nouveau Musée d'ethnographie. Trocadéro 1928–1935}, + Year = {2017 [forthcoming]}} + +@book{Daston:2007aa, + Address = {New York}, + Author = {Daston, Lorraine J., and Peter L. Galison}, + Keywords = {Mauuarin}, + Publisher = {Zone Books}, + Title = {Objectivity}, + Year = {2007}} + +@phdthesis{Brunet:1993aa, + Address = {Paris}, + Author = {Brunet, François}, + Date-Modified = {2017-11-01 13:24:27 +0000}, + Doctoraladvisor = {PhD, dir.\ Pierre-Yves Pétillon}, + Keywords = {Mauuarin}, + School = {EHESS}, + Title = {La Collecte des vues: explorateurs et photographes en mission dans l'Ouest américain}, + Year = {1993}} + +@article{Bouillon:2012aa, + Author = {Bouillon, Marie-Ève}, + Date-Modified = {2017-11-01 13:24:01 +0000}, + Journal = {Études photographiques}, + Keywords = {Mauuarin}, + Lastchecked = {12.04.2017}, + Number = {30}, + Title = {Le marché de l'image touristique}, + Url = {http://etudesphotographiques.revues.org/3334}, + Urldate = {2017-04-12}, + Year = {2012}, + Bdsk-Url-1 = {http://etudesphotographiques.revues.org/3334}} + +@book{Boast:2001aa, + Address = {Cambridge}, + Author = {Boast, Robin and Sudeshna Guha and Anita Herle}, + Keywords = {Mauuarin}, + Publisher = {Museum of Archaeology \& Anthropology}, + Title = {Collected Sights: Photographic Collections of the Museum of Archaeology and Anthropology, 1860s--1930s}, + Year = {2001}} + +@book{Blaschke:2016aa, + Address = {Leipzig}, + Author = {Blaschke, Estelle}, + Keywords = {Mauuarin}, + Publisher = {Spector Books}, + Title = {Banking on Images: The Bettmann Archive and Corbis}, + Year = {2016}} + +@phdthesis{Blaschke:2011aa, + Address = {Paris}, + Author = {Blaschke, Estelle}, + Date-Modified = {2017-11-01 13:22:53 +0000}, + Doctoraldvisor = {PhD, dir.\ André Gunthert und Michel Poivert}, + Keywords = {Mauuarin}, + School = {EHESS}, + Title = {Photography and the Commodification of Images: From the Bettmann Archive to Corbis (1924–2010)}, + Year = {2011}} + +@article{Blaschke:2009aa, + Author = {Blaschke, Estelle}, + Date-Modified = {2017-11-01 13:22:06 +0000}, + Journal = {Études photographiques}, + Keywords = {Mauuarin}, + Number = {24}, + Pages = {150–181}, + Title = {From the Picture Archive to the Image Bank}, + Url = {https://etudesphotographiques.revues.org/3435}, + Urldate = {2017-04-12}, + Year = {2009}, + Bdsk-Url-1 = {https://etudesphotographiques.revues.org/3435}} + +@book{Blanckaert:2015aa, + Editor = {Blanckaert, Claude}, + Keywords = {Mauuarin}, + Publisher = {Muséum national d'histoire naturelle/Editions Artlys}, + Title = {Le Musée de l'Homme : histoire d'un musée laboratoire}, + Year = {2015}} + +@book{Blanckaert:2001aa, + Address = {Paris}, + Editor = {Blanckaert, Claude}, + Keywords = {Mauuarin}, + Publisher = {l'Harmattan}, + Title = {Les politiques de l'anthropologie : discours et pratiques en France, 1860--1940}, + Year = {2001}} + +@book{Benjamin:2008aa, + Address = {Cambridge (Mass.) and London}, + Author = {Benjamin, Walter}, + Editor = {Michael W. Jennings and Brigid Doherty and Thomas Y. Levin}, + Firstedition = {1939}, + Keywords = {Mauuarin}, + Publisher = {The Belknap Press of Harvard University Press}, + Title = {The Work of Art in the Age of its Technological Reproductibility and other writings on media}, + Year = {2008}} + +@article{Barthe:2000aa, + Author = {Barthe, Christine}, + Journal = {Journal Des Anthropologues}, + Keywords = {Mauuarin}, + Number = {80–81 (Question d'optique)}, + Pages = {71--90}, + Title = {De l'échantillon Au Corpus, Du Type à La Personne}, + Year = {2000}} + +@article{AckermanMustardoMurataCole_2016, + Author = {Ackerman, J. Luca and Mustardo, Peter and Murata, Hanako and Cole, Tatiana}, + Date-Modified = {2017-11-01 11:41:40 +0000}, + Journal = {Studies in Conservation}, + Keywords = {GeismarLaurenson}, + Number = {sup2}, + Pages = {1--6}, + Publisher = {Taylor \& Francis}, + Title = {Cindy Sherman: A Play of Selves. A Collaborative Approach to Conservation}, + Volume = {61}, + Year = {2016}} + +@incollection{Marchesi_2014, + Author = {Marchesi, Monica}, + Booktitle = {ICOM - CC 17th Triennial Conference Preprints}, + Editor = {Brigland, J.}, + Publisher = {Paris International Council of Museum}, + Title = {Conservation of Photographic Artwork by John Baldessari: Two Strategies—reproduction and Framing}, + Year = {2014}} + +@article{ClarkBarger_2016, + Author = {Clark, Robin and Barger, Michelle}, + Journal = {Studies in Conservation}, + Keywords = {GeismarLaurenson}, + Number = {sup2}, + Pages = {24--28}, + Publisher = {Taylor \& Francis}, + Title = {The Artist Initiative at San Francisco Museum of Modern Art}, + Volume = {61}, + Year = {2016}} + +@article{Geismar2006, + Author = {Geismar, Haidy}, + Date-Modified = {2017-11-01 12:10:09 +0000}, + Doi = {10.1017/S0010417506000223}, + Issn = {0010-4175, 1475-2999}, + Journal = {Comparative Studies in Society and History}, + Keywords = {GeismarLaurenson}, + Number = {3}, + Pages = {520–563}, + Title = {Malakula: A Photographic Collection}, + Url = {http://www.journals.cambridge.org/abstract_S0010417506000223}, + Urldate = {2017-07-05}, + Volume = {48}, + Year = {2006}, + Bdsk-Url-1 = {http://www.journals.cambridge.org/abstract_S0010417506000223}, + Bdsk-Url-2 = {http://dx.doi.org/10.1017/S0010417506000223}} + +@incollection{Geismar_2015, + Address = {Oxford}, + Author = {Geismar, Haidy}, + Booktitle = {The International Handbooks of Museum Studies: Museum Theory}, + Date-Modified = {2017-11-01 12:12:56 +0000}, + Editor = {Sharon Macdonald and Helen Rees Leahy and Kylie Message and Andrea Witcomb}, + Keywords = {GeismarLaurenson}, + Note = {{DOI}: 10.1002/9781118829059.wbihms110}, + Pages = {183--210}, + Publisher = {John Wiley \& Sons, Ltd}, + Title = {The Art of Anthropology: Questioning Contemporary Art in Ethnographic Display}, + Url = {http://doi.wiley.com/10.1002/9781118829059.wbihms110}, + Urldate = {2017-07-05}, + Year = {2015}, + Bdsk-Url-1 = {http://doi.wiley.com/10.1002/9781118829059.wbihms110}} + +@article{Liboiron_2016, + Author = {Liboiron, M.}, + Date-Modified = {2017-11-01 12:26:50 +0000}, + Doi = {10.1177/1359183515622966}, + Issn = {1359-1835, 1460-3586}, + Journal = {Journal of Material Culture}, + Keywords = {GeismarLaurenson}, + Number = {1}, + Pages = {87--110}, + Shorttitle = {Redefining pollution and action}, + Title = {Redefining pollution and action: The matter of plastics}, + Url = {http://mcu.sagepub.com/cgi/doi/10.1177/1359183515622966}, + Urldate = {2017-07-05}, + Volume = {21}, + Year = {2016}, + Bdsk-Url-1 = {http://mcu.sagepub.com/cgi/doi/10.1177/1359183515622966}, + Bdsk-Url-2 = {http://dx.doi.org/10.1177/1359183515622966}} + +@article{Shapiro_2015, + Author = {Shapiro, Nicholas}, + Date-Modified = {2017-11-01 12:30:37 +0000}, + Doi = {10.14506/ca30.3.02}, + Issn = {08867356, 15481360}, + Journal = {Cultural Anthropology}, + Keywords = {GeismarLaurenson}, + Number = {3}, + Pages = {368--393}, + Shorttitle = {Attuning to the Chemosphere}, + Title = {Attuning to the Chemosphere: Domestic Formaldehyde, Bodily Reasoning, and the Chemical Sublime}, + Url = {http://www.culanth.org/articles/781-attuning-to-the-chemosphere-domestic}, + Urldate = {2017-07-05}, + Volume = {30}, + Year = {2015}, + Bdsk-Url-1 = {http://www.culanth.org/articles/781-attuning-to-the-chemosphere-domestic}, + Bdsk-Url-2 = {http://dx.doi.org/10.14506/ca30.3.02}} + +@book{Strassler_2002, + Address = {Durham}, + Author = {Strassler, Karen}, + Keywords = {GeismarLaurenson, MONITA}, + Publisher = {Duke University Press}, + Series = {Objects/Histories: Critical Perspectives on Art, Material Culture, and Representation}, + Title = {Refracted Visions: Popular Photography and National Modernity in Java}, + Year = {2010}} + +@book{Poole1997, + Address = {Princeton, N.J.}, + Author = {Poole, Deborah}, + Keywords = {GeismarLaurenson}, + Publisher = {Princeton University Press}, + Title = {Vision, race, and modernity: a visual economy of the Andean image world}, + Url = {http://www.loc.gov/catdir/toc/prin031/96045561.html}, + Year = {1997}, + Bdsk-Url-1 = {http://www.loc.gov/catdir/toc/prin031/96045561.html}} + +@book{Pinney1998, + Address = {Chicago}, + Author = {Pinney, Christopher}, + Date-Modified = {2017-11-01 13:43:49 +0000}, + Keywords = {GeismarLaurenson}, + Publisher = {University of Chicago Press}, + Title = {Camera Indica: The Social Life of Indian Photographs}, + Url = {http://www.loc.gov/catdir/description/uchi052/97023831.html}, + Year = {1998}, + Bdsk-Url-1 = {http://www.loc.gov/catdir/description/uchi052/97023831.html}} + +@book{Penichon_2013, + Address = {Los Angeles, CA}, + Author = {Pénichon, Sylvie}, + Date-Modified = {2017-11-01 12:28:10 +0000}, + Keywords = {GeismarLaurenson}, + Publisher = {Getty Conservation Institute}, + Title = {Twentieth-Century Color Photographs: Identification and Care}, + Year = {2013}} + +@book{Ingold_2013, + Address = {New York}, + Author = {Ingold, Tim}, + Date-Modified = {2017-11-01 12:17:13 +0000}, + Keywords = {GeismarLaurenson}, + Publisher = {Routledge}, + Title = {Making: Anthropology, Archaeology, Art and Architecture}, + Year = {2013}} + +@book{HenareHolbraadWastell_2005, + Address = {London}, + Author = {Henare, Amiria J.\ M. and Holbraad, Martin and Wastell, Sari}, + Keywords = {GeismarLaurenson, MONITA}, + Publisher = {Routledge/Taylor \& Francis Group}, + Title = {Thinking Through Things: Theorising Artefacts Ethnographically}, + Year = {2007}} + +@book{Goodman_1976, + Address = {Indianapolis}, + Author = {Goodman, Nelson}, + Keywords = {GeismarLaurenson, MONITA}, + Publisher = {Bobbs-Merrill}, + Title = {Languages of Art: An Approach to a Theory of Symbols}, + Year = {1968}} + +@book{Gell1998, + Address = {Oxford}, + Author = {Gell, Alfred}, + Keywords = {GeismarLaurenson}, + Publisher = {Clarendon Press}, + Title = {Art and Agency: An Anthropological Theory}, + Year = {1998}} + +@book{Edwards2004, + Address = {London and New York}, + Author = {Edwards, Elizabeth and Hart, Janice}, + Date-Modified = {2017-11-01 11:56:54 +0000}, + Keywords = {GeismarLaurenson}, + Publisher = {Routledge}, + Title = {Photographs objects histories: on the materiality of images}, + Year = {2004}} + +@book{Edwards2010, + Address = {Durham, NC}, + Author = {Edwards, Elizabeth}, + Date-Modified = {2017-11-01 11:58:59 +0000}, + Keywords = {GeismarLaurenson, MONITA}, + Publisher = {Duke University Press}, + Title = {The Camera as Historian: Amateur Photographers and Historical Imagination, 1885–1918 (Objects/Histories)}, + Year = {2012}} + +@book{Bennett_2010, + Address = {Durham}, + Author = {Bennett, Jane}, + Keywords = {GeismarLaurenson}, + Publisher = {Duke University Press}, + Title = {Vibrant Matter: A Political Ecology of Things}, + Year = {2010}} + +@book{Appadurai1986, + Address = {Cambridge}, + Author = {Appadurai, Arjun}, + Keywords = {GeismarLaurenson}, + Publisher = {Cambridge University Press}, + Title = {The Social Life of Things: Commodities in Cultural Perspective}, + Year = {1986}} + +@incollection{Buskirk2003, + Address = {Pittsburgh, PA}, + Author = {Buskirk, M.}, + Booktitle = {(Im)Permanence: Cultures In/Out of Time}, + Date-Modified = {2017-09-28 11:15:57 +0000}, + Editor = {Schachter, Judith and Brockmann, Stephen}, + Keywords = {GeismarLaurenson, MONITA}, + Pages = {150–164}, + Publisher = {[University Park, Pa.]: Center for the Arts in Society, Carnegie Mellon University. Distributed by the Penn State University Press}, + Title = {The Contingent Object of Art}, + Year = {2008}} + +@incollection{CurrieAllart_2012, + Address = {London}, + Author = {Currie, Christina and Allart, Dominique}, + Booktitle = {European Paintings 15th–18th Century: Copying, Replicating and Emulating: CATS Proceedings 1, 2012}, + Date-Modified = {2017-11-01 11:49:37 +0000}, + Editor = {Erma Hermens}, + Keywords = {GeismarLaurenson}, + Pages = {1–11}, + Publisher = {Archetype Publications Ltd.}, + Title = {Pieter Brueghel as a Copyist After Pieter Bruegel}, + Year = {2012}} + +@book{DrazinKuchler_2015, + Address = {London}, + Date-Modified = {2017-11-01 11:51:07 +0000}, + Editor = {Drazin, Adam and Küchler, Susanne}, + Keywords = {GeismarLaurenson}, + Publisher = {Bloomsbury Publishing}, + Title = {The Social Life of Materials: Studies in Materials and Society}, + Year = {2015}} + +@incollection{DrazinKuchler-preface_2015, + Address = {London}, + Author = {Drazin, Adam}, + Booktitle = {The Social Life of Materials: Studies in Materials and Society}, + Date-Modified = {2017-11-01 11:52:21 +0000}, + Editor = {Drazin, Adam and Küchler, Susanne}, + Keywords = {GeismarLaurenson}, + Publisher = {Bloomsbury Publishing}, + Title = {Preface: Materials Transformations}, + Year = {2015}} + +@incollection{Drazin_2015, + Address = {London}, + Author = {Drazin, Adam}, + Booktitle = {The Social Life of Materials: Studies in Materials and Society}, + Date-Modified = {2017-11-01 11:53:20 +0000}, + Editor = {Drazin, Adam and Küchler, Susanne}, + Keywords = {GeismarLaurenson}, + Publisher = {Bloomsbury Publishing}, + Title = {To Live in a Materials World}, + Year = {2015}} + +@incollection{Dubois_2009, + Address = {London}, + Author = {Dubois, Hélène}, + Booktitle = {Sources and Serendipity: Testimonies of Artists’ Practice: Proceedings of the Third Symposium of the Art Technological Source Research Working Group}, + Date-Modified = {2017-11-01 11:54:55 +0000}, + Editor = {Erma Hermens and Joyce H. Townsend}, + Keywords = {GeismarLaurenson}, + Publisher = {Archetype Publications Ltd.}, + Title = {The Master's Own Hand? Contribution to the Study of Rubens’ Retouching of Monumental Formats}, + Year = {2009}} + +@incollection{Fiske_2009, + Address = {Amsterdam / Boston / London}, + Author = {Fiske, T.\ L.}, + Booktitle = {Conservation: Principles, Dilemmas and Uncomfortable Truths}, + Date-Modified = {2017-11-01 12:02:34 +0000}, + Edition = {1st Edition}, + Editor = {Alison Richmond and Alison Lee Bracker and {Victoria \& Albert Museum}}, + Keywords = {GeismarLaurenson}, + Pages = {229–240}, + Publisher = {Elsevier/Butterworth-Heinemann; In Association with the Victoria \& Albert Museum}, + Title = {White Walls: Installations, Iteration and Difference}, + Year = {2009}} + +@incollection{Hicks_2010, + Address = {Oxford}, + Author = {Hicks, Dan}, + Booktitle = {The Oxford Handbook of Material Culture Studies}, + Date-Modified = {2017-11-01 12:16:34 +0000}, + Editor = {Hicks, Dan and Beaudry, Mary C.}, + Keywords = {GeismarLaurenson}, + Pages = {25–98}, + Publisher = {Oxford University Press}, + Title = {The Material-Cultural Turn: Event and Effect}, + Year = {2010}} + +@article{KennedyReissSanderson_2016, + Author = {Kennedy, Nora W and Reiss, Meredith and Sanderson, Katherine}, + Journal = {Studies in Conservation}, + Keywords = {GeismarLaurenson}, + Number = {sup2}, + Pages = {91--97}, + Publisher = {Taylor \& Francis}, + Title = {The Future is Not What it Used to Be: Changing Views on Contemporary Color Photography}, + Volume = {61}, + Year = {2016}} + +@book{Krauss_1986, + Address = {Cambridge, MA}, + Author = {Krauss, Rosalind E.}, + Date-Modified = {2017-11-01 12:21:23 +0000}, + Keywords = {GeismarLaurenson}, + Publisher = {MIT Press}, + Title = {The Originality of the Avant-Garde and Other Modernist Myths}, + Year = {1986}} + +@article{Latour_1996, + Author = {Latour, Bruno}, + Date-Modified = {2017-11-01 12:22:48 +0000}, + Journal = {Soziale Welt}, + Keywords = {GeismarLaurenson}, + Pages = {369--381}, + Publisher = {JSTOR}, + Title = {On Actor-Network Theory: A Few Clarifications}, + Url = {http://www.bruno-latour.fr/sites/default/files/P-67%20ACTOR-NETWORK.pdf}, + Volume = {47}, + Year = {1996}, + Bdsk-Url-1 = {http://www.bruno-latour.fr/sites/default/files/P-67%20ACTOR-NETWORK.pdf}} + +@article{Laurenson_2006, + Author = {Laurenson, Pip}, + Date-Modified = {2017-11-01 12:25:49 +0000}, + Journal = {Tate Papers}, + Keywords = {GeismarLaurenson}, + Title = {Authenticity, Change and Loss in the Conservation of Time-Based Media Installations}, + Url = {http://www.tate.org.uk/download/file/fid/7401}, + Urldate = {2017-03-17}, + Volume = {6 (Autumn 2006)}, + Year = {2006}, + Bdsk-Url-1 = {http://www.tate.org.uk/download/file/fid/7401}} + +@article{Pillow_2003, + Author = {Pillow, Kirk}, + Date-Modified = {2017-11-01 12:28:49 +0000}, + Journal = {The Journal of Aesthetics and Art Criticism}, + Keywords = {GeismarLaurenson}, + Number = {4}, + Pages = {365--380}, + Publisher = {Wiley Online Library}, + Title = {Did Goodman's Distinction Survive LeWitt?}, + Url = {http://www.jstor.org/stable/1559071}, + Volume = {61}, + Year = {2003}, + Bdsk-Url-1 = {http://www.jstor.org/stable/1559071}} + +@incollection{Stigter_2014, + Address = {London}, + Author = {Stigter, Sanneke}, + Booktitle = {Authenticity in Transition: Changing Practices in Contemporary Art Making and Conservation: Proceedings of the International Conference Held at the University of Glasgow, 1–2 December 2014}, + Date-Modified = {2017-11-01 12:34:01 +0000}, + Editor = {Erma Hermens and Frances Robertson}, + Keywords = {GeismarLaurenson, MONITA}, + Publisher = {Archetype Publications}, + Title = {Through the Conservator's Lens: From Analogue Photowork to Digital Printout}, + Year = {2016}} + +@incollection{VallHoellingScholteStigter_2011, + Author = {Vall, Renée Van de and Hölling, Hanna and Scholte, Tatja and Stigter, Sanneke}, + Booktitle = {ICOM-CC 16th triennial conference, Lisbon, edited by J. Bridgland}, + Date-Modified = {2017-11-01 12:42:28 +0000}, + Keywords = {GeismarLaurenson}, + Publisher = {Critério}, + Title = {Reflections on a Biographical Approach to Contemporary Art Conservation}, + Url = {http://hdl.handle.net/11245/1.344546}, + Year = {2011}, + Bdsk-Url-1 = {http://hdl.handle.net/11245/1.344546}} + +@article{Vall_2015, + Author = {Vall, Renée van de}, + Journal = {British Journal of Aesthetics}, + Keywords = {GeismarLaurenson}, + Number = {3}, + Pages = {285--302}, + Publisher = {Oxford University Press UK}, + Title = {The Devil and the Details: The Ontology of Contemporary Art in Conservation Theory and Practice}, + Volume = {55}, + Year = {2015}} + +@incollection{Wharton_2006, + Address = {Princeton}, + Author = {Wharton, Glenn}, + Booktitle = {Collecting the New: Museums and Contemporary Art}, + Date-Modified = {2017-11-01 12:43:02 +0000}, + Editor = {Altshuler, Bruce}, + Keywords = {GeismarLaurenson, MONITA}, + Pages = {164–178}, + Publisher = {Princeton University Press}, + Title = {The Conservation of Contemporary Art}, + Year = {2007}} + +@article{Wharton_2015, + Author = {Wharton, Glenn}, + Date-Modified = {2017-11-01 12:43:35 +0000}, + Journal = {Objects Specialty Group Postprints}, + Keywords = {GeismarLaurenson}, + Pages = {1–12}, + Title = {Artist Intention and the Conservation of Contemporary Art}, + Volume = {22}, + Year = {2015}} + +@article{GaleLakeLearnerLevinSterrett_2009, + Author = {Gale, Matthew and Lake, Susan and Learner, Tom and Levin, Jeffrey and Sterrett, Jill}, + Date-Modified = {2017-11-01 12:06:40 +0000}, + Journal = {Conservation Perspectives, The GCI Newsletter.}, + Keywords = {GeismarLaurenson}, + Title = {Competing Commitments: A Discussion about Ethical Dilemmas in the Conservation of Modern and Contemporary Art}, + Year = {2009}} + +@article{JenningsPenichon_2011, + Author = {Jennings, Kate, and Sylvie Pénichon}, + Journal = {Topics in Photographic Preservation}, + Keywords = {GeismarLaurenson}, + Pages = {145}, + Title = {Preliminary Investigation into the Preservation of Backlit Works of Art}, + Url = {http://resources.conservation-us.org/pmgtopics/2011-volume-fourteen/14-23_Jennings&Penichon.html}, + Volume = {14}, + Year = {2011}, + Bdsk-Url-1 = {http://resources.conservation-us.org/pmgtopics/2011-volume-fourteen/14-23_Jennings&Penichon.html}} + +@article{Manchester_2002, + Author = {Manchester, Elizabeth}, + Date-Modified = {2017-11-01 12:27:37 +0000}, + Journal = {Tate Online}, + Keywords = {GeismarLaurenson}, + Title = {Summary Text for Catherine Yass, Corridors, 1994}, + Url = {http://www.tate.org.uk/art/artworks/yass-corridors-t07069}, + Year = {2002}, + Bdsk-Url-1 = {http://www.tate.org.uk/art/artworks/yass-corridors-t07069}} + +@proceedings{Brigland2014, + Address = {Melbourne}, + Date-Modified = {2017-11-01 11:46:45 +0000}, + Editor = {Brigland, J.}, + Note = {1405, 7pp.}, + Organization = {Paris International Council of Museums}, + Publisher = {ICOM - CC 17th Triennial Conference Preprints}, + Title = {Conservation of Photographic Artwork by John Baldessari: Two Strategies—Reproduction and Framing}, + Year = {2014}} + +@misc{shoemakers2017, + Date-Modified = {2017-11-01 12:31:25 +0000}, + Keywords = {GeismarLaurenson}, + Lastchecked = {2017-04-10}, + Title = {Shoemakers Elves}, + Url = {http://www.theshoemakerselves.net/about-us}, + Year = {2017}, + Bdsk-Url-1 = {http://www.theshoemakerselves.net/about-us}} + +@book{Yass2015, + Author = {Yass, Catherine, Haidy Geismar, and Pip Laurenson}, + Date-Modified = {2017-11-01 12:44:49 +0000}, + Title = {An interview with Catherine Yass}, + Year = {2015}} + +@book{YassAdamsHilty_2000, + Address = {London}, + Author = {Yass, Catherine and Parveen Adams and Greg Hilty and Asprey Jacques}, + Date-Modified = {2017-11-01 12:44:36 +0000}, + Keywords = {GeismarLaurenson}, + Publisher = {Asprey Jacques}, + Title = {Catherine Yass: Works, 1994–2000}, + Year = {2000}} + +@book{Tekiner:2010aa, + Address = {Istanbul}, + Author = {Tekiner, Aylin}, + Date-Modified = {2017-09-28 09:39:50 +0000}, + Keywords = {Cetin}, + Publisher = {İletişim Yayınları}, + Title = {Atatürk Heykelleri: Kült, Estetik, Siyaset [Ataturk Statues: Cult, Aesthetics, Politics]}, + Year = {2010}} + +@incollection{Seker:2009aa, + Address = {İstanbul}, + Author = {Şeker, Nesim}, + Booktitle = {Modern Türkiye'de Siyasi Düşünce. Vol.\ 9: Dönemler ve Zihniyetler}, + Date-Modified = {2017-09-28 09:39:28 +0000}, + Editor = {Tanıl Bora and Murat Gültekin}, + Keywords = {Cetin}, + Pages = {1163--1194}, + Publisher = {İletişim Yayınları}, + Title = {İmge, Bellek ve Tarih: Milli Mücadele Dönemi [Image, Memory and History: National Struggle Period]}, + Year = {2009}} + +@incollection{Sekula:2002aa, + Address = {London and New York}, + Author = {Sekula, Allan}, + Booktitle = {The Photography Reader}, + Editor = {Liz Wells}, + Keywords = {Cetin}, + Pages = {443–452}, + Publisher = {Routledge}, + Title = {Reading an Archive}, + Year = {2002}} + +@article{Ozyurek:2004aa, + Author = {Özyürek, Esra}, + Journal = {Ethnologist}, + Keywords = {Cetin}, + Number = {3}, + Pages = {374–391}, + Title = {Miniaturizing Atatürk: Privatization of State Imagery and Ideology in Turkey}, + Volume = {31}, + Year = {2004}} + +@book{Oral:2011aa, + Address = {İstanbul}, + Author = {Atilla Oral}, + Keywords = {Cetin}, + Publisher = {Demkar Yayınevi}, + Title = {Atatürk'ün Sansürlenen Mektubu [The Censured Letter of Atatürk],}, + Year = {2011}} + +@mastersthesis{Erim:2011aa, + Author = {Erim, Bilun}, + Keywords = {Cetin}, + School = {Middle East Technical University}, + Title = {Making The Secular Through The Body: Tattooing the Father Turk}, + Year = {2011}} + +@book{bozdogan:1997aa, + Address = {Seattle and London}, + Date-Modified = {2017-09-28 09:32:42 +0000}, + Editor = {Bozdoğan, Sibel and Reşat Kasaba}, + Keywords = {Cetin}, + Publisher = {University of Washington Press}, + Title = {Rethinking Modernity and National Identity in Turkey}, + Year = {1997}} + +@book{Benazus:2009aa, + Address = {İstanbul}, + Author = {Benazus, Hanri}, + Date-Modified = {2017-09-28 09:37:53 +0000}, + Keywords = {Cetin}, + Publisher = {Tudem Yayınevi}, + Title = {Çağdaş Atatürk Fotoğrafları [Contemporary Photographs of Atatürk]}, + Volume = {Vol.\ 1}, + Year = {2009}} + +@book{Bali:2014aa, + Address = {İstanbul}, + Author = {Bali, Rıfat}, + Keywords = {Cetin}, + Publisher = {Libra Kitabevi}, + Title = {Bir Kıyımın, Bir Talanın Öyküsü [The Story of a Slaughter, of a Raid]}, + Year = {2014}} + +@incollection{Assmann:2011aa, + Address = {Oxford and New York}, + Author = {Assmann, Aledia}, + Booktitle = {The Collective Memory Reader}, + Editor = {Jefrrey K. Olick et al.}, + Keywords = {Cetin}, + Pages = {334–337}, + Publisher = {Oxford University Press}, + Title = {Canon and Archive}, + Year = {2011}} + +@book{Arendt:1958aa, + Address = {Cleveland and New York}, + Author = {Hannah Arendt}, + Keywords = {Cetin}, + Publisher = {Meridian Books}, + Title = {The Origins of Totalitarianism}, + Year = {1958}} + +@book{Aksit:2006aa, + Address = {İstanbul}, + Author = {İlhan Akşit}, + Keywords = {Cetin}, + Publisher = {Akşit Yayınları}, + Title = {Mustafa Kemal Atatürk}, + Year = {2006}} + +@misc{:2013aa, + Date-Modified = {2017-09-28 09:31:39 +0000}, + Journal = {HaberTurk}, + Keywords = {Cetin}, + Lastchecked = {2017-02-05}, + Month = {05}, + Title = {Atatürk'ün Son Fotoğrafları! [The Last Photographs of Atatürk!]}, + Url = {http://www.haberturk.com/galeri/gundem/427757-arsivden-cikan-ataturk-fotograflari/1/69}, + Urldate = {2017-05-02}, + Year = {2013}, + Bdsk-Url-1 = {http://www.haberturk.com/galeri/gundem/427757-arsivden-cikan-ataturk-fotograflari/1/69}} + +@article{:1973aa, + Journal = {Milliyet}, + Keywords = {Cetin}, + Month = {10}, + Pages = {5}, + Title = {Atatürk'ün Görülmemiş Resimleri Sergilendi}, + Year = {1973}} + +@misc{:2008aa, + Date-Modified = {2017-09-28 09:31:16 +0000}, + Journal = {Sabah}, + Keywords = {Cetin}, + Lastchecked = {01. December 2015}, + Title = {Atatürk'ün Çok Az Bilinen 300 Fotoğrafı'' [The Least Unknown 300 Photographs of Atatürk]}, + Url = {http://www.sabah.com.tr/galeri/turkiye/ataturkun_cok_az_bilinen_300_fotografi/11 http://www.sabah.com.tr/galeri/turkiye/ataturkun_cok_az_bilinen_300_fotografi/11 http://www.sabah.com.tr/galeri/turkiye/ataturkun_cok_az_bilinen_300_fotografi/11}, + Urldate = {2015-01-12}, + Year = {2008}, + Bdsk-Url-1 = {http://www.sabah.com.tr/galeri/turkiye/ataturkun_cok_az_bilinen_300_fotografi/11%20http://www.sabah.com.tr/galeri/turkiye/ataturkun_cok_az_bilinen_300_fotografi/11%20http://www.sabah.com.tr/galeri/turkiye/ataturkun_cok_az_bilinen_300_fotografi/11}} + +@article{:1952aa, + Journal = {Resmi Gazete}, + Keywords = {Cetin}, + Month = {07}, + Number = {32}, + Pages = {18–42}, + Title = {Atatürk Aleyhinde İşlenen Suçlar Hakkında Kanun [Law About Crimes Against Atatürk]}, + Volume = {3}, + Year = {1952}} + +@book{Taskiran:1972aa, + Address = {Istanbul}, + Author = {Nimet Taşkıran}, + Keywords = {Celik}, + Publisher = {Yenilik Basımevi}, + Title = {Haseki'nin Kitabı}, + Year = {1972}} + +@book{Oztuncay:2003aa, + Address = {Istanbul}, + Author = {Bahattin Öztuncay}, + Keywords = {Celik}, + Publisher = {Yapı Kredi Yayınları}, + Title = {The Photographers of Constantinople: Pioneers, Studios, and Artists from 19th Century Istanbul}, + Year = {2003}} + +@article{Ozlen:2014aa, + Author = {Fatma Özlen}, + Journal = {Tarih}, + Keywords = {Celik}, + Month = {10}, + Number = {20}, + Pages = {82--89}, + Title = {Röntgen Devrimi}, + Year = {2014}} + +@book{Necipoglu:2005aa, + Address = {Princeton and Oxford}, + Author = {Gülru Necipoğlu}, + Keywords = {Celik}, + Publisher = {Princeton University Press}, + Title = {The Age of Sinan: Architectural Culture in the Ottoman Empire}, + Year = {2005}} + +@book{Osman:1873aa, + Address = {Constantinople}, + Author = {Osman, {Hamdy Bey} and Marie {de Launay}}, + Date-Modified = {2017-09-28 10:05:32 +0000}, + Keywords = {Celik}, + Publisher = {Imprimerie du Levant Times and Shipping Gazette}, + Title = {Les Costumes populaires de la Turquie en 1873}, + Year = {1873}} + +@article{Evens:1995aa, + Author = {{Ronald G.} Evens}, + Journal = {Journal of the American Medical Association}, + Keywords = {Celik}, + Number = {11}, + Pages = {912--916}, + Title = {Röntgen Retrospective: One Hundred Years of Revolutionary Technology}, + Volume = {274}, + Year = {1995}} + +@book{Celik:2008aa, + Address = {Seattle and WA and London}, + Author = {Zeynep Çelik}, + Keywords = {Celik}, + Publisher = {University of Washington Press}, + Title = {Empire, Architecture, and the City: French-Ottoman Encounters. 1830–1914}, + Year = {2008}} + +@book{Celik:2015aa, + Address = {Istanbul}, + Editor = {Zeynep Çelik and Edhem Eldem}, + Keywords = {Celik}, + Publisher = {Koç University Press}, + Title = {Camera Ottomana: Photography and Modernity in the Ottoman Empire. 1840–1914}, + Year = {2015}} + +@book{treml_warburg_2010, + Address = {Berlin}, + Editor = {Treml, Martin and Sigrid Weigel and Perdita Ladwig}, + Keywords = {Sykora}, + Publisher = {Suhrkamp}, + Title = {Aby Warburg: Werke in einem Band}, + Year = {2010}} + +@book{Stoichita:1997aa, + Address = {Cambridge}, + Author = {{Victor I.} Stoichita}, + Keywords = {Sykora}, + Publisher = {Cambridge University Press}, + Title = {The Self-Aware Image: An Insight Into Early Modern Meta-Painting}, + Year = {1997}} + +@book{sykoraschrader_2016, + Address = {Kromsdorf and Weimar}, + Editor = {Sykora, Katharina and Kristin Schrader and Dietmar Kohler and Natascha Pohlmann and Daniel Bühler}, + Keywords = {Sykora}, + Publisher = {Jonas Verlag}, + Title = {Valenzen fotografischen Zeigens}, + Year = {2016}} + +@book{Sierek:2007aa, + Address = {Hamburg}, + Author = {Sierek, Karl}, + Keywords = {Sykora}, + Publisher = {Philo Fine Arts}, + Title = {Foto, Kino und Computer: Aby Warburg als Medientheoretiker}, + Year = {2007}} + +@incollection{Rumberg:2011aa, + Address = {Berlin and Munich}, + Author = {Rumberg, Per}, + Booktitle = {Photo Archives and the Photographic Memory of Art History}, + Editor = {Costanza Caraffa}, + Keywords = {Sykora}, + Pages = {241--252}, + Publisher = {Deutscher Kunstverlag}, + Title = {Aby Warburg and the Anatomy of Art History}, + Year = {2011}} + +@incollection{Pollock:2011aa, + Address = {Berlin and Munich}, + Author = {Pollock, Griselda}, + Booktitle = {Photo Archives and the Photographic Memory of Art History}, + Editor = {Costanza Caraffa}, + Keywords = {Sykora}, + Pages = {73--97}, + Publisher = {Deutscher Kunstverlag}, + Title = {Aby Warburg and Mnemosyne: Photographic aide-mémoire, Optical Unconscious and Philosophy}, + Year = {2011}} + +@incollection{Michaud:2004aa, + Address = {New York}, + Author = {Michaud, Philippe-Alain}, + Booktitle = {Aby Warburg and the Image in Motion}, + Editor = {Plippe-Alain Michaud}, + Keywords = {Sykora}, + Pages = {277--291}, + Publisher = {Zone Books}, + Title = {Crossing the Frontiers: Mnemosyne Between Art History and Cinema}, + Year = {2004}} + +@misc{Mazzucco:2013aa, + Author = {Mazzucco, Katia}, + Date-Modified = {2017-09-28 09:56:16 +0000}, + Journal = {Images Re-vues. Histoire, anthropologie et théorie de l'art, Hors-série}, + Keywords = {Sykora}, + Lastchecked = {01. October 2016}, + Number = {document 14}, + Title = {Bild und Wort dans la conférence d'Aby Warburg sur les tapisseries Valois: methode pour une Bildwissenschaft}, + Url = {http://imagesrevues.revues.org/2972}, + Urldate = {2016-10-01}, + Volume = {4}, + Year = {2013}, + Bdsk-Url-1 = {http://imagesrevues.revues.org/2972}} + +@article{Warburg:1927aa, + Author = {Warburg, Aby}, + Date-Modified = {2017-09-28 10:01:12 +0000}, + Journal = {Kunsthistorisches Institut Florenz: Jahresbericht 1927/28}, + Keywords = {Sykora}, + Title = {Untitled}, + Year = {1927–1928}} + +@book{Levi-Strauss:1966aa, + Address = {London}, + Author = {{Levi-Strauss}, Claude}, + Keywords = {Sykora}, + Publisher = {The University of Chicago Press}, + Title = {The Savage Mind}, + Year = {1966}} + +@incollection{Kimpel:2001aa, + Address = {Marburg}, + Author = {Kimpel, Harald}, + Booktitle = {Triumphzüge: Paraden durch Raum und Zeit}, + Editor = {Harald Kimpel and Johanna Werckmeister}, + Keywords = {Sykora}, + Pages = {110--127}, + Publisher = {Jonas Verlag}, + Title = {Der Triumph im Kopf: Imaginäre Umzüge als Ansichtssachen}, + Year = {2001}} + +@book{bredekamp_2002, + Address = {Frankfurt a. M}, + Author = {Bredekamp, Horst}, + Title = {Florentiner Fußball. Die Renaissance der Spiele}, + Year = {2002}} + +@article{dercks_and-because_2014, + Author = {Dercks, Ute}, + Date-Added = {2018-03-13 15:22:30 +0000}, + Date-Modified = {2018-03-13 15:22:52 +0000}, + Journal = {Visual Resources: An International Journal of Documentation}, + Keywords = {Sykora}, + Number = {3}, + Pages = {181-200}, + Title = {'And because the use of the photographic device is impossible without a proper card catalogue': The Typological-Stylistic Arrangement and the Subject Cross-Reference Index of the KHI's Photothek (1897-1930s)}, + Volume = {30}, + Year = {2014}} + +@article{dercks_ulrich_2013, + Author = {Dercks, Ute}, + Date-Added = {2018-03-13 15:21:44 +0000}, + Date-Modified = {2018-03-13 15:22:58 +0000}, + Journal = {Art Libraries Journal}, + Keywords = {Sykora}, + Number = {4}, + Pages = {29-36}, + Title = {Ulrich Middeldorf Prior to Emigration: The Photothek of the Kunsthistorisches Institut in Florenz (1928-1935)}, + Volume = {28}, + Year = {2013}} + +@book{medina_2004, + Address = {University Park, Pennsylvania}, + Author = {Medina Lasansky, Diana}, + Publisher = {Pennsylvania State University Press}, + Title = {The Renaissance Perfected: Architecture, Spectacle, and Tourism in Fascist Italy}, + Year = {2004}} + +@electronic{Hueck:aa, + Author = {Hueck, Irene and Katharina Sykora}, + Date-Modified = {2017-09-28 09:53:58 +0000}, + Keywords = {Sykora}, + Title = {e-mail correspondence}, + Urldate = {2016-10}} + +@book{Hubert:1997aa, + Address = {Florence}, + Author = {Hubert, Hans}, + Keywords = {Sykora}, + Title = {Das kunsthistorische Institut in Florenz}, + Year = {1997}} + +@incollection{Hensel:2013aa, + Address = {Bielefeld}, + Author = {Hensel, Thomas}, + Booktitle = {Akteur-Medien-Theorie}, + Date-Modified = {2017-09-28 09:51:26 +0000}, + Editor = {Erhard Schuettpelz and Tristan Thielmann}, + Keywords = {Sykora}, + Pages = {643--890}, + Publisher = {Transcript}, + Title = {Von Graphit, Graphemen und Gestellen: Aby Warburg und die Aktanten der Kunstwissenschaft}, + Year = {2013}} + +@book{David:2010aa, + Address = {Berlin}, + Editor = {Ganz, David and Felix Thürlemann}, + Keywords = {Sykora}, + Publisher = {Reimer}, + Title = {Das Bild im Plural}, + Year = {2010}} + +@incollection{Edwards:2011aa, + Address = {Berlin and Munich}, + Author = {Edwards, Elizabeth}, + Booktitle = {Photo Archives and the Photographic Memory of Art History}, + Date-Modified = {2017-11-01 13:50:41 +0000}, + Editor = {Costanza Caraffa}, + Keywords = {Sykora; Holbein}, + Pages = {47--56}, + Publisher = {Deutscher Kunstverlag}, + Title = {Photographs: Material Form and the Dynamic Archive}, + Year = {2011}} + +@incollection{Edwards:2004ab, + Address = {New York and London}, + Author = {Edwards, Elizabeth}, + Booktitle = {Photographs, Objects, Histories: On the Materiality of Images}, + Editor = {Edwards, Elizabeth and Janice Hart}, + Keywords = {Sykora}, + Pages = {47--61}, + Publisher = {Taylor \& Francis}, + Title = {Mixed Box: The Cultural Biography of a Box of `Ethnographic' Photographs}, + Year = {2004}} + +@incollection{Edwards:2004aa, + Address = {New York and London}, + Author = {Edwards, Elizabeth and Janice Hart}, + Booktitle = {Photographs, Objects, Histories: On the Materiality of Images}, + Editor = {Edwards, Elizabeth and Janice Hart}, + Keywords = {Sykora}, + Pages = {1--15}, + Publisher = {Taylor \& Francis}, + Title = {Introduction: Photographs as Objects}, + Year = {2004}} + +@book{Didi-Hubermann:2010aa, + Address = {Berlin}, + Author = {{Didi-Hubermann}, Georges}, + Keywords = {Sykora}, + Publisher = {Suhrkamp}, + Title = {Das Nachleben der Bilder: Kunstgeschichte und Phantomzeit nach Aby Warburg}, + Year = {2010}} + +@book{Carew-Reid:1993aa, + Address = {Paris}, + Author = {{Carew-Reid}, Nicole}, + Date-Modified = {2017-09-28 09:47:50 +0000}, + Keywords = {Sykora}, + Publisher = {Olschki}, + Title = {Les Fêtes Florentines au temps de Lorenzo il Magnifico}, + Year = {1993}} + +@book{Caraffa:2011aa, + Address = {Berlin and Munich}, + Author = {Caraffa, Costanza}, + Editor = {Caraffa, Costanza}, + Keywords = {Sykora}, + Publisher = {Deutscher Kunstverlag}, + Title = {Photo Archives and the Photographical Memory of Art History}, + Year = {2011}} + +@book{Barthes:1984aa, + Address = {London}, + Author = {Barthes, Roland}, + Keywords = {Sykora}, + Publisher = {Fontana Paperbooks}, + Title = {Camera Lucida}, + Year = {1984}} + +@incollection{Barta-Fliedl:1992aa, + Address = {Salzburg und Wien}, + Author = {{Barta-Fliedl}, Ilsebill}, + Booktitle = {Die Beredsamkeit des Leibes: Zur Körpersprache in der Kunst}, + Editor = {Ilsebill {Barta-Fliedl} and Christoph Geissmar}, + Keywords = {Sykora}, + Pages = {165--171}, + Publisher = {Residenz Verlag}, + Title = {Anmerkungen zu den gebärdensprachlichen Bilderreihen Aby Warburgs}, + Year = {1992}} + +@book{Agamben:2005aa, + Address = {Frankfurt am Main}, + Author = {Agamben, Giorgio}, + Keywords = {Sykora}, + Publisher = {Suhrkamp}, + Title = {Profanierungen}, + Year = {2005}} + +@incollection{Abel:2013aa, + Address = {Bielefeld}, + Author = {Abel, Thomas and {Martin Roman} Deppner}, + Booktitle = {Undisziplinierte Bilder: Fotografie als dialogische Struktur}, + Date-Modified = {2017-09-28 09:43:27 +0000}, + Editor = {Abel, Thomas and {Martin Roman} Deppner}, + Keywords = {Sykora}, + Pages = {9--28}, + Publisher = {Transcript}, + Title = {Undisziplinierte Bilder: Fotografie als dialogische Struktur. Skizze eines gemeinsamen Denkraums}, + Year = {2013}} + +@article{Seppanen:2017aa, + Author = {Janne Seppänen}, + Journal = {Photographies}, + Keywords = {Pinney}, + Number = {1}, + Pages = {113--128}, + Title = {Unruly Representation: Materiality, indexicality and agency of the photographic trace}, + Volume = {10}, + Year = {2017}} + +@incollection{Rubenstein:2013aa, + Address = {London}, + Author = {Daniel Rubenstein and Katrina Sluis}, + Booktitle = {The Photographic Image in Digital Culture}, + Editor = {Martin Lister}, + Keywords = {Pinney}, + Publisher = {Routledge (2nd edition)}, + Title = {The Digital Image in Photographic Culture: Algorithmic photogrpay and the crisis of representation}, + Year = {2013}} + +@book{Price:1997aa, + Address = {Stanford}, + Author = {Mary Price}, + Keywords = {Pinney}, + Publisher = {Stanford University Press}, + Title = {The Photograph: A Strange, Confined Space}, + Year = {1997}} + +@article{Pradhan:2015aa, + Author = {Pradhan, Kunal, et al.}, + Journal = {India Today}, + Keywords = {Pinney}, + Month = {10}, + Pages = {26--35}, + Title = {Beef, Ban \& Bloodshed'}, + Year = {2015}} + +@book{Pinney:2008aa, + Address = {London}, + Author = {Christopher Pinney}, + Keywords = {Pinney, Caraffa}, + Publisher = {British Library}, + Title = {The Coming of Photography in India}, + Year = {2008}} + +@book{Pinney:2004aa, + Address = {London}, + Author = {Christopher Pinney}, + Keywords = {Pinney}, + Publisher = {Reaktion}, + Title = {`Photos of the Gods': The Printed Image and Political Struggle in India}, + Year = {2004}} + +@incollection{Marx:1977aa, + Address = {Oxford}, + Author = {Karl Marx and Friedrich Engels}, + Booktitle = {Kalrl Marx : Selected Writings}, + Editor = {David McLellan}, + Keywords = {Pinney}, + Pages = {159--191}, + Publisher = {Oxford University Press}, + Title = {The German Ideology}, + Year = {1977}} + +@article{Meyer:2012aa, + Author = {Edgar Gómez Cruz and Eric T. Meyer}, + Date-Modified = {2017-11-01 13:40:47 +0000}, + Journal = {Photographies}, + Keywords = {Pinney}, + Number = {2}, + Pages = {203--221}, + Title = {Creation and Control in the Photographic Process: iPhones and the emerging fifth moment of photography'}, + Volume = {5}, + Year = {2012}} + +@incollection{Dalrymple:2014aa, + Address = {Milan}, + Author = {William Dalrymple}, + Booktitle = {Karen Knorr: India Song}, + Editor = {Rosa Maria Falvo}, + Keywords = {Pinney}, + Pages = {9--14}, + Publisher = {Skira}, + Title = {Preface}, + Year = {2014}} + +@book{Barthes:1982aa, + Address = {New York}, + Author = {Roland Barthes}, + Keywords = {Pinney}, + Publisher = {Hill and Wang}, + Title = {Camera Lucida: Reflections on Photography}, + Translator = {Richard Howard}, + Year = {1982}} + +@article{SchechnerSliski_2016, + Author = {Schechner, S.\ J. and Sliski, D.}, + Journal = {Journal for the History of Astronomy}, + Keywords = {Nasim}, + Pages = {3--29}, + Title = {The Scientific and Historical Value of Annotations on Astronomical Photographic Plates}, + Volume = {47}, + Year = {2016}} + +@article{Rubio_2016, + Author = {Fernando Domínguez Rubio}, + Journal = {Journal of Material Culture}, + Keywords = {Nasim}, + Pages = {59--86}, + Title = {On the Discrepancy Between Objects and Things: An Ecological Approach}, + Volume = {47}, + Year = {2016}} + +@book{Roberts_18931899, + Address = {London}, + Author = {Isaac Roberts}, + Keywords = {Nasim}, + Publisher = {Universal Press}, + Title = {Photographs of Stars, Star-Clusters and Nebulae: Together with Records of Results Obtained in the Pursuit of Celestial Photography}, + Volume = {2}, + Year = {1893-1899}} + +@article{Roberts_1888, + Author = {Isaac Roberts}, + Date-Modified = {2017-09-28 10:32:35 +0000}, + Journal = {Monthly Notices of the Royal Astronomical Society}, + Keywords = {Nasim}, + Pages = {XXX–XXX}, + Title = {On an Instrument for Measuring the Positions and Magnitudes of Stars on Photographs and for Engraving them upon Metal Plates, with Illustrations of the Method of using the Instrument}, + Volume = {49}, + Year = {1888}} + +@book{Rees_1906, + Address = {New York}, + Author = {John Krom Rees}, + Keywords = {Nasim}, + Publisher = {Columbia University}, + Title = {The Rutherfurd Photographic Measures}, + Year = {1906}} + +@book{Pickering_1895, + Address = {Cambridge}, + Author = {William Henry Pickering}, + Date-Modified = {2017-09-28 10:33:29 +0000}, + Keywords = {Nasim}, + Publisher = {Harvard Observatory}, + Title = {Investigations in Astronomical Photography, (Annals of the Astronomical Observatory of Harvard College): Vol.\ 32, Part 1}, + Year = {1895}} + +@book{Olin:2012aa, + Address = {Chicago}, + Author = {Margaret Olin}, + Keywords = {Nasim}, + Publisher = {University of Chicago Press}, + Title = {Touching Photographs}, + Year = {2012}} + +@article{Nasim_forthcoming_b, + Author = {Omar W. Nasim}, + Date-Modified = {2017-09-28 10:29:23 +0000}, + Journal = {Special issue of Nuncius: Journal of the Material and Visual History of Science}, + Keywords = {Nasim}, + Title = {James Nasmyth on the Moon: Or on Becoming a Lunar Being, Without the Lunacy}, + Year = {forthcoming}} + +@incollection{Nasim_forthcoming_a, + Address = {Amsterdam}, + Author = {Omar W. Nasim}, + Booktitle = {Anton Pannekoek (1873–1960): Ways of Viewing Science and Society Modernism in Science, Radical Politics and Art}, + Date-Modified = {2017-09-28 10:28:34 +0000}, + Editor = {Jeroen van Dongen and Chaokang Tai}, + Keywords = {Nasim}, + Publisher = {Amsterdam University Press}, + Title = {The Labour of Handwork in Astronomy: Between Drawing and Photography in Anton Pannekoek}, + Year = {forthcoming}} + +@article{Moxey_2008, + Author = {Keith Moxey}, + Journal = {Journal of Visual Culture}, + Keywords = {Nasim}, + Pages = {131--146}, + Title = {Visual Studies and the Iconic Turn}, + Volume = {7}, + Year = {2008}} + +@book{JonesBoyd_1971, + Address = {Cambridge}, + Author = {B.~Z. Jones and L.~G. Boyd}, + Keywords = {Nasim}, + Publisher = {Harvard University Press}, + Title = {The Harvard College Observatory: The First Four Directorships, 1839–1919}, + Year = {1971}} + +@book{Jacoby_1904, + Address = {New York}, + Author = {Jacoby, Harold}, + Keywords = {Nasim}, + Pages = {92--93}, + Publisher = {Charles Scribner's Sons}, + Title = {Practical Talks by an Astronomer}, + Year = {1904}} + +@book{Jacoby_1892, + Address = {New York}, + Author = {Jacoby, Harold}, + Keywords = {Nasim}, + Publisher = {Columbia University}, + Title = {Rutherfurd Photographic Measures of the Group of the Pleiades}, + Year = {1892}} + +@article{Ingold_2012, + Author = {Ingold, Tim}, + Journal = {Annual Review of Anthropology}, + Keywords = {Nasim}, + Pages = {427--442}, + Title = {Toward an Ecology of Materials}, + Volume = {41}, + Year = {2012}} + +@article{Ingold_2007, + Author = {Tim Ingold}, + Date-Modified = {2017-09-28 10:23:08 +0000}, + Journal = {Archaeological Dialogues}, + Keywords = {Nasim}, + Pages = {1--16}, + Title = {Materials against Materiality}, + Volume = {14}, + Year = {2007}} + +@article{Hinks_1901, + Author = {Arthur Robert Hinks}, + Journal = {Monthly Notices of the Royal Astronomical Society}, + Keywords = {Nasim}, + Pages = {444--458}, + Title = {The Cambridge Machine for Measuring Celestial Photographs}, + Volume = {61}, + Year = {1901}} + +@book{Heidegger_1985, + Addendum = {Translated by J. Macquarrie and E. Robinson}, + Address = {Oxford}, + Author = {Martin Heidegger}, + Keywords = {Nasim}, + Publisher = {Bail Blackwell}, + Title = {Being and Time}, + Year = {1985}} + +@book{Heidegger_1968, + Address = {South Bend}, + Author = {Heidegger, Martin}, + Keywords = {Nasim}, + Publisher = {Gateway Editions}, + Title = {What is a Thing?}, + Year = {1968}} + +@book{:1907aa, + Address = {London}, + Editor = {Hasluck, Paul N.}, + Keywords = {Nasim}, + Publisher = {Cassell and Company}, + Title = {The Book of Photography: Practical, Theoretical and Applied}, + Year = {1907}} + +@article{Harpham_1900, + Author = {Harpham, F.~E.}, + Journal = {Popular Astronomy}, + Keywords = {Nasim}, + Pages = {129--136}, + Title = {The Rutherfurd Photographs}, + Volume = {8}, + Year = {1900}} + +@article{Gould_1892, + Author = {Benjamin Apthorp Gould}, + Date-Modified = {2017-09-28 10:12:58 +0000}, + Journal = {The Observatory}, + Keywords = {Nasim}, + Pages = {52--55}, + Title = {Preliminary notice of the reduction of Rutherfurd's star-plates}, + Volume = {14}, + Year = {1892}} + +@book{Brown_2004, + Address = {Chicago}, + Editor = {Brown, Bill}, + Keywords = {Nasim}, + Publisher = {University of Chicago Press}, + Title = {Things}, + Year = {2004}} + +@article{Brown_2001, + Author = {Brown, Bill}, + Date-Modified = {2017-09-28 11:11:04 +0000}, + Journal = {Critical Inquiry}, + Keywords = {Nasim; GeismarLaurenson}, + Number = {1}, + Pages = {1--22}, + Title = {Thing Theory}, + Volume = {28}, + Year = {2001}} + +@article{Breitbach_2011, + Author = {Breitbach, Julia}, + Journal = {European Journal of English Literature}, + Keywords = {Nasim}, + Pages = {31--43}, + Title = {The Photo-As-Thing: Photography and Thing Theory}, + Volume = {15}, + Year = {2011}} + +@article{Boyle:2011aa, + Author = {Boyle, Rebecca}, + Date-Modified = {2017-09-28 10:11:38 +0000}, + Journal = {Popular Science}, + Keywords = {Nasim}, + Lastchecked = {20. December 2016}, + Month = {11}, + Title = {Recording a Century of Night Skies Through a Scanner Darkly}, + Url = {http://www.popsci.com/science/article/2011-10/recording-century-night-skies-through-scanner-darkly}, + Urldate = {2016-12-20}, + Year = {2011}, + Bdsk-Url-1 = {http://www.popsci.com/science/article/2011-10/recording-century-night-skies-through-scanner-darkly}} + +@book{Otlet:1906fu, + Address = {Brussels}, + Author = {Otlet, Paul}, + Keywords = {Daston}, + Publisher = {Au siege de l'Institut}, + Title = {L'État actuel de l'organisation bibliographique internationale}, + Year = {1906}} + +@book{Humboldt:1874it, + Address = {Stuttgart}, + Author = {Humboldt, Alexander von}, + Keywords = {Daston}, + Pages = {xxiv}, + Publisher = {J.~G.\ Cotta'scher Verlag}, + Title = {Kosmos}, + Volume = {1}, + Year = {[1844]1874}} + +@book{Larfeld:1907ir, + Address = {Leipzig}, + Author = {Larfeld, Wilhelm}, + Keywords = {Daston}, + Pages = {5–6, 39–53, 92–94}, + Publisher = {O.R.\ Reisland}, + Title = {Handbuch der griechischen Epigraphik}, + Volume = {1}, + Year = {1907}} + +@incollection{Winterhalter:1889xz, + Address = {Washington DC}, + Author = {Winterhalter, Albert G.}, + Booktitle = {Washington Observations for 1885, Appendix I}, + Keywords = {Daston}, + Publisher = {Government Printing Office}, + Title = {The International Astrophysical Congress and a Visit to Certain European Observatories and Other Institutions: Report to the Superintendent}, + Year = {1889}} + +@book{Wilder:2009bc, + Address = {London}, + Author = {Wilder, Kelley}, + Keywords = {Daston}, + Publisher = {Reaktion}, + Title = {Photography and Science}, + Year = {2009}} + +@book{Wickert:1962kl, + Address = {Frankfurt am Main}, + Editor = {Wickert, Lothar}, + Keywords = {Daston}, + Publisher = {Vittorio Klostermann}, + Title = {Theodor Mommsen - Otto Jahn: Briefwechsel 1842–1868}, + Year = {1962}} + +@incollection{White:1988jx, + Address = {Dordrecht}, + Author = {White, Graeme L}, + Booktitle = {Mapping the Sky: Past Heritage and Future Directions}, + Editor = {Débarat, Suzanne and Eddy, John A. and Eichhorn, Heinrich K. and Upgren, Arthur R.}, + Keywords = {Daston}, + Pages = {45–51}, + Publisher = {Kluwer}, + Title = {The Carte du Ciel - The Australian Connection}, + Year = {1988}} + +@book{Weimer:1987et, + Address = {Paris}, + Author = {Weimer, Théo}, + Date-Modified = {2017-09-28 10:35:11 +0000}, + Keywords = {Daston, Nasim}, + Publisher = {Observatoire de Paris}, + Title = {Brève histoire de la Carte du Ciel en France}, + Year = {1987}} + +@incollection{Weimer:1988yb, + Address = {Dordrecht}, + Author = {Weimer, Théo}, + Booktitle = {Mapping the Sky: Past Heritage and Future Directions}, + Editor = {Débarat, Suzanne and Eddy, John A. and Eichhorn, Heinrich K. and Upgren, Arthur R.}, + Keywords = {Daston}, + Pages = {29–32}, + Publisher = {Kluwer}, + Title = {Naissances et developpement de la Carte du Ciel en France}, + Year = {1988}} + +@article{Urban:1998ft, + Author = {Urban, Sean E. and Corbin, Thomas E.}, + Journal = {Sky and Telescope}, + Keywords = {Daston}, + Month = {06}, + Pages = {40–44}, + Title = {The Astrographic Catalogue: A Century of Work Pays Off}, + Year = {1998}} + +@incollection{Turner:1983ca, + Address = {Göttingen}, + Author = {Turner, R.\ Steven}, + Booktitle = {Philologie et herméneutique au 19ème siècle II}, + Editor = {Bollack, Mayotte and Wismann, Heinz}, + Keywords = {Daston}, + Pages = {450–489}, + Publisher = {Vanderhoek \& Ruprecht}, + Title = {Historicism, Kritik, and the Prussian Professoriate, 1790–1840}, + Year = {1983}} + +@book{Tucker:2005il, + Address = {Baltimore}, + Author = {Tucker, Jennifer}, + Keywords = {Daston}, + Publisher = {Johns Hopkins University Press}, + Title = {Nature Exposed: Photography as Eye Witness in Victorian Science}, + Year = {2005}} + +@book{Snow:1959tw, + Address = {New York}, + Author = {Snow, Charles Percy}, + Keywords = {Daston}, + Publisher = {Cambridge University Press}, + Title = {Two Cultures and the Scientific Revolution}, + Year = {1959}} + +@incollection{Rebenich:1999by, + Address = {Berlin}, + Author = {Rebenich, Stefan}, + Booktitle = {Die Königlich Preußische Akademie der Wissenschaften zu Berlin im Kaiserreich}, + Editor = {Kocka, Jürgen and Hohlfeld, Rainer and Walther, Peter}, + Keywords = {Daston}, + Pages = {199–233}, + Publisher = {Akademie Verlag}, + Title = {Die Altertumswissenschaften und die Kirchenväterkommission an der Akademie: Theodor Mommsen und Adolf Harnack}, + Year = {1999}} + +@incollection{Rebenich:2005th, + Address = {Stuttgart}, + Author = {Rebenich, Stefan}, + Booktitle = {Theodor Mommsen: Gelehrter, Politiker und Literat}, + Editor = {Wiesehöfer, Josef}, + Keywords = {Daston}, + Pages = {185–205}, + Publisher = {Franz Steiner Verlag}, + Title = {'Unser Werk lobt keinen Meister'. Theodor Mommsen und die Wissenschaft von Altertum}, + Year = {2005}} + +@book{Poincare:1968ph, + Address = {Paris}, + Author = {Poincaré, Henri}, + Keywords = {Daston}, + Publisher = {Flammarion}, + Title = {La Science et l'hypothèse [1902]}, + Year = {1968}} + +@book{Ortolano:2009la, + Address = {Cambridge}, + Author = {Ortolano, Guy}, + Keywords = {Daston}, + Publisher = {Cambridge University Press}, + Title = {The Two Cultures Controversy: Science, Literature and Cultural Politics in Postwar Britain}, + Year = {2009}} + +@article{Norman:1938oq, + Author = {Norman, Daniel}, + Journal = {Osiris}, + Keywords = {Daston}, + Pages = {560–594}, + Title = {The Development of Astrophotography}, + Volume = {5}, + Year = {1938}} + +@book{Nasim:2013nx, + Address = {Chicago}, + Author = {Nasim, Omar}, + Keywords = {Daston}, + Publisher = {University of Chicago Press}, + Title = {Observing by Hand: Sketching the Nebulae in the Nineteenth Century}, + Year = {2013}} + +@incollection{Nadeau:2008cr, + Address = {New York}, + Author = {Nadeau, Luis}, + Booktitle = {Encyclopedia of Nineteenth-Century Photography}, + Editor = {Hannavy, John}, + Keywords = {Daston}, + Pages = {645–646}, + Publisher = {Routledge}, + Title = {Heliogravure}, + Year = {2008}} + +@article{Mommsen:1905pd, + Author = {Mommsen, Theodor}, + Journal = {Reden und Aufsätze}, + Keywords = {Daston}, + Pages = {208–210}, + Title = {"Antwort auf Harnack," delivered 3 July 1890 to the Königliche Preussische Akademie der Wissenschaften}, + Year = {1905}} + +@book{Mommsen:1847eu, + Address = {Berlin}, + Author = {Mommsen, Theodor}, + Keywords = {Daston}, + Publisher = {A.~W.\ Schade}, + Title = {Ueber Plan und Ausführung eines Corpus Inscriptionum Latinarum}, + Year = {1847}} + +@book{Mommsen:1976qf, + Address = {Bern/Frankfurt am Main}, + Author = {Mommsen, Theodor}, + Editor = {Walser, Gerold and Walser, Brigitte}, + Keywords = {Daston}, + Publisher = {Verlag Herbert Lang}, + Title = {Tagebuch der französisch-italienischen Reise 1844/1845}, + Year = {1976}} + +@incollection{Mommsen:1905li, + Address = {Berlin}, + Author = {Mommsen, Theodor}, + Booktitle = {Reden und Aufsätze}, + Edition = {2nd unrevised}, + Editor = {Mommsen, Theodor}, + Keywords = {Daston}, + Pages = {35–38}, + Publisher = {Weidmannsche Buchhandlung}, + Title = {"Antrittsrede," delivered 8 July 1858 to the Königliche Preussische Akademie der Wissenschaften}, + Year = {1905}} + +@book{Lemov:2015dq, + Address = {New Haven, CT}, + Author = {Lemov, Rebecca}, + Keywords = {Daston}, + Publisher = {Yale University Press}, + Title = {Database of Dreams}, + Year = {2015}} + +@incollection{Lankford:1984ph, + Address = {Cambridge/New York}, + Author = {Lankford, John}, + Booktitle = {Astrophysics and Twentieth-Century astronomy to 1950}, + Editor = {Gingerich, Owen}, + Keywords = {Daston}, + Pages = {16–39}, + Publisher = {Cambridge University Press}, + Title = {The Impact of Photography on Astronomy}, + Year = {1984}} + +@book{Lamy:2008ui, + Address = {Paris}, + Editor = {Lamy, Jérôme}, + Keywords = {Daston}, + Publisher = {Observatoire de Paris}, + Title = {La Carte du Ciel. Histoire et actualité d'un projet scientifique international}, + Year = {2008}} + +@incollection{Kelsey:2008vz, + Address = {New Haven}, + Author = {Kelsey, Robin}, + Booktitle = {The Meaning of Photography}, + Editor = {Kelsey, Robin and Stineson, Blake}, + Keywords = {Daston}, + Pages = {15–33}, + Publisher = {Yale University Press}, + Title = {Photography, Chance, and The Pencil of Nature}, + Year = {2008}} + +@article{Jones:2000jf, + Author = {Jones, Derek}, + Journal = {Astronomy and Geophysics}, + Keywords = {Daston}, + Pages = {5.16–5.20}, + Title = {The Scientific Value of the Carte du Ciel}, + Volume = {41}, + Year = {2000}} + +@incollection{Hudec:1999jy, + Address = {Frankfurt am Main}, + Author = {Hudec, René}, + Booktitle = {Treasure-Hunting in Astronomical Plate Archives}, + Editor = {Kroll, Peter and Dous, Constanze la and Bräuer, Hans-Jürgen}, + Keywords = {Daston}, + Pages = {28–40}, + Publisher = {Verlag Harri Deutsch}, + Title = {An Introduction to the World's Large Plate Archives}, + Year = {1999}} + +@book{Huebner:1881xi, + Address = {Berlin}, + Author = {Hübner, Emil}, + Keywords = {Daston}, + Publisher = {Weidmannsche Buchhandlung}, + Title = {Über mechanische Copien von Inschriften}, + Year = {1881}} + +@book{Hoffleit:1950jb, + Address = {Cambridge, MA}, + Author = {Hoffleit, Dorrit}, + Keywords = {Daston}, + Publisher = {Harvard College Observatory}, + Title = {Some Firsts in Astronomical Photography}, + Year = {1950}} + +@book{Harnack:1900xz, + Address = {Berlin}, + Author = {Harnack, Adolf}, + Keywords = {Daston}, + Pages = {v.\ I.2, 896–914}, + Publisher = {Reichsdruckerei}, + Title = {Geschichte der Königlich Preussischen Akademie der Wissenschaften zu Berlin}, + Volume = {3}, + Year = {1900}} + +@incollection{Geimer:2011oa, + Address = {Stanford}, + Author = {Geimer, Peter}, + Booktitle = {Releasing the Image: From Literature to New Media}, + Editor = {Kalip, Jacques and Mitchell, Robert}, + Keywords = {Daston}, + Pages = {27–43}, + Publisher = {Stanford University Press}, + Title = {Self-generated Images}, + Year = {2011}} + +@article{Flammarion:1887cr, + Author = {Flammarion, Camille}, + Journal = {L'Astronomie}, + Keywords = {Daston}, + Pages = {161–169}, + Title = {Le Congrès astronomique pour la photographie du ciel}, + Volume = {6}, + Year = {1887}} + +@book{Edwards:2012lo, + Address = {Durham, NC}, + Author = {Edwards, Elizabeth}, + Keywords = {Daston}, + Publisher = {Duke University Press}, + Title = {The Camera as Historian: Amateur Photogaphers and the Historical Imagination, 1885–1918}, + Year = {2012}} + +@book{Sobel:2016zv, + Address = {London}, + Author = {Sobel, Dava}, + Date-Modified = {2017-09-28 10:34:27 +0000}, + Keywords = {Daston, Nasim}, + Publisher = {4th Estate}, + Title = {The Glass Universe: The Hidden History of the Women Who Took the Measure of the Stars}, + Year = {2016}} + +@book{Draper:1864ft, + Address = {Washington, DC}, + Author = {Draper, Henry}, + Keywords = {Daston}, + Publisher = {Smithsonian Institution}, + Title = {On the Construction of a Silvered Glass Telescope, Fifteen and a Half Inches in Aperture, and Its Uses in Celestial Photography}, + Year = {1864}} + +@book{Grau:1993ud, + Address = {Heidelberg}, + Author = {Grau, Conrad}, + Keywords = {Daston}, + Publisher = {Spektrum}, + Title = {Die Preußische Akademie der Wissenschaften zu Berlin}, + Year = {1993}} + +@book{Diels:1993wu, + Author = {Diels, Hermann}, + Keywords = {Daston}, + Publisher = {Spektrum}, + Title = {Die Organisation der Wissenschaft [1906]}, + Year = {1993}} + +@book{Debarat:1988mt, + Address = {Dordrecht}, + Editor = {Débarat, Suzanne and Eddy, John A. and Eichhorn, Heinrich K. and Upgren, Arthur R.}, + Keywords = {Daston}, + Publisher = {Kluwer}, + Title = {Mapping the Sky: Past Heritage and Future Directions}, + Year = {1988}} + +@book{Daston:2017sc, + Address = {Chicago}, + Editor = {Daston, Lorraine}, + Keywords = {Daston}, + Publisher = {University of Chicago Press}, + Title = {Science in the Archives: Pasts, Presents, Futures}, + Year = {2017}} + +@incollection{Bruch:2005vl, + Address = {Berlin}, + Author = {Bruch, Rüdiger vom}, + Booktitle = {Theodor Mommsen: Wissenschaft und Politik im 19.\ Jahrhundert}, + Editor = {Demandt, Alexander and Goltz, Andreas and Schlange-Schöningen, Heinrich}, + Keywords = {Daston}, + Pages = {121–141}, + Publisher = {Walter de Gruyter}, + Title = {Mommsen und Harnack: Die Geburt von Big Science aus den Geisteswissenschaften}, + Year = {2005}} + +@book{Aristotle:2fr, + Author = {Aristotle}, + Keywords = {Daston}, + Pages = {III.12, 424a16–20}, + Title = {On the Soul}} + +@book{Aristotle:1ga, + Author = {Aristotle}, + Keywords = {Daston}, + Pages = {IV.3, 767b1–20}, + Title = {Generation of Animals}} + +@book{Amad:2010ij, + Address = {New York}, + Author = {Amad, Paula}, + Keywords = {Daston}, + Publisher = {Columbia University Press}, + Title = {Counter-Archive: Film, Everyday, and Albert Kahn's Archive de la Planète}, + Year = {2010}} + +@article{Daston:2012dp, + Author = {Daston, Lorraine}, + Journal = {Osiris}, + Keywords = {Daston}, + Pages = {156–187}, + Title = {The Sciences of the Archives}, + Volume = {27}, + Year = {2012}} + +@book{Bader2013, + Address = {München}, + Author = {Bader, L.}, + Date-Modified = {2018-04-18 10:16:55 +0000}, + Keywords = {Maennig}, + Publisher = {Wilhelm Fink}, + Title = {Bild-Prozesse im 19.\ Jahrhundert: Der Holbein-Streit und die Ursprünge der Kunstgeschichte}, + Year = {2013}} + +@incollection{Beyrodt1975, + Address = {Gießen}, + Author = {Beyrodt, W.}, + Booktitle = {Kunstwissenschaft und Kunstvermittlung}, + Editor = {I. Below}, + Keywords = {Maennig}, + Pages = {173–187}, + Title = {Diareihen für den Unterricht}, + Year = {1975}} + +@book{Caraffa2009, + Address = {München}, + Date-Modified = {2018-04-18 10:14:04 +0000}, + Editor = {Caraffa, C.}, + Keywords = {Maennig}, + Publisher = {Deutscher Kunstverlag}, + Title = {Fotografie als Instrument und Medium der Kunstgeschichte}, + Year = {2009}} + +@incollection{Dilly1975, + Author = {Dilly, H.}, + Booktitle = {Kunstwissenschaft und Kunstvermittlung}, + Date-Modified = {2018-04-18 10:18:25 +0000}, + Editor = {I. Below}, + Keywords = {Maennig}, + Pages = {153–172}, + Publisher = {Gießen}, + Title = {Lichtprojektion: Prothese der Kunstbetrachtung}, + Year = {1975}} + +@incollection{Dilly1995, + Addendum = {Rundbrief Fotografie, Sonderheft 2}, + Address = {Göppingen}, + Author = {Dilly, H.}, + Booktitle = {Zwischen Markt und Museum: Beiträge der Tagung Präsentationsformen von Fotografie am 24.\ und 25.\ Juni 1994 im Reiß-Museum der Stadt Mannheim}, + Date-Modified = {2018-04-18 10:16:18 +0000}, + Keywords = {Maennig}, + Publisher = {39–44}, + Title = {Bildwerfer: 121 Jahre wissenschaftliche Dia-Projektion}, + Year = {1995}} + +@incollection{Dilly2009, + Address = {München}, + Author = {Dilly, H.}, + Booktitle = {Fotografie als Instrument und Medium der Kunstgeschichte}, + Date-Modified = {2018-04-18 10:18:35 +0000}, + Editor = {C. Caraffa}, + Keywords = {Maennig}, + Pages = {91–116}, + Publisher = {Deutscher Kunstverlag}, + Title = {Weder Grimm noch Schmarsow, geschweige denn Wölfflin \dots\ Zur jüngsten Diskussion über die Diaprojektion um 1900}, + Year = {2009}} + +@article{Eisenhauer2006, + Author = {Eisenhauer, J.\ F.}, + Journal = {A Journal of Issues and Research}, + Keywords = {Maennig}, + Number = {3}, + Pages = {198–214}, + Title = {Next Slide Please: Studies in Art Education}, + Volume = {47}, + Year = {2006}} + +@article{Fawcett1983, + Author = {Fawcett, T.}, + Date-Modified = {2018-04-18 10:20:03 +0000}, + Journal = {Art History}, + Keywords = {Maennig}, + Number = {4}, + Pages = {442–460}, + Title = {Visual Facts and the Nineteenth Century Art Lecture}, + Volume = {6}, + Year = {1983}} + +@incollection{Grimm1897, + Address = {Berlin}, + Author = {Grimm, H.}, + Booktitle = {Beiträge zur Deutschen Culturgeschichte}, + Date-Modified = {2018-04-18 10:18:04 +0000}, + Editor = {H. Grimm}, + Keywords = {Maennig}, + Pages = {XXX}, + Publisher = {W.\ Herts}, + Title = {Die Umgestaltung der Universitätsvorlesungen über Neuere Kunstgeschichte durch die Anwendung des Skioptikons}, + Year = {1897}} + +@incollection{Haffner2007, + Address = {Berlin}, + Author = {Haffner, D.}, + Booktitle = {Bild/Geschichte: Festschrift für Horst Bredekamp}, + Editor = {P. Helas and M. Polte and C. Rückert and B. Uppemkamp}, + Keywords = {Maennig}, + Pages = {119–129}, + Publisher = {Akademie-Verlag}, + Title = {„Die Kunstgeschichte ist ein technisches Fach“. Bilder an der Wand, auf dem Schirm und im Netz}, + Year = {2007}} + +@book{Hess1999, + Address = {München}, + Author = {Heß, H.}, + Date-Modified = {2018-04-18 10:15:55 +0000}, + Keywords = {Maennig}, + Publisher = {Akademie Verlag}, + Title = {Der Kunstverlag Franz Hanfstaengl und die frühe fotografische Kunstreproduktion: Das Kunstwerk und sein Abbild}, + Year = {1999}} + +@book{Hotz1965, + Author = {Hotz, J.}, + Date-Modified = {2018-04-18 10:16:02 +0000}, + Keywords = {Maennig}, + Publisher = {Karlsruhe}, + Title = {Aktenauszüge zur Geschichte des Lehrstuhls und Instituts für Kunstgeschichte an der Technischen Hochschule Karlsruhe}, + Year = {1965}} + +@article{Lankheit1966, + Author = {Lankheit, K.}, + Journal = {Karlsruher Akademische Reden, Neue Folge}, + Keywords = {Maennig}, + Pages = {5–23}, + Title = {Kunstgeschichte unter dem Primat der Technik: Rektoratsrede gehalten bei der Jahresfeier am 4.\ Dezember 1965}, + Volume = {24}, + Year = {1966}} + +@article{Leighton1984, + Author = {Leighton, H.\ B.}, + Journal = {History of Photography}, + Keywords = {Maennig}, + Number = {2}, + Pages = {107–118}, + Title = {The Lantern Slide and Art History}, + Volume = {8}, + Year = {1984}} + +@book{Malraux1987, + Address = {Frankfurt, New York}, + Author = {Malraux, A.}, + Date-Modified = {2018-04-18 10:19:15 +0000}, + Keywords = {Maennig}, + Publisher = {Campus Verlag}, + Title = {Das imaginäre Museum}, + Year = {1987}} + +@book{Marcy1877, + Address = {Philadelphia}, + Author = {Marcy, L.\ J.}, + Keywords = {Maennig}, + Publisher = {James A.\ Moore}, + Title = {The Sciopticon Manual, Explaining Lantern Projections in General, and the Sciopticon Apparatus in Particular: Including Magic Lantern Attachments, Experiments, Novelties, Colored and Photo-transparencies, Mechanical Movements, Etc.}, + Year = {1877}} + +@article{Matyssek2005, + Author = {Matyssek, A.}, + Date-Modified = {2018-04-18 10:19:54 +0000}, + Journal = {Berichte zur Wissenschaftsgeschichte}, + Keywords = {Maennig}, + Number = {3}, + Pages = {227–235}, + Title = {„Entdecker`` und „Finder``: Über die fotografische Wissensproduktion der Kunstgeschichte}, + Volume = {28}, + Year = {2005}} + +@book{McLuhan2015, + Addendum = {Critical Edition edited by Terrence Gordon}, + Address = {Berkeley}, + Author = {McLuhan, M.}, + Date-Modified = {2018-04-18 10:17:20 +0000}, + Keywords = {Maennig}, + Publisher = {Gingko Press}, + Title = {Understanding Media: The Extensions of Man}, + Year = {2015 [1964]}} + +@article{Meyer1879, + Author = {Meyer, B.}, + Date-Modified = {2018-04-18 10:20:14 +0000}, + Journal = {Westermanns illustrierte deutsche Monatshefte: Ein Familienbuch für das gesamte geistige Leben der Gegenwart}, + Keywords = {Maennig}, + Pages = {196–209}, + Title = {Die Photographie im Dienste der Kunstwissenschaft und des Kunstunterrichts}, + Volume = {47}, + Year = {1879}} + +@book{Meyer1883, + Address = {Karlsruhe}, + Author = {Meyer, B.}, + Date-Modified = {2018-04-18 10:15:37 +0000}, + Keywords = {Maennig}, + Publisher = {Selbstverl.}, + Title = {Glasphotogramme für den kunstwissenschaftlichen Unterricht}, + Year = {1883}} + +@article{Nelson2000, + Author = {Nelson, R.\ S.}, + Journal = {Critical Inquiry}, + Keywords = {Maennig}, + Number = {3}, + Pages = {414–434}, + Title = {The Slide Lecture, or the Work of Art “History” in the Age of Mechanical Reproduction}, + Volume = {26}, + Year = {2000}} + +@incollection{Papenbrock2006, + Address = {Karlsruhe}, + Author = {Papenbrock, M.}, + Booktitle = {Kunst und Architektur in Karlsruhe: Festschrift für Norbert Schneider}, + Editor = {K. Büttner and M. Papenbrock}, + Keywords = {Maennig}, + Pages = {179–191}, + Publisher = {Universitätsverlag Karlsruhe}, + Title = {Der Lehrstuhl für Kunstgeschichte in Karlsruhe: Ein Rückblick}, + Year = {2006}} + +@article{Reichle2002, + Author = {Reichle, I.}, + Journal = {kritische berichte. Zeitschrift für Kunst- und Kulturwissenschaften}, + Keywords = {Maennig}, + Pages = {40–56}, + Title = {Medienbrüche}, + Url = {http://www.kunstgeschichte.de/kgs/publikationen/mb1.html}, + Volume = {Heft 1}, + Year = {2002}, + Bdsk-Url-1 = {http://www.kunstgeschichte.de/kgs/publikationen/mb1.html}} + +@incollection{Reichle2005, + Address = {Hamburg}, + Author = {Reichle, I.}, + Booktitle = {Sichtbarkeit und Medium: Austausch, Verknüpfung und Differenz naturwissenschaftlicher und ästhetischer Bildstrategien}, + Editor = {A. Zimmermann}, + Keywords = {Maennig}, + Pages = {169–181}, + Publisher = {Hamburg University Press}, + Title = {Fotografie und Lichtbild: ,Die unsichtbaren’ Bildmedien der Kunstgeschichte}, + Year = {2005}} + +@incollection{Roessler2010, + Address = {Berlin}, + Author = {Rößler, J.}, + Booktitle = {In der Mitte Berlins: 200 Jahre Kunstgeschichte an der Humboldt-Universität}, + Date-Modified = {2018-04-18 10:17:34 +0000}, + Editor = {H. Bredekamp and A.\ S. Labuda}, + Keywords = {Maennig}, + Pages = {69–90}, + Publisher = {Gebr.\ Mann Verlag}, + Title = {Erlebnisbegriff und Skioptikon: Herman Grimm und die Geisteswissenschaften an der Berliner Universität}, + Year = {2010}} + +@incollection{Ruchatz2000, + Address = {Wiltshire}, + Author = {Ruchatz, J.}, + Booktitle = {Visual Delights: Essays on the Popular and Projected Image in the 19th Century}, + Date-Modified = {2018-04-18 10:15:02 +0000}, + Editor = {S. Popple and V. Toulmin}, + Keywords = {Maennig}, + Pages = {38–49}, + Publisher = {Flicks Books}, + Title = {The Magic Lantern in Connection with Pohotography: Rationalisation and Technology}, + Year = {2000}} + +@book{Ruchatz2003, + Address = {München}, + Author = {Ruchatz, J.}, + Date-Modified = {2018-04-18 10:15:16 +0000}, + Keywords = {Maennig}, + Publisher = {Fink}, + Title = {Licht und Wahrheit: Eine Mediumgeschichte der fotografischen Projektion}, + Year = {2003}} + +@book{Thuerlemann2013, + Address = {München}, + Author = {Thürlemann, F.}, + Keywords = {Maennig}, + Publisher = {Fink}, + Title = {Mehr als ein Bild: Für eine Kunstgeschichte des hyperimage}, + Year = {2013}} + +@book{Ullrich2009, + Address = {Berlin}, + Author = {Ullrich, W.}, + Date-Modified = {2018-04-18 10:19:35 +0000}, + Keywords = {Maennig}, + Publisher = {Wagenbach}, + Title = {Raffinierte Kunst: Übung vor Reproduktionen}, + Year = {2009}} + +@incollection{Wenk1999, + Address = {München}, + Author = {Wenk, S.}, + Booktitle = {Konfigurationen: Zwischen Kunst und Medien}, + Editor = {S. Schade}, + Keywords = {Maennig}, + Pages = {293–305}, + Publisher = {Fink}, + Title = {Zeigen und Schweigen: Der kunsthistorische Diskurs und die Diaprojektion}, + Year = {1999}} + +@book{Wyss1996, + Address = {Köln}, + Author = {Wyss, B.}, + Date-Modified = {2018-04-18 10:19:43 +0000}, + Keywords = {Maennig}, + Publisher = {Dumont}, + Title = {Der Wille zur Kunst: Zur ästhetischen Mentalität der Moderne}, + Year = {1996}} + +@book{Batchen_2004, + Address = {New York}, + Author = {Batchen, Geoffrey}, + Keywords = {Narain}, + Publisher = {Princeton Architectural Press}, + Title = {Forget Me Not}, + Year = {2004}} + +@book{Guha-Thakurta_2011, + Address = {Calcutta}, + Author = {Guha-Thakurta, Tapati}, + Keywords = {Narain}, + Publisher = {Seagull Arts and Media Resource Centre and the Ford Foundation}, + Title = {The City in the Archive: Calcutta’s Visual Histories}, + Year = 2011} + +@book{Hirsch_1997, + Author = {Hirsch, Marianne}, + Keywords = {Narain}, + Pages = 51, + Publisher = {Harvard University Press}, + Title = {Family Frames. Photography, Narrative and Post Memory}, + Year = 1997} + +@book{Karlekar_2005, + Address = {New Delhi}, + Author = {Karlekar, Malavika}, + Keywords = {Narain}, + Pages = {166--167}, + Publisher = {Oxford University Press}, + Title = {Re-Visioning the Past: Early Photography in Bengal 1875–1915}, + Year = {2005}} + +@book{Dhawan_2011, + Address = {Calcutta}, + Editor = {Sen, Samita and Biswas, Ranjita and Dhawan, Nandita}, + Keywords = {Narain}, + Publisher = {School of Women’s Studies, Jadavpur University and Stree Publications}, + Title = {Intimate Others: Marriage and Sexualities in India}, + Year = {2011}} + +@incollection{Sundaram_2008, + Address = {New Delhi}, + Author = {Sundaram, Vivan}, + title = {Forward}, + Editor = {Umrao Singh Sher-Gil}, + Keywords = {Narain}, + Pages = {viii}, + Publisher = {Photoink}, + bookTitle = {His Misery and His Manuscript}, + Year = {2008}} + +@book{Tola_1988, + Author = {Tola, Chhobi}, + Keywords = {Narain}, + Publisher = {Ananda}, + Title = {Bangalir Photography Charcha}, + Year = {1988}} + +@book{Derrida_1996, + Address = {Chicago}, + Author = {Jacques Derrida}, + Keywords = {Edwards}, + Note = {Transl. Eric Prenowitz}, + Publisher = {University of Chicago Press}, + Title = {Archive Fever: A Freudian Impression}, + Year = {1996}} + +@book{Hamber_1996, + Address = {Amsterdam}, + Author = {Anthony J. Hamber}, + Keywords = {Edwards}, + Publisher = {Gordon and Breach}, + Title = {"A Higher Branch of the Art": Photographing the Fine Arts in England, 1839-1880}, + Year = {1996}} + +@article{Kratz_2011, + Author = {Corinne A. Kratz}, + Journal = {Visual Anthropology Review}, + Keywords = {Edwards}, + Number = {1}, + Pages = {21-48}, + Title = {Rhetorics of Value: Constituting Worth and Meaning through Display}, + Volume = {27}, + Year = {2011}} + +@incollection{Crane_2013, + Address = {London}, + Author = {Susan A. Crane}, + Booktitle = {Memory and History: Understanding Memory as Source and Subject}, + Editor = {Joan Tumblety}, + Pages = {123-140}, + Publisher = {Routledge}, + Title = {The Pictures in the Background: History, Memory and Photography in the Museum}, + Year = {2013}} + +@book{EdwardsLien_2014, + Address = {Farnham}, + Editor = {Elizabeth Edwards and Sigrid Lien}, + Keywords = {Edwards, Caraffa}, + Publisher = {Ashgate}, + Title = {Uncertain Images: Museums and the Work of Photographs}, + Year = {2014}} + +@book{EdwardsMorton_2015, + Address = {London}, + Editor = {Elizabeth Edwards and Christopher A. Morton}, + Keywords = {Edwards}, + Publisher = {Bloomsbury}, + Title = {Photographs, Museums, Collections: Between Art and Information}, + Year = {2015}} + +@incollection{Daston_2015, + Address = {University Park, Pennsylvania}, + Author = {Lorraine Daston}, + Booktitle = {Vision and Its Instruments: Art, Science, and Technology in Early Modern Europe}, + Editor = {Alina Payne}, + Pages = {13-35}, + Publisher = {The Pennsylvania State University Press}, + Title = {Epistemic Images}, + Year = {2015}} + +@article{Edwards_2017, + Author = {Elizabeth Edwards}, + Doi = {10.15180/170709}, + Journal = {Science Museum Group Journal}, + Title = {Location, Location: A Polemic of Photographs and Institutional Practices}, + Url = {http://dx.doi.org/10.15180/170709}, + Volume = {7 (Spring 2017)}, + Year = {2017}, + Bdsk-Url-1 = {http://dx.doi.org/10.15180/170709}} + +@article{Strathern_1996, + Author = {Marilyn Strathern}, + Journal = {Journal of the Royal Anthropological Institute}, + Pages = {517-535}, + Title = {Cutting the Network}, + Volume = {2.3}, + Year = {1996}} + +@incollection{Pinney_2005, + Address = {Durham NC}, + Author = {Christopher Pinney}, + Booktitle = {Materiality}, + Editor = {Daniel Miller}, + Pages = {256-272}, + Publisher = {Duke University Press}, + Title = {Things Happen: Or, From Which Moment Does That Object Come?}, + Year = {2005}} + +@incollection{Alpers_1991, + Address = {Washington D.C.}, + Author = {Svetlana Alpers}, + Booktitle = {Exhibiting Cultures. The Poetics and Politics of Museum Display}, + Editor = {Ivan Karp and Steven Lavine}, + Publisher = {Smithsonian Institution Press}, + Title = {The Museum as a Way of Seeing}, + Year = {1991}} + +@book{Rose_2001, + Address = {London}, + Author = {Gillian Rose}, + Keywords = {Edwards}, + Publisher = {Sage}, + Title = {Visual Methodologies: An Introduction to the Interpretation of Visual Materials}, + Year = {2001}} + +@incollection{Morgan_2011, + Address = {Cambridge}, + Author = {Mary S. Morgan}, + Booktitle = {How Well Do Facts Travel? The Dissemination of Reliable Knowledge}, + Editor = {Peter Howlett and Mary S. Morgan}, + Publisher = {Cambridge University Press}, + Title = {Travelling Facts}, + Year = {2011}} + +@article{Domanska_2006, + Author = {Ewa Domanska}, + Journal = {Archaeologia Polana}, + Pages = {171-185}, + Title = {The Return to Things}, + Volume = {44}, + Year = {2006}} + +@book{Gell_1998, + Address = {Oxford}, + Author = {Alfred Gell}, + Keywords = {Edwards, Caraffa}, + Publisher = {Clarendon Press}, + Title = {Art and Agency. An Anthropological Theory}, + Year = {1998}} + +@book{Foucault_1970, + Address = {London}, + Author = {Michel Foucault}, + Keywords = {Edwards}, + Publisher = {Routledge}, + Title = {The Order of Things}, + Year = {1970}} + +@book{Malraux_1965, + Address = {Paris}, + Author = {André Malraux}, + Keywords = {Edwards}, + Publisher = {Gallimard}, + Title = {Le Musée imaginaire: les voix du silence}, + Year = {1965 [1947]}} + +@incollection{Amao_2015, + Address = {London}, + Author = {Damarice Amao}, + Booktitle = {Photographs, Museums, Collections: Between Art and Information}, + Editor = {Elizabeth Edwards and Christopher Morton}, + Pages = {231-245}, + Publisher = {Bloomsbury}, + Title = {To Collect and Preserve Negatives: The Eli Lotar Collection at the Centre George Pompidou}, + Year = {2015}} + +@incollection{Willumson_2004, + Address = {London}, + Author = {Glenn Willumson}, + Booktitle = {Photographs Objects Histories: On the Materiality of Images}, + Editor = {Elizabeth Edwards and Janice Hart}, + Pages = {84-99}, + Publisher = {Routledge}, + Title = {Making Meaning: Displaced Materiality in the Library and Art Museum}, + Year = {2004}} + +@book{Crimp_1993, + Address = {Cambridge MA}, + Author = {Douglas Crimp}, + Keywords = {Edwards}, + Publisher = {The MIT Press}, + Title = {On the Museum's Ruins}, + Year = {1993}} + +@book{Spyer_1998, + Address = {New York and London}, + Editor = {Patricia Spyer}, + Keywords = {Edwards}, + Publisher = {Routledge}, + Title = {Border Fetishisms: Material Objects in Unstable Spaces}, + Year = {1998}} + +@book{Ingold_2011, + Address = {Abingdon}, + Author = {Tim Ingold}, + Keywords = {Edwards}, + Publisher = {Routledge}, + Title = {Being Alive: Essays on Movement, Knowledge and Description}, + Year = {2011}} + +@book{Haworth-BoothMcCauley_1998, + Address = {Williamstown, MA}, + Author = {Mark Haworth-Booth and Anne McCauley}, + Keywords = {Edwards}, + Publisher = {Sterling and Francine Clark Art Institute}, + Title = {The Museum and the Photograph: Collecting Photography at the Victoria and Albert Museum 1853-1900}, + Year = {1998}} + +@book{Browne_2016, + Address = {New Haven/London}, + Author = {Clare Woodthorpe Browne and Glyn Davies and M. A. Michael and Michaela Zöschg}, + Keywords = {Edwards}, + Publisher = {Yale University Press/V\&A}, + Title = {English Medieval Embroidery. Opus Anglicanum}, + Year = {2016}} + +@article{Riegl_1982, + Author = {Alois Riegl}, + Journal = {Oppositions}, + Note = {Transl. K. W. Forster and D. Ghirardo}, + Pages = {21-51}, + Title = {The Modern Cult of Monuments: Its Character and Its Origin}, + Volume = {25 (Fall 1982)}, + Year = {1982}} + +@book{Hooper-Greenhill_1992, + Address = {London}, + Author = {Eilean Hooper-Greenhill}, + Keywords = {Edwards}, + Publisher = {Routledge}, + Title = {Museums and the Shaping of Knowledge}, + Year = {1992}} + +@book{Faria_2016, + Address = {Lisbon}, + Author = {Nuno Faria}, + Keywords = {Edwards}, + Publisher = {Museu Nacional de Etnologia}, + Title = {Inquéritos ao Território: Paisagem e Povoamento. Roteiro}, + Year = {2016}} + +@misc{Jacobi:2017aa, + Author = {Carol Jacobi}, + Keywords = {Edwards}, + Title = {Tate Painting and the Art of Stereoscopic Photography}, + Url = {http://www.tate.org.uk/whats-on/tate-britain/display/bp-spotlight-poor-mans-picture-gallery-victorian-art-and-stereoscopic/essay}, + Urldate = {2017-07-19}, + Year = {2017}, + Bdsk-Url-1 = {http://www.tate.org.uk/whats-on/tate-britain/display/bp-spotlight-poor-mans-picture-gallery-victorian-art-and-stereoscopic/essay}} + +@incollection{Hiller-Norouzi2009, + Address = {Tübingen}, + Author = {Hiller-Norouzi, J.}, + Booktitle = {Raum – Perspektive – Medium: Panofsky und die visuellen Kulture}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-03-21 15:13:05 +0000}, + Editor = {Philipp Freytag et al.}, + Keywords = {Maennig}, + Pages = {n. pag.}, + Title = {"Logos Versus Aisthesis. Die kunsthistorische Diaprojektion als codierendes Instrument.}, + Url = {https://publikationen.uni-tuebingen.de/xmlui/bitstream/handle/10900/46390/pdf/Hiller_BL.pdf?sequence=1&isAllowed=y.}, + Urldate = {2017-12-20}, + Year = {2009}, + Bdsk-Url-1 = {https://publikationen.uni-tuebingen.de/xmlui/bitstream/handle/10900/46390/pdf/Hiller_BL.pdf?sequence=1&isAllowed=y.}} + +@book{hotz_aktenauszuge_1965, + Address = {Karlsruhe}, + Author = {Hotz, J.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:20:47 +0000}, + Title = {Aktenauszüge zur Geschichte des Lehrstuhls und Instituts für Kunstgeschichte an der Technischen Hochschule Karlsruhe.}, + Year = {1965}} + +@article{lankheit_kunstgeschichte_1966, + Author = {Lankheit, K.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:26:29 +0000}, + Journal = {Karlsruher Akademische Reden, Neue Folge}, + Pages = {5–23}, + Title = {"Kunstgeschichte unter dem Primat der Technik. Rektoratsrede gehalten bei der Jahresfeier am 4. Dezember 1965}, + Volume = {24}, + Year = {1966}} + +@article{leighton_the-lantern_1984, + Author = {Leighton, H. B.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:28:10 +0000}, + Journal = {History of Photography}, + Number = {2}, + Pages = {107–118}, + Title = {The Lantern Slide and Art History}, + Volume = {8}, + Year = {1984}} + +@book{malraux_das-imaginare_1987, + Address = {Frankfurt/M., New York}, + Author = {Malraux, A.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:21:08 +0000}, + Title = {Das imaginäre Museum}, + Year = {1987}} + +@book{marcy_the-sciopticon_1877, + Address = {Philadelphia}, + Author = {Marcy, L. J.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:30:26 +0000}, + Edition = {6}, + Title = {The Sciopticon manual : explaining lantern projections in general, and the Sciopticon apparatus in particular, including magic lantern attachments, experiments, novelties, colored and photo-transparencies, mechanical movements, etc.}, + Year = {1877}} + +@article{matyssek_entdecker_2005, + Author = {Matyssek, A.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:25:32 +0000}, + Journal = {Berichte zur Wissenschaftsgeschichte}, + Pages = {227–235}, + Title = {'Entdecker' und 'Finder': Über die fotografische Wissensproduktion der Kunstgeschichte}, + Volume = {28}, + Year = {2005}} + +@book{mcluhan_understanding_2015, + Address = {Berkeley}, + Author = {McLuhan, M.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:30:47 +0000}, + Title = {Understanding Media}, + Year = {2015}} + +@article{meyer_die-photographie_1879, + Author = {Meyer, B}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:25:13 +0000}, + Journal = {Westermanns illustrierte deutsche Monatshefte: Ein Familienbuch für das gesamte geistige Leben der Gegenwart}, + Pages = {196–209}, + Title = {Die Photographie im Dienste der Kunstwissenschaft und des Kunstunterrichts}, + Volume = {47}, + Year = {1879}} + +@book{meyer_glasphotogramme_1883, + Address = {Karlsruhe}, + Author = {Meyer, B.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:26:18 +0000}, + Title = {Glasphotogramme für den kunstwissenschaftlichen Unterricht}, + Year = {1883}} + +@article{nelson_the-slide_2000, + Author = {Nelson, R. S.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:30:38 +0000}, + Journal = {Critical Inquiry}, + Number = {3}, + Pages = {414–434}, + Title = {The Slide Lecture, or the Work of Art 'History' in the Age of Mechanical Reproduction}, + Volume = {26}, + Year = {2000}} + +@incollection{papenbrock_der-lehrstuhl_2006, + Address = {Karlsruhe}, + Author = {Papenbrock, M.}, + Booktitle = {Kunst und Architektur in Karlsruhe. Festschrift für Norbert Schneider}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:21:32 +0000}, + Editor = {K. Büttner \& M. Papenbrock}, + Pages = {179–191}, + Title = {Der Lehrstuhl für Kunstgeschichte in Karlsruhe. Ein Rückblick.}, + Year = {2006}} + +@article{Peters2009, + Annote = {urn:nbn:de:0009-23-17785}, + Author = {Peters, D.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:16:37 +0000}, + Journal = {Kunstgeschichte. Open Peer Reviewed Journal}, + Keywords = {Maennig}, + Title = {Fotogeschichte als Teil der kunsthistorischen Wissenschaftsgeschichte}, + Year = {2009}} + +@article{reichle_medienbruche_2002, + Author = {Reichle, I.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:27:01 +0000}, + Journal = {kritische berichte}, + Number = {1}, + Pages = {41–56}, + Title = {Medienbrüche}, + Year = {2002}} + +@incollection{reichle_fotografie_2005, + Address = {Hamburg}, + Author = {Reichle, I.}, + Booktitle = {Sichtbarkeit und Medium. Austausch, Verknüpfung und Differenz naturwissenschaftlicher und ästhetischer Bildstrategien}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:26:11 +0000}, + Editor = {A. Zimmermann}, + Pages = {169–181}, + Title = {Fotografie und Lichtbild. Die 'unsichtbaren' Bildmedien der Kunstgeschichte.}, + Year = {2005}} + +@book{Rogers2003, + Address = {New York}, + Author = {Rogers, E. M.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:18:46 +0000}, + Edition = {3}, + Keywords = {Maennig}, + Title = {Diffusion of Innovations}, + Year = {2003}} + +@incollection{rosler_erlebnisbegriff_2010, + Address = {Berlin}, + Author = {Rößler, J.}, + Booktitle = {In der Mitte Berlins. 200 Jahre Kunstgeschichte an der Humboldt-Universität}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:25:40 +0000}, + Editor = {H. Bredekamp and A. S. Labuda}, + Pages = {69–90}, + Title = {Erlebnisbegriff und Skioptikon. Herman Grimm und die Geisteswissenschaften an der Berliner Universität.}, + Year = {2010}} + +@incollection{ruchatz_the-magic_2000, + Address = {Wiltshire}, + Author = {Ruchatz, J.}, + Booktitle = {Visual Delights. Essays on the Popular and Projected Image in the 19th Century}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:28:26 +0000}, + Editor = {S. Popple and V. Toulmin}, + Pages = {38–49}, + Title = {The Magic Lantern in Connection with Pohotography: Rationalisation and Technology.}, + Year = {2000}} + +@book{ruchatz_licht_2003, + Address = {Munich}, + Author = {Ruchatz, J.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:26:41 +0000}, + Title = {Licht und Wahrheit. Eine Mediumgeschichte der fotografischen Projektion}, + Year = {2003}} + +@book{stoedtner_photo_1925, + Address = {Berlin}, + Author = {Stoedtner, F.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-03-21 15:13:05 +0000}, + Keywords = {Maennig}, + Publisher = {Dr. Franz Stoedtner Verlag}, + Title = {Photo Library of the Kunsthistorisches Institut in Florenz}, + Year = {1925}} + +@book{thurlemann_mehr_2013, + Address = {Munich}, + Author = {Thürlemann, F.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:27:07 +0000}, + Title = {Mehr als ein Bild. Für eine Kunstgeschichte des hyperimage}, + Year = {2013}} + +@book{ullrich_raffinierte_2009, + Address = {Berlin}, + Author = {Ullrich, W.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:27:23 +0000}, + Title = {Raffinierte Kunst : Übung vor Reproduktionen}, + Year = {2009}} + +@incollection{wenk_zeigen_1999, + Address = {Munich}, + Author = {Wenk, S.}, + Booktitle = {Konfigurationen: Zwischen Kunst und Medien}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:27:38 +0000}, + Editor = {S. Schade}, + Pages = {292–305}, + Title = {Zeigen und Schweigen. Der kunsthistorische Diskurs und die Diaprojektion}, + Year = {1999}} + +@book{wyss_der-wille_1996, + Address = {Cologne}, + Author = {Wyss, B.}, + Date-Added = {2018-03-21 15:13:05 +0000}, + Date-Modified = {2018-04-18 10:21:41 +0000}, + Title = {Der Wille zur Kunst}, + Year = {1996}} + +@article{eisenhauer_next_2006, + Author = {Eisenhauer, J. F.}, + Date-Added = {2018-03-21 14:31:43 +0000}, + Date-Modified = {2018-04-18 10:27:16 +0000}, + Journal = {A Journal of Issues and Research}, + Number = {3}, + Pages = {198–214}, + Title = {"Next Slide Please." Studies in Art Education}, + Volume = {47}, + Year = {2006}} + +@article{fawcett_visual_1983, + Author = {Fawcett, T.}, + Date-Added = {2018-03-21 14:31:43 +0000}, + Date-Modified = {2018-04-18 10:30:56 +0000}, + Journal = {Art History}, + Number = {4}, + Pages = {442–460}, + Title = {Visual Facts and the Nineteenth Century Art Lecture}, + Volume = {6}, + Year = {1983}} + +@misc{karlsruhe_GLA52Nokk131, + Annote = {Generallandesarchiv Karlsruhe, sign. no: GLA 52 Nokk 131}, + Date-Added = {2018-03-21 14:31:43 +0000}, + Date-Modified = {2018-03-21 14:31:43 +0000}, + Keywords = {Maennig}} + +@misc{karlsruhe_GLA2354422, + Annote = {Generallandesarchiv Karlsruhe, sign. no: GLA 235/4422}, + Date-Added = {2018-03-21 14:31:43 +0000}, + Date-Modified = {2018-03-21 14:31:43 +0000}, + Keywords = {Maennig}} + +@incollection{grimm_die-umgestaltung_1897, + Address = {Berlin}, + Author = {Grimm, H.}, + Booktitle = {Beiträge zur Deutschen Culturgeschichte}, + Date-Added = {2018-03-21 14:31:43 +0000}, + Date-Modified = {2018-04-18 10:25:24 +0000}, + Editor = {H. Grimm}, + Pages = {276–395}, + Title = {"Die Umgestaltung der Universitätsvorlesungen über Neuere Kunstgeschichte durch die Anwendung des Skioptikons.}, + Year = {1897}} + +@incollection{haffner_die-kunstgeschichte_2007, + Address = {Berlin}, + Author = {Haffner, D.}, + Booktitle = {Bild/Geschichte. Festschrift für Horst Bredekamp}, + Date-Added = {2018-03-21 14:31:43 +0000}, + Date-Modified = {2018-04-18 10:21:56 +0000}, + Editor = {P. Helas, M. Polte, C. Rückert, and B. Uppemkamp}, + Pages = {119–129}, + Title = {'Die Kunstgeschichte ist ein technisches Fach.' Bilder an der Wand, auf dem Schirm und im Netz}, + Year = {2007}} + +@book{hes_der-kunstverlag_1999, + Address = {Munich}, + Author = {Heß, H.}, + Date-Added = {2018-03-21 14:31:43 +0000}, + Date-Modified = {2018-04-18 10:21:15 +0000}, + Title = {Der Kunstverlag Franz Hanfstaengl und die frühe fotografische Kunstreproduktion. Das Kunstwerk und sein Abbild}, + Year = {1999}} + +@incollection{dilly_lichtprojektion._1975, + Address = {Gießen}, + Author = {Dilly, H}, + Booktitle = {Kunstwissenschaft und Kunstvermittlung}, + Date-Added = {2018-03-21 14:26:26 +0000}, + Date-Modified = {2018-04-18 10:26:49 +0000}, + Editor = {I. Below}, + Pages = {153–172}, + Title = {Lichtprojektion. Prothese der Kunstbetrachtung}, + Year = {1975}} + +@article{dilly_bildwerfer._1995, + Author = {Dilly, H.}, + Date-Added = {2018-03-21 14:26:26 +0000}, + Date-Modified = {2018-04-18 10:21:03 +0000}, + Journal = {Rundbrief Fotografie. Sonderheft}, + Pages = {39–44}, + Title = {Bildwerfer. 121 Jahre wissenschaftliche Dia-Projektion." Zwischen Markt und Museum. Beiträge der Tagung „Präsentationsformen von Fotografie“ am 24. und 25. Juni 1994 im Reiß-Museum der Stadt Mannheim}, + Volume = {2}, + Year = {1995}} + +@incollection{dilly_weder_2009, + Address = {Berlin}, + Author = {Dilly, H.}, + Booktitle = {Fotografie als Instrument und Medium der Kunstgeschichte}, + Date-Added = {2018-03-21 14:26:26 +0000}, + Date-Modified = {2018-04-18 10:27:54 +0000}, + Editor = {C. Caraffa}, + Pages = {91–116}, + Title = {Weder Grimm noch Schmarsow, geschweige denn Wölfflin ... Zur jüngsten Diskussion über die Diaprojektion um 1900}, + Year = {2009}} + +@book{_fotografie_2009, + Address = {Berlin}, + Date-Added = {2018-03-21 14:22:25 +0000}, + Date-Modified = {2018-04-18 10:25:55 +0000}, + Editor = {Caraffa, C.}, + Title = {Fotografie als Instrument und Medium der Kunstgeschichte}, + Year = {2009}} + +@incollection{beyrodt_diareihen_1975, + Address = {Gießen}, + Author = {Beyrodt, W.}, + Booktitle = {Kunstwissenschaft und Kunstvermittlung}, + Date-Added = {2018-03-21 14:16:42 +0000}, + Date-Modified = {2018-04-18 10:21:48 +0000}, + Editor = {I. Below}, + Pages = {173–187}, + Title = {Diareihen für den Unterricht}, + Year = {1975}} + +@book{bader_bild-prozesse_2013, + Address = {Munich}, + Author = {Bader, L.}, + Date-Added = {2018-03-21 14:15:18 +0000}, + Date-Modified = {2018-04-18 10:20:54 +0000}, + Title = {Bild-Prozesse im 19. Jahrhundert. Der Holbein-Streit und die Ursprünge der Kunstgeschichte}, + Year = {2013}} + +@article{Anonymous_1975, + journal = {The Photographic Journal}, + Keywords = {Wilder}, + Number = {7}, + url = {https://archive.rps.org/archive/volume-115/745684}, + urldate = {2018-04-25}, + Pages = {308-310}, + Title = {Copying the Collection}, + Volume = {115}, + Year = {1975}} + +@incollection{Daston_2004, + Address = {Ann Arbour}, + Author = {Lorraine Daston}, + Booktitle = {Little Tools of Knowledge. Historical Essays on Academic and Bureaucratic Practices}, + Date-Modified = {2018-04-16 09:15:03 +0000}, + Editor = {Becker, Peter and William Clark}, + Keywords = {Wilder}, + Pages = {259–284}, + Publisher = {University of Michigan Press}, + Title = {Scientific Objectivity with and without Words}, + Year = {2004}} + +@incollection{EdwardsMorton_2017, + Address = {London}, + Author = {Edwards, Elizabeth and Chris Morton}, + Booktitle = {Photographs, Museums, Collections: Between Art and Information}, + Date-Modified = {2018-04-16 09:15:03 +0000}, + Editor = {Elizabeth Edwards and Chris Morton}, + Keywords = {Wilder}, + Pages = {3–23}, + Publisher = {Bloomsbury}, + Title = {Between Art and Information: Towards a Collecting History of Photographs}, + Year = {2015}} + +@incollection{Schwartz_2014, + Address = {Lanham, MD}, + Author = {Schwartz, {Joan M.}}, + Booktitle = {Encyclopedia of Archival Concepts, Principles, and Practices}, + Date-Modified = {2018-04-16 09:15:03 +0000}, + Editor = {Luciana Duranti and Pat Franks}, + Keywords = {Wilder}, + Pages = {270–274}, + Publisher = {Rowman \& Littlefield}, + Title = {Photographic Records/Archives}, + Year = {2014}} + +@incollection{Sekula_2003, + Address = {London}, + Author = {Sekula, Allan}, + Booktitle = {The Photography Reader}, + Date-Modified = {2018-04-16 09:17:39 +0000}, + Editor = {Liz Wells}, + Keywords = {Wilder}, + Pages = {443–452}, + Publisher = {Routledge}, + Title = {Reading an Archive: Photography Between Labour and Capital}, + Year = {2003}} + +@incollection{StulikKaplan_2013, + Address = {Los Angeles}, + Author = {Stulik, Dusan and Art Kaplan}, + Booktitle = {The Atlas of Analytic Signatures of Photographic Processes}, + Date-Modified = {2018-04-16 09:16:45 +0000}, + Keywords = {Wilder}, + Publisher = {Getty Conservation Institute}, + Title = {Silver Gelatin}, + Year = {2013}} + +@incollection{Wilder_2011, + Address = {Berlin}, + Author = {Wilder, Kelley}, + Booktitle = {Photo Archives and the Photographic Memory of Art History}, + Date-Modified = {2018-04-16 09:16:11 +0000}, + Editor = {Caraffa, Costanza}, + Keywords = {Wilder}, + Pages = {369–378}, + Publisher = {Deutscher Kunstverlag}, + Title = {Locating the Photographic Archive of Science}, + Year = {2011}} + +@book{Blodget_1857, + Address = {Philadelphia}, + Author = {Blodget, Lorin}, + Keywords = {Schwartz}, + Publisher = {Lippincott}, + Title = {Climatology of the United States}, + Year = {1857}} + +@book{CliffordMarcus_1986, + Address = {Berkeley and Los Angeles}, + Editor = {Clifford, James and George E. Marcus}, + Keywords = {Schwartz}, + Publisher = {University of California Press}, + Title = {Writing Culture: The Poetics and Politics of Ethnography}, + Year = {1986}} + +@incollection{Hunter_2004, + Address = {Vancouver}, + Author = {Hunter, Aislinn}, + Booktitle = {The Possible Past}, + Keywords = {Schwartz}, + Pages = {ll.12-3}, + Publisher = {Raincoast Books}, + Title = {The Interval}, + Year = {2004}} + +@book{MarcusFischer_1986, + Address = {Chicago}, + Author = {Marcus, George E. and Michael M.J. Fischer}, + Keywords = {Schwartz}, + Publisher = {The University of Chicago Press}, + Title = {Anthropology as Cultural Critique: An Experimental Moment in the Human Sciences}, + Year = {1986}} + +@book{Nye_1994, + Address = {Cambridge, MA}, + Author = {Nye, David E.}, + Keywords = {Schwartz}, + Publisher = {MIT Press}, + Title = {The American Technological Sublime}, + Year = {1994}} + +@incollection{Schlereth_1980, + Address = {Nashville}, + Author = {Schlereth, Thomas J.}, + Booktitle = {Artifacts and the American Past}, + Keywords = {Schwartz}, + Publisher = {AASLH}, + Title = {Mirrors of the Past: Historical Photography and American History}, + Year = {1980}} + +@article{Schwartz_2003, + Author = {Schwartz, Joan M.}, + Journal = {Historical Geography}, + Pages = {105–130}, + Title = {More than 'competent description of an intractably empty landscape': a strategy for critical engagement with historical photographs}, + Volume = {31}, + Year = {2003}} + +@book{Klamm_2016, + Author = {Klamm}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2016}} + +@book{SteberGotto_2014, + Author = {SteberGotto}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2014}} + +@book{Jessen_1896, + Author = {Jessen}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {1896}} + +@book{DerenthalKuhn_2010b, + Author = {DerenthalKuhn}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2010}} + +@book{Hubner:1881xi, + Author = {Hubner}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {1881}} + +@book{Buskirk_2003, + Author = {Buskirk}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2003}} + +@book{Miller_1986, + Author = {Miller}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Material Culture and Mass Consumption}, + Year = {1986}} + +@book{Coupaye_2009, + Author = {Coupaye}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2009}} + +@book{Wright_2004, + Author = {Wright}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2004}} + +@book{Laurenson_2009, + Author = {Laurenson}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2009}} + +@book{Adams_2002, + Author = {Adams}, + Comments = {No candidate found in formatted bibliography}, + Date-Modified = {2018-04-12 11:16:36 +0000}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2002}} + +@book{Dias_1991, + Author = {Dias}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {1991}} + +@book{Lauriere_2015, + Author = {Lauriere}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2015}} + +@book{Mauss_1947, + Author = {Mauss}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {1947}} + +@book{Peltier_2007, + Author = {Peltier}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2007}} + +@book{Preziosi1989, + Author = {Preziosi}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {1989}} + +@book{Bohrer_2011, + Author = {Bohrer}, + Comments = {No candidate found in formatted bibliography}, + Date-Modified = {2018-04-12 11:24:00 +0000}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2011}} + +@book{Goode_1997, + Author = {Goode}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {1997}} + +@book{Baird2011, + Author = {Baird}, + Comments = {No candidate found in formatted bibliography}, + Date-Modified = {2018-04-12 11:16:43 +0000}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2011}} + +@book{Shanks1997, + Author = {Shanks}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {1997}} + +@book{Colla_2007, + Author = {Colla}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {2007}} + +@book{Woelfflin1915, + Author = {Wölfflin}, + Comments = {No candidate found in formatted bibliography}, + Keywords = {FILLMEIN, NOWHERE}, + Title = {Title and other data still missing}, + Year = {1915}} diff --git a/bibformat/4ht/htform.py b/bibformat/4ht/htform.py new file mode 100644 index 0000000..986b05c --- /dev/null +++ b/bibformat/4ht/htform.py @@ -0,0 +1,168 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8; mode: python -*- + +""" +Docstring goes here +""" + +__version__ = "1.0" +__date__ = "20190313" +__author__ = "kthoden@mpiwg-berlin.mpg.de" + +import argparse +import os +import subprocess +import shlex +import logging +import string +from lxml import etree + +logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s - %(message)s') + +NS_MAP = {"x" : 'http://www.w3.org/1999/xhtml'} + +def transform_reference(reference_element, dialect='html'): + """Formatting transformation for reference element""" + + string_from_xml = etree.tostring(reference_element).decode('utf-8') + removed_linebreak = string_from_xml.replace("\n", "") + removed_namespace = removed_linebreak.replace('

', '

') + cleaned_element = etree.fromstring(removed_namespace) + + links = cleaned_element.xpath("a", namespaces=NS_MAP) + for link in links: + link.tag = "tagtobestripped" + + ecti_span = cleaned_element.xpath("span[@class='ecti-1095']", namespaces=NS_MAP) + for ecti in ecti_span: + if dialect == 'tei': + ecti.tag = "hi" + ecti.set("rend", "italic") + else: + ecti.tag = "em" + ecti.attrib.pop('class') + + ectt_span = cleaned_element.xpath("x:span[@class='ectt-1095']", namespaces=NS_MAP) + for ectt in ectt_span: + if dialect == 'tei': + ectt.tag = "hi" + ectt.set("rend", "monospace") + else: + ecti.tag = "code" + ectt.attrib.pop('class') + + etree.strip_tags(cleaned_element, "tagtobestripped") + + return cleaned_element +# def transform_reference ends here + +def write_dummy_latex(citekeys, bibfile, language, tmp_filename): + """Prepare a latex file""" + + translations = {"de" : "german", "en" : "english", "it" : "italian", "fr" : "french"} + + tmp_path_tex = "tmp_files" + os.path.sep + tmp_filename + ".tex" + + allcitekeys = "" + + for key in citekeys: + allcitekeys += """ +\subsection*{%s} +\subsubsection*{authoryear} +\cite{%s} +\subsubsection*{year} +\cite*{%s}\n""" % (key, key, key) + + with open("bibliography4ht.tex", "r") as tmp_template: + template = tmp_template.read() + + fill_in_template = string.Template(template) + substitions = fill_in_template.substitute(language = translations[language], bibfile = '../' + bibfile, citations = allcitekeys) + + with open(tmp_path_tex, "w") as texfile: + texfile.write(substitions) + + logging.info(f"Wrote {tmp_path_tex}") +# def write_dummy_latex ends here + + +def run_htlatex(tmp_filename): + """Create HTML file from temporary LaTeX file""" + + tmp_path_tex = "tmp_files" + os.path.sep + tmp_filename + ".tex" + + command = f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'" + arguments = shlex.split(command) + logging.info("Using external command htlatex with command %s" % command) + subprocess.call(arguments) + + command = f"biber {tmp_filename}" + arguments = shlex.split(command) + logging.info("Using external command biber with command %s" % command) + subprocess.call(arguments) + + command = f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'" + arguments = shlex.split(command) + logging.info("Using external command htlatex with command %s" % command) + subprocess.call(arguments) +# def run_htlatex ends here + + +def main(): + """The main bit""" + + parser = argparse.ArgumentParser() + parser.add_argument("bibfile", help="File that contains the bibliography") + args = parser.parse_args() + + citekeys = ["Edwards_2017", "Riggs:2016aa", "Bruckler:2001aa", "Zdenek:1939aa", "Caraffa_2011", "Uhlikova:2010aa", "Noll:1992aa", "Schwarz:1931aa", "Schwartz_1995", "Faber:2015ab", "Rohacek:2010aa", "Lachnit:2005aa", "Groll:1865aa", "Schlosser:1934aa", "Eitelberger:1863ab", "Wirth:1939aa", "Faber:2015aa", "Trnkova:2015aa", "Trnkova:2010aa", "Frodl:1988aa"] + language = "de" + + tmp_filename = "test" + + if not os.path.exists("tmp_files"): + os.makedirs(os.path.expanduser("tmp_files")) + + write_dummy_latex(citekeys, args.bibfile, language, tmp_filename) + os.chdir(os.path.expanduser("tmp_files")) + run_htlatex(tmp_filename) + os.chdir(os.path.expanduser("..")) + + tmp_path_html = "tmp_files" + os.path.sep + tmp_filename + ".html" + + xml_tree = etree.parse(tmp_path_html) + + # author_year = xml_tree.xpath(f"//x:h4[text() = '{citekey}']/following-sibling::x:p[2]/text()", namespaces=NS_MAP)[0].strip() + # year = xml_tree.xpath(f"//x:h4[text() = '{citekey}']/following-sibling::x:p[4]/text()", namespaces=NS_MAP)[0].strip() + + reference_list = xml_tree.xpath(f"//x:dl[@class='thebibliography']", namespaces=NS_MAP)[0] + entries = reference_list.xpath(f"x:dt", namespaces=NS_MAP) + + reference_div = etree.fromstring("""

""") + + for entry in entries: + entry_citekey = entry.get("id").replace("X0-", "") + reference_string = entry.xpath(f"following-sibling::x:dd[1]/x:p", namespaces=NS_MAP)[0] + formatted_reference = transform_reference(reference_string) + wrapper_div = etree.fromstring(f"""
""") + wrapper_div.append(formatted_reference) + reference_div.append(wrapper_div) + + print(etree.tostring(reference_div)) + + """ +

References

+
+
+

Appadurai, Arjun, ed. (1986). The Social Life of Things: Commodities in Cultural Perspective. Cambridge, UK: Cambridge University Press.

+
+ """ + + # reference = xml_tree.xpath(f"//x:dt[@id='{citekey_id}']/following-sibling::x:dd[1]/x:p", namespaces=NS_MAP)[0] + # formatted_reference = transform_reference(reference) + # print(citekey, author_year, year, etree.tostring(reference), etree.tostring(formatted_reference)) +# def main ends here + +if __name__ == '__main__': + main() +# finis diff --git a/bibformat/4ht/older/fo.4ct b/bibformat/4ht/older/fo.4ct new file mode 100644 index 0000000..fb64459 --- /dev/null +++ b/bibformat/4ht/older/fo.4ct @@ -0,0 +1,64 @@ +\expandafter\ifx\csname doTocEntry\endcsname\relax \expandafter\endinput\fi +\doTocEntry\tocsection{1}{\csname a:TocLink\endcsname{1}{x1-10001}{QQ2-1-1}{Dummy}}{1}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-20001}{QQ2-1-2}{Schwartz_1995}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-30001}{QQ2-1-3}{authoryear}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-40001}{QQ2-1-4}{year}}{1}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-50001}{QQ2-1-5}{Caraffa_2011}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-60001}{QQ2-1-6}{authoryear}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-70001}{QQ2-1-7}{year}}{2}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-80001}{QQ2-1-8}{Trnkova:2015aa}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-90001}{QQ2-1-9}{authoryear}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-100001}{QQ2-1-10}{year}}{2}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-110001}{QQ2-1-11}{Frodl:1988aa}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-120001}{QQ2-1-12}{authoryear}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-130001}{QQ2-1-13}{year}}{3}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-140001}{QQ2-1-14}{Schlosser:1934aa}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-150001}{QQ2-1-15}{authoryear}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-160001}{QQ2-1-16}{year}}{3}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-170001}{QQ2-1-17}{Bruckler:2001aa}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-180001}{QQ2-1-18}{authoryear}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-190001}{QQ2-1-19}{year}}{4}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-200001}{QQ2-1-20}{Lachnit:2005aa}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-210001}{QQ2-1-21}{authoryear}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-220001}{QQ2-1-22}{year}}{4}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-230001}{QQ2-1-23}{Eitelberger:1863ab}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-240001}{QQ2-1-24}{authoryear}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-250001}{QQ2-1-25}{year}}{5}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-260001}{QQ2-1-26}{Faber:2015ab}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-270001}{QQ2-1-27}{authoryear}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-280001}{QQ2-1-28}{year}}{5}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-290001}{QQ2-1-29}{Groll:1865aa}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-300001}{QQ2-1-30}{authoryear}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-310001}{QQ2-1-31}{year}}{6}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-320001}{QQ2-1-32}{Faber:2015aa}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-330001}{QQ2-1-33}{authoryear}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-340001}{QQ2-1-34}{year}}{6}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-350001}{QQ2-1-35}{Noll:1992aa}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-360001}{QQ2-1-36}{authoryear}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-370001}{QQ2-1-37}{year}}{7}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-380001}{QQ2-1-38}{Uhlikova:2010aa}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-390001}{QQ2-1-39}{authoryear}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-400001}{QQ2-1-40}{year}}{7}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-410001}{QQ2-1-41}{Schwarz:1931aa}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-420001}{QQ2-1-42}{authoryear}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-430001}{QQ2-1-43}{year}}{8}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-440001}{QQ2-1-44}{Wirth:1939aa}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-450001}{QQ2-1-45}{authoryear}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-460001}{QQ2-1-46}{year}}{8}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-470001}{QQ2-1-47}{Zdenek:1939aa}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-480001}{QQ2-1-48}{authoryear}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-490001}{QQ2-1-49}{year}}{9}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-500001}{QQ2-1-50}{Edwards_2017}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-510001}{QQ2-1-51}{authoryear}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-520001}{QQ2-1-52}{year}}{9}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-530001}{QQ2-1-53}{Rohacek:2010aa}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-540001}{QQ2-1-54}{authoryear}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-550001}{QQ2-1-55}{year}}{10}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-560001}{QQ2-1-56}{Trnkova:2010aa}}{10}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-570001}{QQ2-1-57}{authoryear}}{10}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-580001}{QQ2-1-58}{year}}{10}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-590001}{QQ2-1-59}{Riggs:2016aa}}{10}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-600001}{QQ2-1-60}{authoryear}}{10}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-610001}{QQ2-1-61}{year}}{11}\relax +\doTocEntry\tocsection{}{\csname a:TocLink\endcsname{1}{x1-620001}{QQ2-1-62}{References}}{11}\relax +\par diff --git a/bibformat/4ht/older/fo.4tc b/bibformat/4ht/older/fo.4tc new file mode 100644 index 0000000..72ccd25 --- /dev/null +++ b/bibformat/4ht/older/fo.4tc @@ -0,0 +1,63 @@ +\expandafter\ifx\csname doTocEntry\endcsname\relax \expandafter\endinput\fi +\doTocEntry\tocsection{1}{\csname a:TocLink\endcsname{1}{x1-10001}{QQ2-1-1}{Dummy}}{1}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-20001}{QQ2-1-2}{Schwartz_1995}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-30001}{QQ2-1-3}{authoryear}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-40001}{QQ2-1-4}{year}}{1}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-50001}{QQ2-1-5}{Caraffa_2011}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-60001}{QQ2-1-6}{authoryear}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-70001}{QQ2-1-7}{year}}{2}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-80001}{QQ2-1-8}{Trnkova:2015aa}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-90001}{QQ2-1-9}{authoryear}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-100001}{QQ2-1-10}{year}}{2}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-110001}{QQ2-1-11}{Frodl:1988aa}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-120001}{QQ2-1-12}{authoryear}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-130001}{QQ2-1-13}{year}}{3}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-140001}{QQ2-1-14}{Schlosser:1934aa}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-150001}{QQ2-1-15}{authoryear}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-160001}{QQ2-1-16}{year}}{3}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-170001}{QQ2-1-17}{Bruckler:2001aa}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-180001}{QQ2-1-18}{authoryear}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-190001}{QQ2-1-19}{year}}{4}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-200001}{QQ2-1-20}{Lachnit:2005aa}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-210001}{QQ2-1-21}{authoryear}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-220001}{QQ2-1-22}{year}}{4}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-230001}{QQ2-1-23}{Eitelberger:1863ab}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-240001}{QQ2-1-24}{authoryear}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-250001}{QQ2-1-25}{year}}{5}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-260001}{QQ2-1-26}{Faber:2015ab}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-270001}{QQ2-1-27}{authoryear}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-280001}{QQ2-1-28}{year}}{5}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-290001}{QQ2-1-29}{Groll:1865aa}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-300001}{QQ2-1-30}{authoryear}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-310001}{QQ2-1-31}{year}}{6}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-320001}{QQ2-1-32}{Faber:2015aa}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-330001}{QQ2-1-33}{authoryear}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-340001}{QQ2-1-34}{year}}{6}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-350001}{QQ2-1-35}{Noll:1992aa}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-360001}{QQ2-1-36}{authoryear}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-370001}{QQ2-1-37}{year}}{7}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-380001}{QQ2-1-38}{Uhlikova:2010aa}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-390001}{QQ2-1-39}{authoryear}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-400001}{QQ2-1-40}{year}}{7}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-410001}{QQ2-1-41}{Schwarz:1931aa}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-420001}{QQ2-1-42}{authoryear}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-430001}{QQ2-1-43}{year}}{8}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-440001}{QQ2-1-44}{Wirth:1939aa}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-450001}{QQ2-1-45}{authoryear}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-460001}{QQ2-1-46}{year}}{8}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-470001}{QQ2-1-47}{Zdenek:1939aa}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-480001}{QQ2-1-48}{authoryear}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-490001}{QQ2-1-49}{year}}{9}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-500001}{QQ2-1-50}{Edwards_2017}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-510001}{QQ2-1-51}{authoryear}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-520001}{QQ2-1-52}{year}}{9}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-530001}{QQ2-1-53}{Rohacek:2010aa}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-540001}{QQ2-1-54}{authoryear}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-550001}{QQ2-1-55}{year}}{10}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-560001}{QQ2-1-56}{Trnkova:2010aa}}{10}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-570001}{QQ2-1-57}{authoryear}}{10}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-580001}{QQ2-1-58}{year}}{10}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-590001}{QQ2-1-59}{Riggs:2016aa}}{10}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-600001}{QQ2-1-60}{authoryear}}{10}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-610001}{QQ2-1-61}{year}}{11}\relax +\doTocEntry\tocsection{}{\csname a:TocLink\endcsname{1}{x1-620001}{QQ2-1-62}{References}}{11}\relax diff --git a/bibformat/4ht/older/fo.aux b/bibformat/4ht/older/fo.aux new file mode 100644 index 0000000..304dba2 --- /dev/null +++ b/bibformat/4ht/older/fo.aux @@ -0,0 +1,210 @@ +\relax +\providecommand*\new@tpo@label[2]{} +\abx@aux@refcontext{nyt/global//global/global} +\ifx\rEfLiNK\UnDef\gdef \rEfLiNK#1#2{#2}\fi +\abx@aux@cite{Schwartz_1995} +\abx@aux@segm{0}{0}{Schwartz_1995} +\abx@aux@segm{0}{0}{Schwartz_1995} +\abx@aux@cite{Caraffa_2011} +\abx@aux@segm{0}{0}{Caraffa_2011} +\abx@aux@segm{0}{0}{Caraffa_2011} +\@writefile{toc}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax } +\@writefile{lof}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax } +\@writefile{lot}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax } +\babel@aux{english}{} +\newlabel{sec:schwartz_1995}{{\rEfLiNK{x1-20001}{1}}{\rEfLiNK{x1-20001}{1}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-30001}{1}}{\rEfLiNK{x1-30001}{1}}} +\abx@aux@page{1}{1} +\newlabel{sec:year}{{\rEfLiNK{x1-40001}{1}}{\rEfLiNK{x1-40001}{1}}} +\abx@aux@page{2}{1} +\newlabel{sec:Caraffa_2011}{{\rEfLiNK{x1-50001}{1}}{\rEfLiNK{x1-50001}{1}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-60001}{1}}{\rEfLiNK{x1-60001}{1}}} +\abx@aux@page{3}{1} +\abx@aux@cite{Trnkova:2015aa} +\abx@aux@segm{0}{0}{Trnkova:2015aa} +\abx@aux@segm{0}{0}{Trnkova:2015aa} +\abx@aux@cite{Frodl:1988aa} +\abx@aux@segm{0}{0}{Frodl:1988aa} +\newlabel{sec:year}{{\rEfLiNK{x1-70001}{1}}{\rEfLiNK{x1-70001}{2}}} +\abx@aux@page{4}{2} +\newlabel{sec:Trnkova:2015aa}{{\rEfLiNK{x1-80001}{1}}{\rEfLiNK{x1-80001}{2}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-90001}{1}}{\rEfLiNK{x1-90001}{2}}} +\abx@aux@page{5}{2} +\newlabel{sec:year}{{\rEfLiNK{x1-100001}{1}}{\rEfLiNK{x1-100001}{2}}} +\abx@aux@page{6}{2} +\newlabel{sec:Frodl:1988aa}{{\rEfLiNK{x1-110001}{1}}{\rEfLiNK{x1-110001}{2}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-120001}{1}}{\rEfLiNK{x1-120001}{2}}} +\abx@aux@page{7}{2} +\abx@aux@segm{0}{0}{Frodl:1988aa} +\abx@aux@cite{Schlosser:1934aa} +\abx@aux@segm{0}{0}{Schlosser:1934aa} +\abx@aux@segm{0}{0}{Schlosser:1934aa} +\abx@aux@cite{Bruckler:2001aa} +\abx@aux@segm{0}{0}{Bruckler:2001aa} +\newlabel{sec:year}{{\rEfLiNK{x1-130001}{1}}{\rEfLiNK{x1-130001}{3}}} +\abx@aux@page{8}{3} +\newlabel{sec:Schlosser:1934aa}{{\rEfLiNK{x1-140001}{1}}{\rEfLiNK{x1-140001}{3}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-150001}{1}}{\rEfLiNK{x1-150001}{3}}} +\abx@aux@page{9}{3} +\newlabel{sec:year}{{\rEfLiNK{x1-160001}{1}}{\rEfLiNK{x1-160001}{3}}} +\abx@aux@page{10}{3} +\newlabel{sec:Bruckler:2001aa}{{\rEfLiNK{x1-170001}{1}}{\rEfLiNK{x1-170001}{3}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-180001}{1}}{\rEfLiNK{x1-180001}{3}}} +\abx@aux@page{11}{3} +\abx@aux@segm{0}{0}{Bruckler:2001aa} +\abx@aux@cite{Lachnit:2005aa} +\abx@aux@segm{0}{0}{Lachnit:2005aa} +\abx@aux@segm{0}{0}{Lachnit:2005aa} +\abx@aux@cite{Eitelberger:1863ab} +\abx@aux@segm{0}{0}{Eitelberger:1863ab} +\newlabel{sec:year}{{\rEfLiNK{x1-190001}{1}}{\rEfLiNK{x1-190001}{4}}} +\abx@aux@page{12}{4} +\newlabel{sec:Lachnit:2005aa}{{\rEfLiNK{x1-200001}{1}}{\rEfLiNK{x1-200001}{4}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-210001}{1}}{\rEfLiNK{x1-210001}{4}}} +\abx@aux@page{13}{4} +\newlabel{sec:year}{{\rEfLiNK{x1-220001}{1}}{\rEfLiNK{x1-220001}{4}}} +\abx@aux@page{14}{4} +\newlabel{sec:Eitelberger:1863ab}{{\rEfLiNK{x1-230001}{1}}{\rEfLiNK{x1-230001}{4}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-240001}{1}}{\rEfLiNK{x1-240001}{4}}} +\abx@aux@page{15}{4} +\abx@aux@segm{0}{0}{Eitelberger:1863ab} +\abx@aux@cite{Faber:2015ab} +\abx@aux@segm{0}{0}{Faber:2015ab} +\abx@aux@segm{0}{0}{Faber:2015ab} +\abx@aux@cite{Groll:1865aa} +\abx@aux@segm{0}{0}{Groll:1865aa} +\newlabel{sec:year}{{\rEfLiNK{x1-250001}{1}}{\rEfLiNK{x1-250001}{5}}} +\abx@aux@page{16}{5} +\newlabel{sec:Faber:2015ab}{{\rEfLiNK{x1-260001}{1}}{\rEfLiNK{x1-260001}{5}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-270001}{1}}{\rEfLiNK{x1-270001}{5}}} +\abx@aux@page{17}{5} +\newlabel{sec:year}{{\rEfLiNK{x1-280001}{1}}{\rEfLiNK{x1-280001}{5}}} +\abx@aux@page{18}{5} +\newlabel{sec:Groll:1865aa}{{\rEfLiNK{x1-290001}{1}}{\rEfLiNK{x1-290001}{5}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-300001}{1}}{\rEfLiNK{x1-300001}{5}}} +\abx@aux@page{19}{5} +\abx@aux@segm{0}{0}{Groll:1865aa} +\abx@aux@cite{Faber:2015aa} +\abx@aux@segm{0}{0}{Faber:2015aa} +\abx@aux@segm{0}{0}{Faber:2015aa} +\abx@aux@cite{Noll:1992aa} +\abx@aux@segm{0}{0}{Noll:1992aa} +\newlabel{sec:year}{{\rEfLiNK{x1-310001}{1}}{\rEfLiNK{x1-310001}{6}}} +\abx@aux@page{20}{6} +\newlabel{sec:Faber:2015aa}{{\rEfLiNK{x1-320001}{1}}{\rEfLiNK{x1-320001}{6}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-330001}{1}}{\rEfLiNK{x1-330001}{6}}} +\abx@aux@page{21}{6} +\newlabel{sec:year}{{\rEfLiNK{x1-340001}{1}}{\rEfLiNK{x1-340001}{6}}} +\abx@aux@page{22}{6} +\newlabel{sec:Noll:1992aa}{{\rEfLiNK{x1-350001}{1}}{\rEfLiNK{x1-350001}{6}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-360001}{1}}{\rEfLiNK{x1-360001}{6}}} +\abx@aux@page{23}{6} +\abx@aux@segm{0}{0}{Noll:1992aa} +\abx@aux@cite{Uhlikova:2010aa} +\abx@aux@segm{0}{0}{Uhlikova:2010aa} +\abx@aux@segm{0}{0}{Uhlikova:2010aa} +\abx@aux@cite{Schwarz:1931aa} +\abx@aux@segm{0}{0}{Schwarz:1931aa} +\newlabel{sec:year}{{\rEfLiNK{x1-370001}{1}}{\rEfLiNK{x1-370001}{7}}} +\abx@aux@page{24}{7} +\newlabel{sec:Uhlikova:2010aa}{{\rEfLiNK{x1-380001}{1}}{\rEfLiNK{x1-380001}{7}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-390001}{1}}{\rEfLiNK{x1-390001}{7}}} +\abx@aux@page{25}{7} +\newlabel{sec:year}{{\rEfLiNK{x1-400001}{1}}{\rEfLiNK{x1-400001}{7}}} +\abx@aux@page{26}{7} +\newlabel{sec:Schwarz:1931aa}{{\rEfLiNK{x1-410001}{1}}{\rEfLiNK{x1-410001}{7}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-420001}{1}}{\rEfLiNK{x1-420001}{7}}} +\abx@aux@page{27}{7} +\abx@aux@segm{0}{0}{Schwarz:1931aa} +\abx@aux@cite{Wirth:1939aa} +\abx@aux@segm{0}{0}{Wirth:1939aa} +\abx@aux@segm{0}{0}{Wirth:1939aa} +\abx@aux@cite{Zdenek:1939aa} +\abx@aux@segm{0}{0}{Zdenek:1939aa} +\newlabel{sec:year}{{\rEfLiNK{x1-430001}{1}}{\rEfLiNK{x1-430001}{8}}} +\abx@aux@page{28}{8} +\newlabel{sec:Wirth:1939aa}{{\rEfLiNK{x1-440001}{1}}{\rEfLiNK{x1-440001}{8}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-450001}{1}}{\rEfLiNK{x1-450001}{8}}} +\abx@aux@page{29}{8} +\newlabel{sec:year}{{\rEfLiNK{x1-460001}{1}}{\rEfLiNK{x1-460001}{8}}} +\abx@aux@page{30}{8} +\newlabel{sec:Zdenek:1939aa}{{\rEfLiNK{x1-470001}{1}}{\rEfLiNK{x1-470001}{8}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-480001}{1}}{\rEfLiNK{x1-480001}{8}}} +\abx@aux@page{31}{8} +\abx@aux@segm{0}{0}{Zdenek:1939aa} +\abx@aux@cite{Edwards_2017} +\abx@aux@segm{0}{0}{Edwards_2017} +\abx@aux@segm{0}{0}{Edwards_2017} +\abx@aux@cite{Rohacek:2010aa} +\abx@aux@segm{0}{0}{Rohacek:2010aa} +\newlabel{sec:year}{{\rEfLiNK{x1-490001}{1}}{\rEfLiNK{x1-490001}{9}}} +\abx@aux@page{32}{9} +\newlabel{sec:Edwards_2017}{{\rEfLiNK{x1-500001}{1}}{\rEfLiNK{x1-500001}{9}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-510001}{1}}{\rEfLiNK{x1-510001}{9}}} +\abx@aux@page{33}{9} +\newlabel{sec:year}{{\rEfLiNK{x1-520001}{1}}{\rEfLiNK{x1-520001}{9}}} +\abx@aux@page{34}{9} +\newlabel{sec:Rohacek:2010aa}{{\rEfLiNK{x1-530001}{1}}{\rEfLiNK{x1-530001}{9}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-540001}{1}}{\rEfLiNK{x1-540001}{9}}} +\abx@aux@page{35}{9} +\abx@aux@segm{0}{0}{Rohacek:2010aa} +\abx@aux@cite{Trnkova:2010aa} +\abx@aux@segm{0}{0}{Trnkova:2010aa} +\abx@aux@segm{0}{0}{Trnkova:2010aa} +\abx@aux@cite{Riggs:2016aa} +\abx@aux@segm{0}{0}{Riggs:2016aa} +\newlabel{sec:year}{{\rEfLiNK{x1-550001}{1}}{\rEfLiNK{x1-550001}{10}}} +\abx@aux@page{36}{10} +\newlabel{sec:Trnkova:2010aa}{{\rEfLiNK{x1-560001}{1}}{\rEfLiNK{x1-560001}{10}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-570001}{1}}{\rEfLiNK{x1-570001}{10}}} +\abx@aux@page{37}{10} +\newlabel{sec:year}{{\rEfLiNK{x1-580001}{1}}{\rEfLiNK{x1-580001}{10}}} +\abx@aux@page{38}{10} +\newlabel{sec:Riggs:2016aa}{{\rEfLiNK{x1-590001}{1}}{\rEfLiNK{x1-590001}{10}}} +\newlabel{sec:authoryear}{{\rEfLiNK{x1-600001}{1}}{\rEfLiNK{x1-600001}{10}}} +\abx@aux@page{39}{10} +\abx@aux@segm{0}{0}{Riggs:2016aa} +\BibFileName[0]{fo.html} +\newlabel{sec:year}{{\rEfLiNK{x1-610001}{1}}{\rEfLiNK{x1-610001}{11}}} +\abx@aux@page{40}{11} +\abx@aux@page{41}{11} +\abx@aux@page{42}{11} +\abx@aux@page{43}{11} +\abx@aux@page{44}{11} +\abx@aux@page{45}{11} +\abx@aux@page{46}{11} +\abx@aux@page{47}{12} +\abx@aux@page{48}{12} +\abx@aux@page{49}{12} +\abx@aux@page{50}{12} +\abx@aux@page{51}{12} +\abx@aux@page{52}{12} +\abx@aux@page{53}{12} +\abx@aux@page{54}{12} +\abx@aux@page{55}{12} +\abx@aux@page{56}{12} +\abx@aux@refcontextdefaultsdone +\abx@aux@defaultrefcontext{0}{Bruckler:2001aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Caraffa_2011}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Edwards_2017}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Eitelberger:1863ab}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Faber:2015ab}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Faber:2015aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Frodl:1988aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Rohacek:2010aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Lachnit:2005aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Noll:1992aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Riggs:2016aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Schlosser:1934aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Schwartz_1995}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Schwarz:1931aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Trnkova:2010aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Trnkova:2015aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Uhlikova:2010aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Groll:1865aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Wirth:1939aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Zdenek:1939aa}{nyt/global//global/global} +\abx@aux@page{57}{13} +\abx@aux@page{58}{13} +\abx@aux@page{59}{13} +\abx@aux@page{60}{13} diff --git a/bibformat/4ht/older/fo.bbl b/bibformat/4ht/older/fo.bbl new file mode 100644 index 0000000..d6b25b7 --- /dev/null +++ b/bibformat/4ht/older/fo.bbl @@ -0,0 +1,671 @@ +% $ biblatex auxiliary file $ +% $ biblatex bbl format version 2.9 $ +% Do not modify the above lines! +% +% This is an auxiliary file used by the 'biblatex' package. +% This file may safely be deleted. It will be recreated by +% biber as required. +% +\begingroup +\makeatletter +\@ifundefined{ver@biblatex.sty} + {\@latex@error + {Missing 'biblatex' package} + {The bibliography requires the 'biblatex' package.} + \aftergroup\endinput} + {} +\endgroup + + +\refsection{0} + \datalist[entry]{nyt/global//global/global} + \entry{Bruckler:2001aa}{book}{} + \name{author}{2}{}{% + {{uniquename=0,uniquepart=base,hash=7a85de160a574a1bc88b5a5339e9254c}{% + family={Brückler}, + familyi={B\bibinitperiod}, + given={Theodor}, + giveni={T\bibinitperiod}, + givenun=0}}% + {{uniquename=0,uniquepart=base,hash=ad286ee93a617b949941c68920a12b77}{% + family={Nimeth}, + familyi={N\bibinitperiod}, + given={Ulrike}, + giveni={U\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Horn}% + } + \list{publisher}{1}{% + {Berger}% + } + \strng{namehash}{74ec18f1252a9f0488d72b7750aed19e} + \strng{fullhash}{74ec18f1252a9f0488d72b7750aed19e} + \strng{bibnamehash}{74ec18f1252a9f0488d72b7750aed19e} + \strng{authorbibnamehash}{74ec18f1252a9f0488d72b7750aed19e} + \strng{authornamehash}{74ec18f1252a9f0488d72b7750aed19e} + \strng{authorfullhash}{74ec18f1252a9f0488d72b7750aed19e} + \field{sortinit}{B} + \field{sortinithash}{276475738cc058478c1677046f857703} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{Personenlexikon zur Österreichischen Denkmlapflege} + \field{volume}{Vol.\ 7} + \field{year}{2001} + \keyw{Trnkova} + \endentry + \entry{Caraffa_2011}{incollection}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=3e90cca5bad3b738057ef2c9a5273a2e}{% + family={Caraffa}, + familyi={C\bibinitperiod}, + given={Costanza}, + giveni={C\bibinitperiod}, + givenun=0}}% + } + \name{editor}{1}{}{% + {{hash=3e90cca5bad3b738057ef2c9a5273a2e}{% + family={Caraffa}, + familyi={C\bibinitperiod}, + given={Costanza}, + giveni={C\bibinitperiod}}}% + } + \list{location}{2}{% + {Berlin}% + {Munich}% + } + \list{publisher}{1}{% + {Deutscher Kunstverlag}% + } + \strng{namehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{fullhash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{bibnamehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{authorbibnamehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{authornamehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{authorfullhash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{editorbibnamehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{editornamehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{editorfullhash}{3e90cca5bad3b738057ef2c9a5273a2e} + \field{sortinit}{C} + \field{sortinithash}{963e9d84a3da2344e8833203de5aed05} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{booktitle}{Photo Archives and the Photographic Memory of Art History} + \field{title}{From Photo Libraries to Photo Archives: On the Epistemological Potential of Art-Historical Photo Collections} + \field{year}{2011} + \field{pages}{11\bibrangedash 44} + \range{pages}{34} + \keyw{Sykora; Trnkova; Caraffa} + \endentry + \entry{Edwards_2017}{article}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=4e87dd56ce5b946ef01a5a37b9b768a5}{% + family={Edwards}, + familyi={E\bibinitperiod}, + given={Elizabeth}, + giveni={E\bibinitperiod}, + givenun=0}}% + } + \strng{namehash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \strng{fullhash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \strng{bibnamehash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \strng{authorbibnamehash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \strng{authornamehash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \strng{authorfullhash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \field{sortinit}{E} + \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{Science Museum Group Journal} + \field{title}{Location, Location: A Polemic of Photographs and Institutional Practices} + \field{volume}{7 (Spring 2017)} + \field{year}{2017} + \verb{doi} + \verb 10.15180/170709 + \endverb + \verb{urlraw} + \verb http://dx.doi.org/10.15180/170709 + \endverb + \verb{url} + \verb http://dx.doi.org/10.15180/170709 + \endverb + \endentry + \entry{Eitelberger:1863ab}{article}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=48018f8c0329575b1d4aa182cf3135fb}{% + family={Eitelberger}, + familyi={E\bibinitperiod}, + given={Rudolf\bibnamedelima von}, + giveni={R\bibinitperiod\bibinitdelim v\bibinitperiod}, + givenun=0}}% + } + \strng{namehash}{48018f8c0329575b1d4aa182cf3135fb} + \strng{fullhash}{48018f8c0329575b1d4aa182cf3135fb} + \strng{bibnamehash}{48018f8c0329575b1d4aa182cf3135fb} + \strng{authorbibnamehash}{48018f8c0329575b1d4aa182cf3135fb} + \strng{authornamehash}{48018f8c0329575b1d4aa182cf3135fb} + \strng{authorfullhash}{48018f8c0329575b1d4aa182cf3135fb} + \field{sortinit}{E} + \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{Zeitschrift fur Fotografie und Stereoskopie} + \field{title}{Der Kupferstich und die Fotografie} + \field{volume}{7} + \field{year}{1863} + \field{pages}{123\bibrangedash 126} + \range{pages}{4} + \keyw{Trnkova} + \endentry + \entry{Faber:2015ab}{incollection}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=78f6e832a8caa38a869ea4f2add57a96}{% + family={Faber}, + familyi={F\bibinitperiod}, + given={Monika}, + giveni={M\bibinitperiod}, + givenun=0}}% + } + \name{editor}{1}{}{% + {{hash=78f6e832a8caa38a869ea4f2add57a96}{% + family={Faber}, + familyi={F\bibinitperiod}, + given={Monika}, + giveni={M\bibinitperiod}}}% + } + \list{location}{1}{% + {Salzburg}% + } + \list{publisher}{1}{% + {Fotohof edition}% + } + \strng{namehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{fullhash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{bibnamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{authorbibnamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{authornamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{authorfullhash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editorbibnamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editornamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editorfullhash}{78f6e832a8caa38a869ea4f2add57a96} + \field{sortinit}{F} + \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72} + \field{extradate}{1} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{booktitle}{Andreas Groll: Wiens erster moderner Fotograf. 1812–1872} + \field{title}{‘… mit aller Kraft auf die Photographie verlegt …’: Annäherungen an das Berufsbild eines frühen Fotografen} + \field{year}{2015} + \field{pages}{27\bibrangedash 95} + \range{pages}{69} + \keyw{Trnkova} + \endentry + \entry{Faber:2015aa}{book}{} + \name{editor}{1}{}{% + {{uniquename=0,uniquepart=base,hash=78f6e832a8caa38a869ea4f2add57a96}{% + family={Faber}, + familyi={F\bibinitperiod}, + given={Monika}, + giveni={M\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Salzburg}% + } + \list{publisher}{1}{% + {Fotohof edition}% + } + \strng{namehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{fullhash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{bibnamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editorbibnamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editornamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editorfullhash}{78f6e832a8caa38a869ea4f2add57a96} + \field{sortinit}{F} + \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72} + \field{extradate}{2} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{editor} + \field{labeltitlesource}{title} + \field{title}{Andreas Groll: Wiens erster moderner Fotograf. 1812–1872} + \field{year}{2015} + \keyw{Trnkova} + \endentry + \entry{Frodl:1988aa}{book}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=032a0bb377c298feabd0b458cae3ab35}{% + family={Frodl}, + familyi={F\bibinitperiod}, + given={Walter}, + giveni={W\bibinitperiod}, + givenun=0}}% + } + \list{location}{3}{% + {Wien}% + {Köln}% + {Graz}% + } + \list{publisher}{1}{% + {Böhlau}% + } + \strng{namehash}{032a0bb377c298feabd0b458cae3ab35} + \strng{fullhash}{032a0bb377c298feabd0b458cae3ab35} + \strng{bibnamehash}{032a0bb377c298feabd0b458cae3ab35} + \strng{authorbibnamehash}{032a0bb377c298feabd0b458cae3ab35} + \strng{authornamehash}{032a0bb377c298feabd0b458cae3ab35} + \strng{authorfullhash}{032a0bb377c298feabd0b458cae3ab35} + \field{sortinit}{F} + \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{Idee und Verwirklichung: Das Werden der staatlichen Denkmalpflege in Österreich} + \field{year}{1988} + \keyw{Trnkova} + \endentry + \entry{Rohacek:2010aa}{book}{} + \name{editor}{2}{}{% + {{uniquename=0,uniquepart=base,hash=621be5baf1c8e09d61033755e7f01278}{% + family={Jiří}, + familyi={J\bibinitperiod}, + given={Roháček}, + giveni={R\bibinitperiod}, + givenun=0}}% + {{uniquename=0,uniquepart=base,hash=e9138635f7e2be25c0020cbbb57344cc}{% + family={Uhlíková}, + familyi={U\bibinitperiod}, + given={Kristina}, + giveni={K\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Prague}% + } + \list{publisher}{1}{% + {Artefactum}% + } + \strng{namehash}{572ef81b176a047f270766cc160df14b} + \strng{fullhash}{572ef81b176a047f270766cc160df14b} + \strng{bibnamehash}{572ef81b176a047f270766cc160df14b} + \strng{editorbibnamehash}{572ef81b176a047f270766cc160df14b} + \strng{editornamehash}{572ef81b176a047f270766cc160df14b} + \strng{editorfullhash}{572ef81b176a047f270766cc160df14b} + \field{sortinit}{J} + \field{sortinithash}{fce5f8d0bd05e8d93f3dbe21c78897ca} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{editor} + \field{labeltitlesource}{title} + \field{title}{Zdeněk Wirth pohledem dnešní doby} + \field{year}{2010} + \keyw{Trnkova} + \endentry + \entry{Lachnit:2005aa}{book}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=d231a3b8f04e9821384b1d7f798b75cb}{% + family={Lachnit}, + familyi={L\bibinitperiod}, + given={Edwin}, + giveni={E\bibinitperiod}, + givenun=0}}% + } + \list{location}{3}{% + {Vienna}% + {Cologne}% + {Weimar}% + } + \list{publisher}{1}{% + {Böhlau}% + } + \strng{namehash}{d231a3b8f04e9821384b1d7f798b75cb} + \strng{fullhash}{d231a3b8f04e9821384b1d7f798b75cb} + \strng{bibnamehash}{d231a3b8f04e9821384b1d7f798b75cb} + \strng{authorbibnamehash}{d231a3b8f04e9821384b1d7f798b75cb} + \strng{authornamehash}{d231a3b8f04e9821384b1d7f798b75cb} + \strng{authorfullhash}{d231a3b8f04e9821384b1d7f798b75cb} + \field{sortinit}{L} + \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{Die Wiener Schule der Kunstgeschichte und die Kunst ihrer Zeit: zum Verhältnis von Methode und Forschungsgegenstand am Beginn der Moderne} + \field{year}{2005} + \keyw{Trnkova} + \endentry + \entry{Noll:1992aa}{book}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=4fdcaec4eebffbaee27e030d4caa45da}{% + family={Noll}, + familyi={N\bibinitperiod}, + given={Jindřich}, + giveni={J\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Prague}% + } + \list{publisher}{1}{% + {Národní galerie}% + } + \strng{namehash}{4fdcaec4eebffbaee27e030d4caa45da} + \strng{fullhash}{4fdcaec4eebffbaee27e030d4caa45da} + \strng{bibnamehash}{4fdcaec4eebffbaee27e030d4caa45da} + \strng{authorbibnamehash}{4fdcaec4eebffbaee27e030d4caa45da} + \strng{authornamehash}{4fdcaec4eebffbaee27e030d4caa45da} + \strng{authorfullhash}{4fdcaec4eebffbaee27e030d4caa45da} + \field{sortinit}{N} + \field{sortinithash}{f7242c3ed3dc50029fca1be76c497c7c} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{Josef Schulz 1840–1917} + \field{year}{1992} + \keyw{Trnkova} + \endentry + \entry{Riggs:2016aa}{article}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=f7a661e69856fc25b02ebc21e88df7eb}{% + family={Riggs}, + familyi={R\bibinitperiod}, + given={Christina}, + giveni={C\bibinitperiod}, + givenun=0}}% + } + \strng{namehash}{f7a661e69856fc25b02ebc21e88df7eb} + \strng{fullhash}{f7a661e69856fc25b02ebc21e88df7eb} + \strng{bibnamehash}{f7a661e69856fc25b02ebc21e88df7eb} + \strng{authorbibnamehash}{f7a661e69856fc25b02ebc21e88df7eb} + \strng{authornamehash}{f7a661e69856fc25b02ebc21e88df7eb} + \strng{authorfullhash}{f7a661e69856fc25b02ebc21e88df7eb} + \field{sortinit}{R} + \field{sortinithash}{da6b42bd3ab22fee61abed031ee405f7} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{History of Photography} + \field{number}{3} + \field{title}{Photography and Antiquity in the Archive, or How Howard Carter Moved the Road to the Valley of the Kings} + \field{volume}{40} + \field{year}{2016} + \field{pages}{267\bibrangedash 282} + \range{pages}{16} + \keyw{Riggs; Trnkova} + \endentry + \entry{Schlosser:1934aa}{article}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=bcd76aa6ec773ded0fe30a93f986c4e2}{% + family={Schlosser}, + familyi={S\bibinitperiod}, + given={Julius\bibnamedelima von}, + giveni={J\bibinitperiod\bibinitdelim v\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Innsbruck}% + } + \strng{namehash}{bcd76aa6ec773ded0fe30a93f986c4e2} + \strng{fullhash}{bcd76aa6ec773ded0fe30a93f986c4e2} + \strng{bibnamehash}{bcd76aa6ec773ded0fe30a93f986c4e2} + \strng{authorbibnamehash}{bcd76aa6ec773ded0fe30a93f986c4e2} + \strng{authornamehash}{bcd76aa6ec773ded0fe30a93f986c4e2} + \strng{authorfullhash}{bcd76aa6ec773ded0fe30a93f986c4e2} + \field{sortinit}{S} + \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{Mitteilungen des Instituts für Österreichische Geschichtsforschung} + \field{number}{2} + \field{title}{Die Wiener Schule der Kunstgeschichte: Rückblick auf ein Säkulum deutscher Gelehrtenarbeit in Österreich} + \field{volume}{13} + \field{year}{1934} + \field{pages}{141\bibrangedash 228} + \range{pages}{88} + \keyw{Trnkova} + \endentry + \entry{Schwartz_1995}{article}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=1b5a7a0921931d3bf8ff71bcf9f60ec3}{% + family={Schwartz}, + familyi={S\bibinitperiod}, + given={Joan\bibnamedelima M.}, + giveni={J\bibinitperiod\bibinitdelim M\bibinitperiod}, + givenun=0}}% + } + \strng{namehash}{1b5a7a0921931d3bf8ff71bcf9f60ec3} + \strng{fullhash}{1b5a7a0921931d3bf8ff71bcf9f60ec3} + \strng{bibnamehash}{1b5a7a0921931d3bf8ff71bcf9f60ec3} + \strng{authorbibnamehash}{1b5a7a0921931d3bf8ff71bcf9f60ec3} + \strng{authornamehash}{1b5a7a0921931d3bf8ff71bcf9f60ec3} + \strng{authorfullhash}{1b5a7a0921931d3bf8ff71bcf9f60ec3} + \field{sortinit}{S} + \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{Archivaria: The Journal of the Association of Canadian Archivists} + \field{title}{‘We Make Our Tools and Our Tools Make Us”: Lessons from Photographs for the Practice, Politics, and Poetics of Diplomatics’} + \field{volume}{40} + \field{year}{1995} + \field{pages}{40\bibrangedash 74} + \range{pages}{35} + \endentry + \entry{Schwarz:1931aa}{book}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=1768879e61711fab6f6895cdbf9057fb}{% + family={Schwarz}, + familyi={S\bibinitperiod}, + given={Heinrich}, + giveni={H\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Leipzig}% + } + \list{publisher}{1}{% + {Insel-Verlag}% + } + \strng{namehash}{1768879e61711fab6f6895cdbf9057fb} + \strng{fullhash}{1768879e61711fab6f6895cdbf9057fb} + \strng{bibnamehash}{1768879e61711fab6f6895cdbf9057fb} + \strng{authorbibnamehash}{1768879e61711fab6f6895cdbf9057fb} + \strng{authornamehash}{1768879e61711fab6f6895cdbf9057fb} + \strng{authorfullhash}{1768879e61711fab6f6895cdbf9057fb} + \field{sortinit}{S} + \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{David Octavius Hill: der Meister der Photographie} + \field{year}{1931} + \keyw{Trnkova} + \endentry + \entry{Trnkova:2010aa}{book}{} + \name{editor}{1}{}{% + {{uniquename=0,uniquepart=base,hash=07b9354b087e0c5a6a19435100eb0d99}{% + family={Trnková}, + familyi={T\bibinitperiod}, + given={Petra}, + giveni={P\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Prague}% + } + \list{publisher}{1}{% + {Artefactum}% + } + \strng{namehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{fullhash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{bibnamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{editorbibnamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{editornamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{editorfullhash}{07b9354b087e0c5a6a19435100eb0d99} + \field{sortinit}{T} + \field{sortinithash}{6f7aff9db9dcfeb7f95fd5bbd2f78df9} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{editor} + \field{labeltitlesource}{title} + \field{title}{Oudadate Pix: Revealing a Photographic Archive} + \field{year}{2010} + \keyw{Trnkova} + \endentry + \entry{Trnkova:2015aa}{incollection}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=07b9354b087e0c5a6a19435100eb0d99}{% + family={Trnková}, + familyi={T\bibinitperiod}, + given={Petra}, + giveni={P\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Salzburg}% + } + \list{publisher}{1}{% + {Fotohof edition}% + } + \strng{namehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{fullhash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{bibnamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{authorbibnamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{authornamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{authorfullhash}{07b9354b087e0c5a6a19435100eb0d99} + \field{sortinit}{T} + \field{sortinithash}{6f7aff9db9dcfeb7f95fd5bbd2f78df9} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{booktitle}{Andreas Groll: Wiens erster moderner Fotograf. 1812–1872} + \field{title}{Archäologischer Frühling: Aufnahmen historischer Baudenkmäler in Böhmen} + \field{year}{2015} + \field{pages}{237\bibrangedash 245} + \range{pages}{9} + \keyw{Trnkova} + \endentry + \entry{Uhlikova:2010aa}{book}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=e9138635f7e2be25c0020cbbb57344cc}{% + family={Uhlíková}, + familyi={U\bibinitperiod}, + given={Kristina}, + giveni={K\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Prague}% + } + \list{publisher}{1}{% + {Národní památkový ústav}% + } + \strng{namehash}{e9138635f7e2be25c0020cbbb57344cc} + \strng{fullhash}{e9138635f7e2be25c0020cbbb57344cc} + \strng{bibnamehash}{e9138635f7e2be25c0020cbbb57344cc} + \strng{authorbibnamehash}{e9138635f7e2be25c0020cbbb57344cc} + \strng{authornamehash}{e9138635f7e2be25c0020cbbb57344cc} + \strng{authorfullhash}{e9138635f7e2be25c0020cbbb57344cc} + \field{sortinit}{U} + \field{sortinithash}{36a2444f5238e0dcf4bb59704df6624d} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{Zdeněk Wirth, první dvě životní etapy (1878–1939)} + \field{year}{2010} + \keyw{Trnkova} + \endentry + \entry{Groll:1865aa}{book}{} + \field{sortinit}{V} + \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labeltitlesource}{title} + \field{title}{Verlags-Catalog von Andreas Groll, Photograph in Wien} + \field{year}{1865 [Vienna 1864]} + \keyw{Trnkova} + \endentry + \entry{Wirth:1939aa}{article}{} + \name{author}{1}{}{% + {{uniquename=2,uniquepart=given,hash=9496236bdf552eb7cac7a0a4c45d46b3}{% + family={Wirth}, + familyi={W\bibinitperiod}, + given={Zdenĕk}, + giveni={Z\bibinitperiod}, + givenun=2}}% + } + \strng{namehash}{9496236bdf552eb7cac7a0a4c45d46b3} + \strng{fullhash}{9496236bdf552eb7cac7a0a4c45d46b3} + \strng{bibnamehash}{9496236bdf552eb7cac7a0a4c45d46b3} + \strng{authorbibnamehash}{9496236bdf552eb7cac7a0a4c45d46b3} + \strng{authornamehash}{9496236bdf552eb7cac7a0a4c45d46b3} + \strng{authorfullhash}{9496236bdf552eb7cac7a0a4c45d46b3} + \field{sortinit}{W} + \field{sortinithash}{ecb89ff85896a47dc313960773ac311d} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{Umění} + \field{title}{První fotograf Prahy} + \field{volume}{12} + \field{year}{1939--1940} + \field{pages}{361\bibrangedash 376} + \range{pages}{16} + \keyw{Trnkova} + \endentry + \entry{Zdenek:1939aa}{book}{} + \name{editor}{1}{}{% + {{uniquename=2,uniquepart=given,hash=22815677c28e6c6da236398fe5e6d224}{% + family={Wirth}, + familyi={W\bibinitperiod}, + given={Zdeněk}, + giveni={Z\bibinitperiod}, + givenun=2}}% + } + \list{location}{1}{% + {Prague}% + } + \list{publisher}{1}{% + {Umělecko-průmyslové museum}% + } + \strng{namehash}{22815677c28e6c6da236398fe5e6d224} + \strng{fullhash}{22815677c28e6c6da236398fe5e6d224} + \strng{bibnamehash}{22815677c28e6c6da236398fe5e6d224} + \strng{editorbibnamehash}{22815677c28e6c6da236398fe5e6d224} + \strng{editornamehash}{22815677c28e6c6da236398fe5e6d224} + \strng{editorfullhash}{22815677c28e6c6da236398fe5e6d224} + \field{sortinit}{W} + \field{sortinithash}{ecb89ff85896a47dc313960773ac311d} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{editor} + \field{labeltitlesource}{title} + \field{title}{Sto let české fotografie 1839–1939} + \field{year}{1939} + \keyw{Trnkova} + \endentry + \enddatalist +\endrefsection +\endinput + diff --git a/bibformat/4ht/older/fo.bcf b/bibformat/4ht/older/fo.bcf new file mode 100644 index 0000000..00f6668 --- /dev/null +++ b/bibformat/4ht/older/fo.bcf @@ -0,0 +1,2058 @@ + + + + + + output_encoding + utf8 + + + input_encoding + utf8 + + + debug + 0 + + + mincrossrefs + 2 + + + minxrefs + 2 + + + sortcase + 1 + + + sortupper + 1 + + + + + + + alphaothers + + + + + labelalpha + 0 + + + labelnamespec + shortauthor + author + shorteditor + editor + translator + + + labeltitle + 0 + + + labeltitlespec + shorttitle + title + maintitle + + + labeltitleyear + 0 + + + labeldateparts + 1 + + + labeldatespec + date + year + eventdate + origdate + urldate + nodate + + + julian + 0 + + + gregorianstart + 1582-10-15 + + + maxalphanames + 3 + + + maxbibnames + 100 + + + maxcitenames + 3 + + + maxitems + 3 + + + minalphanames + 1 + + + minbibnames + 1 + + + mincitenames + 1 + + + minitems + 1 + + + singletitle + 0 + + + sortalphaothers + + + + + sortlocale + english + + + sortingtemplatename + nyt + + + sortsets + 0 + + + uniquelist + 1 + + + uniquename + 2 + + + uniqueprimaryauthor + 0 + + + uniquetitle + 0 + + + uniquebaretitle + 0 + + + uniquework + 0 + + + useprefix + 0 + + + useafterword + 1 + + + useannotator + 1 + + + useauthor + 1 + + + usebookauthor + 1 + + + usecommentator + 1 + + + useeditor + 1 + + + useeditora + 1 + + + useeditorb + 1 + + + useeditorc + 1 + + + useforeword + 1 + + + useholder + 1 + + + useintroduction + 1 + + + usenamea + 1 + + + usenameb + 1 + + + usenamec + 1 + + + usetranslator + 0 + + + useshortauthor + 1 + + + useshorteditor + 1 + + + + + datamodel + labelalphanametemplate + labelalphatemplate + inheritance + translit + uniquenametemplate + sortingnamekeytemplate + sortingtemplate + extradatespec + labelnamespec + labeltitlespec + labeldatespec + controlversion + alphaothers + sortalphaothers + presort + texencoding + bibencoding + sortingtemplatename + sortlocale + language + autolang + backrefsetstyle + block + labeldate + labeltime + dateera + date + time + eventdate + eventtime + origdate + origtime + urldate + urltime + alldatesusetime + alldates + alltimes + gregorianstart + autocite + notetype + refsection + refsegment + citereset + sortlos + babel + datelabel + backrefstyle + arxiv + familyinits + giveninits + prefixinits + suffixinits + useafterword + useannotator + useauthor + usebookauthor + usecommentator + useeditor + useeditora + useeditorb + useeditorc + useforeword + useholder + useintroduction + usenamea + usenameb + usenamec + usetranslator + useshortauthor + useshorteditor + debug + loadfiles + safeinputenc + sortcase + sortupper + terseinits + abbreviate + dateabbrev + clearlang + indexing + sortcites + sortsets + hyperref + backref + pagetracker + citecounter + citetracker + ibidtracker + idemtracker + opcittracker + loccittracker + parentracker + labeldateusetime + datecirca + dateuncertain + dateusetime + eventdateusetime + origdateusetime + urldateusetime + julian + datezeros + timezeros + timezones + seconds + autopunct + punctfont + labelnumber + labelalpha + labeltitle + labeltitleyear + labeldateparts + uniquelist + uniquename + singletitle + uniquetitle + uniquebaretitle + uniquework + uniqueprimaryauthor + defernumbers + locallabelwidth + bibwarn + useprefix + defernums + firstinits + sortfirstinits + sortgiveninits + labelyear + isbn + url + doi + eprint + related + dashed + mergedate + mincrossrefs + minxrefs + maxnames + minnames + maxbibnames + minbibnames + maxcitenames + mincitenames + maxitems + minitems + maxalphanames + minalphanames + maxparens + dateeraauto + + + alphaothers + sortalphaothers + presort + useafterword + useannotator + useauthor + usebookauthor + usecommentator + useeditor + useeditora + useeditorb + useeditorc + useforeword + useholder + useintroduction + usenamea + usenameb + usenamec + usetranslator + useshortauthor + useshorteditor + indexing + labelnumber + labelalpha + labeltitle + labeltitleyear + labeldateparts + uniquelist + uniquename + singletitle + uniquetitle + uniquebaretitle + uniquework + useprefix + skipbib + skipbiblist + skiplab + dataonly + skiplos + labelyear + labelalphatemplate + translit + sortexclusion + sortinclusion + labelnamespec + labeltitlespec + labeldatespec + maxnames + minnames + maxbibnames + minbibnames + maxcitenames + mincitenames + maxitems + minitems + maxalphanames + minalphanames + + + noinherit + nametemplates + labelalphanametemplatename + uniquenametemplatename + sortingnamekeytemplatename + presort + useafterword + useannotator + useauthor + usebookauthor + usecommentator + useeditor + useeditora + useeditorb + useeditorc + useforeword + useholder + useintroduction + usenamea + usenameb + usenamec + usetranslator + useshortauthor + useshorteditor + indexing + uniquelist + uniquename + useprefix + skipbib + skipbiblist + skiplab + dataonly + skiplos + maxnames + minnames + maxbibnames + minbibnames + maxcitenames + mincitenames + maxitems + minitems + maxalphanames + minalphanames + + + nametemplates + sortingnamekeytemplatename + uniquenametemplatename + labelalphanametemplatename + useprefix + + + nametemplates + sortingnamekeytemplatename + uniquenametemplatename + labelalphanametemplatename + useprefix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + prefix + family + + + + + shorthand + label + labelname + labelname + + + year + + + + + + labelyear + year + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + prefix + family + given + + + + + prefix + + + family + + + given + + + suffix + + + prefix + + + mm + + + + sf,sm,sn,pf,pm,pn,pp + family,given,prefix,suffix + boolean,integer,string,xml + + + article + artwork + audio + bibnote + book + bookinbook + booklet + collection + commentary + customa + customb + customc + customd + custome + customf + inbook + incollection + inproceedings + inreference + image + jurisdiction + legal + legislation + letter + manual + misc + movie + music + mvcollection + mvreference + mvproceedings + mvbook + online + patent + performance + periodical + proceedings + reference + report + review + set + software + standard + suppbook + suppcollection + suppperiodical + thesis + unpublished + video + xdata + + + number + volume + volumes + abstract + addendum + annotation + booksubtitle + booktitle + booktitleaddon + chapter + edition + eid + entrysubtype + eprintclass + eprinttype + eventtitle + eventtitleaddon + gender + howpublished + indexsorttitle + indextitle + isan + isbn + ismn + isrn + issn + issue + issuesubtitle + issuetitle + iswc + journalsubtitle + journaltitle + label + langid + langidopts + library + mainsubtitle + maintitle + maintitleaddon + nameaddon + note + origtitle + pagetotal + part + relatedstring + relatedtype + reprinttitle + series + shorthandintro + subtitle + title + titleaddon + usera + userb + userc + userd + usere + userf + venue + version + shorthand + shortjournal + shortseries + shorttitle + sortyear + sorttitle + sortshorthand + sortkey + presort + institution + lista + listb + listc + listd + liste + listf + location + organization + origlocation + origpublisher + publisher + afterword + annotator + author + bookauthor + commentator + editor + editora + editorb + editorc + foreword + holder + introduction + namea + nameb + namec + translator + shortauthor + shorteditor + sortname + authortype + editoratype + editorbtype + editorctype + editortype + bookpagination + nameatype + namebtype + namectype + pagination + pubstate + type + language + origlanguage + crossref + xref + date + endyear + year + month + day + hour + minute + second + timezone + season + endmonth + endday + endhour + endminute + endsecond + endtimezone + endseason + eventdate + eventendyear + eventyear + eventmonth + eventday + eventhour + eventminute + eventsecond + eventtimezone + eventseason + eventendmonth + eventendday + eventendhour + eventendminute + eventendsecond + eventendtimezone + eventendseason + origdate + origendyear + origyear + origmonth + origday + orighour + origminute + origsecond + origtimezone + origseason + origendmonth + origendday + origendhour + origendminute + origendsecond + origendtimezone + origendseason + urldate + urlendyear + urlyear + urlmonth + urlday + urlhour + urlminute + urlsecond + urltimezone + urlseason + urlendmonth + urlendday + urlendhour + urlendminute + urlendsecond + urlendtimezone + urlendseason + doi + eprint + file + verba + verbb + verbc + url + xdata + ids + entryset + related + keywords + options + relatedoptions + pages + execute + + + abstract + annotation + authortype + bookpagination + crossref + day + endday + endhour + endminute + endmonth + endseason + endsecond + endtimezone + endyear + entryset + entrysubtype + execute + file + gender + hour + ids + indextitle + indexsorttitle + isan + ismn + iswc + keywords + label + langid + langidopts + library + lista + listb + listc + listd + liste + listf + minute + month + nameaddon + options + origday + origendday + origendhour + origendminute + origendmonth + origendseason + origendsecond + origendtimezone + origendyear + orighour + origminute + origmonth + origseason + origsecond + origtimezone + origyear + origlocation + origpublisher + origtitle + pagination + presort + related + relatedoptions + relatedstring + relatedtype + season + second + shortauthor + shorteditor + shorthand + shorthandintro + shortjournal + shortseries + shorttitle + sortkey + sortname + sortshorthand + sorttitle + sortyear + timezone + url + urlday + urlendday + urlendhour + urlendminute + urlendmonth + urlendsecond + urlendtimezone + urlendyear + urlhour + urlminute + urlmonth + urlsecond + urltimezone + urlyear + usera + userb + userc + userd + usere + userf + verba + verbb + verbc + xdata + xref + year + + + set + entryset + crossref + + + article + addendum + annotator + author + commentator + doi + editor + editora + editorb + editorc + editortype + editoratype + editorbtype + editorctype + eid + eprint + eprintclass + eprinttype + issn + issue + issuetitle + issuesubtitle + journalsubtitle + journaltitle + language + note + number + origlanguage + pages + pubstate + series + subtitle + title + titleaddon + translator + version + volume + + + bibnote + note + + + book + author + addendum + afterword + annotator + chapter + commentator + doi + edition + editor + editora + editorb + editorc + editortype + editoratype + editorbtype + editorctype + eprint + eprintclass + eprinttype + foreword + introduction + isbn + language + location + maintitle + maintitleaddon + mainsubtitle + note + number + origlanguage + pages + pagetotal + part + publisher + pubstate + series + subtitle + title + titleaddon + translator + volume + volumes + + + mvbook + addendum + afterword + annotator + author + commentator + doi + edition + editor + editora + editorb + editorc + editortype + editoratype + editorbtype + editorctype + eprint + eprintclass + eprinttype + foreword + introduction + isbn + language + location + note + number + origlanguage + pagetotal + publisher + pubstate + series + subtitle + title + titleaddon + translator + volume + volumes + + + inbook + bookinbook + suppbook + addendum + afterword + annotator + author + booktitle + bookauthor + booksubtitle + booktitleaddon + chapter + commentator + doi + edition + editor + editora + editorb + editorc + editortype + editoratype + editorbtype + editorctype + eprint + eprintclass + eprinttype + foreword + introduction + isbn + language + location + mainsubtitle + maintitle + maintitleaddon + note + number + origlanguage + part + publisher + pages + pubstate + series + subtitle + title + titleaddon + translator + volume + volumes + + + booklet + addendum + author + chapter + doi + editor + editortype + eprint + eprintclass + eprinttype + howpublished + language + location + note + pages + pagetotal + pubstate + subtitle + title + titleaddon + type + + + collection + reference + addendum + afterword + annotator + chapter + commentator + doi + edition + editor + editora + editorb + editorc + editortype + editoratype + editorbtype + editorctype + eprint + eprintclass + eprinttype + foreword + introduction + isbn + language + location + mainsubtitle + maintitle + maintitleaddon + note + number + origlanguage + pages + pagetotal + part + publisher + pubstate + series + subtitle + title + titleaddon + translator + volume + volumes + + + mvcollection + mvreference + addendum + afterword + annotator + author + commentator + doi + edition + editor + editora + editorb + editorc + editortype + editoratype + editorbtype + editorctype + eprint + eprintclass + eprinttype + foreword + introduction + isbn + language + location + note + number + origlanguage + publisher + pubstate + subtitle + title + titleaddon + translator + volume + volumes + + + incollection + suppcollection + inreference + addendum + afterword + annotator + author + booksubtitle + booktitle + booktitleaddon + chapter + commentator + doi + edition + editor + editora + editorb + editorc + editortype + editoratype + editorbtype + editorctype + eprint + eprintclass + eprinttype + foreword + introduction + isbn + language + location + mainsubtitle + maintitle + maintitleaddon + note + number + origlanguage + pages + part + publisher + pubstate + series + subtitle + title + titleaddon + translator + volume + volumes + + + manual + addendum + author + chapter + doi + edition + editor + editortype + eprint + eprintclass + eprinttype + isbn + language + location + note + number + organization + pages + pagetotal + publisher + pubstate + series + subtitle + title + titleaddon + type + version + + + misc + addendum + author + doi + editor + editortype + eprint + eprintclass + eprinttype + howpublished + language + location + note + organization + pubstate + subtitle + title + titleaddon + type + version + + + online + addendum + author + editor + editortype + language + note + organization + pubstate + subtitle + title + titleaddon + version + + + patent + addendum + author + doi + eprint + eprintclass + eprinttype + holder + location + note + number + pubstate + subtitle + title + titleaddon + type + version + + + periodical + addendum + doi + editor + editora + editorb + editorc + editortype + editoratype + editorbtype + editorctype + eprint + eprintclass + eprinttype + issn + issue + issuesubtitle + issuetitle + language + note + number + pubstate + season + series + subtitle + title + volume + + + mvproceedings + addendum + doi + editor + editortype + eprint + eprintclass + eprinttype + eventday + eventendday + eventendhour + eventendminute + eventendmonth + eventendseason + eventendsecond + eventendtimezone + eventendyear + eventhour + eventminute + eventmonth + eventseason + eventsecond + eventtimezone + eventyear + eventtitle + eventtitleaddon + isbn + language + location + note + number + organization + pagetotal + publisher + pubstate + series + subtitle + title + titleaddon + venue + volumes + + + proceedings + addendum + chapter + doi + editor + editortype + eprint + eprintclass + eprinttype + eventday + eventendday + eventendhour + eventendminute + eventendmonth + eventendseason + eventendsecond + eventendtimezone + eventendyear + eventhour + eventminute + eventmonth + eventseason + eventsecond + eventtimezone + eventyear + eventtitle + eventtitleaddon + isbn + language + location + mainsubtitle + maintitle + maintitleaddon + note + number + organization + pages + pagetotal + part + publisher + pubstate + series + subtitle + title + titleaddon + venue + volume + volumes + + + inproceedings + addendum + author + booksubtitle + booktitle + booktitleaddon + chapter + doi + editor + editortype + eprint + eprintclass + eprinttype + eventday + eventendday + eventendhour + eventendminute + eventendmonth + eventendseason + eventendsecond + eventendtimezone + eventendyear + eventhour + eventminute + eventmonth + eventseason + eventsecond + eventtimezone + eventyear + eventtitle + eventtitleaddon + isbn + language + location + mainsubtitle + maintitle + maintitleaddon + note + number + organization + pages + part + publisher + pubstate + series + subtitle + title + titleaddon + venue + volume + volumes + + + report + addendum + author + chapter + doi + eprint + eprintclass + eprinttype + institution + isrn + language + location + note + number + pages + pagetotal + pubstate + subtitle + title + titleaddon + type + version + + + thesis + addendum + author + chapter + doi + eprint + eprintclass + eprinttype + institution + language + location + note + pages + pagetotal + pubstate + subtitle + title + titleaddon + type + + + unpublished + addendum + author + eventday + eventendday + eventendhour + eventendminute + eventendmonth + eventendseason + eventendsecond + eventendtimezone + eventendyear + eventhour + eventminute + eventmonth + eventseason + eventsecond + eventtimezone + eventyear + eventtitle + eventtitleaddon + howpublished + language + location + note + pubstate + subtitle + title + titleaddon + type + venue + + + article + book + inbook + bookinbook + suppbook + booklet + collection + incollection + suppcollection + manual + misc + mvbook + mvcollection + online + patent + periodical + suppperiodical + proceedings + inproceedings + reference + inreference + report + set + thesis + unpublished + + + date + year + + + + + set + + entryset + crossref + + + + article + + author + journaltitle + title + + + + book + mvbook + mvcollection + mvreference + + author + title + + + + inbook + bookinbook + suppbook + + author + title + booktitle + + + + booklet + + + author + editor + + title + + + + collection + reference + + editor + title + + + + incollection + suppcollection + inreference + + author + editor + title + booktitle + + + + manual + + title + + + + misc + + title + + + + online + + title + url + + + + patent + + author + title + number + + + + periodical + + editor + title + + + + proceedings + mvproceedings + + editor + title + + + + inproceedings + + author + title + booktitle + + + + report + + author + title + type + institution + + + + thesis + + author + title + type + institution + + + + unpublished + + author + title + + + + + isbn + + + issn + + + ismn + + + date + eventdate + origdate + urldate + + + gender + + + + + + + fo.bib + + + Schwartz_1995 + Schwartz_1995 + Caraffa_2011 + Caraffa_2011 + Trnkova:2015aa + Trnkova:2015aa + Frodl:1988aa + Frodl:1988aa + Schlosser:1934aa + Schlosser:1934aa + Bruckler:2001aa + Bruckler:2001aa + Lachnit:2005aa + Lachnit:2005aa + Eitelberger:1863ab + Eitelberger:1863ab + Faber:2015ab + Faber:2015ab + Groll:1865aa + Groll:1865aa + Faber:2015aa + Faber:2015aa + Noll:1992aa + Noll:1992aa + Uhlikova:2010aa + Uhlikova:2010aa + Schwarz:1931aa + Schwarz:1931aa + Wirth:1939aa + Wirth:1939aa + Zdenek:1939aa + Zdenek:1939aa + Edwards_2017 + Edwards_2017 + Rohacek:2010aa + Rohacek:2010aa + Trnkova:2010aa + Trnkova:2010aa + Riggs:2016aa + Riggs:2016aa + + + + + presort + + + sortkey + + + sortname + author + editor + translator + sorttitle + title + + + sortyear + year + + + sorttitle + title + + + volume + 0 + + + + + + diff --git a/bibformat/4ht/older/fo.css b/bibformat/4ht/older/fo.css new file mode 100644 index 0000000..24a50f9 --- /dev/null +++ b/bibformat/4ht/older/fo.css @@ -0,0 +1,124 @@ + +/* start css.sty */ +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ecti-1095{ font-style: italic;} +.ecti-1095{ font-style: italic;} +.ecti-1095{ font-style: italic;} +.eccc1095-{font-size:90%;} +.small-caps{font-variant: small-caps; } +p.noindent { text-indent: 0em } +td p.noindent { text-indent: 0em; margin-top:0em; } +p.nopar { text-indent: 0em; } +p.indent{ text-indent: 1.5em } +@media print {div.crosslinks {visibility:hidden;}} +a img { border-top: 0; border-left: 0; border-right: 0; } +center { margin-top:1em; margin-bottom:1em; } +td center { margin-top:0em; margin-bottom:0em; } +.Canvas { position:relative; } +img.math{vertical-align:middle;} +li p.indent { text-indent: 0em } +li p:first-child{ margin-top:0em; } +li p:last-child, li div:last-child { margin-bottom:0.5em; } +li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } +.enumerate1 {list-style-type:decimal;} +.enumerate2 {list-style-type:lower-alpha;} +.enumerate3 {list-style-type:lower-roman;} +.enumerate4 {list-style-type:upper-alpha;} +div.newtheorem { margin-bottom: 2em; margin-top: 2em;} +.obeylines-h,.obeylines-v {white-space: nowrap; } +div.obeylines-v p { margin-top:0; margin-bottom:0; } +.overline{ text-decoration:overline; } +.overline img{ border-top: 1px solid black; } +td.displaylines {text-align:center; white-space:nowrap;} +.centerline {text-align:center;} +.rightline {text-align:right;} +div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } +.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.fbox {display:table} +div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.minipage{width:100%;} +div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} +div.center div {text-align: left;} +div.flushright, div.flushright div.flushright {text-align: right;} +div.flushright div {text-align: left;} +div.flushleft {text-align: left;} +.underline{ text-decoration:underline; } +.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } +.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +.framebox-c {text-align:center;} +.framebox-l {text-align:left;} +.framebox-r {text-align:right;} +span.thank-mark{ vertical-align: super } +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } +table.tabular td p{margin-top:0em;} +table.tabular {margin-left: auto; margin-right: auto;} +td p:first-child{ margin-top:0em; } +td p:last-child{ margin-bottom:0em; } +div.td00{ margin-left:0pt; margin-right:0pt; } +div.td01{ margin-left:0pt; margin-right:5pt; } +div.td10{ margin-left:5pt; margin-right:0pt; } +div.td11{ margin-left:5pt; margin-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +td.td00{ padding-left:0pt; padding-right:0pt; } +td.td01{ padding-left:0pt; padding-right:5pt; } +td.td10{ padding-left:5pt; padding-right:0pt; } +td.td11{ padding-left:5pt; padding-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +.hline hr, .cline hr{ height : 1px; margin:0px; } +.tabbing-right {text-align:right;} +span.TEX {letter-spacing: -0.125em; } +span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} +a span.TEX span.E {text-decoration: none; } +span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} +span.LATEX span.TEX{ position:relative; left: -0.4em; } +div.float, div.figure {margin-left: auto; margin-right: auto;} +div.float img {text-align:center;} +div.figure img {text-align:center;} +.marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} +.marginpar p{margin-top:0.4em; margin-bottom:0.4em;} +table.equation {width:100%;} +.equation td{text-align:center; } +td.equation { margin-top:1em; margin-bottom:1em; } +td.equation-label { width:5%; text-align:center; } +td.eqnarray4 { width:5%; white-space: normal; } +td.eqnarray2 { width:5%; } +table.eqnarray-star, table.eqnarray {width:100%;} +div.eqnarray{text-align:center;} +div.array {text-align:center;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.pmatrix img{vertical-align:middle;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.bar-css {text-decoration:overline;} +img.cdots{vertical-align:middle;} +.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} +.index-item, .index-subitem, .index-subsubitem {display:block} +div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} +div.caption span.id{font-weight: bold; white-space: nowrap; } +h1.partHead{text-align: center} +p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} +.subparagraphHead, .likesubparagraphHead { font-weight: bold;} +.quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} +.verse{white-space:nowrap; margin-left:2em} +div.maketitle {text-align:center;} +h2.titleHead{text-align:center;} +div.maketitle{ margin-bottom: 2em; } +div.author, div.date {text-align:center;} +div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } +div.author{white-space: nowrap;} +.quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } +.abstract p {margin-left:5%; margin-right:5%;} +div.abstract {width:100%;} +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +dt.printshorthands{float:left; clear:left; margin-right:1em;} +dd.thebibliography { text-indent: -2em; margin-left: 2em;} +dd.thebibliography p:first-child{ text-indent: -2em; } +dt.thebibliography{float:left; clear:left; margin-right:1em;} +/* end css.sty */ + diff --git a/bibformat/4ht/older/fo.dvi b/bibformat/4ht/older/fo.dvi new file mode 100644 index 0000000000000000000000000000000000000000..29ed40edb92679c98ab093225f6d771434c01fd8 GIT binary patch literal 34460 zcmchAeUKaHc^}QYvqsF~Hpib>u9hsDNlrz8Bsrd8M9m3BAFrw)S##qPk6IHk{9BE!#vUzAOpMP@%uZ2>`H4h( z)~h8?%u>%sEVGCzdYNvLt{iqe=R0s`N_L{EFjWZc5 zy0%m+RKXElWlg8rDX-~ta5xkAv#N@&$BIhb5=N75PkNQI6SIvj1E@v=N@YR{Dyz_# zpU83v6UTDsqEVOJp;qiN%CJB1sZpPw$hBp+VcBDDw`{CfU0f9^FviM>cHXO!3=9D6 zgK`~1HkEp1EmSqx5v3d)J5|+eaH|-qm2M}!4l#J20#L0*LobEuWchRg3uIz}s5Aj0 zd)Lpkvu>YBk1w9mQT?*6)ngUI4ECE$@F|aelf<0HVg&0K=O>a~ZX|=;U?S?N3CT29 z?1{(E88!QPAj|Rb^!SN_6z>*aFXOA&iehR?4Rfgb1x^0*G%m5WoM6=%TOey*s+zu5C^mqyE9ypjIz$E^1(Ct^z^%x8 zmH0b!%fP@#f40*t5!;LYjrR3WcRh(^%FvTy$z_6{FB|O~Z;cc7mDhJrP-QM zE10UT*bu;sbmWFsvMYs0pUN3%El zlZiOYOd^rYC$i}*J@tH(@!8NgrxJqi(AMSiMtedKGz?L^s@RqF71gvgU}a1+5KwQi zu&%)i*vVyx3oTROLRm8{8+_IDl1~d=7vWs6Jj|$Dd{ROKu<3>FtF9uuikl#(fH35V zKszrrbfF$=s{WE8zUxpEY>Js5*F%b{wMJDn6HyIB0jw{<#z9C5h%<4fvhlIP*3`W!YP(KuI8u zWC>m@V(^e8vx}~2ld49|U}Er-*O7@Z48qPCxCW|X7BC|!#DXQEmw0*6fF-UgrIJ=# ziZQ57#S?W@^4@U=*?lR76RZ?>vI_#2r9>QI40ZG~LPs0W`cw`Qj^!Em+s%kZ@t}LnR9O~sn;!(&;4V2>aO%lAhY9W3U)yuWQo%z71 z7fm?lI=$Iw$9i@{P5U&C8A=qt6ewQS8&-w2$0_SRGwOs#ABCP$ionUF(rGS|0v1EK zGrCiShS-x{7N&UfzY}AG0ig30>DDvCAmg2Hd=TJT04an5en&^<%KCA!!Lq4TRm_Z7 zaZ-wR9(3`6+^-*v?unMU+j-H)J9j1o(4|YMuP|{QdLiZry6s{d!VL3-F3N<0nz&t2 zYRfTjZh2h_xD*lsJb0rU?W({+R;g?lcFlm%pn6m+PF=C$R?*au_>g*(Q+kzLcS8eY zP6|0pK6IxG-I107P#U^ohNhqU-Z#$R{A1RMdmVo5=(r-H3&fzy>rbK_%DP*NwZkT@ zXqWxvy|Qf1OG?8wIxxUzJ%6{+_H~I)cJsOt0z-%>!Bq;n0f?0A#=axqwn$kM!Vo+e4KO92M#?fs>{c4T?}Zqy6%udb%~F@x~!o0#wWjU-C(~x z>i+0i$&zWFF{m(4se&mTFS;MsB_2>o1;TZ2;uI3}*>5RnelC(z!-nmf{p<}8QJgRg zh^{R>2Y*|&5nVG!7u5?=ED@KJZa{KDkaVX8`>+7chk{=ZR#s=2a-pR}TApV3z|ubM zK!JFKvD7HPc`S{GG(`eD*}@Pt zL+;G!;NXO&(MQk5If!{J`Xe@O`V9pz&pv8P4HHhXJFj`o9pEqM_LOxr#dEuY#p+l> z5iN!8ST49%`P;&15h_!bn`N@OhnFN9!+I=mZQ+@89z+xAp6YR***6SN>LC{MHUz15 z92an3jH3j4{HBEq&gEby#3gBNwBIKTh+7=>g$9eA5WBG)jO(_F?peH3#x9ADfahul zmkYY(J77=46i}ifJlqh>L}q zVw8rN!V-s=E02mCp{{vdMDRjgfBfq)j+aDUfE)_{%K$e;ca8MU>!k-b{q7nSW@GVT zQ%9eJ?beabF*O8hy_ET9#gS5A74H=Hi9Y1ldBrGp4)}F^Edh%49z%?#4)$+YerF0U`*W4_@rygs`!ogjLc9?jk)$PtT50H7_yiC*u2wAj1p45e#Fc- zw@4y8Ig;fNYU84+SPrB-d(v+%d976gnh|=zY&c?IeN7le2u1iHD!tP zz0g1~)-k{xj&bKkAS@C0y<&V35uQ7eL8bbIhGlEzHB3{{x1l7Kg}jN7JoIvhZjY>a z@WSuDkv>+HW!2VfJtDIv;!-6UXC;GL*MZY1ff2s8J0fxU!S$@O{=>4OQ~@R)3vt|) zDIs;-8;Cy?=!V73mWbJG?s;m!S=&Jt+89vCkuBuD87)K<+!ZOs{Dwy6|tO8tuRr7^kBTzi=t zAg{LHVfis97JRU1$Jssv3$iC!maKK|6>>51Or%ew-N~`hUJ%$_Dj|uY0`7Fp;LFxQ zEQ-LqjkcIe=+R6dG2p{D-ev&m?I0xsjOo>T_U*gXzJ~@jUpC^f*zKR9hdJrU)JX}C zajd0CC#QIkS+@vt&gW(yTdnGpKC)oN=EmiCVq8*dMT2tBbK?!H$mYhS$L6IY?QgIq zXCFEH%$aK+xV#|ICKu`Qv!^dUaYh=CO-)@-otc_Cd+n_B+=XkGE=p)gx@IahzWAu< zQ&S61V_xnSCS{ z+hhG$j2hr;I&-s(dJMgWtt8^H8a>z*?|kno z7fSn%yp>}A4yi@6Dkt)pJF9Nx*y`=(Jue;VN&&Un_j0Z>pqy{NlRr)IM|69Uzo@FV z0*2f57<_eYWp4ZoAOtJUv1?c!8<&dwiElfZqM>1d0Sl~_YR|bMoT5QIEwolcI(2S* zNv+YM8+J2v8^OjZD35epV2j;YVuFGm{y@s<~Nsjmr|2W#`7(qM}t%ReM~brA3!zm?Ps- z#Z=34<9v3w^Yfz5cua19o`m^_a>eIKHN8Y^Hewcq*NqM_J zEVW1;B3Z%ldGBj-=ez<;*Z|_?@p-v9_QD&UPVn7K&5_ra+wbO$Dwsc7X>NQ~jv;PL z$Y_skIGdZDQs&P#s?|^a&TDJ!BfRibB{hHh^;aMMx!bS)1mOdVN9KsddR)q8z|Gmt z<{)o(+PH)&w>pj1>4}YsExthQ(;m^}mBZih4=zk5T=W2$SBtOw&TAFth6CsS=JS|n znJ&R;^!Klh{l#&R;HNe>7_}_y2DOe}quS^_$h|6JCN#n` zhzx#Oc^-R5<*rmo10fZ^Aaap%?M>rd2qGIIvw!u=Md}M5D(M}K_V(+yZ~rRok=?)B z{#f_>lMx$WznmIpxVM9NbCD`Cbk zYC^SB>7Z)6@EagF64-_>nXvmafOgA~&?pX^Yj-N$!>tXBI}*o+Kkl$U6@jz?5+h-f zq}!)LCI_^ydsfJ>=X2U@kV-D=&_@899Ms1!)FvYlZ1_S6yD_NpL#&n=~v_B|L{HMEs;$$Su4WGwhkE=f@PDP?9XIF$f?4LfV z0qyo)HJ@yDz>&JBFf6WVHYt9T9~>Yz65oa{mt@#48bJ3`k;vH{HurZEz5Lz4s3S3M z_@gF4`Lk7h!EibfK}oiK!f<*(GrMPH40}HdSVq+s;qj{G5_tx>Y)V=52WDX;PDcXV z@Z}PAWd_j3bR?Yl$IToA484Q3WBp-m_JenUwV6m98$K7q&Q*U{n~8);(v&{cJ2Rl+ z-m`j#T`3mZC|tjJ)*+zWJ>A|+B!~@PGGWhX0R7HH0;D)_jcHOKAuH{U+_=Qy^dELpKL3eHv=TW`Pcf0i~!-ke)8YR;)oe&vU? zlG##QishU)TZZ1;cl&;Q(z#qQY@@Ygws3~q(Q3|hO|3OYSL{2)Qu3ca^nSdlDGr{~ zAMPOff&LJE=J)Ob(SKyiAz{Tzg}t=?5Pdolj3fBhmpeT@phvJ*h);#xG!f}`N-Xt$R7qn5u)V|`;Len#xU$< z^{?5;bZqib5f3ky5UPD?9U9KxpE``ilgS(oa!c$5A}!5=MU~3 zo0D=R?hT)ZVgITxY);CNuu6K;r)nn$G~jzy?XWX-UBl*L(&>C(fSioPx#5c>>=O;3 z*2zdz{2(rF3t+A+XE-8L=*KwX5J!&6`SkAin~Vgv;j<*{ef5RE$w=rFhS?Vgrv^00 zd)CyjuS9ZFmwT#eDCv<*MWWj9g%Wmn2GG+~B*yjB)6>25wBs-z?hlkN{>EK^aw-z= zhR@lsOV%GKrz7!{^u13|P7i3o_p0gya{;Gnp>zYw+KO4SXy4|ve<`J>qnwU}yP-=Z z6ZVe=(D!sCT6PERCL*SHb$!#3xHkMzhn=jxpf?i8nXlX0ehY~Vb9FJZMU;$IW&uU;(0a_CWkMeu&Xt| zM9M}&uz&oa*)w34V>%K?htH6(L)RD7Pe-Ek017)jpdsJ0!iIgTE85bMML?eohJshRjcbZ(+R=Aru&^}d-Xw_ za^wdBy>o{+BFGL1KEh8qlyvXNUEp9fjwDWL(CsH9B0`9`Bsu=o}NJL#gB5 zSa5Q(b8J$XkKT&wc(A!s3D(?n+__+wwSse+?PrUlt&lSC z7v2%nQpr^hcKyWMY^fuAI+9i{^W%3rN-$FJ$sMZ=BzS&4ZnAmE`K>bs?iZ@vRJIO% z;!W^gCf*$LqbXP4^>bzE$$Rt?=)qWhn>MqdB+WjeWqquh?IDSFE&w@#UM>;j76BsGe(_=b!# zSOw(Ah^=_*iCO{Z{D<4@tLDg?pQ7CyOw17SifZB2r=d)4pXhySWTMInZ<4G{2YWlT zV(StJG1t&#b7VqiP1r5o@!FmE*8cBS7E1Bv{_p&YMMT_doBO|$^;qL@cEwvz1Dvcz znGEUfrAAF-dv6OJ9c$PY^v2k z2ao>Msm+7;|I^FZj-yt!q65*ODw7<$ox*auVtoR<)a(YGELZgA!SDV0WxC=+1G=M= z_SE*(BKGMNY15CodGOo+?oz{28&$T|r%`vFG#VyVJACAC?@Vu^^6{&5qs9`p#B(a! zQ*S-=m8XAsP25>jEYi-Rua^w%jwfLm*YIWJTw+R|PE05A3`4%&F!ehHC-}=Kx7uS2 zL2vU*)#he#mYpN1d(A*;HIAm)EdzmOJ3>OsfZ1DbJ@DO?->QhD**1~(Z+C6!_RIV3 zeDyB`oW3)N0^9mlXTkN>|bjgq04n`4jt`xR)Y zQQI7QZ2LI2Bc;fyoSr+Yn$A;=I(!2tRIydrLP6Yt=ae+H#ZV6$!k~S}R91TXgQ|u} zjk}A>c603c&z2jeJKItAG*q+o6l|p3QW|9@jV=&qsvM1hEm%aedBW_><0v_H_8@%&!^N<>DGCt9Cfe;{)8jw zNLj7Lo1?#(BLg-1xgTu1y9~MP6{|V=#}Ax09e1xGiu~vEw7t-B6^IlNiZb#Mt;#kl z;)iW;Hwm@R^ongtEXSK8iY({km?*E&hgtkU!&-x@Z`(-Af7MD${YB*df&C%HfPcRO7 z6cEhl?0*ymgXTNT?m`6IOPA%ZFS{&{-*)qR_x2NC?%Vg__2>w5@BZjH)94&a-huDz zzJo}KP47_Cy-1~BiQQqUYx3jLlg-1{z1IN>m>|u=wbpSu77Gy`zVS=jPn1+{ ztl1@o;@Al62bn}dj4%Kb#R`ugNL?nKr-G%=adgx19l46fe{F!fo1=eS zf67DzfqR&oy(Zs@21_l$nH>GW!vq-#LX01-ZSS=Bx;6Hmm)ItO=Gc2aS|`{yD!K~D zsJ2QqHAr`sCpyEniI2y{jFPd4aD;+WIJipAoTZjHYDUullPP>#O*Cs#4Q8H3>} zP;j-R!ZpKOv{lD*;n;getMD{{=d6(z2NU=!pSszoZjSuQ&%A$&fks&6xSycgHO+G9 z;J_usGX|v$O1z76EyF~gKpAVv1q{#uEkxt*RjTkMTDT9aMrOmgWB_?!)0xvv%;84~ zCP}ymaE+y!%HiQUr6E-O;*U8zkYK+6B!Yynjd({X@}KPMm3YEUdBcJTB8KtdNnExX zoG9)x8xO7>V1GV&BJONIX;^BRd~Bu#H*q2(oxsK%dD=f+o(?qU-HXCaOVsRhmJ~Rk znmWi73pwXv-h4-1Me}%w**!)LCfBk5aR%WFgU8L$W4}b;mZb^y@O;<7MxeAtmI|eR z@l>s4Yq)jKZmr=&481{cN4cIBvMnu@wP=|1{({lEfecyeMhkfW7r&4zfzjR?d*>^c z45WIH{wTFjzjeh>O3kr%{u)l(&?C#dk<(8J8TRHW#N&Y9vHSnSwwsk{j-{62td6CA zA&|^jYaTc#-AN~or%rf2e=<9LG?_~dB0hGjw>U$fSH3GP_9((3=IQvxOHLH{{@Z`@ zWJA{)*4F56-?QQv%r8o%NtU1g4PYe-9N}2mx>|H94xo|%s0)=2uoCZW6|u!hvl1eEsgldSiob#%#R-g^I z$DEy+M3|@50@0h_v4USkb)g06jqOVsegi?%S-{pDyZTT`wKm7DzS~O#AxsNW;|{=kiT>90NkT) z4KaZyZ0fadLb-lF{Up4p&CzfE+$AW~H@`=?%M9@!y!#{9x5z*_my~6S!kuRtrgN=D zuDYQk%KhdQ@^O7HJ4K(h?uWAd{;e#U`oRx?^A3T7m)ZkW z5B~0DO5*4UR*T3qjz0LWsV`&<>5w_S!>bP%W#_C`*YP8E^yYma|DpR>sMkpn)6au? zP;sroe0(=2h@>O+>6`+66ju~AmaC-K_@zSyKLX5851K7XHUmb{vLm^UF9oQPFe`EWsvZ9qXN51sT zGesL88H?AyuF4?;*1q`IUF`x?2)%a%$4=E2?9+2TII5%;woVJs8I@IVvHt}Nb92RA_S!U5oV2w?DTTEb~iyabJ6ts9bLnoPnw}sz}_cB@c z^_R(7{?j33vO=rs>`+->Q=KQX*zb?@if@LQ&Dwh&;=q^wo0rXK9{AmldUOB4S93e& zA~p|v@lRPUVzPPQD+lZ5N@S!{S_!D5Ec4Ce%>!Tj@4>I87g*w4TfwjB1-|q4Jp!(j z`WoW2+;k4{SSo*_6Y#nqL%Orau&l0xClAk~*b%4Z&hc~#?dJ&+eD0LHOF(f}1~D$7 zKu^4NVUH*`#C+TEFF&B=vheK(C+>=8OgY^{8++v05Ytb5s*qy#Oz^pc9mX7;} zg8<|9O4w6%*baoae^;FMdk5Gjgq>YF?$W0nW-M{~6KuNxe(_<7?%AJj^XFOi>jwB8 z05Y|Ivv1!^pL@s0Ufw=7Lk4%`d;34}nOpDp%qe}}*uMLsHZVk8nG&_DAnIow{&wHK MfBdfff5!j*KQRm7od5s; literal 0 HcmV?d00001 diff --git a/bibformat/4ht/older/fo.ent b/bibformat/4ht/older/fo.ent new file mode 100644 index 0000000..7515c6d --- /dev/null +++ b/bibformat/4ht/older/fo.ent @@ -0,0 +1,3 @@ + + + diff --git a/bibformat/4ht/older/fo.html b/bibformat/4ht/older/fo.html new file mode 100644 index 0000000..5d1293d --- /dev/null +++ b/bibformat/4ht/older/fo.html @@ -0,0 +1,483 @@ + + + + + + + + + + + + +

1 Dummy

+

+

+

Schwartz_1995

+

+

+
authoryear
+

Schwartz 1995 +

+

+
year
+

1995 +

+

+

Caraffa_2011

+

+

+
authoryear
+

Caraffa 2011 + +

+

+
year
+

2011 +

+

+

Trnkova:2015aa

+

+

+
authoryear
+

Trnková 2015 +

+

+
year
+

2015 +

+

+

Frodl:1988aa

+

+

+
authoryear
+

Frodl 1988 + +

+

+
year
+

1988 +

+

+

Schlosser:1934aa

+

+

+
authoryear
+

Schlosser 1934 +

+

+
year
+

1934 +

+

+

Bruckler:2001aa

+

+

+
authoryear
+

Brückler and Nimeth 2001 + +

+

+
year
+

2001 +

+

+

Lachnit:2005aa

+

+

+
authoryear
+

Lachnit 2005 +

+

+
year
+

2005 +

+

+

Eitelberger:1863ab

+

+

+
authoryear
+

Eitelberger 1863 + +

+

+
year
+

1863 +

+

+

Faber:2015ab

+

+

+
authoryear
+

Faber 2015a +

+

+
year
+

2015a +

+

+

Groll:1865aa

+

+

+
authoryear
+

Verlags-Catalog von Andreas Groll, Photograph in Wien 1865 [Vienna 1864] + +

+

+
year
+

1865 [Vienna 1864] +

+

+

Faber:2015aa

+

+

+
authoryear
+

Faber 2015b +

+

+
year
+

2015b +

+

+

Noll:1992aa

+

+

+
authoryear
+

Noll 1992 + +

+

+
year
+

1992 +

+

+

Uhlikova:2010aa

+

+

+
authoryear
+

Uhlíková 2010 +

+

+
year
+

2010 +

+

+

Schwarz:1931aa

+

+

+
authoryear
+

Schwarz 1931 + +

+

+
year
+

1931 +

+

+

Wirth:1939aa

+

+

+
authoryear
+

Zdenĕk Wirth 1939–1940 +

+

+
year
+

1939–1940 +

+

+

Zdenek:1939aa

+

+

+
authoryear
+

Zdeněk Wirth 1939 + +

+

+
year
+

1939 +

+

+

Edwards_2017

+

+

+
authoryear
+

Edwards 2017 +

+

+
year
+

2017 +

+

+

Rohacek:2010aa

+

+

+
authoryear
+

Jiří and Uhlíková 2010 + +

+

+
year
+

2010 +

+

+

Trnkova:2010aa

+

+

+
authoryear
+

Trnková 2010 +

+

+
year
+

2010 +

+

+

Riggs:2016aa

+

+

+
authoryear
+

Riggs 2016 + +

+

+
year
+

2016 +

+

+

References

+

+

+
+

Brückler, Theodor and Ulrike Nimeth (2001). Personenlexikon zur Österreichischen + Denkmlapflege. Vol. 7. Horn: Berger. +

+
+

Caraffa, Costanza (2011). From Photo Libraries to Photo Archives: On the + Epistemological Potential of Art-Historical Photo Collections. In: Photo Archives and + the Photographic Memory of Art History. Ed. by Costanza Caraffa. Berlin and Munich: + Deutscher Kunstverlag, 11–44. +

+
+

Edwards, Elizabeth (2017). Location, Location: A Polemic of Photographs and + Institutional Practices. Science Museum Group Journal 7 (Spring 2017). doi: + 10.15180/170709. url: http://dx.doi.org/10.15180/170709. +

+
+

Eitelberger, Rudolf von (1863). Der Kupferstich und die Fotografie. Zeitschrift fur + Fotografie und Stereoskopie 7:123–126. +

+
+

Faber, Monika (2015a). ‘… mit aller Kraft auf die Photographie verlegt …’: + Annäherungen an das Berufsbild eines frühen Fotografen. In: Andreas Groll: Wiens + erster moderner Fotograf. 1812–1872. Ed. by Monika Faber. Salzburg: Fotohof edition, + 27–95. +

+
+

– ed. (2015b). Andreas Groll: Wiens erster moderner Fotograf. 1812–1872. Salzburg: + Fotohof edition. + +

+
+

Frodl, Walter (1988). Idee und Verwirklichung: Das Werden der staatlichen + Denkmalpflege in Österreich. Wien, Köln, and Graz: Böhlau. +

+
+

Jiří, Roháček and Kristina Uhlíková, eds. (2010). Zdeněk Wirth pohledem dnešní + doby. Prague: Artefactum. +

+
+

Lachnit, Edwin (2005). Die Wiener Schule der Kunstgeschichte und die Kunst ihrer + Zeit: zum Verhältnis von Methode und Forschungsgegenstand am Beginn der Moderne. + Vienna, Cologne, and Weimar: Böhlau. +

+
+

Noll, Jindřich (1992). Josef Schulz 1840–1917. Prague: Národní galerie. +

+
+

Riggs, Christina (2016). Photography and Antiquity in the Archive, or How Howard + Carter Moved the Road to the Valley of the Kings. History of Photography 40(3): + 267–282. +

+
+

Schlosser, Julius von (1934). Die Wiener Schule der Kunstgeschichte: Rückblick auf + ein Säkulum deutscher Gelehrtenarbeit in Österreich. Mitteilungen des Instituts für + Österreichische Geschichtsforschung 13(2):141–228. +

+
+

Schwartz, Joan M. (1995). ‘We Make Our Tools and Our Tools Make Us”: Lessons + from Photographs for the Practice, Politics, and Poetics of Diplomatics’. Archivaria: + The Journal of the Association of Canadian Archivists 40:40–74. +

+
+

Schwarz, Heinrich (1931). David Octavius Hill: der Meister der Photographie. Leipzig: + Insel-Verlag. +

+
+

Trnková, Petra, ed. (2010). Oudadate Pix: Revealing a Photographic Archive. Prague: + Artefactum. +

+
+

– (2015). Archäologischer Frühling: Aufnahmen historischer Baudenkmäler in + Böhmen. In: Andreas Groll: Wiens erster moderner Fotograf. 1812–1872. Salzburg: + Fotohof edition, 237–245. + +

+
+

Uhlíková, Kristina (2010). Zdeněk Wirth, první dvě životní etapy (1878–1939). + Prague: Národní památkový ústav. +

+
+

Verlags-Catalog von Andreas Groll, Photograph in Wien (1865 [Vienna 1864]). +

+
+

Wirth, Zdenĕk (1939–1940). První fotograf Prahy. Umění 12:361–376. +

+
+

Wirth, Zdeněk, ed. (1939). Sto let české fotografie 1839–1939. Prague: + Umělecko-průmyslové museum.

+ + + + + diff --git a/bibformat/4ht/older/fo.idv b/bibformat/4ht/older/fo.idv new file mode 100644 index 0000000000000000000000000000000000000000..1e1c835b3c6441565698cf9288c2e84b904f760e GIT binary patch literal 433 zcmey)#MnIPfQ&T*5HP=xRtQOrP{=PWDJU&bFfuT-)H5*FGc>U>G&45t2C85LDI)~_ z13~X3kg5eB;u8=n79lziq_nd*_k z!1dV}j5$)1i*gMOEKPTTz-LjJX-hsJOO|AUBoBaPckMa=hM&cE__b6bt4dA=sXDal z(5}zIx5`#!Aj_4MfaLZ;^+G9#K`;_7*w^y|=m{<4kYegz)XTWYF^7STff1L*xSWm4 QF}T9uCotgEneIaX0QP&B00000 literal 0 HcmV?d00001 diff --git a/bibformat/4ht/older/fo.lg b/bibformat/4ht/older/fo.lg new file mode 100644 index 0000000..02fc0ac --- /dev/null +++ b/bibformat/4ht/older/fo.lg @@ -0,0 +1,153 @@ +htfcss: eccc1000 font-variant: small-caps; +htfcss: ecbx font-weight: bold; +htfcss: ecsx font-weight: bold; +htfcss: ecbi font-weight: bold; font-style: italic; +htfcss: ecit font-style: italic; font-family: monospace; +htfcss: ecss font-family: sans-serif; +htfcss: ecff font-family: fantasy; +htfcss: ecti font-style: italic; +htfcss: ectt font-family: monospace; +htfcss: ecbx font-weight: bold; +htfcss: ecsx font-weight: bold; +htfcss: ecbi font-weight: bold; font-style: italic; +htfcss: ecit font-style: italic; font-family: monospace; +htfcss: ecss font-family: sans-serif; +htfcss: ecff font-family: fantasy; +htfcss: ecti font-style: italic; +htfcss: ectt font-family: monospace; +htfcss: ecbx font-weight: bold; +htfcss: ecsx font-weight: bold; +htfcss: ecbi font-weight: bold; font-style: italic; +htfcss: ecit font-style: italic; font-family: monospace; +htfcss: ecss font-family: sans-serif; +htfcss: ecff font-family: fantasy; +htfcss: ecti font-style: italic; +htfcss: ectt font-family: monospace; +File: fo.html +File: fo.css +File: fo.tmp +Font_Class(4,"4"): +Css: p.noindent { text-indent: 0em } +Css: td p.noindent { text-indent: 0em; margin-top:0em; } +Css: p.nopar { text-indent: 0em; } +Css: p.indent{ text-indent: 1.5em } +Css: @media print {div.crosslinks {visibility:hidden;}} +Css: a img { border-top: 0; border-left: 0; border-right: 0; } +Font_Css("4"): .small-caps{font-variant: small-caps; } +Font_Css("10"): .htf-cmbx {font-weight: bold; font-style:normal;} +Font_Css("12"): .htf-calligraphy {font-family:cursive} +Font_Css("14"): .htf-italic {font-style: italic;} +Font_Css("16"): .htf-bold {font-weight: bold;} +Font_Css("12"): .htf-calligraphy-bold {font-family:cursive ; font-weight: bold; } +Css: center { margin-top:1em; margin-bottom:1em; } +Css: td center { margin-top:0em; margin-bottom:0em; } +Css: .Canvas { position:relative; } +Css: img.math{vertical-align:middle;} +Css: li p.indent { text-indent: 0em } +Css: li p:first-child{ margin-top:0em; } +Css: li p:last-child, li div:last-child { margin-bottom:0.5em; } +Css: li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } +Css: .enumerate1 {list-style-type:decimal;} +Css: .enumerate2 {list-style-type:lower-alpha;} +Css: .enumerate3 {list-style-type:lower-roman;} +Css: .enumerate4 {list-style-type:upper-alpha;} +Css: div.newtheorem { margin-bottom: 2em; margin-top: 2em;} +Css: .obeylines-h,.obeylines-v {white-space: nowrap; } +Css: div.obeylines-v p { margin-top:0; margin-bottom:0; } +Css: .overline{ text-decoration:overline; } +Css: .overline img{ border-top: 1px solid black; } +Css: td.displaylines {text-align:center; white-space:nowrap;} +Css: .centerline {text-align:center;} +Css: .rightline {text-align:right;} +Css: div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } +Css: .fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +Css: div.fbox {display:table} +Css: div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +Css: div.minipage{width:100%;} +Css: div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} +Css: div.center div {text-align: left;} +Css: div.flushright, div.flushright div.flushright {text-align: right;} +Css: div.flushright div {text-align: left;} +Css: div.flushleft {text-align: left;} +Css: .underline{ text-decoration:underline; } +Css: .underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } +Css: .framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +Css: .framebox-c {text-align:center;} +Css: .framebox-l {text-align:left;} +Css: .framebox-r {text-align:right;} +Css: span.thank-mark{ vertical-align: super } +Css: span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +Css: div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } +Css: table.tabular td p{margin-top:0em;} +Css: table.tabular {margin-left: auto; margin-right: auto;} +Css: td p:first-child{ margin-top:0em; } +Css: td p:last-child{ margin-bottom:0em; } +Css: div.td00{ margin-left:0pt; margin-right:0pt; } +Css: div.td01{ margin-left:0pt; margin-right:5pt; } +Css: div.td10{ margin-left:5pt; margin-right:0pt; } +Css: div.td11{ margin-left:5pt; margin-right:5pt; } +Css: table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +Css: td.td00{ padding-left:0pt; padding-right:0pt; } +Css: td.td01{ padding-left:0pt; padding-right:5pt; } +Css: td.td10{ padding-left:5pt; padding-right:0pt; } +Css: td.td11{ padding-left:5pt; padding-right:5pt; } +Css: table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +Css: .hline hr, .cline hr{ height : 1px; margin:0px; } +Css: .tabbing-right {text-align:right;} +Css: span.TEX {letter-spacing: -0.125em; } +Css: span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} +Css: a span.TEX span.E {text-decoration: none; } +Css: span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} +Css: span.LATEX span.TEX{ position:relative; left: -0.4em; } +Css: div.float, div.figure {margin-left: auto; margin-right: auto;} +Css: div.float img {text-align:center;} +Css: div.figure img {text-align:center;} +Css: .marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} +Css: .marginpar p{margin-top:0.4em; margin-bottom:0.4em;} +Css: table.equation {width:100%;} +Css: .equation td{text-align:center; } +Css: td.equation { margin-top:1em; margin-bottom:1em; } +Css: td.equation-label { width:5%; text-align:center; } +Css: td.eqnarray4 { width:5%; white-space: normal; } +Css: td.eqnarray2 { width:5%; } +Css: table.eqnarray-star, table.eqnarray {width:100%;} +Css: div.eqnarray{text-align:center;} +Css: div.array {text-align:center;} +Css: div.pmatrix {text-align:center;} +Css: table.pmatrix {width:100%;} +Css: span.pmatrix img{vertical-align:middle;} +Css: div.pmatrix {text-align:center;} +Css: table.pmatrix {width:100%;} +Css: span.bar-css {text-decoration:overline;} +Css: img.cdots{vertical-align:middle;} +Css: .partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} +Css: .index-item, .index-subitem, .index-subsubitem {display:block} +Css: div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} +Css: div.caption span.id{font-weight: bold; white-space: nowrap; } +Css: h1.partHead{text-align: center} +Css: p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +Css: p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +Css: .paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} +Css: .subparagraphHead, .likesubparagraphHead { font-weight: bold;} +Css: .quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} +Css: .verse{white-space:nowrap; margin-left:2em} +Css: div.maketitle {text-align:center;} +Css: h2.titleHead{text-align:center;} +Css: div.maketitle{ margin-bottom: 2em; } +Css: div.author, div.date {text-align:center;} +Css: div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } +Css: div.author{white-space: nowrap;} +Font_Size: 11 +Css: .quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } +Css: .abstract p {margin-left:5%; margin-right:5%;} +Css: div.abstract {width:100%;} +Css: span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +Css: dt.printshorthands{float:left; clear:left; margin-right:1em;} +Css: dd.thebibliography { text-indent: -2em; margin-left: 2em;} +Css: dd.thebibliography p:first-child{ text-indent: -2em; } +Css: dt.thebibliography{float:left; clear:left; margin-right:1em;} +--- characters --- +Font("ecrm","1095","10","100") +Font("ectt","1095","10","100") +Font("ecti","1095","10","100") +Font("eccc1095","","10","100") diff --git a/bibformat/4ht/older/fo.odt b/bibformat/4ht/older/fo.odt new file mode 100644 index 0000000000000000000000000000000000000000..b352332291041c98cbfd76364f334b01f6b0deb3 GIT binary patch literal 10546 zcma)?1yCIAx~*}y5ZoPtySo$IA?RSib#MzV3GNo$oq+&@I|O%k3GNd7l6_9y{r~6O zefOTJmg(+#`u*PZ%~bW8r6Lavg9P#CRTXKc^pBnYULisdK`2UTh%w12Nwa8bAVNUH zGe_wESzJAkAs}IHAt4}Ou--0Kc|-i!B0yBUAxLohqEOyWp+Q4HVE+|i2e7xYFn0km zd)V3j0|)(v`m_8GTxC3)O%E$Z$lVLljhnnxF~t@PL9vSE5z5$vs_ZWfWBGpmu;1(2 zXsNtZ63A->+pBkL#Etsdhmpj!sB0Lq{VSDQcTih4@UbEA! z%w%GVB_g$L^ndnPXO#^eBm{cueu`RYgeR|~FwM?CO=AgO@PiDh?M21M+i#q}8x9%f zF`sBq^1`-_Rhq@4vO37mx&W6?#~`m z@PO2Fyg(o~nvET?C8azSnUU~y*62@b|Ft?QR;EB#XLFbTP@O*l^PtZzt71YxKzcwx zAit?&>R=BvxBsUmf8>Sz-Rs3*7zoJqc^>k#&Oab1ECj^UmuRXLn1CBAjn1x>ovr|OiOg^-vjTy7`^(P@$V$dWh0*{j#}1R z2YV*hH1qhXKR)c%370(kiK7|5y1iT+5BvLp$xPTcaR?W?kqq`=UFAI>ed3jkl&jaW z<36=5J~bJy$#7MW@6;~}zB(&ipIwDVrbcOjJTG#kt-abqi5Iw<(DV=P9*w(jM`+)l z*6?tVA40aE6J$N+NXI4x&Fks#l97G=6?1*S)1cx-Ddu|`BY4Q}kEKHinb~KSzq20~ zuTOdrRH&Y+kE)~w57f{6^tN4&U&E&EuQe{Bx|eJ%9St;Qv*tcKJtc6rGlwwcCE|W< zZ?-l>I+!9O@i}vJXm@SpZ^1-jRMDZqYax$s0QXZQMuP+GxYBxJ2OS7d^YLR`bw$4# z!Vl0?Z-<JVF>7ey?)IlXT@p<>c;_|az) zw8xdH@v3iB`78#Ostz&bNd(BX(=is2WEJ3=oP3idn|lX|wPba;9x>^j)^kRMo~nS- z$R4IQQ>#UQdx`@hP{dRH+_)cJz6^!E=|Ik!@o;TjaCTHqXw$C`CKeX6<>cogjmgs;twW|c+=++4@K83RI#7f7Bzh_lZGy;ODqP{aAH4-wQRk2Ju z5x_xF*Bl=1U85@v+W2Oa`J;!w1kC%WgY?~uc#PG29mNCgcQXj!a+c&ILq!ge5nG48 z^!S)jbWQ^%&+nlX*lg=@c$?DryE^ zs$$x?b;#ym5+xORqKqk6qJVoXHR)io&n|?G5iXyoFQjmRKM&CiB3Tz^Mo_ zMek?0dq;6D*?Gv^W`tPE*r2v-9X^gz+fJ$3Kv1c*u46Q~N5C^bfWnzaH|1~C%196c5byDrMGK+DD@8|T$Wl%#WhqRrU z!m3yKP`r$GBdy`)!NksF11>Fdc{$@K)0fBK4SzNwQee(3;gH6J->W$_a+ZI{^b=A6Zp_qb?CfR6Eu(&{RL zrTIDt93Sq@y`s@c{eetXK%K&IIW1ORnwq>82vaBzsBzGWWe#hq0A?v1)ax(z9;CP{ z$xck`U!^qL@u;JI)|eU!ei^pKmyVoA`-FX*E}=hH)z)oDh$y4d#QDOn89YqG%%I=# zW!nCIu}84yt&+f?Mi1`6Xde@C00lUaW|e!cZ=%F_iD;{?h#2Qqk7>Q*b^E28SK6jH zqy%tra}^db{4rcMC;YDHCx;K;nvI!6p8N;f&t@p_L5jbkI05x#j76R^g?1UJ{_&^f zJCt-r^!{xhr_9w;l9>sS`i#j9DDr<(+&>xc5OP7H0fWyt5Kos+3tFltt4ubC4yWM8 zLd9Zgs*>Y!zLg5%goTMH8GP!t)yHaKl}+qV)b;7|c@fS;%~LYB93^%H*di6R)ab(E z@2RG6J95)~1fQ3}oI85DRqRk<9bW~sFs8o4;!E14U$i1|wF&^eQ%9klqPE60lFV+C z$XIMTjQqqA1HV7M3iP+vhWzR|V?JtQkzY_CB7>P%J6)4M$&5zgp9!w_Sq!(@Z7;=i zjbzCiU-t!d&BCIma#%P=mY7V~Ogp6`yVG~|zZFk2CM_?At0XI@@^ePBNw07vUdG_l zpzS^uBr?{AsNyY#gR8r3+hA9@0VEB)RUrDQmUtB3Okq?;R1)_Tf1+~X8D~_NVN$&O zTeTN;Y|~(hIA*mFl0J~jnl0;17*=%9raN+A$xQoTe$`Y5-F~ZXTQ#yfTaTUFB5~af zb3lTF0zdF@e%w-&n2oxzo6s$miW_VlafZj=veVJt zg%Ly288h};P+FrFMjZpLhpZ!Cv9{6~lKC;L?c?izd-q9z@SYkca%QVxvKr>IONsn4 z*rU<0P3_w>9+3t;#;!^VPPJ@{V~Z?H31DHY-g&xY7W=I|z+YVDWW9oiQ~gY9;!m^+$QSdh z-~pGsV5xHSO$?aoTQ;(QnN(Y?QjA^I6r2`gBQ|aDEwVM6TOAwjQuZhZQL6#0?4Lq` z7jWA@yOeo|1YLFQwLcKQU7p+^>!2Eu*scBx_6DbAG4`lCRCD3h$=_0BG)^GN*bL28 zciZi&I}YVNhQ_TrUxixaP(Cx0QSF!sSaKD2M)%layK>w_nkl?z`F*=RHCCF0!BT5q zOQgT^x9-)=TBXMstr${SC~wV3uD9=4AIp@(pGF??xPjudO>lt>ZLzku^pHQ_X5uZ= znzK*qJO0_7=Z{huZwJJ2Yz2$tuLB>VS8a1{(v*vZ!Hz6KqIV1d14M`P$~joq#?+() z;FSLL9JM%_FmOFkD&0$udP$y=N;ts-<+9P}(!&fCK73cVx%lgMaW?Sx0;j34Thl2K z3wr$fo(ORI^-v9%Mck?uS|gu7Vz0d#UJ&91dXJfiU}JF_MiF>WA6IV0T?P3&PLrwJ{_>Cgf!;2T@*3C2Ld;#CNm%pqRpD7=~1%x}P7z6t)ZhDnYDKE|YgPE?APphMMTyV~gg?pnWstH*bn}Q@ zcn=Xyb6maoJog7y*Dq{Rd3wI9%@%%)Y!3!8)y5IhuDckL?^$9wG`PrUUceB_qLnwW}$HD#5n=rfhq~~RtFe`ED)4~1IHVu5YbICE%f+Wsn^MX%v6D%)wksi`j`@rcv(7Ou>X*7ThCmDFQDXB|d+t20` z#o3wqrB}l%dGjK?^`?f>eUdMfi~hQ3M4`<7(X?Uf(BD)J7Tt_lHF$9(%4%?y5Kh~_D9&ADSeyou9sQ@tp2 zvOa|ApJYb;1kY+(WOxof@I_4VFdhQko> zFGfQO%(dgiquXg!KWS^k50)e*9^#=nYswVBVBNHk==D{47wi9d$|AhYt`A96o?s*A z;}Ehd@G>w4^C|w?re$|BEPBugPswWl%|~kHDXaiJR_GvzBP`S#7#QFjDC5hjf848Z zhk7n~^prY^y%JKWByQ3vl>S2xb3Zkz3HPi+i)7^KLTcRa8c!DRxGDV=Gm#9mmMMl~ zvd5ayyxTf)t0UL$EsftUZ;hzXTswoCr1XtrN>Vngh@23hG(;1NA9704=2_Cp=e2T= z;7;4g6jPXWS~VZ&0`cDCN<0-DfVanrU8`X)VE$!fqY9m~OdKUI`aN1x^Nw?rhl3;u z*-_9SAA{AJ626f$RLmpNm7zpCN_i&cp_;5wh`m2jfMy%o8qExB3Fq$jVxUu{_S?@G zWcN{6dUTC3MG?vL@me$ha*H1xw#kVx}qnE;HqC-T#W^@i=I4?f(J!dDO& zxznG{9`)?r{cMU7-j_xG`UCewH&v~(H5PEJDg#C<_i{3>&~1e>PCN_nn?vv}W&Ayd z{QEUTP-iRft9en0j;mxa)mbm`i!ybx(pU*fV)+WYUeps~Nt7nv(+lckYnjYubq6o+ za8xLY9yOj$E2?wWcG;N@#J1InqCv$W*q*Q@QalsR`uwk+LZaAvb^*?;=E-FS-%UF{BCZ}T?X5$Q_qmmIczpbY_)X7 zkm(_MU1up72gU8p?!DT6Q{laIX8g`%A$l$|7EwBO&w?tGm8LGHw53V9N-QxZl=;y} z2JX}B!bi_ijaecpnwSs7*!?V7FzE$(a0Uvr2Vxe%4|fC&lIKg+wO#cu^0n=5uxLSK zW1OrxjWlAH80!}<{}$3+SZsGRWNY`>pl=BE=*|TDJ@{moO}Uou>@l3{;>e2fJ2~Yw z*hKlF*jcN8$;|#O)a&IoToMH94_@4k(Av_^bQ1MLGv*<|cF@>_doN?AQ7vC~QItaE zjE}pf!hJjz{61z(zXERrh|5gi@lk?M-Cqb62Nv)Q#b%;%@KWczT7@hr(`#EjDO=n! zUe=T=FKrd^Y9y!9mYUR;@SfR)-gFM z6w&#tc(PeuLFD4SRi9HOjAJR%9&Gyi0tbV+ZT0g6A=Pce@jlw(iGU_rb~|uqRv0_) zh62VsmO9~(Ro1iSNWs5>6ra#;pkH*QG<8+PR{E3=f*Kx z>ZqpsZ-g(>`x5m+?(6zZssbKFII;B|9jb$tl~?T2rZ24pi=i3hHIBEex;%ClyP`ua z`B`&xF=Q}uqAk_-W_V$`E~-Ydn%3=tZYk~gDc759PP5Dj(o=fz8AwhYMm`Zyl_8U) zMskZTD+*6>$u}%q?{r_AQwIDw?si@w|Lz&eDTmYo-aJE^H_s5^&6Tn<2Lk?`P1qMN z@6gSP5q$Q9G+(Smu^8-3hl5@!TKG|O6Qkf3kB`uV>w;qWL*~PB20TnG@AcfanaKFJ zdHiuSsj>D+9VxGF36Twyh62fhlVFED+_Q-Bq6(gNy^6ibUtU9Wib;}jv5d$wV+<30 zwr!q%-dP-{kQHtv+Nj$Ji%^Vtur@ba9>J(j5XSdo_zt5_z0|E}%?G1ino@RB0-5Ji zmSVMl5xpvYq`+dF7&5yL>qoyGQRot)J(V65b>GJl^_?@T`? zWX0-cR`kvfg=0WX0#<&=-D96)srlyslG~tu++FF-0Z+Fv{kFxJ*Bvf$!Vl}@50@2R zi62rE&p}LzwpjJ=&Q;px@$8d%la}+OulyUvE^dm4Ph1ZV;VWwX;XVG-){PIOE?Idq zc@y4bLV1(O#T*EXJjqjq z=K}0rq%>$OqsbC&`@D!O4?RqgY|6Wj=_omUz(Gh)szl-WaQZc6A90=`mHLWt9V=`V z$JT(b(A<2sdG?sHxDCA~X!Yg(#1$Iv-7f9ueJA2Fm!xi7*YB|^yK^!e$z^vKB50{y zhNpL{BVoFDNm)bzSmVUi|DV1(h3|2wz)`|XBe2m=G`q7~x>QCn{R1pvDxX;_H z`|Q!C1b+Si^JebRHgMc`p!R*oRh76(1O(Eb4go!F z&HrtGP7L%CGI(+P#;ecSlPXu?ZGDb@cu#XArBOAM{v0WwPb*uMfvg*a!+>sD73%PF zg=7?kqB3nz9b%%k@P{03cerLx%M!E14kA zLx`a5@xi{cyZjaA1*g2xqgDyrb7i$TF6btPZ|`83LoXpKD9W5@sj zDs`oBjJVr(FX{BwTr4uoRYoSMVZ&B5)6Fgr$71&Cp~}UCu}cEvD+zxQyzq{s~~ByZw$C&<(E^!9c3KTGbm@hrMJ{b7V+(%o;O{TA?z3 z7!%=86?>3F){VC;%oxxr?(~^EuFjmEb)K7Irhj5dZ#Qa zaNOSnpyAa-3+q-8-mg?enVF24hGNjeDO%^W!2z7oq88k%B!V;hkz6>c;4JClwAfXyAS*u>0Geb7KDk2TodD);(~6+2 zeJkM8g#+yspoTI&ix_7QVVt5a>(Q>a4h~{!Lx3(1*1|it-R)U7g{Q9;z z?RJC#6zf=pI$Ru)Z0t^l0HZqbh3;M(7EX1nRl+&PEf}~I>wHdXi)DgORHl+}{c(Dn zhO}!J`A>0{+!C>EC#hRX`#6->v;FO$x)l%*mDzCqiM z;KlKqL+$9V8RG|8nAw}~sXach<56tXSt0FVy%44>rm|_r_OPW6*Q*|PFI;aT*=U7} z4;J^Yc~Qz1`C>%?RR{+o-weZ~qGms*F*33CUub?c`=sW^*qv}^@<}134I` z6RcEPY9VuYRb)S~7m~M>G0pAfXYIld@_Nl)V)8zRe?1mVQRtkC`sI^=wTNy71ucgU ze~(})#&^9L6dKaKy+19zdEDi5@o7|zxJT<_sb$Xg(c`NnhyQvrUmALUvXplq1$zeaT4ZgLDUCTjE#_VT+Fm8OfiA0Ot|V7$ZGo^!eo+r z#AZo{#zL_U9&<_%J#Ai9N4P>bo^00~``Fas-@0$&2jP_;dgyYJ(M-ZPoS_HRxan?R zx;eUijM40g`UCa(>xIyXGb6vU_aJ3D9N_`B<1>;t;Q-xqqZwOBCoaT-!t|G!(5AxH zFX@qEvfMf8;hed8=epl)-`fNI(8S>>0Y%F1>`|y_7Ck$ogeuM)8Ip15h8jb+b9R!q zSE#0eOmUbCmiMun*~>Jf^teSV9}o;MT8LK|8%R6v<^Y=ZFO7<74mV~r9&kZ=Yk+ZY zhl(%RqFm6*((mkp5~5*PCZkzVz=u`%R&{PWzF7B$^Pd=@nwO0jVZdr>kb8MFnQTht zAgS~&91uQ6g=`+T2E3$MfyH5=-zY_6lbHgJL8b*L2g8QxJc`0IMbXA~r-kK92~6X5 zMryreLLNMZH<`jP(}%e8uCEC*1y^F|<0w5#L?7*}GLxKqVyPNb>nm&m$#|Cpvu@iAN=g-E=D@PA}B?O7nsQC zvt`E@rPGK92azB~L+e5EgBm4!21#n!Y+9`so>_PD^F4XDBb*`l7g7Mja$@7m-eGpD z!$d1m=N$tC?3pXmQQ_6A^Zm*O7ym=>Sm-7_k@n_BFeSSLRzT?Jwfz7$y-jDNfqlAM zDP#46fu=dtaZC5lP3VQD5h zX-+mdz`>Wa$hJ7P$kf}urdm)#WZGmerMOetFCN?2we&+f&&x~Cc5k}EOW&D{OPi)U zbwW7N)-U)`J_=3-GFfQv4hJ(-+CYU0)YLAtO1sG=h4%FRQm7tDWH@z~r)d!3tA-JZ z#hGiLu^%tWa~|uoR9Br}`>fRFtt6e}eKVI8+W>}ghVeIA$F^g}S;ou9y!#ZJgke)G zmvBWTy~<06db~6Zth&@2$!KDerc08Gk!*SS9}MZ-JMZOEsbsCtvkDqisRR~XsjbX) z=m6C0t64Pxg++qVgH5A#mCuI2?+G1Dy$bV7m6LJ(G8{S&s zGJuH{$Aoo_WO|BQmjt&?R-B;JY2W!3d8r?5c?O5c0nTf#5TH7JoT~(C5*f=08EydS zEs$CrgOGJbNv-zt?hme*Hx0BuPmaOneP9~oSYNbLWL^elBT!1!C-10f)Nh3*PU7(d z=5h#Y1zI3&m4D1N$b-12F%pljR@ym~topyJ`b^niTvMw$F(+`>h;qA;e_oCO_Q**2 z4_EO6wFYI)j49N5q2)V_!rOx~H3Q8usFkmi44_u2#T5J54gRXY25F+Q=&DVXt#PKq zgL5!WPBTlchX+$T6m>hNh(!ujF#Lj))*_Cpc#YS{BwTJ1AD`E%F(-%X=DX4_B5Lmv>3*5=BdYB@6S~YTj)9ukA4&LGg!!kU+2lHjpa(m zwcO?W)) zCD9Q~N%YlHajL!@{)M3B8u-2@qVKM`qT_q3zOrEzEej^}sBSne$lrDU1FR?JPsw-Q zP>hl^_f^+K`iL{~tJ1na;qn+ zhX!+puJ2EAY*VURmTHtf#ub#Mp8V?)7gHrS=|aFVi!nLMQf3+So5F%s-ic#3CN+=qkQIgW^&Ro&~DJBMu&8man#wI8Yyfb^_Yl zUst?6*o(Qrqw9Xn@!iGN$Arne+s$W&R!v2shyux5L&m-oKP`eW?Md%wg5{Ei6K;hI zxIXOHui8EDJbNWv`#BPnJomOAEFO9>Pktcv*4D3sc`Z9M)%5Dt%PzLcyO9CGh2Vs# zZYM(!Bn%?8Cp85+dunfam4PQ6IP5 zIvAhyV@o3pdcLaow)IZRuukhDe_y_VdiW|Ouez6>xS(`yvUc#RYxkvlzom4M+CGM0;yS9qP%tq^)rFy|8P7zrewzPBoA$S_Iu=A^L)!91y=k{on@ zKe(#<+^nAo={=Uf1^UbtLls-*u!c~f$KbNp!w0IP<+fk-;Pkg3VM=Kn_@&wcpN`IC z<7}^BQd``n%>IyJYFU9gGqB$Bswo(CvJ6>n=mVg;KHbAo-CrIrU2Tt4SOyK1FZ6FD zVTB5or!2sqYR#4}<$A|4c2X3JcZo(lWHrZ^TX&PP2q-0nUp|BO%nfv7mnf1B(CO*y z_^|dfnWOja-&rFJ9+;8>b{!HFhxABn+!-0jpGwgSPeM)sSNv=Wl^spfku?5iC(SH0 z`{Kz3WJ&^Gig=mm9FFwqd9!$my_!NNG14Jz^{z~&h4(7weaj`cQmc0 zmqi0#HhmZ9BN4n<%Pg}`7dMwYg{aG?+8Cf2TDB-Ecft;8;QZ_*7QHVB5FxCb8VJds<;47X zw$w#JH5tbo^b>`U9)#F#r;h@j*n~i2yq0`C+{zLJQ!B zC;@4vtAqn;f=}b>4Pi&hUHN+bJqNBvhVhFz)e+~oV;l$-iI`mX6<$Ri5{d-+U!|z< z{yXi40r4#MXZJ6OH`xD5y#0@O+JE8xX^i|m@AhA~H;)9OK0xBHxWA|0-q8P#G!ug{3ZSM?<@V^*{{D=y7`9tTN3Qw1OG(*{%+g-73lufpMRQo|G&}xvyp#ynEpy5 sz=8N5e$#(O{JSIbSE3;98}Tpx%)jEn!u^>O@NaK^C + + + + + + + + + + + + + + + + + + + + + + + +]> + + + latex + + fo.bcf + + + fo.bbl + + + blx-dm.def + blx-compat.def + biblatex.def + standard.bbx + authoryear.bbx + authoryear.cbx + biblatex.cfg + english.lbx + + + + biber + + biber + fo + + + fo.bcf + + + fo.bbl + + + fo.bbl + + + fo.bcf + + + fo.bib + + + diff --git a/bibformat/4ht/older/fo.tex b/bibformat/4ht/older/fo.tex new file mode 100644 index 0000000..92adb3a --- /dev/null +++ b/bibformat/4ht/older/fo.tex @@ -0,0 +1,287 @@ +\documentclass{scrartcl} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[english]{babel} +\newcommand{\EOAbibtweaks}{ +% Remove pp from references +\DeclareFieldFormat{postnote}{##1} +% Remove quotation marks from certain titles +\DeclareFieldFormat[thesis]{title}{\mkbibemph{##1}} +\DeclareFieldFormat[article]{title}{##1} +\DeclareFieldFormat[incollection]{title}{##1} +\DeclareFieldFormat[inproceedings]{title}{##1} +\DeclareFieldFormat[inbook]{title}{\mkbibemph{##1}} +\DeclareFieldFormat{title}{\mkbibemph{##1}} +% Remove pp from bibliography at all +\DeclareFieldFormat{pages}{##1}% +% Remove "In:" from articles +\renewbibmacro{in:}{% + \ifentrytype{article}{}{% + \printtext{\bibstring{in}\intitlepunct}}} +% Delete Vol. as praefix +\DeclareFieldFormat*{volume}{##1} +% Use : for pages of an article, use . for the rest +\renewcommand*{\bibpagespunct}{% +\ifentrytype{article}% +{% +\iffieldundef{Number}% +{\addcolon\hspace{0pt}}% +{}% +}% +{,\space}% +} +% Group Volume and Issue in {Brackets} +\renewbibmacro*{journal+issuetitle}{% + \usebibmacro{journal}% + \setunit*{\addspace}% + \iffieldundef{series} + {} + {\newunit + \printfield{series}% + \setunit{\addspace}}% + \printfield{volume}% + \iffieldundef{number} + {} + {\mkbibparens{\printfield{number}}}% + \setunit{\addcomma\space}% + \printfield{eid}% + \setunit{\addspace}% + \usebibmacro{issue+date}% + \setunit{\addcolon\space}% + \usebibmacro{issue}% + \newunit} +% Bug fix for Windows +\defbibheading{none}[]{} +} +\usepackage[autostyle]{csquotes} +\usepackage[mincitenames=1,maxcitenames=3,maxbibnames=100,style=authoryear,backend=biber,autolang=hyphen]{biblatex} +\EOAbibtweaks +\addbibresource{fo.bib} +\begin{document} +% \maketitle + +\section{Dummy} + +\subsection*{Schwartz_1995} +\label{sec:schwartz_1995} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Schwartz_1995} + +\subsubsection*{year} +\label{sec:year} +\cite*{Schwartz_1995} + + +\subsection*{Caraffa_2011} +\label{sec:Caraffa_2011} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Caraffa_2011} + +\subsubsection*{year} +\label{sec:year} +\cite*{Caraffa_2011} + +\subsection*{Trnkova:2015aa} +\label{sec:Trnkova:2015aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Trnkova:2015aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Trnkova:2015aa} + +\subsection*{Frodl:1988aa} +\label{sec:Frodl:1988aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Frodl:1988aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Frodl:1988aa} + +\subsection*{Schlosser:1934aa} +\label{sec:Schlosser:1934aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Schlosser:1934aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Schlosser:1934aa} + +\subsection*{Bruckler:2001aa} +\label{sec:Bruckler:2001aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Bruckler:2001aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Bruckler:2001aa} + +\subsection*{Lachnit:2005aa} +\label{sec:Lachnit:2005aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Lachnit:2005aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Lachnit:2005aa} + +\subsection*{Eitelberger:1863ab} +\label{sec:Eitelberger:1863ab} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Eitelberger:1863ab} + +\subsubsection*{year} +\label{sec:year} +\cite*{Eitelberger:1863ab} + +\subsection*{Faber:2015ab} +\label{sec:Faber:2015ab} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Faber:2015ab} + +\subsubsection*{year} +\label{sec:year} +\cite*{Faber:2015ab} + +\subsection*{Groll:1865aa} +\label{sec:Groll:1865aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Groll:1865aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Groll:1865aa} + +\subsection*{Faber:2015aa} +\label{sec:Faber:2015aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Faber:2015aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Faber:2015aa} + +\subsection*{Noll:1992aa} +\label{sec:Noll:1992aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Noll:1992aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Noll:1992aa} + +\subsection*{Uhlikova:2010aa} +\label{sec:Uhlikova:2010aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Uhlikova:2010aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Uhlikova:2010aa} + +\subsection*{Schwarz:1931aa} +\label{sec:Schwarz:1931aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Schwarz:1931aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Schwarz:1931aa} + +\subsection*{Wirth:1939aa} +\label{sec:Wirth:1939aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Wirth:1939aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Wirth:1939aa} + +\subsection*{Zdenek:1939aa} +\label{sec:Zdenek:1939aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Zdenek:1939aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Zdenek:1939aa} + +\subsection*{Edwards_2017} +\label{sec:Edwards_2017} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Edwards_2017} + +\subsubsection*{year} +\label{sec:year} +\cite*{Edwards_2017} + +\subsection*{Rohacek:2010aa} +\label{sec:Rohacek:2010aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Rohacek:2010aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Rohacek:2010aa} + +\subsection*{Trnkova:2010aa} +\label{sec:Trnkova:2010aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Trnkova:2010aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Trnkova:2010aa} + +\subsection*{Riggs:2016aa} +\label{sec:Riggs:2016aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Riggs:2016aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Riggs:2016aa} + +\printbibliography +\end{document} \ No newline at end of file diff --git a/bibformat/4ht/older/fo.tmp b/bibformat/4ht/older/fo.tmp new file mode 100644 index 0000000..41b58e2 --- /dev/null +++ b/bibformat/4ht/older/fo.tmp @@ -0,0 +1,2 @@ + +/* css.sty */ \ No newline at end of file diff --git a/bibformat/4ht/older/fo.xml b/bibformat/4ht/older/fo.xml new file mode 100644 index 0000000..cb937ce --- /dev/null +++ b/bibformat/4ht/older/fo.xml @@ -0,0 +1,885 @@ + + + +]> + + + + + + <author/> + </titleStmt> + <publicationStmt> + <p/> + </publicationStmt> + <sourceDesc> + <p>fo.xml from fo.tex (TeX4ht)</p> + </sourceDesc> + </fileDesc> + <revisionDesc> + <list type="simple"> + <item/> + </list> + </revisionDesc> + </teiHeader> + <text> + <body> + <!--l. 63--> + <div type="section"> + <head><ref id="x1-10001"/>Dummy</head> + <div type="preamble"> + <p/> + <!--l. 65--> + <p> + </p> + </div> + <!--l. 65--> + <div type="likesubsection"> + <head><ref id="x1-20001"/>Schwartz_1995</head> + <div type="preamble"> + <p/> + <!--l. 68--> + <p> + </p> + </div> + <!--l. 68--> + <div type="likesubsubsection"> + <head><ref id="x1-30001"/>authoryear</head> + <!--l. 70--> + <p> Schwartz 1995 +</p> + <!--l. 72--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 72--> + <div type="likesubsubsection"> + <head><ref id="x1-40001"/>year</head> + <!--l. 74--> + <p> 1995 +</p> + <!--l. 77--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 77--> + <div type="likesubsection"> + <head><ref id="x1-50001"/>Caraffa_2011</head> + <div type="preamble"> + <p/> + <!--l. 80--> + <p> + </p> + </div> + <!--l. 80--> + <div type="likesubsubsection"> + <head><ref id="x1-60001"/>authoryear</head> + <!--l. 82--> + <p> Caraffa 2011 +</p> + <!--l. 84--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 84--> + <div type="likesubsubsection"> + <head><ref id="x1-70001"/>year</head> + <!--l. 86--> + <p> 2011 + +</p> + <!--l. 88--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 88--> + <div type="likesubsection"> + <head><ref id="x1-80001"/>Trnkova:2015aa</head> + <div type="preamble"> + <p/> + <!--l. 91--> + <p> + </p> + </div> + <!--l. 91--> + <div type="likesubsubsection"> + <head><ref id="x1-90001"/>authoryear</head> + <!--l. 93--> + <p> Trnková 2015 +</p> + <!--l. 95--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 95--> + <div type="likesubsubsection"> + <head><ref id="x1-100001"/>year</head> + <!--l. 97--> + <p> 2015 +</p> + <!--l. 99--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 99--> + <div type="likesubsection"> + <head><ref id="x1-110001"/>Frodl:1988aa</head> + <div type="preamble"> + <p/> + <!--l. 102--> + <p> + </p> + </div> + <!--l. 102--> + <div type="likesubsubsection"> + <head><ref id="x1-120001"/>authoryear</head> + <!--l. 104--> + <p> Frodl 1988 +</p> + <!--l. 106--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 106--> + <div type="likesubsubsection"> + <head><ref id="x1-130001"/>year</head> + <!--l. 108--> + <p> 1988 +</p> + <!--l. 110--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 110--> + <div type="likesubsection"> + <head><ref id="x1-140001"/>Schlosser:1934aa</head> + <div type="preamble"> + <p/> + <!--l. 113--> + <p> + </p> + </div> + <!--l. 113--> + <div type="likesubsubsection"> + <head><ref id="x1-150001"/>authoryear</head> + <!--l. 115--> + <p> Schlosser 1934 +</p> + <!--l. 117--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 117--> + <div type="likesubsubsection"> + <head><ref id="x1-160001"/>year</head> + <!--l. 119--> + <p> 1934 +</p> + <!--l. 121--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 121--> + <div type="likesubsection"> + <head><ref id="x1-170001"/>Bruckler:2001aa</head> + <div type="preamble"> + <p/> + <!--l. 124--> + <p> + </p> + </div> + <!--l. 124--> + <div type="likesubsubsection"> + <head><ref id="x1-180001"/>authoryear</head> + <!--l. 126--> + <p> Brückler and Nimeth 2001 +</p> + <!--l. 128--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 128--> + <div type="likesubsubsection"> + <head><ref id="x1-190001"/>year</head> + <!--l. 130--> + <p> 2001 +</p> + <!--l. 132--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 132--> + <div type="likesubsection"> + <head><ref id="x1-200001"/>Lachnit:2005aa</head> + <div type="preamble"> + <p/> + <!--l. 135--> + <p> + </p> + </div> + <!--l. 135--> + <div type="likesubsubsection"> + <head><ref id="x1-210001"/>authoryear</head> + <!--l. 137--> + <p> Lachnit 2005 + +</p> + <!--l. 139--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 139--> + <div type="likesubsubsection"> + <head><ref id="x1-220001"/>year</head> + <!--l. 141--> + <p> 2005 +</p> + <!--l. 143--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 143--> + <div type="likesubsection"> + <head><ref id="x1-230001"/>Eitelberger:1863ab</head> + <div type="preamble"> + <p/> + <!--l. 146--> + <p> + </p> + </div> + <!--l. 146--> + <div type="likesubsubsection"> + <head><ref id="x1-240001"/>authoryear</head> + <!--l. 148--> + <p> Eitelberger 1863 +</p> + <!--l. 150--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 150--> + <div type="likesubsubsection"> + <head><ref id="x1-250001"/>year</head> + <!--l. 152--> + <p> 1863 +</p> + <!--l. 154--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 154--> + <div type="likesubsection"> + <head><ref id="x1-260001"/>Faber:2015ab</head> + <div type="preamble"> + <p/> + <!--l. 157--> + <p> + </p> + </div> + <!--l. 157--> + <div type="likesubsubsection"> + <head><ref id="x1-270001"/>authoryear</head> + <!--l. 159--> + <p> Faber 2015a +</p> + <!--l. 161--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 161--> + <div type="likesubsubsection"> + <head><ref id="x1-280001"/>year</head> + <!--l. 163--> + <p> 2015a + +</p> + <!--l. 165--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 165--> + <div type="likesubsection"> + <head><ref id="x1-290001"/>Groll:1865aa</head> + <div type="preamble"> + <p/> + <!--l. 168--> + <p> + </p> + </div> + <!--l. 168--> + <div type="likesubsubsection"> + <head><ref id="x1-300001"/>authoryear</head> + <!--l. 170--> + <p><emph>Verlags-Catalog von Andreas Groll, Photograph in Wien</emph> 1865 [Vienna 1864] +</p> + <!--l. 172--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 172--> + <div type="likesubsubsection"> + <head><ref id="x1-310001"/>year</head> + <!--l. 174--> + <p> 1865 [Vienna 1864] +</p> + <!--l. 176--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 176--> + <div type="likesubsection"> + <head><ref id="x1-320001"/>Faber:2015aa</head> + <div type="preamble"> + <p/> + <!--l. 179--> + <p> + </p> + </div> + <!--l. 179--> + <div type="likesubsubsection"> + <head><ref id="x1-330001"/>authoryear</head> + <!--l. 181--> + <p> Faber 2015b +</p> + <!--l. 183--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 183--> + <div type="likesubsubsection"> + <head><ref id="x1-340001"/>year</head> + <!--l. 185--> + <p> 2015b +</p> + <!--l. 187--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 187--> + <div type="likesubsection"> + <head><ref id="x1-350001"/>Noll:1992aa</head> + <div type="preamble"> + <p/> + <!--l. 190--> + <p> + </p> + </div> + <!--l. 190--> + <div type="likesubsubsection"> + <head><ref id="x1-360001"/>authoryear</head> + <!--l. 192--> + <p> Noll 1992 +</p> + <!--l. 194--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 194--> + <div type="likesubsubsection"> + <head><ref id="x1-370001"/>year</head> + <!--l. 196--> + <p> 1992 +</p> + <!--l. 198--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 198--> + <div type="likesubsection"> + <head><ref id="x1-380001"/>Uhlikova:2010aa</head> + <div type="preamble"> + <p/> + <!--l. 201--> + <p> + </p> + </div> + <!--l. 201--> + <div type="likesubsubsection"> + <head><ref id="x1-390001"/>authoryear</head> + <!--l. 203--> + <p> Uhlíková 2010 +</p> + <!--l. 205--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 205--> + <div type="likesubsubsection"> + <head><ref id="x1-400001"/>year</head> + <!--l. 207--> + <p> 2010 +</p> + <!--l. 209--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 209--> + <div type="likesubsection"> + <head><ref id="x1-410001"/>Schwarz:1931aa</head> + <div type="preamble"> + <p/> + <!--l. 212--> + <p> + </p> + </div> + <!--l. 212--> + <div type="likesubsubsection"> + <head><ref id="x1-420001"/>authoryear</head> + <!--l. 214--> + <p> Schwarz 1931 + +</p> + <!--l. 216--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 216--> + <div type="likesubsubsection"> + <head><ref id="x1-430001"/>year</head> + <!--l. 218--> + <p> 1931 +</p> + <!--l. 220--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 220--> + <div type="likesubsection"> + <head><ref id="x1-440001"/>Wirth:1939aa</head> + <div type="preamble"> + <p/> + <!--l. 223--> + <p> + </p> + </div> + <!--l. 223--> + <div type="likesubsubsection"> + <head><ref id="x1-450001"/>authoryear</head> + <!--l. 225--> + <p> Zdenĕk Wirth 1939–1940 +</p> + <!--l. 227--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 227--> + <div type="likesubsubsection"> + <head><ref id="x1-460001"/>year</head> + <!--l. 229--> + <p> 1939–1940 +</p> + <!--l. 231--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 231--> + <div type="likesubsection"> + <head><ref id="x1-470001"/>Zdenek:1939aa</head> + <div type="preamble"> + <p/> + <!--l. 234--> + <p> + </p> + </div> + <!--l. 234--> + <div type="likesubsubsection"> + <head><ref id="x1-480001"/>authoryear</head> + <!--l. 236--> + <p> Zdeněk Wirth 1939 +</p> + <!--l. 238--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 238--> + <div type="likesubsubsection"> + <head><ref id="x1-490001"/>year</head> + <!--l. 240--> + <p> 1939 + +</p> + <!--l. 242--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 242--> + <div type="likesubsection"> + <head><ref id="x1-500001"/>Edwards_2017</head> + <div type="preamble"> + <p/> + <!--l. 245--> + <p> + </p> + </div> + <!--l. 245--> + <div type="likesubsubsection"> + <head><ref id="x1-510001"/>authoryear</head> + <!--l. 247--> + <p> Edwards 2017 +</p> + <!--l. 249--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 249--> + <div type="likesubsubsection"> + <head><ref id="x1-520001"/>year</head> + <!--l. 251--> + <p> 2017 +</p> + <!--l. 253--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 253--> + <div type="likesubsection"> + <head><ref id="x1-530001"/>Rohacek:2010aa</head> + <div type="preamble"> + <p/> + <!--l. 256--> + <p> + </p> + </div> + <!--l. 256--> + <div type="likesubsubsection"> + <head><ref id="x1-540001"/>authoryear</head> + <!--l. 258--> + <p> Jiří and Uhlíková 2010 +</p> + <!--l. 260--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 260--> + <div type="likesubsubsection"> + <head><ref id="x1-550001"/>year</head> + <!--l. 262--> + <p> 2010 +</p> + <!--l. 264--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 264--> + <div type="likesubsection"> + <head><ref id="x1-560001"/>Trnkova:2010aa</head> + <div type="preamble"> + <p/> + <!--l. 267--> + <p> + </p> + </div> + <!--l. 267--> + <div type="likesubsubsection"> + <head><ref id="x1-570001"/>authoryear</head> + <!--l. 269--> + <p> Trnková 2010 +</p> + <!--l. 271--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 271--> + <div type="likesubsubsection"> + <head><ref id="x1-580001"/>year</head> + <!--l. 273--> + <p> 2010 +</p> + <!--l. 275--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + <!--l. 275--> + <div type="likesubsection"> + <head><ref id="x1-590001"/>Riggs:2016aa</head> + <div type="preamble"> + <p/> + <!--l. 278--> + <p> + </p> + </div> + <!--l. 278--> + <div type="likesubsubsection"> + <head><ref id="x1-600001"/>authoryear</head> + <!--l. 280--> + <p> Riggs 2016 +</p> + <!--l. 282--> + <p> + </p> + </div> + <!--end likesubsubsection--> + <!--l. 282--> + <div type="likesubsubsection"> + <head><ref id="x1-610001"/>year</head> + <!--l. 284--> + <p> 2016 +</p> + <!--l. 287--> + <p> + </p> + </div> + <!--end likesubsubsection--> + </div> + <!--end likesubsection--> + </div> + <!--end section--> + <!--l. 287--> + <div type="section"> + <head><ref id="x1-620001"/>References</head> + <!--l. 287--> + <p> + </p> + <dl class="thebibliography"> + <dt id="X0-Bruckler:2001aa" class="thebibliography"> +</dt> + <dd id="bib-1" class="thebibliography"> + <!--l. 287--> + <p><a id="page.9"/><ref target="fo.xml" id="X0-"/>Brückler, Theodor and Ulrike Nimeth (2001). <emph>Personenlexikon zur + Österreichischen Denkmlapflege</emph>. Vol. 7. Horn: Berger. + </p> + </dd> + <dt id="X0-Caraffa_2011" class="thebibliography"> +</dt> + <dd id="bib-2" class="thebibliography"> + <!--l. 287--> + <p>Caraffa, Costanza (2011). From Photo Libraries to Photo Archives: On the + Epistemological Potential of Art-Historical Photo Collections. In: <emph>Photo Archives and + the Photographic Memory of Art History</emph>. Ed. by Costanza Caraffa. Berlin and Munich: + Deutscher Kunstverlag, 11–44. + </p> + </dd> + <dt id="X0-Edwards_2017" class="thebibliography"> +</dt> + <dd id="bib-3" class="thebibliography"> + <!--l. 287--> + <p>Edwards, Elizabeth (2017). Location, Location: A Polemic of Photographs and + Institutional Practices. <emph>Science Museum Group Journal</emph> 7 (Spring 2017). <hi rend="sc">doi</hi>: + 10.15180/170709. <hi rend="sc">url</hi>: <xref doc="xr-ent0">http://dx.doi.org/10.15180/170709</xref>. + </p> + </dd> + <dt id="X0-Eitelberger:1863ab" class="thebibliography"> +</dt> + <dd id="bib-4" class="thebibliography"> + <!--l. 287--> + <p>Eitelberger, Rudolf von (1863). Der Kupferstich und die Fotografie. <emph>Zeitschrift fur + Fotografie und Stereoskopie</emph> 7:123–126. + </p> + </dd> + <dt id="X0-Faber:2015ab" class="thebibliography"> +</dt> + <dd id="bib-5" class="thebibliography"> + <!--l. 287--> + <p>Faber, Monika (2015a). ‘… mit aller Kraft auf die Photographie verlegt …’: + Annäherungen an das Berufsbild eines frühen Fotografen. In: <emph>Andreas Groll: + Wiens erster moderner Fotograf. 1812–1872</emph>. Ed. by Monika Faber. Salzburg: Fotohof + edition, 27–95. + </p> + </dd> + <dt id="X0-Faber:2015aa" class="thebibliography"> +</dt> + <dd id="bib-6" class="thebibliography"> + <!--l. 287--> + <p>– ed. (2015b). <emph>Andreas Groll: Wiens erster moderner Fotograf. 1812–1872</emph>. Salzburg: + Fotohof edition. + </p> + </dd> + <dt id="X0-Frodl:1988aa" class="thebibliography"> +</dt> + <dd id="bib-7" class="thebibliography"> + <!--l. 287--> + <p>Frodl, Walter (1988). <emph>Idee und Verwirklichung: Das Werden der staatlichen + Denkmalpflege in Österreich</emph>. Wien, Köln, and Graz: Böhlau. + </p> + </dd> + <dt id="X0-Rohacek:2010aa" class="thebibliography"> +</dt> + <dd id="bib-8" class="thebibliography"> + <!--l. 287--> + <p>Jiří, Roháček and Kristina Uhlíková, eds. (2010). <emph>Zdeněk + Wirth pohledem dnešní doby</emph>. Prague: Artefactum. + </p> + </dd> + <dt id="X0-Lachnit:2005aa" class="thebibliography"> +</dt> + <dd id="bib-9" class="thebibliography"> + <!--l. 287--> + <p>Lachnit, Edwin (2005). <emph>Die Wiener Schule der Kunstgeschichte und die Kunst ihrer + Zeit: zum Verhältnis von Methode und Forschungsgegenstand am Beginn der + Moderne</emph>. Vienna, Cologne, and Weimar: Böhlau. + </p> + </dd> + <dt id="X0-Noll:1992aa" class="thebibliography"> +</dt> + <dd id="bib-10" class="thebibliography"> + <!--l. 287--> + <p>Noll, Jindřich (1992). <emph>Josef Schulz 1840–1917</emph>. Prague: Národní galerie. + </p> + </dd> + <dt id="X0-Riggs:2016aa" class="thebibliography"> +</dt> + <dd id="bib-11" class="thebibliography"> + <!--l. 287--> + <p>Riggs, Christina (2016). Photography and Antiquity in the Archive, or How Howard + Carter Moved the Road to the Valley of the Kings. <emph>History of Photography</emph> 40(3): + 267–282. + + </p> + </dd> + <dt id="X0-Schlosser:1934aa" class="thebibliography"> +</dt> + <dd id="bib-12" class="thebibliography"> + <!--l. 287--> + <p>Schlosser, Julius von (1934). Die Wiener Schule der Kunstgeschichte: Rückblick auf + ein Säkulum deutscher Gelehrtenarbeit in Österreich. <emph>Mitteilungen des Instituts + für Österreichische Geschichtsforschung</emph> 13(2):141–228. + </p> + </dd> + <dt id="X0-Schwartz_1995" class="thebibliography"> +</dt> + <dd id="bib-13" class="thebibliography"> + <!--l. 287--> + <p>Schwartz, Joan M. (1995). ‘We Make Our Tools and Our Tools Make Us”: Lessons + from Photographs for the Practice, Politics, and Poetics of Diplomatics’. <emph>Archivaria: + The Journal of the Association of Canadian Archivists</emph> 40:40–74. + </p> + </dd> + <dt id="X0-Schwarz:1931aa" class="thebibliography"> +</dt> + <dd id="bib-14" class="thebibliography"> + <!--l. 287--> + <p>Schwarz, Heinrich (1931). <emph>David Octavius Hill: der Meister der Photographie</emph>. Leipzig: + Insel-Verlag. + </p> + </dd> + <dt id="X0-Trnkova:2010aa" class="thebibliography"> +</dt> + <dd id="bib-15" class="thebibliography"> + <!--l. 287--> + <p>Trnková, Petra, ed. (2010). <emph>Oudadate Pix: Revealing a Photographic Archive</emph>. + Prague: Artefactum. + </p> + </dd> + <dt id="X0-Trnkova:2015aa" class="thebibliography"> +</dt> + <dd id="bib-16" class="thebibliography"> + <!--l. 287--> + <p>– (2015). Archäologischer Frühling: + Aufnahmen historischer Baudenkmäler in Böhmen. In: <emph>Andreas Groll: Wiens + erster moderner Fotograf. 1812–1872</emph>. Salzburg: Fotohof edition, 237–245. + </p> + </dd> + <dt id="X0-Uhlikova:2010aa" class="thebibliography"> +</dt> + <dd id="bib-17" class="thebibliography"> + <!--l. 287--> + <p>Uhlíková, Kristina (2010). + <emph>Zdeněk Wirth, první dvě životní etapy (1878–1939)</emph>. Prague: + Národní památkový ústav. + </p> + </dd> + <dt id="X0-Groll:1865aa" class="thebibliography"> +</dt> + <dd id="bib-18" class="thebibliography"> + <!--l. 287--> + <p><emph>Verlags-Catalog von Andreas Groll, Photograph in Wien</emph> (1865 [Vienna 1864]). + </p> + </dd> + <dt id="X0-Wirth:1939aa" class="thebibliography"> +</dt> + <dd id="bib-19" class="thebibliography"> + <!--l. 287--> + <p>Wirth, Zdenĕk (1939–1940). První fotograf Prahy. <emph>Umění</emph> 12: + 361–376. + </p> + </dd> + <dt id="X0-Zdenek:1939aa" class="thebibliography"> +</dt> + <dd id="bib-20" class="thebibliography"> + <!--l. 287--> + <p>Wirth, Zdeněk, ed. (1939). <emph>Sto let české fotografie 1839–1939</emph>. Prague: + Umělecko-průmyslové museum.</p> + </dd> + </dl> + </div> + <!--end section--> + </body> + </text> +</TEI.2> diff --git a/bibformat/4ht/older/fo.xref b/bibformat/4ht/older/fo.xref new file mode 100644 index 0000000..75a44b6 --- /dev/null +++ b/bibformat/4ht/older/fo.xref @@ -0,0 +1,65 @@ +\:CrossWord{)F1F-}{fo.html}{1}% +\:CrossWord{)Qx1-10001}{1}{1}% +\:CrossWord{)Qx1-20001}{1}{1}% +\:CrossWord{)Qx1-30001}{1}{1}% +\:CrossWord{)Qx1-40001}{1}{1}% +\:CrossWord{)Qx1-50001}{1}{1}% +\:CrossWord{)Qx1-60001}{1}{1}% +\:CrossWord{)Qx1-70001}{1}{2}% +\:CrossWord{)Qx1-80001}{1}{2}% +\:CrossWord{)Qx1-90001}{1}{2}% +\:CrossWord{)Qx1-100001}{1}{2}% +\:CrossWord{)Qx1-110001}{1}{2}% +\:CrossWord{)Qx1-120001}{1}{2}% +\:CrossWord{)Qx1-130001}{1}{3}% +\:CrossWord{)Qx1-140001}{1}{3}% +\:CrossWord{)Qx1-150001}{1}{3}% +\:CrossWord{)Qx1-160001}{1}{3}% +\:CrossWord{)Qx1-170001}{1}{3}% +\:CrossWord{)Qx1-180001}{1}{3}% +\:CrossWord{)Qx1-190001}{1}{4}% +\:CrossWord{)Qx1-200001}{1}{4}% +\:CrossWord{)Qx1-210001}{1}{4}% +\:CrossWord{)Qx1-220001}{1}{4}% +\:CrossWord{)Qx1-230001}{1}{4}% +\:CrossWord{)Qx1-240001}{1}{4}% +\:CrossWord{)Qx1-250001}{1}{5}% +\:CrossWord{)Qx1-260001}{1}{5}% +\:CrossWord{)Qx1-270001}{1}{5}% +\:CrossWord{)Qx1-280001}{1}{5}% +\:CrossWord{)Qx1-290001}{1}{5}% +\:CrossWord{)Qx1-300001}{1}{5}% +\:CrossWord{)Qx1-310001}{1}{6}% +\:CrossWord{)Qx1-320001}{1}{6}% +\:CrossWord{)Qx1-330001}{1}{6}% +\:CrossWord{)Qx1-340001}{1}{6}% +\:CrossWord{)Qx1-350001}{1}{6}% +\:CrossWord{)Qx1-360001}{1}{6}% +\:CrossWord{)Qx1-370001}{1}{7}% +\:CrossWord{)Qx1-380001}{1}{7}% +\:CrossWord{)Qx1-390001}{1}{7}% +\:CrossWord{)Qx1-400001}{1}{7}% +\:CrossWord{)Qx1-410001}{1}{7}% +\:CrossWord{)Qx1-420001}{1}{7}% +\:CrossWord{)Qx1-430001}{1}{8}% +\:CrossWord{)Qx1-440001}{1}{8}% +\:CrossWord{)Qx1-450001}{1}{8}% +\:CrossWord{)Qx1-460001}{1}{8}% +\:CrossWord{)Qx1-470001}{1}{8}% +\:CrossWord{)Qx1-480001}{1}{8}% +\:CrossWord{)Qx1-490001}{1}{9}% +\:CrossWord{)Qx1-500001}{1}{9}% +\:CrossWord{)Qx1-510001}{1}{9}% +\:CrossWord{)Qx1-520001}{1}{9}% +\:CrossWord{)Qx1-530001}{1}{9}% +\:CrossWord{)Qx1-540001}{1}{9}% +\:CrossWord{)Qx1-550001}{1}{10}% +\:CrossWord{)Qx1-560001}{1}{10}% +\:CrossWord{)Qx1-570001}{1}{10}% +\:CrossWord{)Qx1-580001}{1}{10}% +\:CrossWord{)Qx1-590001}{1}{10}% +\:CrossWord{)Qx1-600001}{1}{10}% +\:CrossWord{)Qx1-610001}{1}{11}% +\:CrossWord{)Qx1-620001}{1}{11}% +\:CrossWord{)Qpage.11}{1}{11}% +\:CrossWord{)QX0-}{1}{11}% diff --git a/bibformat/4ht/older/folbl.tex b/bibformat/4ht/older/folbl.tex new file mode 100644 index 0000000..92adb3a --- /dev/null +++ b/bibformat/4ht/older/folbl.tex @@ -0,0 +1,287 @@ +\documentclass{scrartcl} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[english]{babel} +\newcommand{\EOAbibtweaks}{ +% Remove pp from references +\DeclareFieldFormat{postnote}{##1} +% Remove quotation marks from certain titles +\DeclareFieldFormat[thesis]{title}{\mkbibemph{##1}} +\DeclareFieldFormat[article]{title}{##1} +\DeclareFieldFormat[incollection]{title}{##1} +\DeclareFieldFormat[inproceedings]{title}{##1} +\DeclareFieldFormat[inbook]{title}{\mkbibemph{##1}} +\DeclareFieldFormat{title}{\mkbibemph{##1}} +% Remove pp from bibliography at all +\DeclareFieldFormat{pages}{##1}% +% Remove "In:" from articles +\renewbibmacro{in:}{% + \ifentrytype{article}{}{% + \printtext{\bibstring{in}\intitlepunct}}} +% Delete Vol. as praefix +\DeclareFieldFormat*{volume}{##1} +% Use : for pages of an article, use . for the rest +\renewcommand*{\bibpagespunct}{% +\ifentrytype{article}% +{% +\iffieldundef{Number}% +{\addcolon\hspace{0pt}}% +{}% +}% +{,\space}% +} +% Group Volume and Issue in {Brackets} +\renewbibmacro*{journal+issuetitle}{% + \usebibmacro{journal}% + \setunit*{\addspace}% + \iffieldundef{series} + {} + {\newunit + \printfield{series}% + \setunit{\addspace}}% + \printfield{volume}% + \iffieldundef{number} + {} + {\mkbibparens{\printfield{number}}}% + \setunit{\addcomma\space}% + \printfield{eid}% + \setunit{\addspace}% + \usebibmacro{issue+date}% + \setunit{\addcolon\space}% + \usebibmacro{issue}% + \newunit} +% Bug fix for Windows +\defbibheading{none}[]{} +} +\usepackage[autostyle]{csquotes} +\usepackage[mincitenames=1,maxcitenames=3,maxbibnames=100,style=authoryear,backend=biber,autolang=hyphen]{biblatex} +\EOAbibtweaks +\addbibresource{fo.bib} +\begin{document} +% \maketitle + +\section{Dummy} + +\subsection*{Schwartz_1995} +\label{sec:schwartz_1995} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Schwartz_1995} + +\subsubsection*{year} +\label{sec:year} +\cite*{Schwartz_1995} + + +\subsection*{Caraffa_2011} +\label{sec:Caraffa_2011} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Caraffa_2011} + +\subsubsection*{year} +\label{sec:year} +\cite*{Caraffa_2011} + +\subsection*{Trnkova:2015aa} +\label{sec:Trnkova:2015aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Trnkova:2015aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Trnkova:2015aa} + +\subsection*{Frodl:1988aa} +\label{sec:Frodl:1988aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Frodl:1988aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Frodl:1988aa} + +\subsection*{Schlosser:1934aa} +\label{sec:Schlosser:1934aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Schlosser:1934aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Schlosser:1934aa} + +\subsection*{Bruckler:2001aa} +\label{sec:Bruckler:2001aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Bruckler:2001aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Bruckler:2001aa} + +\subsection*{Lachnit:2005aa} +\label{sec:Lachnit:2005aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Lachnit:2005aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Lachnit:2005aa} + +\subsection*{Eitelberger:1863ab} +\label{sec:Eitelberger:1863ab} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Eitelberger:1863ab} + +\subsubsection*{year} +\label{sec:year} +\cite*{Eitelberger:1863ab} + +\subsection*{Faber:2015ab} +\label{sec:Faber:2015ab} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Faber:2015ab} + +\subsubsection*{year} +\label{sec:year} +\cite*{Faber:2015ab} + +\subsection*{Groll:1865aa} +\label{sec:Groll:1865aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Groll:1865aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Groll:1865aa} + +\subsection*{Faber:2015aa} +\label{sec:Faber:2015aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Faber:2015aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Faber:2015aa} + +\subsection*{Noll:1992aa} +\label{sec:Noll:1992aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Noll:1992aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Noll:1992aa} + +\subsection*{Uhlikova:2010aa} +\label{sec:Uhlikova:2010aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Uhlikova:2010aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Uhlikova:2010aa} + +\subsection*{Schwarz:1931aa} +\label{sec:Schwarz:1931aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Schwarz:1931aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Schwarz:1931aa} + +\subsection*{Wirth:1939aa} +\label{sec:Wirth:1939aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Wirth:1939aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Wirth:1939aa} + +\subsection*{Zdenek:1939aa} +\label{sec:Zdenek:1939aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Zdenek:1939aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Zdenek:1939aa} + +\subsection*{Edwards_2017} +\label{sec:Edwards_2017} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Edwards_2017} + +\subsubsection*{year} +\label{sec:year} +\cite*{Edwards_2017} + +\subsection*{Rohacek:2010aa} +\label{sec:Rohacek:2010aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Rohacek:2010aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Rohacek:2010aa} + +\subsection*{Trnkova:2010aa} +\label{sec:Trnkova:2010aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Trnkova:2010aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Trnkova:2010aa} + +\subsection*{Riggs:2016aa} +\label{sec:Riggs:2016aa} + +\subsubsection*{authoryear} +\label{sec:authoryear} +\cite{Riggs:2016aa} + +\subsubsection*{year} +\label{sec:year} +\cite*{Riggs:2016aa} + +\printbibliography +\end{document} \ No newline at end of file diff --git a/bibformat/4ht/older/sam.tex b/bibformat/4ht/older/sam.tex new file mode 100644 index 0000000..26334a1 --- /dev/null +++ b/bibformat/4ht/older/sam.tex @@ -0,0 +1,16 @@ +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[czech]{babel} +\usepackage{biblatex} +\addbibresource{xampl.bib} +\title{Základní dokument v češtině} +\author{Michal Hoftich} +\begin{document} +\maketitle +\tableofcontents +\section{Úvod} +Příliš žluťoučký kůň \textit{úpěl} \textbf{ďábelské ódy} \parencite{article-full} + +\printbibliography +\end{document} \ No newline at end of file diff --git a/bibformat/4ht/tmp.html b/bibformat/4ht/tmp.html new file mode 100644 index 0000000..b8a10b3 --- /dev/null +++ b/bibformat/4ht/tmp.html @@ -0,0 +1,12 @@ +<h3 class="sectionHead"><a id="x1-620001"></a>References</h3> +<p class="noindent" > + <dl class="thebibliography"> + <dt id="X0-Bruckler:2001aa" class="thebibliography"></dt> + <dd id="bib-1" class="thebibliography"> + <p class="noindent" ><a id="page.11"></a><a href="fo.html" id="X0-" ></a>Brückler, Theodor and Ulrike Nimeth (2001). <span class="ecti-1095">Personenlexikon zur </span><span class="ecti-1095">Österreichischen</span> <span class="ecti-1095">Denkmlapflege</span>. Vol. 7. Horn: Berger. </dd> + <dt id="X0-Caraffa_2011" class="thebibliography"></dt> + <dd id="bib-2" class="thebibliography"><p class="noindent" >Caraffa, Costanza (2011). From Photo Libraries to Photo Archives: On the Epistemological Potential of Art-Historical Photo Collections. In: <span class="ecti-1095">Photo Archives and</span> <span class="ecti-1095">the Photographic Memory of Art History</span>. Ed. by Costanza Caraffa. Berlin and Munich: + Deutscher Kunstverlag, 11–44. + </dd><dt id="X0-Edwards_2017" class="thebibliography"> +</dt><dd +id="bib-3" class="thebibliography"> diff --git a/bibformat/4ht/tmp_files/test.4ct b/bibformat/4ht/tmp_files/test.4ct new file mode 100644 index 0000000..6ee7ab5 --- /dev/null +++ b/bibformat/4ht/tmp_files/test.4ct @@ -0,0 +1,64 @@ +\expandafter\ifx\csname doTocEntry\endcsname\relax \expandafter\endinput\fi +\doTocEntry\tocsection{1}{\csname a:TocLink\endcsname{1}{x1-10001}{QQ2-1-1}{Dummy}}{1}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-20001}{QQ2-1-2}{Edwards_2017}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-30001}{QQ2-1-3}{authoryear}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-40001}{QQ2-1-4}{year}}{1}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-50001}{QQ2-1-5}{Riggs:2016aa}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-60001}{QQ2-1-6}{authoryear}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-70001}{QQ2-1-7}{year}}{1}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-80001}{QQ2-1-8}{Bruckler:2001aa}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-90001}{QQ2-1-9}{authoryear}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-100001}{QQ2-1-10}{year}}{2}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-110001}{QQ2-1-11}{Zdenek:1939aa}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-120001}{QQ2-1-12}{authoryear}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-130001}{QQ2-1-13}{year}}{2}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-140001}{QQ2-1-14}{Caraffa_2011}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-150001}{QQ2-1-15}{authoryear}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-160001}{QQ2-1-16}{year}}{3}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-170001}{QQ2-1-17}{Uhlikova:2010aa}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-180001}{QQ2-1-18}{authoryear}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-190001}{QQ2-1-19}{year}}{3}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-200001}{QQ2-1-20}{Noll:1992aa}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-210001}{QQ2-1-21}{authoryear}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-220001}{QQ2-1-22}{year}}{4}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-230001}{QQ2-1-23}{Schwarz:1931aa}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-240001}{QQ2-1-24}{authoryear}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-250001}{QQ2-1-25}{year}}{4}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-260001}{QQ2-1-26}{Schwartz_1995}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-270001}{QQ2-1-27}{authoryear}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-280001}{QQ2-1-28}{year}}{4}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-290001}{QQ2-1-29}{Faber:2015ab}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-300001}{QQ2-1-30}{authoryear}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-310001}{QQ2-1-31}{year}}{5}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-320001}{QQ2-1-32}{Rohacek:2010aa}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-330001}{QQ2-1-33}{authoryear}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-340001}{QQ2-1-34}{year}}{5}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-350001}{QQ2-1-35}{Lachnit:2005aa}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-360001}{QQ2-1-36}{authoryear}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-370001}{QQ2-1-37}{year}}{6}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-380001}{QQ2-1-38}{Groll:1865aa}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-390001}{QQ2-1-39}{authoryear}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-400001}{QQ2-1-40}{year}}{6}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-410001}{QQ2-1-41}{Schlosser:1934aa}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-420001}{QQ2-1-42}{authoryear}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-430001}{QQ2-1-43}{year}}{7}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-440001}{QQ2-1-44}{Eitelberger:1863ab}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-450001}{QQ2-1-45}{authoryear}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-460001}{QQ2-1-46}{year}}{7}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-470001}{QQ2-1-47}{Wirth:1939aa}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-480001}{QQ2-1-48}{authoryear}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-490001}{QQ2-1-49}{year}}{7}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-500001}{QQ2-1-50}{Faber:2015aa}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-510001}{QQ2-1-51}{authoryear}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-520001}{QQ2-1-52}{year}}{8}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-530001}{QQ2-1-53}{Trnkova:2015aa}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-540001}{QQ2-1-54}{authoryear}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-550001}{QQ2-1-55}{year}}{8}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-560001}{QQ2-1-56}{Trnkova:2010aa}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-570001}{QQ2-1-57}{authoryear}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-580001}{QQ2-1-58}{year}}{9}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-590001}{QQ2-1-59}{Frodl:1988aa}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-600001}{QQ2-1-60}{authoryear}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-610001}{QQ2-1-61}{year}}{9}\relax +\doTocEntry\tocsection{}{\csname a:TocLink\endcsname{1}{x1-620001}{QQ2-1-62}{Literatur}}{9}\relax +\par diff --git a/bibformat/4ht/tmp_files/test.4tc b/bibformat/4ht/tmp_files/test.4tc new file mode 100644 index 0000000..1ddd35a --- /dev/null +++ b/bibformat/4ht/tmp_files/test.4tc @@ -0,0 +1,63 @@ +\expandafter\ifx\csname doTocEntry\endcsname\relax \expandafter\endinput\fi +\doTocEntry\tocsection{1}{\csname a:TocLink\endcsname{1}{x1-10001}{QQ2-1-1}{Dummy}}{1}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-20001}{QQ2-1-2}{Edwards_2017}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-30001}{QQ2-1-3}{authoryear}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-40001}{QQ2-1-4}{year}}{1}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-50001}{QQ2-1-5}{Riggs:2016aa}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-60001}{QQ2-1-6}{authoryear}}{1}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-70001}{QQ2-1-7}{year}}{1}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-80001}{QQ2-1-8}{Bruckler:2001aa}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-90001}{QQ2-1-9}{authoryear}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-100001}{QQ2-1-10}{year}}{2}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-110001}{QQ2-1-11}{Zdenek:1939aa}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-120001}{QQ2-1-12}{authoryear}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-130001}{QQ2-1-13}{year}}{2}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-140001}{QQ2-1-14}{Caraffa_2011}}{2}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-150001}{QQ2-1-15}{authoryear}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-160001}{QQ2-1-16}{year}}{3}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-170001}{QQ2-1-17}{Uhlikova:2010aa}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-180001}{QQ2-1-18}{authoryear}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-190001}{QQ2-1-19}{year}}{3}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-200001}{QQ2-1-20}{Noll:1992aa}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-210001}{QQ2-1-21}{authoryear}}{3}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-220001}{QQ2-1-22}{year}}{4}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-230001}{QQ2-1-23}{Schwarz:1931aa}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-240001}{QQ2-1-24}{authoryear}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-250001}{QQ2-1-25}{year}}{4}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-260001}{QQ2-1-26}{Schwartz_1995}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-270001}{QQ2-1-27}{authoryear}}{4}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-280001}{QQ2-1-28}{year}}{4}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-290001}{QQ2-1-29}{Faber:2015ab}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-300001}{QQ2-1-30}{authoryear}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-310001}{QQ2-1-31}{year}}{5}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-320001}{QQ2-1-32}{Rohacek:2010aa}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-330001}{QQ2-1-33}{authoryear}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-340001}{QQ2-1-34}{year}}{5}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-350001}{QQ2-1-35}{Lachnit:2005aa}}{5}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-360001}{QQ2-1-36}{authoryear}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-370001}{QQ2-1-37}{year}}{6}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-380001}{QQ2-1-38}{Groll:1865aa}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-390001}{QQ2-1-39}{authoryear}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-400001}{QQ2-1-40}{year}}{6}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-410001}{QQ2-1-41}{Schlosser:1934aa}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-420001}{QQ2-1-42}{authoryear}}{6}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-430001}{QQ2-1-43}{year}}{7}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-440001}{QQ2-1-44}{Eitelberger:1863ab}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-450001}{QQ2-1-45}{authoryear}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-460001}{QQ2-1-46}{year}}{7}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-470001}{QQ2-1-47}{Wirth:1939aa}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-480001}{QQ2-1-48}{authoryear}}{7}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-490001}{QQ2-1-49}{year}}{7}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-500001}{QQ2-1-50}{Faber:2015aa}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-510001}{QQ2-1-51}{authoryear}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-520001}{QQ2-1-52}{year}}{8}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-530001}{QQ2-1-53}{Trnkova:2015aa}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-540001}{QQ2-1-54}{authoryear}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-550001}{QQ2-1-55}{year}}{8}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-560001}{QQ2-1-56}{Trnkova:2010aa}}{8}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-570001}{QQ2-1-57}{authoryear}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-580001}{QQ2-1-58}{year}}{9}\relax +\doTocEntry\toclikesubsection{}{\csname a:TocLink\endcsname{1}{x1-590001}{QQ2-1-59}{Frodl:1988aa}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-600001}{QQ2-1-60}{authoryear}}{9}\relax +\doTocEntry\toclikesubsubsection{}{\csname a:TocLink\endcsname{1}{x1-610001}{QQ2-1-61}{year}}{9}\relax +\doTocEntry\tocsection{}{\csname a:TocLink\endcsname{1}{x1-620001}{QQ2-1-62}{Literatur}}{9}\relax diff --git a/bibformat/4ht/tmp_files/test.aux b/bibformat/4ht/tmp_files/test.aux new file mode 100644 index 0000000..8e11ab9 --- /dev/null +++ b/bibformat/4ht/tmp_files/test.aux @@ -0,0 +1,151 @@ +\relax +\providecommand*\new@tpo@label[2]{} +\catcode `"\active +\abx@aux@refcontext{nyt/global//global/global} +\ifx\rEfLiNK\UnDef\gdef \rEfLiNK#1#2{#2}\fi +\abx@aux@cite{Edwards_2017} +\abx@aux@segm{0}{0}{Edwards_2017} +\abx@aux@segm{0}{0}{Edwards_2017} +\abx@aux@cite{Riggs:2016aa} +\abx@aux@segm{0}{0}{Riggs:2016aa} +\abx@aux@segm{0}{0}{Riggs:2016aa} +\@writefile{toc}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax } +\@writefile{lof}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax } +\@writefile{lot}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax } +\babel@aux{german}{} +\abx@aux@page{1}{1} +\abx@aux@page{2}{1} +\abx@aux@page{3}{1} +\abx@aux@page{4}{1} +\abx@aux@cite{Bruckler:2001aa} +\abx@aux@segm{0}{0}{Bruckler:2001aa} +\abx@aux@segm{0}{0}{Bruckler:2001aa} +\abx@aux@cite{Zdenek:1939aa} +\abx@aux@segm{0}{0}{Zdenek:1939aa} +\abx@aux@segm{0}{0}{Zdenek:1939aa} +\abx@aux@page{5}{2} +\abx@aux@page{6}{2} +\abx@aux@page{7}{2} +\abx@aux@page{8}{2} +\abx@aux@cite{Caraffa_2011} +\abx@aux@segm{0}{0}{Caraffa_2011} +\abx@aux@segm{0}{0}{Caraffa_2011} +\abx@aux@cite{Uhlikova:2010aa} +\abx@aux@segm{0}{0}{Uhlikova:2010aa} +\abx@aux@segm{0}{0}{Uhlikova:2010aa} +\abx@aux@cite{Noll:1992aa} +\abx@aux@segm{0}{0}{Noll:1992aa} +\abx@aux@page{9}{3} +\abx@aux@page{10}{3} +\abx@aux@page{11}{3} +\abx@aux@page{12}{3} +\abx@aux@page{13}{3} +\abx@aux@segm{0}{0}{Noll:1992aa} +\abx@aux@cite{Schwarz:1931aa} +\abx@aux@segm{0}{0}{Schwarz:1931aa} +\abx@aux@segm{0}{0}{Schwarz:1931aa} +\abx@aux@cite{Schwartz_1995} +\abx@aux@segm{0}{0}{Schwartz_1995} +\abx@aux@segm{0}{0}{Schwartz_1995} +\abx@aux@page{14}{4} +\abx@aux@page{15}{4} +\abx@aux@page{16}{4} +\abx@aux@page{17}{4} +\abx@aux@page{18}{4} +\abx@aux@cite{Faber:2015ab} +\abx@aux@segm{0}{0}{Faber:2015ab} +\abx@aux@segm{0}{0}{Faber:2015ab} +\abx@aux@cite{Rohacek:2010aa} +\abx@aux@segm{0}{0}{Rohacek:2010aa} +\abx@aux@segm{0}{0}{Rohacek:2010aa} +\abx@aux@page{19}{5} +\abx@aux@page{20}{5} +\abx@aux@page{21}{5} +\abx@aux@page{22}{5} +\abx@aux@cite{Lachnit:2005aa} +\abx@aux@segm{0}{0}{Lachnit:2005aa} +\abx@aux@segm{0}{0}{Lachnit:2005aa} +\abx@aux@cite{Groll:1865aa} +\abx@aux@segm{0}{0}{Groll:1865aa} +\abx@aux@segm{0}{0}{Groll:1865aa} +\abx@aux@cite{Schlosser:1934aa} +\abx@aux@segm{0}{0}{Schlosser:1934aa} +\abx@aux@page{23}{6} +\abx@aux@page{24}{6} +\abx@aux@page{25}{6} +\abx@aux@page{26}{6} +\abx@aux@page{27}{6} +\abx@aux@segm{0}{0}{Schlosser:1934aa} +\abx@aux@cite{Eitelberger:1863ab} +\abx@aux@segm{0}{0}{Eitelberger:1863ab} +\abx@aux@segm{0}{0}{Eitelberger:1863ab} +\abx@aux@cite{Wirth:1939aa} +\abx@aux@segm{0}{0}{Wirth:1939aa} +\abx@aux@segm{0}{0}{Wirth:1939aa} +\abx@aux@page{28}{7} +\abx@aux@page{29}{7} +\abx@aux@page{30}{7} +\abx@aux@page{31}{7} +\abx@aux@page{32}{7} +\abx@aux@cite{Faber:2015aa} +\abx@aux@segm{0}{0}{Faber:2015aa} +\abx@aux@segm{0}{0}{Faber:2015aa} +\abx@aux@cite{Trnkova:2015aa} +\abx@aux@segm{0}{0}{Trnkova:2015aa} +\abx@aux@segm{0}{0}{Trnkova:2015aa} +\abx@aux@page{33}{8} +\abx@aux@page{34}{8} +\abx@aux@page{35}{8} +\abx@aux@page{36}{8} +\abx@aux@cite{Trnkova:2010aa} +\abx@aux@segm{0}{0}{Trnkova:2010aa} +\abx@aux@segm{0}{0}{Trnkova:2010aa} +\abx@aux@cite{Frodl:1988aa} +\abx@aux@segm{0}{0}{Frodl:1988aa} +\abx@aux@segm{0}{0}{Frodl:1988aa} +\BibFileName[0]{test.html} +\abx@aux@page{37}{9} +\abx@aux@page{38}{9} +\abx@aux@page{39}{9} +\abx@aux@page{40}{9} +\abx@aux@page{41}{9} +\abx@aux@page{42}{10} +\abx@aux@page{43}{10} +\abx@aux@page{44}{10} +\abx@aux@page{45}{10} +\abx@aux@page{46}{10} +\abx@aux@page{47}{10} +\abx@aux@page{48}{10} +\abx@aux@page{49}{10} +\abx@aux@page{50}{10} +\abx@aux@page{51}{10} +\abx@aux@refcontextdefaultsdone +\abx@aux@defaultrefcontext{0}{Bruckler:2001aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Caraffa_2011}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Edwards_2017}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Eitelberger:1863ab}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Faber:2015ab}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Faber:2015aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Frodl:1988aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Rohacek:2010aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Lachnit:2005aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Noll:1992aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Riggs:2016aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Schlosser:1934aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Schwartz_1995}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Schwarz:1931aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Trnkova:2010aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Trnkova:2015aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Uhlikova:2010aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Groll:1865aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Wirth:1939aa}{nyt/global//global/global} +\abx@aux@defaultrefcontext{0}{Zdenek:1939aa}{nyt/global//global/global} +\abx@aux@page{52}{11} +\abx@aux@page{53}{11} +\abx@aux@page{54}{11} +\abx@aux@page{55}{11} +\abx@aux@page{56}{11} +\abx@aux@page{57}{11} +\abx@aux@page{58}{11} +\abx@aux@page{59}{11} +\abx@aux@page{60}{11} diff --git a/bibformat/4ht/tmp_files/test.bbl b/bibformat/4ht/tmp_files/test.bbl new file mode 100644 index 0000000..f08e70b --- /dev/null +++ b/bibformat/4ht/tmp_files/test.bbl @@ -0,0 +1,675 @@ +% $ biblatex auxiliary file $ +% $ biblatex bbl format version 3.0 $ +% Do not modify the above lines! +% +% This is an auxiliary file used by the 'biblatex' package. +% This file may safely be deleted. It will be recreated by +% biber as required. +% +\begingroup +\makeatletter +\@ifundefined{ver@biblatex.sty} + {\@latex@error + {Missing 'biblatex' package} + {The bibliography requires the 'biblatex' package.} + \aftergroup\endinput} + {} +\endgroup + + +\refsection{0} + \datalist[entry]{nyt/global//global/global} + \entry{Bruckler:2001aa}{book}{} + \name{author}{2}{}{% + {{uniquename=0,uniquepart=base,hash=7a85de160a574a1bc88b5a5339e9254c}{% + family={Brückler}, + familyi={B\bibinitperiod}, + given={Theodor}, + giveni={T\bibinitperiod}, + givenun=0}}% + {{uniquename=0,uniquepart=base,hash=ad286ee93a617b949941c68920a12b77}{% + family={Nimeth}, + familyi={N\bibinitperiod}, + given={Ulrike}, + giveni={U\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Horn}% + } + \list{publisher}{1}{% + {Berger}% + } + \strng{namehash}{74ec18f1252a9f0488d72b7750aed19e} + \strng{fullhash}{74ec18f1252a9f0488d72b7750aed19e} + \strng{bibnamehash}{74ec18f1252a9f0488d72b7750aed19e} + \strng{authorbibnamehash}{74ec18f1252a9f0488d72b7750aed19e} + \strng{authornamehash}{74ec18f1252a9f0488d72b7750aed19e} + \strng{authorfullhash}{74ec18f1252a9f0488d72b7750aed19e} + \field{sortinit}{B} + \field{sortinithash}{276475738cc058478c1677046f857703} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{Personenlexikon zur Österreichischen Denkmlapflege} + \field{volume}{Vol.\ 7} + \field{year}{2001} + \keyw{Trnkova} + \endentry + \entry{Caraffa_2011}{incollection}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=3e90cca5bad3b738057ef2c9a5273a2e}{% + family={Caraffa}, + familyi={C\bibinitperiod}, + given={Costanza}, + giveni={C\bibinitperiod}, + givenun=0}}% + } + \name{editor}{1}{}{% + {{hash=3e90cca5bad3b738057ef2c9a5273a2e}{% + family={Caraffa}, + familyi={C\bibinitperiod}, + given={Costanza}, + giveni={C\bibinitperiod}}}% + } + \list{location}{2}{% + {Berlin}% + {Munich}% + } + \list{publisher}{1}{% + {Deutscher Kunstverlag}% + } + \strng{namehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{fullhash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{bibnamehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{authorbibnamehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{authornamehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{authorfullhash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{editorbibnamehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{editornamehash}{3e90cca5bad3b738057ef2c9a5273a2e} + \strng{editorfullhash}{3e90cca5bad3b738057ef2c9a5273a2e} + \field{sortinit}{C} + \field{sortinithash}{963e9d84a3da2344e8833203de5aed05} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{booktitle}{Photo Archives and the Photographic Memory of Art History} + \field{title}{From Photo Libraries to Photo Archives: On the Epistemological Potential of Art-Historical Photo Collections} + \field{year}{2011} + \field{pages}{11\bibrangedash 44} + \range{pages}{34} + \keyw{Sykora; Trnkova; Caraffa} + \endentry + \entry{Edwards_2017}{article}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=4e87dd56ce5b946ef01a5a37b9b768a5}{% + family={Edwards}, + familyi={E\bibinitperiod}, + given={Elizabeth}, + giveni={E\bibinitperiod}, + givenun=0}}% + } + \strng{namehash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \strng{fullhash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \strng{bibnamehash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \strng{authorbibnamehash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \strng{authornamehash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \strng{authorfullhash}{4e87dd56ce5b946ef01a5a37b9b768a5} + \field{sortinit}{E} + \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{Science Museum Group Journal} + \field{title}{Location, Location: A Polemic of Photographs and Institutional Practices} + \field{volume}{7 (Spring 2017)} + \field{year}{2017} + \verb{doi} + \verb 10.15180/170709 + \endverb + \verb{urlraw} + \verb http://dx.doi.org/10.15180/170709 + \endverb + \verb{url} + \verb http://dx.doi.org/10.15180/170709 + \endverb + \endentry + \entry{Eitelberger:1863ab}{article}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=fb2e9a2604e0d7d6a4442221b0257db7}{% + family={Eitelberger}, + familyi={E\bibinitperiod}, + given={Rudolf\bibnamedelima von}, + giveni={R\bibinitperiod\bibinitdelim v\bibinitperiod}, + givenun=0}}% + } + \strng{namehash}{fb2e9a2604e0d7d6a4442221b0257db7} + \strng{fullhash}{fb2e9a2604e0d7d6a4442221b0257db7} + \strng{bibnamehash}{fb2e9a2604e0d7d6a4442221b0257db7} + \strng{authorbibnamehash}{fb2e9a2604e0d7d6a4442221b0257db7} + \strng{authornamehash}{fb2e9a2604e0d7d6a4442221b0257db7} + \strng{authorfullhash}{fb2e9a2604e0d7d6a4442221b0257db7} + \field{sortinit}{E} + \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{Zeitschrift fur Fotografie und Stereoskopie} + \field{title}{Der Kupferstich und die Fotografie} + \field{volume}{7} + \field{year}{1863} + \field{pages}{123\bibrangedash 126} + \range{pages}{4} + \keyw{Trnkova} + \endentry + \entry{Faber:2015ab}{incollection}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=78f6e832a8caa38a869ea4f2add57a96}{% + family={Faber}, + familyi={F\bibinitperiod}, + given={Monika}, + giveni={M\bibinitperiod}, + givenun=0}}% + } + \name{editor}{1}{}{% + {{hash=78f6e832a8caa38a869ea4f2add57a96}{% + family={Faber}, + familyi={F\bibinitperiod}, + given={Monika}, + giveni={M\bibinitperiod}}}% + } + \list{location}{1}{% + {Salzburg}% + } + \list{publisher}{1}{% + {Fotohof edition}% + } + \strng{namehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{fullhash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{bibnamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{authorbibnamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{authornamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{authorfullhash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editorbibnamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editornamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editorfullhash}{78f6e832a8caa38a869ea4f2add57a96} + \field{extraname}{1} + \field{sortinit}{F} + \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72} + \field{extradate}{1} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{booktitle}{Andreas Groll: Wiens erster moderner Fotograf. 1812–1872} + \field{title}{‘… mit aller Kraft auf die Photographie verlegt …’: Annäherungen an das Berufsbild eines frühen Fotografen} + \field{year}{2015} + \field{pages}{27\bibrangedash 95} + \range{pages}{69} + \keyw{Trnkova} + \endentry + \entry{Faber:2015aa}{book}{} + \name{editor}{1}{}{% + {{uniquename=0,uniquepart=base,hash=78f6e832a8caa38a869ea4f2add57a96}{% + family={Faber}, + familyi={F\bibinitperiod}, + given={Monika}, + giveni={M\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Salzburg}% + } + \list{publisher}{1}{% + {Fotohof edition}% + } + \strng{namehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{fullhash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{bibnamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editorbibnamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editornamehash}{78f6e832a8caa38a869ea4f2add57a96} + \strng{editorfullhash}{78f6e832a8caa38a869ea4f2add57a96} + \field{extraname}{2} + \field{sortinit}{F} + \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72} + \field{extradate}{2} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{editor} + \field{labeltitlesource}{title} + \field{title}{Andreas Groll: Wiens erster moderner Fotograf. 1812–1872} + \field{year}{2015} + \keyw{Trnkova} + \endentry + \entry{Frodl:1988aa}{book}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=032a0bb377c298feabd0b458cae3ab35}{% + family={Frodl}, + familyi={F\bibinitperiod}, + given={Walter}, + giveni={W\bibinitperiod}, + givenun=0}}% + } + \list{location}{3}{% + {Wien}% + {Köln}% + {Graz}% + } + \list{publisher}{1}{% + {Böhlau}% + } + \strng{namehash}{032a0bb377c298feabd0b458cae3ab35} + \strng{fullhash}{032a0bb377c298feabd0b458cae3ab35} + \strng{bibnamehash}{032a0bb377c298feabd0b458cae3ab35} + \strng{authorbibnamehash}{032a0bb377c298feabd0b458cae3ab35} + \strng{authornamehash}{032a0bb377c298feabd0b458cae3ab35} + \strng{authorfullhash}{032a0bb377c298feabd0b458cae3ab35} + \field{sortinit}{F} + \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{Idee und Verwirklichung: Das Werden der staatlichen Denkmalpflege in Österreich} + \field{year}{1988} + \keyw{Mausi} + \endentry + \entry{Rohacek:2010aa}{book}{} + \name{editor}{2}{}{% + {{uniquename=0,uniquepart=base,hash=621be5baf1c8e09d61033755e7f01278}{% + family={Jiří}, + familyi={J\bibinitperiod}, + given={Roháček}, + giveni={R\bibinitperiod}, + givenun=0}}% + {{uniquename=0,uniquepart=base,hash=e9138635f7e2be25c0020cbbb57344cc}{% + family={Uhlíková}, + familyi={U\bibinitperiod}, + given={Kristina}, + giveni={K\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Prague}% + } + \list{publisher}{1}{% + {Artefactum}% + } + \strng{namehash}{572ef81b176a047f270766cc160df14b} + \strng{fullhash}{572ef81b176a047f270766cc160df14b} + \strng{bibnamehash}{572ef81b176a047f270766cc160df14b} + \strng{editorbibnamehash}{572ef81b176a047f270766cc160df14b} + \strng{editornamehash}{572ef81b176a047f270766cc160df14b} + \strng{editorfullhash}{572ef81b176a047f270766cc160df14b} + \field{sortinit}{J} + \field{sortinithash}{fce5f8d0bd05e8d93f3dbe21c78897ca} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{editor} + \field{labeltitlesource}{title} + \field{title}{Zdeněk Wirth pohledem dnešní doby} + \field{year}{2010} + \keyw{Trnkova} + \endentry + \entry{Lachnit:2005aa}{book}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=d231a3b8f04e9821384b1d7f798b75cb}{% + family={Lachnit}, + familyi={L\bibinitperiod}, + given={Edwin}, + giveni={E\bibinitperiod}, + givenun=0}}% + } + \list{location}{3}{% + {Vienna}% + {Cologne}% + {Weimar}% + } + \list{publisher}{1}{% + {Böhlau}% + } + \strng{namehash}{d231a3b8f04e9821384b1d7f798b75cb} + \strng{fullhash}{d231a3b8f04e9821384b1d7f798b75cb} + \strng{bibnamehash}{d231a3b8f04e9821384b1d7f798b75cb} + \strng{authorbibnamehash}{d231a3b8f04e9821384b1d7f798b75cb} + \strng{authornamehash}{d231a3b8f04e9821384b1d7f798b75cb} + \strng{authorfullhash}{d231a3b8f04e9821384b1d7f798b75cb} + \field{sortinit}{L} + \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{Die Wiener Schule der Kunstgeschichte und die Kunst ihrer Zeit: zum Verhältnis von Methode und Forschungsgegenstand am Beginn der Moderne} + \field{year}{2005} + \keyw{Trnkova} + \endentry + \entry{Noll:1992aa}{book}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=4fdcaec4eebffbaee27e030d4caa45da}{% + family={Noll}, + familyi={N\bibinitperiod}, + given={Jindřich}, + giveni={J\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Prague}% + } + \list{publisher}{1}{% + {Národní galerie}% + } + \strng{namehash}{4fdcaec4eebffbaee27e030d4caa45da} + \strng{fullhash}{4fdcaec4eebffbaee27e030d4caa45da} + \strng{bibnamehash}{4fdcaec4eebffbaee27e030d4caa45da} + \strng{authorbibnamehash}{4fdcaec4eebffbaee27e030d4caa45da} + \strng{authornamehash}{4fdcaec4eebffbaee27e030d4caa45da} + \strng{authorfullhash}{4fdcaec4eebffbaee27e030d4caa45da} + \field{sortinit}{N} + \field{sortinithash}{f7242c3ed3dc50029fca1be76c497c7c} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{Josef Schulz 1840–1917} + \field{year}{1992} + \keyw{Trnkova} + \endentry + \entry{Riggs:2016aa}{article}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=f7a661e69856fc25b02ebc21e88df7eb}{% + family={Riggs}, + familyi={R\bibinitperiod}, + given={Christina}, + giveni={C\bibinitperiod}, + givenun=0}}% + } + \strng{namehash}{f7a661e69856fc25b02ebc21e88df7eb} + \strng{fullhash}{f7a661e69856fc25b02ebc21e88df7eb} + \strng{bibnamehash}{f7a661e69856fc25b02ebc21e88df7eb} + \strng{authorbibnamehash}{f7a661e69856fc25b02ebc21e88df7eb} + \strng{authornamehash}{f7a661e69856fc25b02ebc21e88df7eb} + \strng{authorfullhash}{f7a661e69856fc25b02ebc21e88df7eb} + \field{sortinit}{R} + \field{sortinithash}{da6b42bd3ab22fee61abed031ee405f7} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{History of Photography} + \field{number}{3} + \field{title}{Photography and Antiquity in the Archive, or How Howard Carter Moved the Road to the Valley of the Kings} + \field{volume}{40} + \field{year}{2016} + \field{pages}{267\bibrangedash 282} + \range{pages}{16} + \keyw{Riggs; Trnkova} + \endentry + \entry{Schlosser:1934aa}{article}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=e4ffaa23d09febdcdd2b822e0ec98b81}{% + family={Schlosser}, + familyi={S\bibinitperiod}, + given={Julius\bibnamedelima von}, + giveni={J\bibinitperiod\bibinitdelim v\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Innsbruck}% + } + \strng{namehash}{e4ffaa23d09febdcdd2b822e0ec98b81} + \strng{fullhash}{e4ffaa23d09febdcdd2b822e0ec98b81} + \strng{bibnamehash}{e4ffaa23d09febdcdd2b822e0ec98b81} + \strng{authorbibnamehash}{e4ffaa23d09febdcdd2b822e0ec98b81} + \strng{authornamehash}{e4ffaa23d09febdcdd2b822e0ec98b81} + \strng{authorfullhash}{e4ffaa23d09febdcdd2b822e0ec98b81} + \field{sortinit}{S} + \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{Mitteilungen des Instituts für Österreichische Geschichtsforschung} + \field{number}{2} + \field{title}{Die Wiener Schule der Kunstgeschichte: Rückblick auf ein Säkulum deutscher Gelehrtenarbeit in Österreich} + \field{volume}{13} + \field{year}{1934} + \field{pages}{141\bibrangedash 228} + \range{pages}{88} + \keyw{Trnkova} + \endentry + \entry{Schwartz_1995}{article}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=649a0a663ff45dc45deb082868bbf45b}{% + family={Schwartz}, + familyi={S\bibinitperiod}, + given={Joan\bibnamedelima M.}, + giveni={J\bibinitperiod\bibinitdelim M\bibinitperiod}, + givenun=0}}% + } + \strng{namehash}{649a0a663ff45dc45deb082868bbf45b} + \strng{fullhash}{649a0a663ff45dc45deb082868bbf45b} + \strng{bibnamehash}{649a0a663ff45dc45deb082868bbf45b} + \strng{authorbibnamehash}{649a0a663ff45dc45deb082868bbf45b} + \strng{authornamehash}{649a0a663ff45dc45deb082868bbf45b} + \strng{authorfullhash}{649a0a663ff45dc45deb082868bbf45b} + \field{sortinit}{S} + \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{Archivaria: The Journal of the Association of Canadian Archivists} + \field{title}{‘We Make Our Tools and Our Tools Make Us”: Lessons from Photographs for the Practice, Politics, and Poetics of Diplomatics’} + \field{volume}{40} + \field{year}{1995} + \field{pages}{40\bibrangedash 74} + \range{pages}{35} + \endentry + \entry{Schwarz:1931aa}{book}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=1768879e61711fab6f6895cdbf9057fb}{% + family={Schwarz}, + familyi={S\bibinitperiod}, + given={Heinrich}, + giveni={H\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Leipzig}% + } + \list{publisher}{1}{% + {Insel-Verlag}% + } + \strng{namehash}{1768879e61711fab6f6895cdbf9057fb} + \strng{fullhash}{1768879e61711fab6f6895cdbf9057fb} + \strng{bibnamehash}{1768879e61711fab6f6895cdbf9057fb} + \strng{authorbibnamehash}{1768879e61711fab6f6895cdbf9057fb} + \strng{authornamehash}{1768879e61711fab6f6895cdbf9057fb} + \strng{authorfullhash}{1768879e61711fab6f6895cdbf9057fb} + \field{sortinit}{S} + \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{David Octavius Hill: der Meister der Photographie} + \field{year}{1931} + \keyw{Trnkova} + \endentry + \entry{Trnkova:2010aa}{book}{} + \name{editor}{1}{}{% + {{uniquename=0,uniquepart=base,hash=07b9354b087e0c5a6a19435100eb0d99}{% + family={Trnková}, + familyi={T\bibinitperiod}, + given={Petra}, + giveni={P\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Prague}% + } + \list{publisher}{1}{% + {Artefactum}% + } + \strng{namehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{fullhash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{bibnamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{editorbibnamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{editornamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{editorfullhash}{07b9354b087e0c5a6a19435100eb0d99} + \field{extraname}{1} + \field{sortinit}{T} + \field{sortinithash}{6f7aff9db9dcfeb7f95fd5bbd2f78df9} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{editor} + \field{labeltitlesource}{title} + \field{title}{Oudadate Pix: Revealing a Photographic Archive} + \field{year}{2010} + \keyw{Trnkova} + \endentry + \entry{Trnkova:2015aa}{incollection}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=07b9354b087e0c5a6a19435100eb0d99}{% + family={Trnková}, + familyi={T\bibinitperiod}, + given={Petra}, + giveni={P\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Salzburg}% + } + \list{publisher}{1}{% + {Fotohof edition}% + } + \strng{namehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{fullhash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{bibnamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{authorbibnamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{authornamehash}{07b9354b087e0c5a6a19435100eb0d99} + \strng{authorfullhash}{07b9354b087e0c5a6a19435100eb0d99} + \field{extraname}{2} + \field{sortinit}{T} + \field{sortinithash}{6f7aff9db9dcfeb7f95fd5bbd2f78df9} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{booktitle}{Andreas Groll: Wiens erster moderner Fotograf. 1812–1872} + \field{title}{Archäologischer Frühling: Aufnahmen historischer Baudenkmäler in Böhmen} + \field{year}{2015} + \field{pages}{237\bibrangedash 245} + \range{pages}{9} + \keyw{Trnkova} + \endentry + \entry{Uhlikova:2010aa}{book}{} + \name{author}{1}{}{% + {{uniquename=0,uniquepart=base,hash=e9138635f7e2be25c0020cbbb57344cc}{% + family={Uhlíková}, + familyi={U\bibinitperiod}, + given={Kristina}, + giveni={K\bibinitperiod}, + givenun=0}}% + } + \list{location}{1}{% + {Prague}% + } + \list{publisher}{1}{% + {Národní památkový ústav}% + } + \strng{namehash}{e9138635f7e2be25c0020cbbb57344cc} + \strng{fullhash}{e9138635f7e2be25c0020cbbb57344cc} + \strng{bibnamehash}{e9138635f7e2be25c0020cbbb57344cc} + \strng{authorbibnamehash}{e9138635f7e2be25c0020cbbb57344cc} + \strng{authornamehash}{e9138635f7e2be25c0020cbbb57344cc} + \strng{authorfullhash}{e9138635f7e2be25c0020cbbb57344cc} + \field{sortinit}{U} + \field{sortinithash}{36a2444f5238e0dcf4bb59704df6624d} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{Zdeněk Wirth, první dvě životní etapy (1878–1939)} + \field{year}{2010} + \keyw{Trnkova} + \endentry + \entry{Groll:1865aa}{book}{} + \field{sortinit}{V} + \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labeltitlesource}{title} + \field{title}{Verlags-Catalog von Andreas Groll, Photograph in Wien} + \field{year}{1865 [Vienna 1864]} + \keyw{Trnkova} + \endentry + \entry{Wirth:1939aa}{article}{} + \name{author}{1}{}{% + {{uniquename=2,uniquepart=given,hash=9496236bdf552eb7cac7a0a4c45d46b3}{% + family={Wirth}, + familyi={W\bibinitperiod}, + given={Zdenĕk}, + giveni={Z\bibinitperiod}, + givenun=2}}% + } + \strng{namehash}{9496236bdf552eb7cac7a0a4c45d46b3} + \strng{fullhash}{9496236bdf552eb7cac7a0a4c45d46b3} + \strng{bibnamehash}{9496236bdf552eb7cac7a0a4c45d46b3} + \strng{authorbibnamehash}{9496236bdf552eb7cac7a0a4c45d46b3} + \strng{authornamehash}{9496236bdf552eb7cac7a0a4c45d46b3} + \strng{authorfullhash}{9496236bdf552eb7cac7a0a4c45d46b3} + \field{sortinit}{W} + \field{sortinithash}{ecb89ff85896a47dc313960773ac311d} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{journaltitle}{Umění} + \field{title}{První fotograf Prahy} + \field{volume}{12} + \field{year}{1939--1940} + \field{pages}{361\bibrangedash 376} + \range{pages}{16} + \keyw{Trnkova} + \endentry + \entry{Zdenek:1939aa}{book}{} + \name{editor}{1}{}{% + {{uniquename=2,uniquepart=given,hash=22815677c28e6c6da236398fe5e6d224}{% + family={Wirth}, + familyi={W\bibinitperiod}, + given={Zdeněk}, + giveni={Z\bibinitperiod}, + givenun=2}}% + } + \list{location}{1}{% + {Prague}% + } + \list{publisher}{1}{% + {Umělecko-průmyslové museum}% + } + \strng{namehash}{22815677c28e6c6da236398fe5e6d224} + \strng{fullhash}{22815677c28e6c6da236398fe5e6d224} + \strng{bibnamehash}{22815677c28e6c6da236398fe5e6d224} + \strng{editorbibnamehash}{22815677c28e6c6da236398fe5e6d224} + \strng{editornamehash}{22815677c28e6c6da236398fe5e6d224} + \strng{editorfullhash}{22815677c28e6c6da236398fe5e6d224} + \field{sortinit}{W} + \field{sortinithash}{ecb89ff85896a47dc313960773ac311d} + \field{extradatescope}{labelyear} + \field{labeldatesource}{year} + \field{labelnamesource}{editor} + \field{labeltitlesource}{title} + \field{title}{Sto let české fotografie 1839–1939} + \field{year}{1939} + \keyw{Trnkova} + \endentry + \enddatalist +\endrefsection +\endinput + diff --git a/bibformat/4ht/tmp_files/test.bcf b/bibformat/4ht/tmp_files/test.bcf new file mode 100644 index 0000000..6d27172 --- /dev/null +++ b/bibformat/4ht/tmp_files/test.bcf @@ -0,0 +1,2079 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bcf:controlfile version="3.5" bltxversion="3.12" xmlns:bcf="https://sourceforge.net/projects/biblatex"> + <!-- BIBER OPTIONS --> + <bcf:options component="biber" type="global"> + <bcf:option type="singlevalued"> + <bcf:key>output_encoding</bcf:key> + <bcf:value>utf8</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>input_encoding</bcf:key> + <bcf:value>utf8</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>debug</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>mincrossrefs</bcf:key> + <bcf:value>2</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>minxrefs</bcf:key> + <bcf:value>2</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>sortcase</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>sortupper</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + </bcf:options> + <!-- BIBLATEX OPTIONS --> + <!-- GLOBAL --> + <bcf:options component="biblatex" type="global"> + <bcf:option type="singlevalued"> + <bcf:key>alphaothers</bcf:key> + <bcf:value>+</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>labelalpha</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="multivalued"> + <bcf:key>labelnamespec</bcf:key> + <bcf:value order="1">shortauthor</bcf:value> + <bcf:value order="2">author</bcf:value> + <bcf:value order="3">shorteditor</bcf:value> + <bcf:value order="4">editor</bcf:value> + <bcf:value order="5">translator</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>labeltitle</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="multivalued"> + <bcf:key>labeltitlespec</bcf:key> + <bcf:value order="1">shorttitle</bcf:value> + <bcf:value order="2">title</bcf:value> + <bcf:value order="3">maintitle</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>labeltitleyear</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>labeldateparts</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="multivalued"> + <bcf:key>labeldatespec</bcf:key> + <bcf:value order="1" type="field">date</bcf:value> + <bcf:value order="2" type="field">year</bcf:value> + <bcf:value order="3" type="field">eventdate</bcf:value> + <bcf:value order="4" type="field">origdate</bcf:value> + <bcf:value order="5" type="field">urldate</bcf:value> + <bcf:value order="6" type="string">nodate</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>julian</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>gregorianstart</bcf:key> + <bcf:value>1582-10-15</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>maxalphanames</bcf:key> + <bcf:value>3</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>maxbibnames</bcf:key> + <bcf:value>100</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>maxcitenames</bcf:key> + <bcf:value>3</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>maxsortnames</bcf:key> + <bcf:value>100</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>maxitems</bcf:key> + <bcf:value>3</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>minalphanames</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>minbibnames</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>mincitenames</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>minsortnames</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>minitems</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>singletitle</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>sortalphaothers</bcf:key> + <bcf:value>+</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>sortlocale</bcf:key> + <bcf:value>german</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>sortingtemplatename</bcf:key> + <bcf:value>nyt</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>sortsets</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>uniquelist</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>uniquename</bcf:key> + <bcf:value>2</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>uniqueprimaryauthor</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>uniquetitle</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>uniquebaretitle</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>uniquework</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useprefix</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useafterword</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useannotator</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useauthor</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>usebookauthor</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>usecommentator</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useeditor</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useeditora</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useeditorb</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useeditorc</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useforeword</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useholder</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useintroduction</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>usenamea</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>usenameb</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>usenamec</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>usetranslator</bcf:key> + <bcf:value>0</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useshortauthor</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + <bcf:option type="singlevalued"> + <bcf:key>useshorteditor</bcf:key> + <bcf:value>1</bcf:value> + </bcf:option> + </bcf:options> + <!-- BIBLATEX OPTION SCOPE --> + <bcf:optionscope type="GLOBAL"> + <bcf:option datatype="xml">datamodel</bcf:option> + <bcf:option datatype="xml">labelalphanametemplate</bcf:option> + <bcf:option datatype="xml">labelalphatemplate</bcf:option> + <bcf:option datatype="xml">inheritance</bcf:option> + <bcf:option datatype="xml">translit</bcf:option> + <bcf:option datatype="xml">uniquenametemplate</bcf:option> + <bcf:option datatype="xml">sortingnamekeytemplate</bcf:option> + <bcf:option datatype="xml">sortingtemplate</bcf:option> + <bcf:option datatype="xml">extradatespec</bcf:option> + <bcf:option datatype="xml">labelnamespec</bcf:option> + <bcf:option datatype="xml">labeltitlespec</bcf:option> + <bcf:option datatype="xml">labeldatespec</bcf:option> + <bcf:option datatype="string">controlversion</bcf:option> + <bcf:option datatype="string">alphaothers</bcf:option> + <bcf:option datatype="string">sortalphaothers</bcf:option> + <bcf:option datatype="string">presort</bcf:option> + <bcf:option datatype="string">texencoding</bcf:option> + <bcf:option datatype="string">bibencoding</bcf:option> + <bcf:option datatype="string">sortingtemplatename</bcf:option> + <bcf:option datatype="string">sortlocale</bcf:option> + <bcf:option datatype="string">language</bcf:option> + <bcf:option datatype="string">autolang</bcf:option> + <bcf:option datatype="string">backrefsetstyle</bcf:option> + <bcf:option datatype="string">block</bcf:option> + <bcf:option datatype="string">labeldate</bcf:option> + <bcf:option datatype="string">labeltime</bcf:option> + <bcf:option datatype="string">dateera</bcf:option> + <bcf:option datatype="string">date</bcf:option> + <bcf:option datatype="string">time</bcf:option> + <bcf:option datatype="string">eventdate</bcf:option> + <bcf:option datatype="string">eventtime</bcf:option> + <bcf:option datatype="string">origdate</bcf:option> + <bcf:option datatype="string">origtime</bcf:option> + <bcf:option datatype="string">urldate</bcf:option> + <bcf:option datatype="string">urltime</bcf:option> + <bcf:option datatype="string">alldatesusetime</bcf:option> + <bcf:option datatype="string">alldates</bcf:option> + <bcf:option datatype="string">alltimes</bcf:option> + <bcf:option datatype="string">gregorianstart</bcf:option> + <bcf:option datatype="string">autocite</bcf:option> + <bcf:option datatype="string">notetype</bcf:option> + <bcf:option datatype="string">refsection</bcf:option> + <bcf:option datatype="string">refsegment</bcf:option> + <bcf:option datatype="string">citereset</bcf:option> + <bcf:option datatype="string">sortlos</bcf:option> + <bcf:option datatype="string">babel</bcf:option> + <bcf:option datatype="string">datelabel</bcf:option> + <bcf:option datatype="string">backrefstyle</bcf:option> + <bcf:option datatype="string">arxiv</bcf:option> + <bcf:option datatype="boolean">familyinits</bcf:option> + <bcf:option datatype="boolean">giveninits</bcf:option> + <bcf:option datatype="boolean">prefixinits</bcf:option> + <bcf:option datatype="boolean">suffixinits</bcf:option> + <bcf:option datatype="boolean">useafterword</bcf:option> + <bcf:option datatype="boolean">useannotator</bcf:option> + <bcf:option datatype="boolean">useauthor</bcf:option> + <bcf:option datatype="boolean">usebookauthor</bcf:option> + <bcf:option datatype="boolean">usecommentator</bcf:option> + <bcf:option datatype="boolean">useeditor</bcf:option> + <bcf:option datatype="boolean">useeditora</bcf:option> + <bcf:option datatype="boolean">useeditorb</bcf:option> + <bcf:option datatype="boolean">useeditorc</bcf:option> + <bcf:option datatype="boolean">useforeword</bcf:option> + <bcf:option datatype="boolean">useholder</bcf:option> + <bcf:option datatype="boolean">useintroduction</bcf:option> + <bcf:option datatype="boolean">usenamea</bcf:option> + <bcf:option datatype="boolean">usenameb</bcf:option> + <bcf:option datatype="boolean">usenamec</bcf:option> + <bcf:option datatype="boolean">usetranslator</bcf:option> + <bcf:option datatype="boolean">useshortauthor</bcf:option> + <bcf:option datatype="boolean">useshorteditor</bcf:option> + <bcf:option datatype="boolean">debug</bcf:option> + <bcf:option datatype="boolean">loadfiles</bcf:option> + <bcf:option datatype="boolean">safeinputenc</bcf:option> + <bcf:option datatype="boolean">sortcase</bcf:option> + <bcf:option datatype="boolean">sortupper</bcf:option> + <bcf:option datatype="boolean">terseinits</bcf:option> + <bcf:option datatype="boolean">abbreviate</bcf:option> + <bcf:option datatype="boolean">dateabbrev</bcf:option> + <bcf:option datatype="boolean">clearlang</bcf:option> + <bcf:option datatype="boolean">indexing</bcf:option> + <bcf:option datatype="boolean">sortcites</bcf:option> + <bcf:option datatype="boolean">sortsets</bcf:option> + <bcf:option datatype="boolean">hyperref</bcf:option> + <bcf:option datatype="boolean">backref</bcf:option> + <bcf:option datatype="boolean">pagetracker</bcf:option> + <bcf:option datatype="boolean">citecounter</bcf:option> + <bcf:option datatype="boolean">citetracker</bcf:option> + <bcf:option datatype="boolean">ibidtracker</bcf:option> + <bcf:option datatype="boolean">idemtracker</bcf:option> + <bcf:option datatype="boolean">opcittracker</bcf:option> + <bcf:option datatype="boolean">loccittracker</bcf:option> + <bcf:option datatype="boolean">parentracker</bcf:option> + <bcf:option datatype="boolean">labeldateusetime</bcf:option> + <bcf:option datatype="boolean">datecirca</bcf:option> + <bcf:option datatype="boolean">dateuncertain</bcf:option> + <bcf:option datatype="boolean">dateusetime</bcf:option> + <bcf:option datatype="boolean">eventdateusetime</bcf:option> + <bcf:option datatype="boolean">origdateusetime</bcf:option> + <bcf:option datatype="boolean">urldateusetime</bcf:option> + <bcf:option datatype="boolean">julian</bcf:option> + <bcf:option datatype="boolean">datezeros</bcf:option> + <bcf:option datatype="boolean">timezeros</bcf:option> + <bcf:option datatype="boolean">timezones</bcf:option> + <bcf:option datatype="boolean">seconds</bcf:option> + <bcf:option datatype="boolean">autopunct</bcf:option> + <bcf:option datatype="boolean">punctfont</bcf:option> + <bcf:option datatype="boolean">labelnumber</bcf:option> + <bcf:option datatype="boolean">labelalpha</bcf:option> + <bcf:option datatype="boolean">labeltitle</bcf:option> + <bcf:option datatype="boolean">labeltitleyear</bcf:option> + <bcf:option datatype="boolean">labeldateparts</bcf:option> + <bcf:option datatype="boolean">uniquelist</bcf:option> + <bcf:option datatype="boolean">uniquename</bcf:option> + <bcf:option datatype="boolean">noroman</bcf:option> + <bcf:option datatype="boolean">singletitle</bcf:option> + <bcf:option datatype="boolean">uniquetitle</bcf:option> + <bcf:option datatype="boolean">uniquebaretitle</bcf:option> + <bcf:option datatype="boolean">uniquework</bcf:option> + <bcf:option datatype="boolean">uniqueprimaryauthor</bcf:option> + <bcf:option datatype="boolean">defernumbers</bcf:option> + <bcf:option datatype="boolean">locallabelwidth</bcf:option> + <bcf:option datatype="boolean">bibwarn</bcf:option> + <bcf:option datatype="boolean">useprefix</bcf:option> + <bcf:option datatype="boolean">defernums</bcf:option> + <bcf:option datatype="boolean">firstinits</bcf:option> + <bcf:option datatype="boolean">sortfirstinits</bcf:option> + <bcf:option datatype="boolean">sortgiveninits</bcf:option> + <bcf:option datatype="boolean">labelyear</bcf:option> + <bcf:option datatype="boolean">isbn</bcf:option> + <bcf:option datatype="boolean">url</bcf:option> + <bcf:option datatype="boolean">doi</bcf:option> + <bcf:option datatype="boolean">eprint</bcf:option> + <bcf:option datatype="boolean">related</bcf:option> + <bcf:option datatype="boolean">dashed</bcf:option> + <bcf:option datatype="boolean">mergedate</bcf:option> + <bcf:option datatype="integer">mincrossrefs</bcf:option> + <bcf:option datatype="integer">minxrefs</bcf:option> + <bcf:option datatype="integer">maxnames</bcf:option> + <bcf:option datatype="integer">minnames</bcf:option> + <bcf:option datatype="integer">maxbibnames</bcf:option> + <bcf:option datatype="integer">minbibnames</bcf:option> + <bcf:option datatype="integer">maxcitenames</bcf:option> + <bcf:option datatype="integer">mincitenames</bcf:option> + <bcf:option datatype="integer">maxsortnames</bcf:option> + <bcf:option datatype="integer">minsortnames</bcf:option> + <bcf:option datatype="integer">maxitems</bcf:option> + <bcf:option datatype="integer">minitems</bcf:option> + <bcf:option datatype="integer">maxalphanames</bcf:option> + <bcf:option datatype="integer">minalphanames</bcf:option> + <bcf:option datatype="integer">maxparens</bcf:option> + <bcf:option datatype="integer">dateeraauto</bcf:option> + </bcf:optionscope> + <bcf:optionscope type="ENTRYTYPE"> + <bcf:option datatype="string">alphaothers</bcf:option> + <bcf:option datatype="string">sortalphaothers</bcf:option> + <bcf:option datatype="string">presort</bcf:option> + <bcf:option datatype="boolean">useafterword</bcf:option> + <bcf:option datatype="boolean">useannotator</bcf:option> + <bcf:option datatype="boolean">useauthor</bcf:option> + <bcf:option datatype="boolean">usebookauthor</bcf:option> + <bcf:option datatype="boolean">usecommentator</bcf:option> + <bcf:option datatype="boolean">useeditor</bcf:option> + <bcf:option datatype="boolean">useeditora</bcf:option> + <bcf:option datatype="boolean">useeditorb</bcf:option> + <bcf:option datatype="boolean">useeditorc</bcf:option> + <bcf:option datatype="boolean">useforeword</bcf:option> + <bcf:option datatype="boolean">useholder</bcf:option> + <bcf:option datatype="boolean">useintroduction</bcf:option> + <bcf:option datatype="boolean">usenamea</bcf:option> + <bcf:option datatype="boolean">usenameb</bcf:option> + <bcf:option datatype="boolean">usenamec</bcf:option> + <bcf:option datatype="boolean">usetranslator</bcf:option> + <bcf:option datatype="boolean">useshortauthor</bcf:option> + <bcf:option datatype="boolean">useshorteditor</bcf:option> + <bcf:option datatype="boolean">indexing</bcf:option> + <bcf:option datatype="boolean">labelnumber</bcf:option> + <bcf:option datatype="boolean">labelalpha</bcf:option> + <bcf:option datatype="boolean">labeltitle</bcf:option> + <bcf:option datatype="boolean">labeltitleyear</bcf:option> + <bcf:option datatype="boolean">labeldateparts</bcf:option> + <bcf:option datatype="boolean">uniquelist</bcf:option> + <bcf:option datatype="boolean">uniquename</bcf:option> + <bcf:option datatype="boolean">noroman</bcf:option> + <bcf:option datatype="boolean">singletitle</bcf:option> + <bcf:option datatype="boolean">uniquetitle</bcf:option> + <bcf:option datatype="boolean">uniquebaretitle</bcf:option> + <bcf:option datatype="boolean">uniquework</bcf:option> + <bcf:option datatype="boolean">useprefix</bcf:option> + <bcf:option datatype="boolean">skipbib</bcf:option> + <bcf:option datatype="boolean">skipbiblist</bcf:option> + <bcf:option datatype="boolean">skiplab</bcf:option> + <bcf:option datatype="boolean">dataonly</bcf:option> + <bcf:option datatype="boolean">skiplos</bcf:option> + <bcf:option datatype="boolean">labelyear</bcf:option> + <bcf:option datatype="xml">labelalphatemplate</bcf:option> + <bcf:option datatype="xml">translit</bcf:option> + <bcf:option datatype="xml">sortexclusion</bcf:option> + <bcf:option datatype="xml">sortinclusion</bcf:option> + <bcf:option datatype="xml">labelnamespec</bcf:option> + <bcf:option datatype="xml">labeltitlespec</bcf:option> + <bcf:option datatype="xml">labeldatespec</bcf:option> + <bcf:option datatype="integer">maxnames</bcf:option> + <bcf:option datatype="integer">minnames</bcf:option> + <bcf:option datatype="integer">maxbibnames</bcf:option> + <bcf:option datatype="integer">minbibnames</bcf:option> + <bcf:option datatype="integer">maxcitenames</bcf:option> + <bcf:option datatype="integer">mincitenames</bcf:option> + <bcf:option datatype="integer">maxsortnames</bcf:option> + <bcf:option datatype="integer">minsortnames</bcf:option> + <bcf:option datatype="integer">maxitems</bcf:option> + <bcf:option datatype="integer">minitems</bcf:option> + <bcf:option datatype="integer">maxalphanames</bcf:option> + <bcf:option datatype="integer">minalphanames</bcf:option> + </bcf:optionscope> + <bcf:optionscope type="ENTRY"> + <bcf:option datatype="string">noinherit</bcf:option> + <bcf:option datatype="string">nametemplates</bcf:option> + <bcf:option datatype="string">labelalphanametemplatename</bcf:option> + <bcf:option datatype="string">uniquenametemplatename</bcf:option> + <bcf:option datatype="string">sortingnamekeytemplatename</bcf:option> + <bcf:option datatype="string">presort</bcf:option> + <bcf:option datatype="boolean">useafterword</bcf:option> + <bcf:option datatype="boolean">useannotator</bcf:option> + <bcf:option datatype="boolean">useauthor</bcf:option> + <bcf:option datatype="boolean">usebookauthor</bcf:option> + <bcf:option datatype="boolean">usecommentator</bcf:option> + <bcf:option datatype="boolean">useeditor</bcf:option> + <bcf:option datatype="boolean">useeditora</bcf:option> + <bcf:option datatype="boolean">useeditorb</bcf:option> + <bcf:option datatype="boolean">useeditorc</bcf:option> + <bcf:option datatype="boolean">useforeword</bcf:option> + <bcf:option datatype="boolean">useholder</bcf:option> + <bcf:option datatype="boolean">useintroduction</bcf:option> + <bcf:option datatype="boolean">usenamea</bcf:option> + <bcf:option datatype="boolean">usenameb</bcf:option> + <bcf:option datatype="boolean">usenamec</bcf:option> + <bcf:option datatype="boolean">usetranslator</bcf:option> + <bcf:option datatype="boolean">useshortauthor</bcf:option> + <bcf:option datatype="boolean">useshorteditor</bcf:option> + <bcf:option datatype="boolean">indexing</bcf:option> + <bcf:option datatype="boolean">uniquelist</bcf:option> + <bcf:option datatype="boolean">uniquename</bcf:option> + <bcf:option datatype="boolean">noroman</bcf:option> + <bcf:option datatype="boolean">useprefix</bcf:option> + <bcf:option datatype="boolean">skipbib</bcf:option> + <bcf:option datatype="boolean">skipbiblist</bcf:option> + <bcf:option datatype="boolean">skiplab</bcf:option> + <bcf:option datatype="boolean">dataonly</bcf:option> + <bcf:option datatype="boolean">skiplos</bcf:option> + <bcf:option datatype="integer">maxnames</bcf:option> + <bcf:option datatype="integer">minnames</bcf:option> + <bcf:option datatype="integer">maxbibnames</bcf:option> + <bcf:option datatype="integer">minbibnames</bcf:option> + <bcf:option datatype="integer">maxcitenames</bcf:option> + <bcf:option datatype="integer">mincitenames</bcf:option> + <bcf:option datatype="integer">maxsortnames</bcf:option> + <bcf:option datatype="integer">minsortnames</bcf:option> + <bcf:option datatype="integer">maxitems</bcf:option> + <bcf:option datatype="integer">minitems</bcf:option> + <bcf:option datatype="integer">maxalphanames</bcf:option> + <bcf:option datatype="integer">minalphanames</bcf:option> + </bcf:optionscope> + <bcf:optionscope type="NAMELIST"> + <bcf:option datatype="string">nametemplates</bcf:option> + <bcf:option datatype="string">sortingnamekeytemplatename</bcf:option> + <bcf:option datatype="string">uniquenametemplatename</bcf:option> + <bcf:option datatype="string">labelalphanametemplatename</bcf:option> + <bcf:option datatype="boolean">useprefix</bcf:option> + </bcf:optionscope> + <bcf:optionscope type="NAME"> + <bcf:option datatype="string">nametemplates</bcf:option> + <bcf:option datatype="string">sortingnamekeytemplatename</bcf:option> + <bcf:option datatype="string">uniquenametemplatename</bcf:option> + <bcf:option datatype="string">labelalphanametemplatename</bcf:option> + <bcf:option datatype="boolean">useprefix</bcf:option> + </bcf:optionscope> + <!-- DATAFIELDSETS --> + <bcf:datafieldset name="setnames"> + <bcf:member datatype="name" fieldtype="list"/> + </bcf:datafieldset> + <bcf:datafieldset name="settitles"> + <bcf:member field="title"/> + <bcf:member field="booktitle"/> + <bcf:member field="eventtitle"/> + <bcf:member field="issuetitle"/> + <bcf:member field="journaltitle"/> + <bcf:member field="maintitle"/> + <bcf:member field="origtitle"/> + </bcf:datafieldset> + <!-- SOURCEMAP --> + <bcf:sourcemap> + <bcf:maps datatype="bibtex" level="driver"> + <bcf:map> + <bcf:map_step map_field_set="day" map_null="1"/> + </bcf:map> + <bcf:map> + <bcf:map_step map_type_source="conference" map_type_target="inproceedings"/> + <bcf:map_step map_type_source="electronic" map_type_target="online"/> + <bcf:map_step map_type_source="www" map_type_target="online"/> + </bcf:map> + <bcf:map> + <bcf:map_step map_type_source="mastersthesis" map_type_target="thesis" map_final="1"/> + <bcf:map_step map_field_set="type" map_field_value="mathesis"/> + </bcf:map> + <bcf:map> + <bcf:map_step map_type_source="phdthesis" map_type_target="thesis" map_final="1"/> + <bcf:map_step map_field_set="type" map_field_value="phdthesis"/> + </bcf:map> + <bcf:map> + <bcf:map_step map_type_source="techreport" map_type_target="report" map_final="1"/> + <bcf:map_step map_field_set="type" map_field_value="techreport"/> + </bcf:map> + <bcf:map> + <bcf:map_step map_field_source="hyphenation" map_field_target="langid"/> + <bcf:map_step map_field_source="address" map_field_target="location"/> + <bcf:map_step map_field_source="school" map_field_target="institution"/> + <bcf:map_step map_field_source="annote" map_field_target="annotation"/> + <bcf:map_step map_field_source="archiveprefix" map_field_target="eprinttype"/> + <bcf:map_step map_field_source="journal" map_field_target="journaltitle"/> + <bcf:map_step map_field_source="primaryclass" map_field_target="eprintclass"/> + <bcf:map_step map_field_source="key" map_field_target="sortkey"/> + <bcf:map_step map_field_source="pdf" map_field_target="file"/> + </bcf:map> + </bcf:maps> + </bcf:sourcemap> + <!-- LABELALPHA NAME TEMPLATE --> + <bcf:labelalphanametemplate name="global"> + <bcf:namepart order="1" use="1" pre="1" substring_width="1" substring_compound="1">prefix</bcf:namepart> + <bcf:namepart order="2">family</bcf:namepart> + </bcf:labelalphanametemplate> + <!-- LABELALPHA TEMPLATE --> + <bcf:labelalphatemplate type="global"> + <bcf:labelelement order="1"> + <bcf:labelpart final="1">shorthand</bcf:labelpart> + <bcf:labelpart>label</bcf:labelpart> + <bcf:labelpart substring_width="3" substring_side="left" ifnames="1">labelname</bcf:labelpart> + <bcf:labelpart substring_width="1" substring_side="left">labelname</bcf:labelpart> + </bcf:labelelement> + <bcf:labelelement order="2"> + <bcf:labelpart substring_width="2" substring_side="right">year</bcf:labelpart> + </bcf:labelelement> + </bcf:labelalphatemplate> + <!-- EXTRADATE --> + <bcf:extradatespec> + <bcf:scope> + <bcf:field order="1">labelyear</bcf:field> + <bcf:field order="2">year</bcf:field> + </bcf:scope> + </bcf:extradatespec> + <!-- INHERITANCE --> + <bcf:inheritance> + <bcf:defaults inherit_all="true" override_target="false"> + </bcf:defaults> + <bcf:inherit> + <bcf:type_pair source="mvbook" target="inbook"/> + <bcf:type_pair source="mvbook" target="bookinbook"/> + <bcf:type_pair source="mvbook" target="suppbook"/> + <bcf:type_pair source="book" target="inbook"/> + <bcf:type_pair source="book" target="bookinbook"/> + <bcf:type_pair source="book" target="suppbook"/> + <bcf:field source="author" target="author"/> + <bcf:field source="author" target="bookauthor"/> + </bcf:inherit> + <bcf:inherit> + <bcf:type_pair source="mvbook" target="book"/> + <bcf:type_pair source="mvbook" target="inbook"/> + <bcf:type_pair source="mvbook" target="bookinbook"/> + <bcf:type_pair source="mvbook" target="suppbook"/> + <bcf:field source="title" target="maintitle"/> + <bcf:field source="subtitle" target="mainsubtitle"/> + <bcf:field source="titleaddon" target="maintitleaddon"/> + <bcf:field source="shorttitle" skip="true"/> + <bcf:field source="sorttitle" skip="true"/> + <bcf:field source="indextitle" skip="true"/> + <bcf:field source="indexsorttitle" skip="true"/> + </bcf:inherit> + <bcf:inherit> + <bcf:type_pair source="mvcollection" target="collection"/> + <bcf:type_pair source="mvcollection" target="reference"/> + <bcf:type_pair source="mvcollection" target="incollection"/> + <bcf:type_pair source="mvcollection" target="inreference"/> + <bcf:type_pair source="mvcollection" target="suppcollection"/> + <bcf:type_pair source="mvreference" target="collection"/> + <bcf:type_pair source="mvreference" target="reference"/> + <bcf:type_pair source="mvreference" target="incollection"/> + <bcf:type_pair source="mvreference" target="inreference"/> + <bcf:type_pair source="mvreference" target="suppcollection"/> + <bcf:field source="title" target="maintitle"/> + <bcf:field source="subtitle" target="mainsubtitle"/> + <bcf:field source="titleaddon" target="maintitleaddon"/> + <bcf:field source="shorttitle" skip="true"/> + <bcf:field source="sorttitle" skip="true"/> + <bcf:field source="indextitle" skip="true"/> + <bcf:field source="indexsorttitle" skip="true"/> + </bcf:inherit> + <bcf:inherit> + <bcf:type_pair source="mvproceedings" target="proceedings"/> + <bcf:type_pair source="mvproceedings" target="inproceedings"/> + <bcf:field source="title" target="maintitle"/> + <bcf:field source="subtitle" target="mainsubtitle"/> + <bcf:field source="titleaddon" target="maintitleaddon"/> + <bcf:field source="shorttitle" skip="true"/> + <bcf:field source="sorttitle" skip="true"/> + <bcf:field source="indextitle" skip="true"/> + <bcf:field source="indexsorttitle" skip="true"/> + </bcf:inherit> + <bcf:inherit> + <bcf:type_pair source="book" target="inbook"/> + <bcf:type_pair source="book" target="bookinbook"/> + <bcf:type_pair source="book" target="suppbook"/> + <bcf:field source="title" target="booktitle"/> + <bcf:field source="subtitle" target="booksubtitle"/> + <bcf:field source="titleaddon" target="booktitleaddon"/> + <bcf:field source="shorttitle" skip="true"/> + <bcf:field source="sorttitle" skip="true"/> + <bcf:field source="indextitle" skip="true"/> + <bcf:field source="indexsorttitle" skip="true"/> + </bcf:inherit> + <bcf:inherit> + <bcf:type_pair source="collection" target="incollection"/> + <bcf:type_pair source="collection" target="inreference"/> + <bcf:type_pair source="collection" target="suppcollection"/> + <bcf:type_pair source="reference" target="incollection"/> + <bcf:type_pair source="reference" target="inreference"/> + <bcf:type_pair source="reference" target="suppcollection"/> + <bcf:field source="title" target="booktitle"/> + <bcf:field source="subtitle" target="booksubtitle"/> + <bcf:field source="titleaddon" target="booktitleaddon"/> + <bcf:field source="shorttitle" skip="true"/> + <bcf:field source="sorttitle" skip="true"/> + <bcf:field source="indextitle" skip="true"/> + <bcf:field source="indexsorttitle" skip="true"/> + </bcf:inherit> + <bcf:inherit> + <bcf:type_pair source="proceedings" target="inproceedings"/> + <bcf:field source="title" target="booktitle"/> + <bcf:field source="subtitle" target="booksubtitle"/> + <bcf:field source="titleaddon" target="booktitleaddon"/> + <bcf:field source="shorttitle" skip="true"/> + <bcf:field source="sorttitle" skip="true"/> + <bcf:field source="indextitle" skip="true"/> + <bcf:field source="indexsorttitle" skip="true"/> + </bcf:inherit> + <bcf:inherit> + <bcf:type_pair source="periodical" target="article"/> + <bcf:type_pair source="periodical" target="suppperiodical"/> + <bcf:field source="title" target="journaltitle"/> + <bcf:field source="subtitle" target="journalsubtitle"/> + <bcf:field source="shorttitle" skip="true"/> + <bcf:field source="sorttitle" skip="true"/> + <bcf:field source="indextitle" skip="true"/> + <bcf:field source="indexsorttitle" skip="true"/> + </bcf:inherit> + <bcf:inherit> + <bcf:type_pair source="*" target="*"/> + <bcf:field source="ids" skip="true"/> + <bcf:field source="crossref" skip="true"/> + <bcf:field source="xref" skip="true"/> + <bcf:field source="entryset" skip="true"/> + <bcf:field source="entrysubtype" skip="true"/> + <bcf:field source="execute" skip="true"/> + <bcf:field source="label" skip="true"/> + <bcf:field source="options" skip="true"/> + <bcf:field source="presort" skip="true"/> + <bcf:field source="related" skip="true"/> + <bcf:field source="relatedoptions" skip="true"/> + <bcf:field source="relatedstring" skip="true"/> + <bcf:field source="relatedtype" skip="true"/> + <bcf:field source="shorthand" skip="true"/> + <bcf:field source="shorthandintro" skip="true"/> + <bcf:field source="sortkey" skip="true"/> + </bcf:inherit> + </bcf:inheritance> + <!-- UNIQUENAME TEMPLATES --> + <bcf:uniquenametemplate name="global"> + <bcf:namepart order="1" use="1" base="1">prefix</bcf:namepart> + <bcf:namepart order="2" base="1">family</bcf:namepart> + <bcf:namepart order="3">given</bcf:namepart> + </bcf:uniquenametemplate> + <!-- SORTING NAME KEY TEMPLATES --> + <bcf:sortingnamekeytemplate name="global"> + <bcf:keypart order="1"> + <bcf:part type="namepart" order="1" use="1">prefix</bcf:part> + </bcf:keypart> + <bcf:keypart order="2"> + <bcf:part type="namepart" order="1">family</bcf:part> + </bcf:keypart> + <bcf:keypart order="3"> + <bcf:part type="namepart" order="1">given</bcf:part> + </bcf:keypart> + <bcf:keypart order="4"> + <bcf:part type="namepart" order="1">suffix</bcf:part> + </bcf:keypart> + <bcf:keypart order="5"> + <bcf:part type="namepart" order="1" use="0">prefix</bcf:part> + </bcf:keypart> + </bcf:sortingnamekeytemplate> + <bcf:presort>mm</bcf:presort> + <!-- DATA MODEL --> + <bcf:datamodel> + <bcf:constants> + <bcf:constant type="list" name="gender">sf,sm,sn,pf,pm,pn,pp</bcf:constant> + <bcf:constant type="list" name="nameparts">family,given,prefix,suffix</bcf:constant> + <bcf:constant type="list" name="optiondatatypes">boolean,integer,string,xml</bcf:constant> + </bcf:constants> + <bcf:entrytypes> + <bcf:entrytype>article</bcf:entrytype> + <bcf:entrytype>artwork</bcf:entrytype> + <bcf:entrytype>audio</bcf:entrytype> + <bcf:entrytype>bibnote</bcf:entrytype> + <bcf:entrytype>book</bcf:entrytype> + <bcf:entrytype>bookinbook</bcf:entrytype> + <bcf:entrytype>booklet</bcf:entrytype> + <bcf:entrytype>collection</bcf:entrytype> + <bcf:entrytype>commentary</bcf:entrytype> + <bcf:entrytype>customa</bcf:entrytype> + <bcf:entrytype>customb</bcf:entrytype> + <bcf:entrytype>customc</bcf:entrytype> + <bcf:entrytype>customd</bcf:entrytype> + <bcf:entrytype>custome</bcf:entrytype> + <bcf:entrytype>customf</bcf:entrytype> + <bcf:entrytype>inbook</bcf:entrytype> + <bcf:entrytype>incollection</bcf:entrytype> + <bcf:entrytype>inproceedings</bcf:entrytype> + <bcf:entrytype>inreference</bcf:entrytype> + <bcf:entrytype>image</bcf:entrytype> + <bcf:entrytype>jurisdiction</bcf:entrytype> + <bcf:entrytype>legal</bcf:entrytype> + <bcf:entrytype>legislation</bcf:entrytype> + <bcf:entrytype>letter</bcf:entrytype> + <bcf:entrytype>manual</bcf:entrytype> + <bcf:entrytype>misc</bcf:entrytype> + <bcf:entrytype>movie</bcf:entrytype> + <bcf:entrytype>music</bcf:entrytype> + <bcf:entrytype>mvcollection</bcf:entrytype> + <bcf:entrytype>mvreference</bcf:entrytype> + <bcf:entrytype>mvproceedings</bcf:entrytype> + <bcf:entrytype>mvbook</bcf:entrytype> + <bcf:entrytype>online</bcf:entrytype> + <bcf:entrytype>patent</bcf:entrytype> + <bcf:entrytype>performance</bcf:entrytype> + <bcf:entrytype>periodical</bcf:entrytype> + <bcf:entrytype>proceedings</bcf:entrytype> + <bcf:entrytype>reference</bcf:entrytype> + <bcf:entrytype>report</bcf:entrytype> + <bcf:entrytype>review</bcf:entrytype> + <bcf:entrytype>set</bcf:entrytype> + <bcf:entrytype>software</bcf:entrytype> + <bcf:entrytype>standard</bcf:entrytype> + <bcf:entrytype>suppbook</bcf:entrytype> + <bcf:entrytype>suppcollection</bcf:entrytype> + <bcf:entrytype>suppperiodical</bcf:entrytype> + <bcf:entrytype>thesis</bcf:entrytype> + <bcf:entrytype>unpublished</bcf:entrytype> + <bcf:entrytype>video</bcf:entrytype> + <bcf:entrytype skip_output="true">xdata</bcf:entrytype> + </bcf:entrytypes> + <bcf:fields> + <bcf:field fieldtype="field" datatype="integer">sortyear</bcf:field> + <bcf:field fieldtype="field" datatype="integer">volume</bcf:field> + <bcf:field fieldtype="field" datatype="integer">volumes</bcf:field> + <bcf:field fieldtype="field" datatype="literal">abstract</bcf:field> + <bcf:field fieldtype="field" datatype="literal">addendum</bcf:field> + <bcf:field fieldtype="field" datatype="literal">annotation</bcf:field> + <bcf:field fieldtype="field" datatype="literal">booksubtitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">booktitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">booktitleaddon</bcf:field> + <bcf:field fieldtype="field" datatype="literal">chapter</bcf:field> + <bcf:field fieldtype="field" datatype="literal">edition</bcf:field> + <bcf:field fieldtype="field" datatype="literal">eid</bcf:field> + <bcf:field fieldtype="field" datatype="literal">entrysubtype</bcf:field> + <bcf:field fieldtype="field" datatype="literal">eprintclass</bcf:field> + <bcf:field fieldtype="field" datatype="literal">eprinttype</bcf:field> + <bcf:field fieldtype="field" datatype="literal">eventtitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">eventtitleaddon</bcf:field> + <bcf:field fieldtype="field" datatype="literal">gender</bcf:field> + <bcf:field fieldtype="field" datatype="literal">howpublished</bcf:field> + <bcf:field fieldtype="field" datatype="literal">indexsorttitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">indextitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">isan</bcf:field> + <bcf:field fieldtype="field" datatype="literal">isbn</bcf:field> + <bcf:field fieldtype="field" datatype="literal">ismn</bcf:field> + <bcf:field fieldtype="field" datatype="literal">isrn</bcf:field> + <bcf:field fieldtype="field" datatype="literal">issn</bcf:field> + <bcf:field fieldtype="field" datatype="literal">issue</bcf:field> + <bcf:field fieldtype="field" datatype="literal">issuesubtitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">issuetitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">iswc</bcf:field> + <bcf:field fieldtype="field" datatype="literal">journalsubtitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">journaltitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">label</bcf:field> + <bcf:field fieldtype="field" datatype="literal">langid</bcf:field> + <bcf:field fieldtype="field" datatype="literal">langidopts</bcf:field> + <bcf:field fieldtype="field" datatype="literal">library</bcf:field> + <bcf:field fieldtype="field" datatype="literal">mainsubtitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">maintitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">maintitleaddon</bcf:field> + <bcf:field fieldtype="field" datatype="literal">nameaddon</bcf:field> + <bcf:field fieldtype="field" datatype="literal">note</bcf:field> + <bcf:field fieldtype="field" datatype="literal">number</bcf:field> + <bcf:field fieldtype="field" datatype="literal">origtitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">pagetotal</bcf:field> + <bcf:field fieldtype="field" datatype="literal">part</bcf:field> + <bcf:field fieldtype="field" datatype="literal">relatedstring</bcf:field> + <bcf:field fieldtype="field" datatype="literal">relatedtype</bcf:field> + <bcf:field fieldtype="field" datatype="literal">reprinttitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">series</bcf:field> + <bcf:field fieldtype="field" datatype="literal">shorthandintro</bcf:field> + <bcf:field fieldtype="field" datatype="literal">subtitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal">title</bcf:field> + <bcf:field fieldtype="field" datatype="literal">titleaddon</bcf:field> + <bcf:field fieldtype="field" datatype="literal">usera</bcf:field> + <bcf:field fieldtype="field" datatype="literal">userb</bcf:field> + <bcf:field fieldtype="field" datatype="literal">userc</bcf:field> + <bcf:field fieldtype="field" datatype="literal">userd</bcf:field> + <bcf:field fieldtype="field" datatype="literal">usere</bcf:field> + <bcf:field fieldtype="field" datatype="literal">userf</bcf:field> + <bcf:field fieldtype="field" datatype="literal">venue</bcf:field> + <bcf:field fieldtype="field" datatype="literal">version</bcf:field> + <bcf:field fieldtype="field" datatype="literal" label="true">shorthand</bcf:field> + <bcf:field fieldtype="field" datatype="literal" label="true">shortjournal</bcf:field> + <bcf:field fieldtype="field" datatype="literal" label="true">shortseries</bcf:field> + <bcf:field fieldtype="field" datatype="literal" label="true">shorttitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal" skip_output="true">sorttitle</bcf:field> + <bcf:field fieldtype="field" datatype="literal" skip_output="true">sortshorthand</bcf:field> + <bcf:field fieldtype="field" datatype="literal" skip_output="true">sortkey</bcf:field> + <bcf:field fieldtype="field" datatype="literal" skip_output="true">presort</bcf:field> + <bcf:field fieldtype="list" datatype="literal">institution</bcf:field> + <bcf:field fieldtype="list" datatype="literal">lista</bcf:field> + <bcf:field fieldtype="list" datatype="literal">listb</bcf:field> + <bcf:field fieldtype="list" datatype="literal">listc</bcf:field> + <bcf:field fieldtype="list" datatype="literal">listd</bcf:field> + <bcf:field fieldtype="list" datatype="literal">liste</bcf:field> + <bcf:field fieldtype="list" datatype="literal">listf</bcf:field> + <bcf:field fieldtype="list" datatype="literal">location</bcf:field> + <bcf:field fieldtype="list" datatype="literal">organization</bcf:field> + <bcf:field fieldtype="list" datatype="literal">origlocation</bcf:field> + <bcf:field fieldtype="list" datatype="literal">origpublisher</bcf:field> + <bcf:field fieldtype="list" datatype="literal">publisher</bcf:field> + <bcf:field fieldtype="list" datatype="name">afterword</bcf:field> + <bcf:field fieldtype="list" datatype="name">annotator</bcf:field> + <bcf:field fieldtype="list" datatype="name">author</bcf:field> + <bcf:field fieldtype="list" datatype="name">bookauthor</bcf:field> + <bcf:field fieldtype="list" datatype="name">commentator</bcf:field> + <bcf:field fieldtype="list" datatype="name">editor</bcf:field> + <bcf:field fieldtype="list" datatype="name">editora</bcf:field> + <bcf:field fieldtype="list" datatype="name">editorb</bcf:field> + <bcf:field fieldtype="list" datatype="name">editorc</bcf:field> + <bcf:field fieldtype="list" datatype="name">foreword</bcf:field> + <bcf:field fieldtype="list" datatype="name">holder</bcf:field> + <bcf:field fieldtype="list" datatype="name">introduction</bcf:field> + <bcf:field fieldtype="list" datatype="name">namea</bcf:field> + <bcf:field fieldtype="list" datatype="name">nameb</bcf:field> + <bcf:field fieldtype="list" datatype="name">namec</bcf:field> + <bcf:field fieldtype="list" datatype="name">translator</bcf:field> + <bcf:field fieldtype="list" datatype="name" label="true">shortauthor</bcf:field> + <bcf:field fieldtype="list" datatype="name" label="true">shorteditor</bcf:field> + <bcf:field fieldtype="list" datatype="name" skip_output="true">sortname</bcf:field> + <bcf:field fieldtype="field" datatype="key">authortype</bcf:field> + <bcf:field fieldtype="field" datatype="key">editoratype</bcf:field> + <bcf:field fieldtype="field" datatype="key">editorbtype</bcf:field> + <bcf:field fieldtype="field" datatype="key">editorctype</bcf:field> + <bcf:field fieldtype="field" datatype="key">editortype</bcf:field> + <bcf:field fieldtype="field" datatype="key">bookpagination</bcf:field> + <bcf:field fieldtype="field" datatype="key">nameatype</bcf:field> + <bcf:field fieldtype="field" datatype="key">namebtype</bcf:field> + <bcf:field fieldtype="field" datatype="key">namectype</bcf:field> + <bcf:field fieldtype="field" datatype="key">pagination</bcf:field> + <bcf:field fieldtype="field" datatype="key">pubstate</bcf:field> + <bcf:field fieldtype="field" datatype="key">type</bcf:field> + <bcf:field fieldtype="list" datatype="key">language</bcf:field> + <bcf:field fieldtype="list" datatype="key">origlanguage</bcf:field> + <bcf:field fieldtype="field" datatype="entrykey">crossref</bcf:field> + <bcf:field fieldtype="field" datatype="entrykey">xref</bcf:field> + <bcf:field fieldtype="field" datatype="date" skip_output="true">date</bcf:field> + <bcf:field fieldtype="field" datatype="datepart" nullok="true">endyear</bcf:field> + <bcf:field fieldtype="field" datatype="datepart" nullok="true">year</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">month</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">day</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">hour</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">minute</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">second</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">timezone</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">season</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">endmonth</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">endday</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">endhour</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">endminute</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">endsecond</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">endtimezone</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">endseason</bcf:field> + <bcf:field fieldtype="field" datatype="date" skip_output="true">eventdate</bcf:field> + <bcf:field fieldtype="field" datatype="datepart" nullok="true">eventendyear</bcf:field> + <bcf:field fieldtype="field" datatype="datepart" nullok="true">eventyear</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventmonth</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventday</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventhour</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventminute</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventsecond</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventtimezone</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventseason</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventendmonth</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventendday</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventendhour</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventendminute</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventendsecond</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventendtimezone</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">eventendseason</bcf:field> + <bcf:field fieldtype="field" datatype="date" skip_output="true">origdate</bcf:field> + <bcf:field fieldtype="field" datatype="datepart" nullok="true">origendyear</bcf:field> + <bcf:field fieldtype="field" datatype="datepart" nullok="true">origyear</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origmonth</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origday</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">orighour</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origminute</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origsecond</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origtimezone</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origseason</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origendmonth</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origendday</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origendhour</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origendminute</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origendsecond</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origendtimezone</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">origendseason</bcf:field> + <bcf:field fieldtype="field" datatype="date" skip_output="true">urldate</bcf:field> + <bcf:field fieldtype="field" datatype="datepart" nullok="true">urlendyear</bcf:field> + <bcf:field fieldtype="field" datatype="datepart" nullok="true">urlyear</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlmonth</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlday</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlhour</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlminute</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlsecond</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urltimezone</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlseason</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlendmonth</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlendday</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlendhour</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlendminute</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlendsecond</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlendtimezone</bcf:field> + <bcf:field fieldtype="field" datatype="datepart">urlendseason</bcf:field> + <bcf:field fieldtype="field" datatype="verbatim">doi</bcf:field> + <bcf:field fieldtype="field" datatype="verbatim">eprint</bcf:field> + <bcf:field fieldtype="field" datatype="verbatim">file</bcf:field> + <bcf:field fieldtype="field" datatype="verbatim">verba</bcf:field> + <bcf:field fieldtype="field" datatype="verbatim">verbb</bcf:field> + <bcf:field fieldtype="field" datatype="verbatim">verbc</bcf:field> + <bcf:field fieldtype="field" datatype="uri">url</bcf:field> + <bcf:field fieldtype="field" format="xsv" datatype="entrykey" skip_output="true">xdata</bcf:field> + <bcf:field fieldtype="field" format="xsv" datatype="entrykey" skip_output="true">ids</bcf:field> + <bcf:field fieldtype="field" format="xsv" datatype="entrykey" skip_output="true">entryset</bcf:field> + <bcf:field fieldtype="field" format="xsv" datatype="entrykey">related</bcf:field> + <bcf:field fieldtype="field" format="xsv" datatype="keyword">keywords</bcf:field> + <bcf:field fieldtype="field" format="xsv" datatype="option" skip_output="true">options</bcf:field> + <bcf:field fieldtype="field" format="xsv" datatype="option" skip_output="true">relatedoptions</bcf:field> + <bcf:field fieldtype="field" datatype="range">pages</bcf:field> + <bcf:field fieldtype="field" datatype="code">execute</bcf:field> + </bcf:fields> + <bcf:entryfields> + <bcf:field>abstract</bcf:field> + <bcf:field>annotation</bcf:field> + <bcf:field>authortype</bcf:field> + <bcf:field>bookpagination</bcf:field> + <bcf:field>crossref</bcf:field> + <bcf:field>day</bcf:field> + <bcf:field>endday</bcf:field> + <bcf:field>endhour</bcf:field> + <bcf:field>endminute</bcf:field> + <bcf:field>endmonth</bcf:field> + <bcf:field>endseason</bcf:field> + <bcf:field>endsecond</bcf:field> + <bcf:field>endtimezone</bcf:field> + <bcf:field>endyear</bcf:field> + <bcf:field>entryset</bcf:field> + <bcf:field>entrysubtype</bcf:field> + <bcf:field>execute</bcf:field> + <bcf:field>file</bcf:field> + <bcf:field>gender</bcf:field> + <bcf:field>hour</bcf:field> + <bcf:field>ids</bcf:field> + <bcf:field>indextitle</bcf:field> + <bcf:field>indexsorttitle</bcf:field> + <bcf:field>isan</bcf:field> + <bcf:field>ismn</bcf:field> + <bcf:field>iswc</bcf:field> + <bcf:field>keywords</bcf:field> + <bcf:field>label</bcf:field> + <bcf:field>langid</bcf:field> + <bcf:field>langidopts</bcf:field> + <bcf:field>library</bcf:field> + <bcf:field>lista</bcf:field> + <bcf:field>listb</bcf:field> + <bcf:field>listc</bcf:field> + <bcf:field>listd</bcf:field> + <bcf:field>liste</bcf:field> + <bcf:field>listf</bcf:field> + <bcf:field>minute</bcf:field> + <bcf:field>month</bcf:field> + <bcf:field>nameaddon</bcf:field> + <bcf:field>options</bcf:field> + <bcf:field>origday</bcf:field> + <bcf:field>origendday</bcf:field> + <bcf:field>origendhour</bcf:field> + <bcf:field>origendminute</bcf:field> + <bcf:field>origendmonth</bcf:field> + <bcf:field>origendseason</bcf:field> + <bcf:field>origendsecond</bcf:field> + <bcf:field>origendtimezone</bcf:field> + <bcf:field>origendyear</bcf:field> + <bcf:field>orighour</bcf:field> + <bcf:field>origminute</bcf:field> + <bcf:field>origmonth</bcf:field> + <bcf:field>origseason</bcf:field> + <bcf:field>origsecond</bcf:field> + <bcf:field>origtimezone</bcf:field> + <bcf:field>origyear</bcf:field> + <bcf:field>origlocation</bcf:field> + <bcf:field>origpublisher</bcf:field> + <bcf:field>origtitle</bcf:field> + <bcf:field>pagination</bcf:field> + <bcf:field>presort</bcf:field> + <bcf:field>related</bcf:field> + <bcf:field>relatedoptions</bcf:field> + <bcf:field>relatedstring</bcf:field> + <bcf:field>relatedtype</bcf:field> + <bcf:field>season</bcf:field> + <bcf:field>second</bcf:field> + <bcf:field>shortauthor</bcf:field> + <bcf:field>shorteditor</bcf:field> + <bcf:field>shorthand</bcf:field> + <bcf:field>shorthandintro</bcf:field> + <bcf:field>shortjournal</bcf:field> + <bcf:field>shortseries</bcf:field> + <bcf:field>shorttitle</bcf:field> + <bcf:field>sortkey</bcf:field> + <bcf:field>sortname</bcf:field> + <bcf:field>sortshorthand</bcf:field> + <bcf:field>sorttitle</bcf:field> + <bcf:field>sortyear</bcf:field> + <bcf:field>timezone</bcf:field> + <bcf:field>url</bcf:field> + <bcf:field>urlday</bcf:field> + <bcf:field>urlendday</bcf:field> + <bcf:field>urlendhour</bcf:field> + <bcf:field>urlendminute</bcf:field> + <bcf:field>urlendmonth</bcf:field> + <bcf:field>urlendsecond</bcf:field> + <bcf:field>urlendtimezone</bcf:field> + <bcf:field>urlendyear</bcf:field> + <bcf:field>urlhour</bcf:field> + <bcf:field>urlminute</bcf:field> + <bcf:field>urlmonth</bcf:field> + <bcf:field>urlsecond</bcf:field> + <bcf:field>urltimezone</bcf:field> + <bcf:field>urlyear</bcf:field> + <bcf:field>usera</bcf:field> + <bcf:field>userb</bcf:field> + <bcf:field>userc</bcf:field> + <bcf:field>userd</bcf:field> + <bcf:field>usere</bcf:field> + <bcf:field>userf</bcf:field> + <bcf:field>verba</bcf:field> + <bcf:field>verbb</bcf:field> + <bcf:field>verbc</bcf:field> + <bcf:field>xdata</bcf:field> + <bcf:field>xref</bcf:field> + <bcf:field>year</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>set</bcf:entrytype> + <bcf:field>entryset</bcf:field> + <bcf:field>crossref</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>article</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>annotator</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>commentator</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editora</bcf:field> + <bcf:field>editorb</bcf:field> + <bcf:field>editorc</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>editoratype</bcf:field> + <bcf:field>editorbtype</bcf:field> + <bcf:field>editorctype</bcf:field> + <bcf:field>eid</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>issn</bcf:field> + <bcf:field>issue</bcf:field> + <bcf:field>issuetitle</bcf:field> + <bcf:field>issuesubtitle</bcf:field> + <bcf:field>journalsubtitle</bcf:field> + <bcf:field>journaltitle</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>origlanguage</bcf:field> + <bcf:field>pages</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>series</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>translator</bcf:field> + <bcf:field>version</bcf:field> + <bcf:field>volume</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>bibnote</bcf:entrytype> + <bcf:field>note</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>book</bcf:entrytype> + <bcf:field>author</bcf:field> + <bcf:field>addendum</bcf:field> + <bcf:field>afterword</bcf:field> + <bcf:field>annotator</bcf:field> + <bcf:field>chapter</bcf:field> + <bcf:field>commentator</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>edition</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editora</bcf:field> + <bcf:field>editorb</bcf:field> + <bcf:field>editorc</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>editoratype</bcf:field> + <bcf:field>editorbtype</bcf:field> + <bcf:field>editorctype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>foreword</bcf:field> + <bcf:field>introduction</bcf:field> + <bcf:field>isbn</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>maintitle</bcf:field> + <bcf:field>maintitleaddon</bcf:field> + <bcf:field>mainsubtitle</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>origlanguage</bcf:field> + <bcf:field>pages</bcf:field> + <bcf:field>pagetotal</bcf:field> + <bcf:field>part</bcf:field> + <bcf:field>publisher</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>series</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>translator</bcf:field> + <bcf:field>volume</bcf:field> + <bcf:field>volumes</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>mvbook</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>afterword</bcf:field> + <bcf:field>annotator</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>commentator</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>edition</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editora</bcf:field> + <bcf:field>editorb</bcf:field> + <bcf:field>editorc</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>editoratype</bcf:field> + <bcf:field>editorbtype</bcf:field> + <bcf:field>editorctype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>foreword</bcf:field> + <bcf:field>introduction</bcf:field> + <bcf:field>isbn</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>origlanguage</bcf:field> + <bcf:field>pagetotal</bcf:field> + <bcf:field>publisher</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>series</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>translator</bcf:field> + <bcf:field>volume</bcf:field> + <bcf:field>volumes</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>inbook</bcf:entrytype> + <bcf:entrytype>bookinbook</bcf:entrytype> + <bcf:entrytype>suppbook</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>afterword</bcf:field> + <bcf:field>annotator</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>booktitle</bcf:field> + <bcf:field>bookauthor</bcf:field> + <bcf:field>booksubtitle</bcf:field> + <bcf:field>booktitleaddon</bcf:field> + <bcf:field>chapter</bcf:field> + <bcf:field>commentator</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>edition</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editora</bcf:field> + <bcf:field>editorb</bcf:field> + <bcf:field>editorc</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>editoratype</bcf:field> + <bcf:field>editorbtype</bcf:field> + <bcf:field>editorctype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>foreword</bcf:field> + <bcf:field>introduction</bcf:field> + <bcf:field>isbn</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>mainsubtitle</bcf:field> + <bcf:field>maintitle</bcf:field> + <bcf:field>maintitleaddon</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>origlanguage</bcf:field> + <bcf:field>part</bcf:field> + <bcf:field>publisher</bcf:field> + <bcf:field>pages</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>series</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>translator</bcf:field> + <bcf:field>volume</bcf:field> + <bcf:field>volumes</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>booklet</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>chapter</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>howpublished</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>pages</bcf:field> + <bcf:field>pagetotal</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>type</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>collection</bcf:entrytype> + <bcf:entrytype>reference</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>afterword</bcf:field> + <bcf:field>annotator</bcf:field> + <bcf:field>chapter</bcf:field> + <bcf:field>commentator</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>edition</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editora</bcf:field> + <bcf:field>editorb</bcf:field> + <bcf:field>editorc</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>editoratype</bcf:field> + <bcf:field>editorbtype</bcf:field> + <bcf:field>editorctype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>foreword</bcf:field> + <bcf:field>introduction</bcf:field> + <bcf:field>isbn</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>mainsubtitle</bcf:field> + <bcf:field>maintitle</bcf:field> + <bcf:field>maintitleaddon</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>origlanguage</bcf:field> + <bcf:field>pages</bcf:field> + <bcf:field>pagetotal</bcf:field> + <bcf:field>part</bcf:field> + <bcf:field>publisher</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>series</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>translator</bcf:field> + <bcf:field>volume</bcf:field> + <bcf:field>volumes</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>mvcollection</bcf:entrytype> + <bcf:entrytype>mvreference</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>afterword</bcf:field> + <bcf:field>annotator</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>commentator</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>edition</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editora</bcf:field> + <bcf:field>editorb</bcf:field> + <bcf:field>editorc</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>editoratype</bcf:field> + <bcf:field>editorbtype</bcf:field> + <bcf:field>editorctype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>foreword</bcf:field> + <bcf:field>introduction</bcf:field> + <bcf:field>isbn</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>origlanguage</bcf:field> + <bcf:field>publisher</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>translator</bcf:field> + <bcf:field>volume</bcf:field> + <bcf:field>volumes</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>incollection</bcf:entrytype> + <bcf:entrytype>suppcollection</bcf:entrytype> + <bcf:entrytype>inreference</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>afterword</bcf:field> + <bcf:field>annotator</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>booksubtitle</bcf:field> + <bcf:field>booktitle</bcf:field> + <bcf:field>booktitleaddon</bcf:field> + <bcf:field>chapter</bcf:field> + <bcf:field>commentator</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>edition</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editora</bcf:field> + <bcf:field>editorb</bcf:field> + <bcf:field>editorc</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>editoratype</bcf:field> + <bcf:field>editorbtype</bcf:field> + <bcf:field>editorctype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>foreword</bcf:field> + <bcf:field>introduction</bcf:field> + <bcf:field>isbn</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>mainsubtitle</bcf:field> + <bcf:field>maintitle</bcf:field> + <bcf:field>maintitleaddon</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>origlanguage</bcf:field> + <bcf:field>pages</bcf:field> + <bcf:field>part</bcf:field> + <bcf:field>publisher</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>series</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>translator</bcf:field> + <bcf:field>volume</bcf:field> + <bcf:field>volumes</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>manual</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>chapter</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>edition</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>isbn</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>organization</bcf:field> + <bcf:field>pages</bcf:field> + <bcf:field>pagetotal</bcf:field> + <bcf:field>publisher</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>series</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>type</bcf:field> + <bcf:field>version</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>misc</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>howpublished</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>organization</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>type</bcf:field> + <bcf:field>version</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>online</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>organization</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>version</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>patent</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>holder</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>type</bcf:field> + <bcf:field>version</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>periodical</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editora</bcf:field> + <bcf:field>editorb</bcf:field> + <bcf:field>editorc</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>editoratype</bcf:field> + <bcf:field>editorbtype</bcf:field> + <bcf:field>editorctype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>issn</bcf:field> + <bcf:field>issue</bcf:field> + <bcf:field>issuesubtitle</bcf:field> + <bcf:field>issuetitle</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>season</bcf:field> + <bcf:field>series</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>volume</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>mvproceedings</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>eventday</bcf:field> + <bcf:field>eventendday</bcf:field> + <bcf:field>eventendhour</bcf:field> + <bcf:field>eventendminute</bcf:field> + <bcf:field>eventendmonth</bcf:field> + <bcf:field>eventendseason</bcf:field> + <bcf:field>eventendsecond</bcf:field> + <bcf:field>eventendtimezone</bcf:field> + <bcf:field>eventendyear</bcf:field> + <bcf:field>eventhour</bcf:field> + <bcf:field>eventminute</bcf:field> + <bcf:field>eventmonth</bcf:field> + <bcf:field>eventseason</bcf:field> + <bcf:field>eventsecond</bcf:field> + <bcf:field>eventtimezone</bcf:field> + <bcf:field>eventyear</bcf:field> + <bcf:field>eventtitle</bcf:field> + <bcf:field>eventtitleaddon</bcf:field> + <bcf:field>isbn</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>organization</bcf:field> + <bcf:field>pagetotal</bcf:field> + <bcf:field>publisher</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>series</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>venue</bcf:field> + <bcf:field>volumes</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>proceedings</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>chapter</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>eventday</bcf:field> + <bcf:field>eventendday</bcf:field> + <bcf:field>eventendhour</bcf:field> + <bcf:field>eventendminute</bcf:field> + <bcf:field>eventendmonth</bcf:field> + <bcf:field>eventendseason</bcf:field> + <bcf:field>eventendsecond</bcf:field> + <bcf:field>eventendtimezone</bcf:field> + <bcf:field>eventendyear</bcf:field> + <bcf:field>eventhour</bcf:field> + <bcf:field>eventminute</bcf:field> + <bcf:field>eventmonth</bcf:field> + <bcf:field>eventseason</bcf:field> + <bcf:field>eventsecond</bcf:field> + <bcf:field>eventtimezone</bcf:field> + <bcf:field>eventyear</bcf:field> + <bcf:field>eventtitle</bcf:field> + <bcf:field>eventtitleaddon</bcf:field> + <bcf:field>isbn</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>mainsubtitle</bcf:field> + <bcf:field>maintitle</bcf:field> + <bcf:field>maintitleaddon</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>organization</bcf:field> + <bcf:field>pages</bcf:field> + <bcf:field>pagetotal</bcf:field> + <bcf:field>part</bcf:field> + <bcf:field>publisher</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>series</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>venue</bcf:field> + <bcf:field>volume</bcf:field> + <bcf:field>volumes</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>inproceedings</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>booksubtitle</bcf:field> + <bcf:field>booktitle</bcf:field> + <bcf:field>booktitleaddon</bcf:field> + <bcf:field>chapter</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>editortype</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>eventday</bcf:field> + <bcf:field>eventendday</bcf:field> + <bcf:field>eventendhour</bcf:field> + <bcf:field>eventendminute</bcf:field> + <bcf:field>eventendmonth</bcf:field> + <bcf:field>eventendseason</bcf:field> + <bcf:field>eventendsecond</bcf:field> + <bcf:field>eventendtimezone</bcf:field> + <bcf:field>eventendyear</bcf:field> + <bcf:field>eventhour</bcf:field> + <bcf:field>eventminute</bcf:field> + <bcf:field>eventmonth</bcf:field> + <bcf:field>eventseason</bcf:field> + <bcf:field>eventsecond</bcf:field> + <bcf:field>eventtimezone</bcf:field> + <bcf:field>eventyear</bcf:field> + <bcf:field>eventtitle</bcf:field> + <bcf:field>eventtitleaddon</bcf:field> + <bcf:field>isbn</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>mainsubtitle</bcf:field> + <bcf:field>maintitle</bcf:field> + <bcf:field>maintitleaddon</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>organization</bcf:field> + <bcf:field>pages</bcf:field> + <bcf:field>part</bcf:field> + <bcf:field>publisher</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>series</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>venue</bcf:field> + <bcf:field>volume</bcf:field> + <bcf:field>volumes</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>report</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>chapter</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>institution</bcf:field> + <bcf:field>isrn</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>number</bcf:field> + <bcf:field>pages</bcf:field> + <bcf:field>pagetotal</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>type</bcf:field> + <bcf:field>version</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>thesis</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>chapter</bcf:field> + <bcf:field>doi</bcf:field> + <bcf:field>eprint</bcf:field> + <bcf:field>eprintclass</bcf:field> + <bcf:field>eprinttype</bcf:field> + <bcf:field>institution</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>pages</bcf:field> + <bcf:field>pagetotal</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>type</bcf:field> + </bcf:entryfields> + <bcf:entryfields> + <bcf:entrytype>unpublished</bcf:entrytype> + <bcf:field>addendum</bcf:field> + <bcf:field>author</bcf:field> + <bcf:field>eventday</bcf:field> + <bcf:field>eventendday</bcf:field> + <bcf:field>eventendhour</bcf:field> + <bcf:field>eventendminute</bcf:field> + <bcf:field>eventendmonth</bcf:field> + <bcf:field>eventendseason</bcf:field> + <bcf:field>eventendsecond</bcf:field> + <bcf:field>eventendtimezone</bcf:field> + <bcf:field>eventendyear</bcf:field> + <bcf:field>eventhour</bcf:field> + <bcf:field>eventminute</bcf:field> + <bcf:field>eventmonth</bcf:field> + <bcf:field>eventseason</bcf:field> + <bcf:field>eventsecond</bcf:field> + <bcf:field>eventtimezone</bcf:field> + <bcf:field>eventyear</bcf:field> + <bcf:field>eventtitle</bcf:field> + <bcf:field>eventtitleaddon</bcf:field> + <bcf:field>howpublished</bcf:field> + <bcf:field>language</bcf:field> + <bcf:field>location</bcf:field> + <bcf:field>note</bcf:field> + <bcf:field>pubstate</bcf:field> + <bcf:field>subtitle</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>titleaddon</bcf:field> + <bcf:field>type</bcf:field> + <bcf:field>venue</bcf:field> + </bcf:entryfields> + <bcf:constraints> + <bcf:entrytype>article</bcf:entrytype> + <bcf:entrytype>book</bcf:entrytype> + <bcf:entrytype>inbook</bcf:entrytype> + <bcf:entrytype>bookinbook</bcf:entrytype> + <bcf:entrytype>suppbook</bcf:entrytype> + <bcf:entrytype>booklet</bcf:entrytype> + <bcf:entrytype>collection</bcf:entrytype> + <bcf:entrytype>incollection</bcf:entrytype> + <bcf:entrytype>suppcollection</bcf:entrytype> + <bcf:entrytype>manual</bcf:entrytype> + <bcf:entrytype>misc</bcf:entrytype> + <bcf:entrytype>mvbook</bcf:entrytype> + <bcf:entrytype>mvcollection</bcf:entrytype> + <bcf:entrytype>online</bcf:entrytype> + <bcf:entrytype>patent</bcf:entrytype> + <bcf:entrytype>periodical</bcf:entrytype> + <bcf:entrytype>suppperiodical</bcf:entrytype> + <bcf:entrytype>proceedings</bcf:entrytype> + <bcf:entrytype>inproceedings</bcf:entrytype> + <bcf:entrytype>reference</bcf:entrytype> + <bcf:entrytype>inreference</bcf:entrytype> + <bcf:entrytype>report</bcf:entrytype> + <bcf:entrytype>set</bcf:entrytype> + <bcf:entrytype>thesis</bcf:entrytype> + <bcf:entrytype>unpublished</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:fieldxor> + <bcf:field>date</bcf:field> + <bcf:field>year</bcf:field> + </bcf:fieldxor> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>set</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>entryset</bcf:field> + <bcf:field>crossref</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>article</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>author</bcf:field> + <bcf:field>journaltitle</bcf:field> + <bcf:field>title</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>book</bcf:entrytype> + <bcf:entrytype>mvbook</bcf:entrytype> + <bcf:entrytype>mvcollection</bcf:entrytype> + <bcf:entrytype>mvreference</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>author</bcf:field> + <bcf:field>title</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>inbook</bcf:entrytype> + <bcf:entrytype>bookinbook</bcf:entrytype> + <bcf:entrytype>suppbook</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>author</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>booktitle</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>booklet</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:fieldor> + <bcf:field>author</bcf:field> + <bcf:field>editor</bcf:field> + </bcf:fieldor> + <bcf:field>title</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>collection</bcf:entrytype> + <bcf:entrytype>reference</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>editor</bcf:field> + <bcf:field>title</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>incollection</bcf:entrytype> + <bcf:entrytype>suppcollection</bcf:entrytype> + <bcf:entrytype>inreference</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>author</bcf:field> + <bcf:field>editor</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>booktitle</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>manual</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>title</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>misc</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>title</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>online</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>title</bcf:field> + <bcf:field>url</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>patent</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>author</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>number</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>periodical</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>editor</bcf:field> + <bcf:field>title</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>proceedings</bcf:entrytype> + <bcf:entrytype>mvproceedings</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>editor</bcf:field> + <bcf:field>title</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>inproceedings</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>author</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>booktitle</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>report</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>author</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>type</bcf:field> + <bcf:field>institution</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>thesis</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>author</bcf:field> + <bcf:field>title</bcf:field> + <bcf:field>type</bcf:field> + <bcf:field>institution</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:entrytype>unpublished</bcf:entrytype> + <bcf:constraint type="mandatory"> + <bcf:field>author</bcf:field> + <bcf:field>title</bcf:field> + </bcf:constraint> + </bcf:constraints> + <bcf:constraints> + <bcf:constraint type="data" datatype="isbn"> + <bcf:field>isbn</bcf:field> + </bcf:constraint> + <bcf:constraint type="data" datatype="issn"> + <bcf:field>issn</bcf:field> + </bcf:constraint> + <bcf:constraint type="data" datatype="ismn"> + <bcf:field>ismn</bcf:field> + </bcf:constraint> + <bcf:constraint type="data" datatype="date"> + <bcf:field>date</bcf:field> + <bcf:field>eventdate</bcf:field> + <bcf:field>origdate</bcf:field> + <bcf:field>urldate</bcf:field> + </bcf:constraint> + <bcf:constraint type="data" datatype="pattern" pattern="(?:sf|sm|sn|pf|pm|pn|pp)"> + <bcf:field>gender</bcf:field> + </bcf:constraint> + </bcf:constraints> + </bcf:datamodel> + <!-- CITATION DATA --> + <!-- SECTION 0 --> + <bcf:bibdata section="0"> + <bcf:datasource type="file" datatype="bibtex">../fo.bib</bcf:datasource> + </bcf:bibdata> + <bcf:section number="0"> + <bcf:citekey order="1">Edwards_2017</bcf:citekey> + <bcf:citekey order="2">Edwards_2017</bcf:citekey> + <bcf:citekey order="3">Riggs:2016aa</bcf:citekey> + <bcf:citekey order="4">Riggs:2016aa</bcf:citekey> + <bcf:citekey order="5">Bruckler:2001aa</bcf:citekey> + <bcf:citekey order="6">Bruckler:2001aa</bcf:citekey> + <bcf:citekey order="7">Zdenek:1939aa</bcf:citekey> + <bcf:citekey order="8">Zdenek:1939aa</bcf:citekey> + <bcf:citekey order="9">Caraffa_2011</bcf:citekey> + <bcf:citekey order="10">Caraffa_2011</bcf:citekey> + <bcf:citekey order="11">Uhlikova:2010aa</bcf:citekey> + <bcf:citekey order="12">Uhlikova:2010aa</bcf:citekey> + <bcf:citekey order="13">Noll:1992aa</bcf:citekey> + <bcf:citekey order="14">Noll:1992aa</bcf:citekey> + <bcf:citekey order="15">Schwarz:1931aa</bcf:citekey> + <bcf:citekey order="16">Schwarz:1931aa</bcf:citekey> + <bcf:citekey order="17">Schwartz_1995</bcf:citekey> + <bcf:citekey order="18">Schwartz_1995</bcf:citekey> + <bcf:citekey order="19">Faber:2015ab</bcf:citekey> + <bcf:citekey order="20">Faber:2015ab</bcf:citekey> + <bcf:citekey order="21">Rohacek:2010aa</bcf:citekey> + <bcf:citekey order="22">Rohacek:2010aa</bcf:citekey> + <bcf:citekey order="23">Lachnit:2005aa</bcf:citekey> + <bcf:citekey order="24">Lachnit:2005aa</bcf:citekey> + <bcf:citekey order="25">Groll:1865aa</bcf:citekey> + <bcf:citekey order="26">Groll:1865aa</bcf:citekey> + <bcf:citekey order="27">Schlosser:1934aa</bcf:citekey> + <bcf:citekey order="28">Schlosser:1934aa</bcf:citekey> + <bcf:citekey order="29">Eitelberger:1863ab</bcf:citekey> + <bcf:citekey order="30">Eitelberger:1863ab</bcf:citekey> + <bcf:citekey order="31">Wirth:1939aa</bcf:citekey> + <bcf:citekey order="32">Wirth:1939aa</bcf:citekey> + <bcf:citekey order="33">Faber:2015aa</bcf:citekey> + <bcf:citekey order="34">Faber:2015aa</bcf:citekey> + <bcf:citekey order="35">Trnkova:2015aa</bcf:citekey> + <bcf:citekey order="36">Trnkova:2015aa</bcf:citekey> + <bcf:citekey order="37">Trnkova:2010aa</bcf:citekey> + <bcf:citekey order="38">Trnkova:2010aa</bcf:citekey> + <bcf:citekey order="39">Frodl:1988aa</bcf:citekey> + <bcf:citekey order="40">Frodl:1988aa</bcf:citekey> + </bcf:section> + <!-- SORTING TEMPLATES --> + <bcf:sortingtemplate name="nyt"> + <bcf:sort order="1"> + <bcf:sortitem order="1">presort</bcf:sortitem> + </bcf:sort> + <bcf:sort order="2" final="1"> + <bcf:sortitem order="1">sortkey</bcf:sortitem> + </bcf:sort> + <bcf:sort order="3"> + <bcf:sortitem order="1">sortname</bcf:sortitem> + <bcf:sortitem order="2">author</bcf:sortitem> + <bcf:sortitem order="3">editor</bcf:sortitem> + <bcf:sortitem order="4">translator</bcf:sortitem> + <bcf:sortitem order="5">sorttitle</bcf:sortitem> + <bcf:sortitem order="6">title</bcf:sortitem> + </bcf:sort> + <bcf:sort order="4"> + <bcf:sortitem order="1">sortyear</bcf:sortitem> + <bcf:sortitem order="2">year</bcf:sortitem> + </bcf:sort> + <bcf:sort order="5"> + <bcf:sortitem order="1">sorttitle</bcf:sortitem> + <bcf:sortitem order="2">title</bcf:sortitem> + </bcf:sort> + <bcf:sort order="6"> + <bcf:sortitem order="1">volume</bcf:sortitem> + <bcf:sortitem order="2">0</bcf:sortitem> + </bcf:sort> + </bcf:sortingtemplate> + <!-- DATALISTS --> + <bcf:datalist section="0" + name="nyt/global//global/global" + type="entry" + sortingtemplatename="nyt" + sortingnamekeytemplatename="global" + labelprefix="" + uniquenametemplatename="global" + labelalphanametemplatename="global"> + </bcf:datalist> +</bcf:controlfile> diff --git a/bibformat/4ht/tmp_files/test.blg b/bibformat/4ht/tmp_files/test.blg new file mode 100644 index 0000000..ee1eb66 --- /dev/null +++ b/bibformat/4ht/tmp_files/test.blg @@ -0,0 +1,20 @@ +[0] Config.pm:304> INFO - This is Biber 2.12 +[1] Config.pm:307> INFO - Logfile is 'test.blg' +[50] biber-darwin:315> INFO - === Di Mär 26, 2019, 12:29:36 +[80] Biber.pm:371> INFO - Reading 'test.bcf' +[203] Biber.pm:889> INFO - Found 20 citekeys in bib section 0 +[218] Biber.pm:4093> INFO - Processing section 0 +[230] Biber.pm:4254> INFO - Looking for bibtex format file '../fo.bib' for section 0 +[252] bibtex.pm:1523> INFO - LaTeX decoding ... +[1359] bibtex.pm:1340> INFO - Found BibTeX data source '../fo.bib' +[1497] Utils.pm:193> WARN - year field '1865 [Vienna 1864]' in entry 'Groll:1865aa' is not an integer - this will probably not sort properly. +[1513] Utils.pm:193> WARN - year field '1939--1940' in entry 'Wirth:1939aa' is not an integer - this will probably not sort properly. +[1527] Utils.pm:193> WARN - BibTeX subsystem: warning: comma(s) at end of name (removing) +[1527] Utils.pm:193> WARN - BibTeX subsystem: author, warning: comma(s) at end of name (removing) +[1579] UCollate.pm:68> INFO - Overriding locale 'de-DE' defaults 'normalization = NFD' with 'normalization = prenormalized' +[1579] UCollate.pm:68> INFO - Overriding locale 'de-DE' defaults 'variable = shifted' with 'variable = non-ignorable' +[1579] Biber.pm:3921> INFO - Sorting list 'nyt/global//global/global' of type 'entry' with template 'nyt' and locale 'de-DE' +[1579] Biber.pm:3927> INFO - No sort tailoring available for locale 'de-DE' +[1603] bbl.pm:636> INFO - Writing 'test.bbl' with encoding 'UTF-8' +[1614] bbl.pm:739> INFO - Output to test.bbl +[1614] Biber.pm:110> INFO - WARNINGS: 4 diff --git a/bibformat/4ht/tmp_files/test.css b/bibformat/4ht/tmp_files/test.css new file mode 100644 index 0000000..24a50f9 --- /dev/null +++ b/bibformat/4ht/tmp_files/test.css @@ -0,0 +1,124 @@ + +/* start css.sty */ +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ecti-1095{ font-style: italic;} +.ecti-1095{ font-style: italic;} +.ecti-1095{ font-style: italic;} +.eccc1095-{font-size:90%;} +.small-caps{font-variant: small-caps; } +p.noindent { text-indent: 0em } +td p.noindent { text-indent: 0em; margin-top:0em; } +p.nopar { text-indent: 0em; } +p.indent{ text-indent: 1.5em } +@media print {div.crosslinks {visibility:hidden;}} +a img { border-top: 0; border-left: 0; border-right: 0; } +center { margin-top:1em; margin-bottom:1em; } +td center { margin-top:0em; margin-bottom:0em; } +.Canvas { position:relative; } +img.math{vertical-align:middle;} +li p.indent { text-indent: 0em } +li p:first-child{ margin-top:0em; } +li p:last-child, li div:last-child { margin-bottom:0.5em; } +li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } +.enumerate1 {list-style-type:decimal;} +.enumerate2 {list-style-type:lower-alpha;} +.enumerate3 {list-style-type:lower-roman;} +.enumerate4 {list-style-type:upper-alpha;} +div.newtheorem { margin-bottom: 2em; margin-top: 2em;} +.obeylines-h,.obeylines-v {white-space: nowrap; } +div.obeylines-v p { margin-top:0; margin-bottom:0; } +.overline{ text-decoration:overline; } +.overline img{ border-top: 1px solid black; } +td.displaylines {text-align:center; white-space:nowrap;} +.centerline {text-align:center;} +.rightline {text-align:right;} +div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } +.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.fbox {display:table} +div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.minipage{width:100%;} +div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} +div.center div {text-align: left;} +div.flushright, div.flushright div.flushright {text-align: right;} +div.flushright div {text-align: left;} +div.flushleft {text-align: left;} +.underline{ text-decoration:underline; } +.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } +.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +.framebox-c {text-align:center;} +.framebox-l {text-align:left;} +.framebox-r {text-align:right;} +span.thank-mark{ vertical-align: super } +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } +table.tabular td p{margin-top:0em;} +table.tabular {margin-left: auto; margin-right: auto;} +td p:first-child{ margin-top:0em; } +td p:last-child{ margin-bottom:0em; } +div.td00{ margin-left:0pt; margin-right:0pt; } +div.td01{ margin-left:0pt; margin-right:5pt; } +div.td10{ margin-left:5pt; margin-right:0pt; } +div.td11{ margin-left:5pt; margin-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +td.td00{ padding-left:0pt; padding-right:0pt; } +td.td01{ padding-left:0pt; padding-right:5pt; } +td.td10{ padding-left:5pt; padding-right:0pt; } +td.td11{ padding-left:5pt; padding-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +.hline hr, .cline hr{ height : 1px; margin:0px; } +.tabbing-right {text-align:right;} +span.TEX {letter-spacing: -0.125em; } +span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} +a span.TEX span.E {text-decoration: none; } +span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} +span.LATEX span.TEX{ position:relative; left: -0.4em; } +div.float, div.figure {margin-left: auto; margin-right: auto;} +div.float img {text-align:center;} +div.figure img {text-align:center;} +.marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} +.marginpar p{margin-top:0.4em; margin-bottom:0.4em;} +table.equation {width:100%;} +.equation td{text-align:center; } +td.equation { margin-top:1em; margin-bottom:1em; } +td.equation-label { width:5%; text-align:center; } +td.eqnarray4 { width:5%; white-space: normal; } +td.eqnarray2 { width:5%; } +table.eqnarray-star, table.eqnarray {width:100%;} +div.eqnarray{text-align:center;} +div.array {text-align:center;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.pmatrix img{vertical-align:middle;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.bar-css {text-decoration:overline;} +img.cdots{vertical-align:middle;} +.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} +.index-item, .index-subitem, .index-subsubitem {display:block} +div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} +div.caption span.id{font-weight: bold; white-space: nowrap; } +h1.partHead{text-align: center} +p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} +.subparagraphHead, .likesubparagraphHead { font-weight: bold;} +.quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} +.verse{white-space:nowrap; margin-left:2em} +div.maketitle {text-align:center;} +h2.titleHead{text-align:center;} +div.maketitle{ margin-bottom: 2em; } +div.author, div.date {text-align:center;} +div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } +div.author{white-space: nowrap;} +.quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } +.abstract p {margin-left:5%; margin-right:5%;} +div.abstract {width:100%;} +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +dt.printshorthands{float:left; clear:left; margin-right:1em;} +dd.thebibliography { text-indent: -2em; margin-left: 2em;} +dd.thebibliography p:first-child{ text-indent: -2em; } +dt.thebibliography{float:left; clear:left; margin-right:1em;} +/* end css.sty */ + diff --git a/bibformat/4ht/tmp_files/test.dvi b/bibformat/4ht/tmp_files/test.dvi new file mode 100644 index 0000000000000000000000000000000000000000..2a082fab7c8639015c98e597b6469df04e6bda65 GIT binary patch literal 33156 zcmd5_4U8OTd3Nku|6HI^3Qp3-ktPQL+jl#+vwyd{_mlYNY$x&A#&+U_C?s>cv%AC1 z?rdge@5jdl3T>gZzGO4x*l?<nP!uT8w5243lb}~rQ~^PS&{B!Eq9O{4gw#c(rBJC& z-}n2z+5Ki_XT58$t)66gXZHJfzxRE==l%J9_P@4X^N}Yu_l$3WziqGIESy#D6ZEQ8 zsairbBBjMhOpGQoQZ$<WLnv_#7Q5KroAB4TwIWv(!&J{JlZo`0n23y}V-;&86;Ftf zcrqQYSWo}-AD@3_>*rqn@r7sprx?5SnXSdxG<^JGY^br_iWjXr9$^1J*w}^7V$mvT zjs5s>_>M!SnGq^tSy#(BrECeyf~724VfvI2B1%bEX-sittz75g<3dR`3TioQ>6Hvr zABXyTx%${wMK;=WgeCX6N>VC3BuQd|5H-may`!Y$R9UDPDh?s1&Wl+?H%(0~&zZvV zylSems-{{?nWCD5VUDk?G!ApsWkD?!fTCI5$SDS)T!@T2kD8LVfD_GULoF2Pi<L$k zTN(dABoY~(Fe`Fd7|d$2X-*Ce-)0Vn;oo9-F??HYcz9@Pcw!VwObtgG6HYB@cmjJK zG>t4&84_g8BLBM@$<am@;rr34VX1MyQ#;nV_HAaEQo%J~T1%QTIYeYEYigmKDFH_` zg)|*&#GIz%-r)?xpIMSMEu57rCO4XRW5lVH9G<AQ7=SgZpi~A(K_L~YQ^QFrVdPi} zx~NtJHq@e(hce_3_*AV-4W}9sYglra+bSE*mSz{Z3WTvzq>*;2L_Gt5_JMK@hHS`{ z;*zgwv?)r-J9ez9TEMNWuU5PfbvlH>yA%Lx&FWgtS0_oQ6R<!+7Vt{rA+mk_R3pjy zj5>UAln(3XHMJ5h>V~)9XoOCA=r@YYsm=zles*d&+Tupk%MBu;wwe%)Q^g*><A`3i z9s*?9I}{(<ml4EP@#Q>x6`q$3RW8FEYJGu||0s@&uPsGLb;1^qw?JzzD0BiMcgF?N zAW`c~SvNpK$5;GhNYPe9EhS*><>iv9EoHJ*K-qa^r7`9sgN_2ppnAY6(q0An4!R{^ z;G#d->=ub_NB>IWoUgmK#1ds_OR>P1;O5IpBSjk~2%iOPR}geLaF!69+4HP!S$Zi$ zUad67xtf6Y?J5&wcUPuh{|hi~AHe!U``yZYNG{LIfE@epqwg6MRdiFeRK1)r6iv23 z0OP{of||36ncKu@URfL;nqt7o{@d@g>uo@uHFd3OK?4M_S#<&JkkeEXohUKkMF4_! zRED!f8D`LaPtUX{Lm}40vC~6<-xOAxV`)zcM~Qoc!qi03Xtq+M`t8u{41a$_1Tzzf zMAMOEJc&<j-y~c%RHRgb;G49y_`K2><^&CfNG!=#ad}=bEETXa%o_+$Z@#dmf)~)q zWe~ZRv2Z4@8m0w&RkfT;3z>^>#9JQBC@Vf9Km%aYGp$!GMP`Z{L8kyQ<W5gJk5)CV z9%-ubsLsD@QsZrkm>=dLiAuRzQViKrBw<-ofixoWu(ecCGC3uyQs7B&y|=1F{Z%x5 z0UQlks}yD6Z2M}lplXI*lEH@ws22BEt5(2;Z1#45BNAPuva(<m72N=@%F7EO%3%bm zFL}`fSOP7gKC3LDjW@%^5$<7LSY9ZqmJ$XNmsK)CSziFti!!?1LqMy6d7;vxfjE#} zgaS8gg*pa~WOUG1?4G%aAPgPkgoxsNgH?Di6rC^7?Q?s5Qe{y96j5`+tR`pYu;w9- zS}P~!RI{SVbil$g=SWeM92fXOvoX8pjz~))&Fva+JHaCHHhpEuTTp=<M;yu$crgou z2T2mU$V{71(#tv#gPXjjOt@hnc8-H<pvXoBW<(KLP~dtI^Rqfw;)<NhspUeLKy6Hn zRG^acjylNfB_B?ZQq;-La9kE5B7`y6(L1<~a5%It#`26M&uU<wKjA6F%u}m8HyTGM z{CFHP`%C&eJyey{vRaV~$})v|DH6F2<fV8@QTj#@-k4hOA9?j+R=7DI2=%-Pr(DN3 zD~)j5Zm?;W#t}ma#b-Rl^IFv`lJ+QNt!F|V_voU~QA!>-iBy`+1yVp_2sWdeRd9%H z=_O%`Gyj`0h93Z$U!iWD<OV4=zi~kTvjBn*1>BB~M3wbpe1myIE-5fG!r2i)Y(8lG z1G-;VM)!Ej-0D2*;vJg_9&~9@>MD$!2fg5P1g&;q9NY|ZgwD$ZgBsB)%H_E*aBgl{ z@VFEL1bE<$t~5#<3rVHCu3Kdtj0V=jVj^}$ikn$Og~W%@rkvca<T48lAajyQ!Q_MP zG_E_;G60mSCL6x#$KJcf>79SXI#I8~tsPBQgm-}mbUFPAm_u1+wMaW;((-oMUEV26 z=DZ+RExic?bk@^%D-Bnd(8<NTt_a5vB#LvDysiNA(@22LO;jrvi8PB6`UuFg!BOhS zn-v<HyQ@kUtD2xw&EKo!>6H}hu2;#^tG_Dil_Xji!9*Yr7*$O%9~72ZqKJ&QjUi)S z)6uv2ex;FdF<zuxbb&(~i^}-uuL}dZSY0+GUtQ#*t1c<%ym86TU)S4jo4Qw?l_Z(w z7=t45l!`E=#Vq@{EYN^T$RMse6DJeF&u&YJ^K%xR8ZvCx>?dyk5%~#2favV>ec*2^ z7DU&?(S_<6Asi8<C<{oAaguJ<ARnfI^S<EMftAH^qFm5YBrc5+d?0BbHc&u3#8~W| zw#BIBykBtc$`A{$(0n1QM+zT5(5!c$9StO8hMp4;ebZPP9^x1Y&}0ii)C9US2fc&i znub2wHcmmzY0(|AQPZ!>0Q2OdTBsV}B(r%<Yj%J?uiKN?pedT$<t$dy67p!tbw_f+ z?aHrmqlHizv)m+;O+CCQ+8EMfhH4AVq|+c8Nq1C_`pm9jI8yhqn6|-5wduG3_xU)A zqsMJpsNfg}n;|YrbEWZaZa~!HD34T0>;$nJ$-ywUm3Pm?W*IBTI|7cY?OiTtm2ZMQ z4wrXb8Cf*@BsBQUK15tje_>6YRWxv-C~2U8JcnD|dvHp5q%0eTyaaJESCfy@V5X47 zA<UKAc#dG#v@S&OTwQnk>oAU%guDPc6z-QEZu0IL>YdX|8*aMYH7rcV;=-n;K6~4( zKsv`zAy{jt%<tkyih-5bEbbD$&#!ZeVeIVj>*!hnDAv`XWL7r9SrZm`$oRNP;>7nr z39q@B;mYQ8%M7I3;+P`B+_ui@SwRM4!al<%O`TKtZ}?}(43(8I%iqDWA3+36c(c?j zpRq;|l_U}r@;NJ#R9l2Rvr>Z2FvGSOhFrb(nZ3fbE|QMO%xZdeZl&=)ZUCq)uvmks z5XK_5su$+7Is{Z>2<|TLiOfY#ZwP>`G<a*qw@>VfnroM!_sldW3B<=1MTs!@m?FCn zg}L1BEJsD0g~dEz4@^ly9~+e5AC)hA6%mu%K$~DlUb<uRW-nn(NV)pqGvCxA@$95X z-l>~2oQQDPGFg$rvA49V^$vPxa>15KPs9kjlKpNYDuQyfYuEc4nr_#W$<y~p6@sy* z0d8`PIyW3)5z+OE@P$Ws>PUK(>it#IQu9kNO?lr2lUOF?O}ONtlRIQRlIDRIZubrK zu_VtamTGAMnKd4licyi2^lDubPDeRLxY}-tgz<ywS#$k|WJR$8n0Q!-qpnO2QpfFq z_yJEhByKi&%qDZsQ3J}_CbHnhfJ_Q)A@$90AtJ+8q`;o>18$Mz;;oYeTxq<GQgQ@W z@6KSmf+RIgbL5Gr4$MDbqPPT=a7Th7td&@XoV76Z%gYzX#Ga}45Ra2L&}2YPZMVa6 zl@kjtShPg455WZ4qbzggGW80n7-=TbCDPX9SZPdi?9SyNiJ}19X{t__t-V+jfO#to zK9|s@8Bb!sg>SS?57b*;N_rU6)7Ng<a-s279N3hln3f1OyYY5>oD>E}_Y3eS!fJ}J zf0P!QXci(4`sBpzizN+HNG4da$stLM3<*j(t7HCoa;OTcvZ*2A_9<bo@lDd`#I1)< z9y)vfsc8W>x(KK4Ie7feL&8vabo5;8(CFylvxkNIj-8!3E<j7dSwk+<1xQ&N9i2V_ zi+O@DRJ5#0W^{C6VL@DoiMml3J$rg|5u1~+KKmF3y=_(&a~7=i3&P;Ut>N$`)(?lV z0lMNaIYFq0p+iyz2bzOT8t_zx%_aWkrF1$?sTzV7kQZd@&v>eFE#*lO?8_7{1gliJ z@WyrTeDYXs%itR^@^7b-HA+$>o!D4p)x(RcwQC>U$;$=mHQqwoB=9-axQ;%J(nsj} zIDJu4EEz;#Rl?xGtMijXhX7b$9Xfm#7R`o)EPbMzQATmFu<QWKuBKv5GNF#*Ku&P2 zl_AMGIaE-}xD*F_99oUQb}LXQVK2uTt6CtU1MP;dM)%<!7iiD$wWq@bRLhszAj(@H zx-sG+e}u>nMLJ0H@sksTBXkU~<A<Z3Xgtu#NW6oR2;StJ0L!(LLu9ehEGmjMB;b-G zV;anyA)#m}d3>f5i?zTcG)l!zbs<f~I5{z^=axW8R-YdF;Miy0`qZZ`)CONY-nfN! zT8ugSLQEx#z9ZVlp(*EUbo878MBo6?b3;>7E%eB9j$Y7xPPJ{%&NXhLjmj{q)ZFCI zq7;URG9p2HWGmX_#Hc)VxLPVb{-tM@8iTa(XfZam`s~xUyl3_4-$3Lbk;){pSrdh1 z5;!{1+&1LwTN@If%7td56?`J2BFi!`m*Ni5=&yq(<Q|-#OmN;kWKQQ6fJ)iOnGeB+ zzOfdyap>$%_xx-x^zSBhtT$3gG!CRDyrf>7+L(`8>U%5!#judqqBTL-<R&u}L}qKm zC`%ml>T_+Gd>NF-eUx`Y^H?N^W<q64d0Z;t7SC8TsEz(=Qo=XF(`un$W`NS9EVo31 zYJ}`{31=+U8<CeGiKLIt?saG^9z-S?D^s6j|J7&AM|4-}69^(Gl+|ZfSN{k%>2AH) z23_|3{(v30Ux^J71nZ=Pfs=2QAafrPE#+g?#zCW+1%#N>6a&;TB6-!Z9jc9`gGAka z+FXW4rhOE5uaT)hgg9tW=kt!?cP+;fD~plHkweRg^va^ciZuW`NVD1}RIt}Y8yR!C ziu+q_&7jA?bfdYcK+qy&b_IN?z{%QPg58<WHbeBA`uD=-Yh^AYrDJKYuKA!ZmAFER z)`n8QweLaG0>K1F>(MnyI!JVF4wdYj3IU>x%(w#j<#!3X(yu@~B4l=@U+KW9*Ju6m z`woX7op!T~{+Z-9tPIh&b%*G~e;<tK6qa2^IxSs2P4#;d8{MmFIuJc5<CvY6RvGX+ zK6=ZY?i$V8OftWN(Tzr?1JMel%*6>EtZX`PiuPF}{qD#;up&M8<d>e&?fKf9%0U_3 zzQ{$fFMXv#hc;sI`vpBHR3KcyxINGpnLbRRk8;EJtwg?MDj2x}i0F4G0`!k5ISn|$ zhy~4V6lI_SdKw9wdHvNuG-MvP;)JegU~$vYc3S75@=8S;ezlAGor8{Q=OHu@6mYbt zLpb17hWZ2Dp}zF&#ZbSmco_9N9UI*#WFVT6K?m7r4+jHhZl4v>?}wbp0s<861zR@G zqbnE`c6bQBQgKHc-Sj&aJ?N$sh!_08sgB03Kx7g1y9iyWl@th3D5EZMP70iueO4>K zGr@7!I{y$%g@oG$!~nysQqt9nFrt3Xpcj=2obj$fGu%t`-*!g*PC|D&6^Jq@pJt*Z z)Ez*NeKHuJ+ay}t!j1+`%gfBPw80O*r?GLQ_U4VR%CnEpJVbIWQbL|}t0!~0Jw#u< z$O3WN<2m%8q0vC_;0Ml}yM)|-4UPHziLNv>8VFe6-2tK9S<`6X1nn>E#r!_QX}t)? ztL6gZ3Xeivy}%;oxBR^*R3LKPrFudKDUl|jgXgsqZ#e0^|9=rl%<pG(rL(a>DC;32 zi3QHsKC7(X9XT#zs<l{FEzCM6ym1Nh+P8OS6ed%_MuFyP+%q6{^<tcu-%075tnpA9 z2u&>pQbdg;u1Llv=671U)6YOOL~(Zssj)x+=(B$MU7Mo@37Jz#pKAJj$k^2jOJaVv zq6a{Y2ZF{MyZ5Yp=I8t_5KF~fAe;Br-rWBh9IllMX84c{H(==NZ$9$xg|%(3PR{FP z`@rKb{j!`h>PlTU?W0Cr*J@i<uh&NGQ$^j<>jk3@H*MHz**>Q#<=Vi!wIKmZ5sn|Y z7v7X*8=m72_TLvkSoOFvUFmH+5E9!H-kom{51hvRRphwe13E)+R)d>x!0Ci2F7Aa| zzdpyWUQ87CJ2SoLb0Em@qh?`t+(`xP=+3Adnz@)!>1!$|?st{CO9jOPK@z3iCDJAW zk)h8D>UVdhVI#LjgQ5beXet@&DlSS~y|^gu_g{L@(nKJnxQ9;k6h?mqz|il6bOnZq zK-fYlb*ox|leEvO<@Z#`;%eYZv)j{3T)n6$?sqqOQK!K9-gd1y(Qd7Ix0H@wf#sFB z-#h6_&ys=Y0}z&`#5x;tc6Nu}cYZn;y)T+4N(Ro@zUPS$Sv-D9n>>+ci&)z{QS#~q zH3`3)(Srgf15u@2o@loJaG3Br9o?yEAd+F8Xtql{Oa{*1{^DW6?@*k@1f)^+u0?kd z;v}zLh?DTU2t6oQ@UBqz;C+cA*V6M9NS`PCK15ea7raFkm99&j3*MXAXPxsq8g8}+ z?|)z!pIzO-`^krc;k{kPXYA^QGzq^S(o4o?ED&Veob0T?kt>o6O86a@?sPa1@_I;C z2JhzVvkv>67-E+U9TskKxQ!x}x_Atox_Z$G&N+_@(F0%x?<VC(O=IX(s{h6~>GvhN z(y8DbtSBJBML5{<^l!r15%-=jx6_{rRLu4|b&>Ni{$;?V-_<w{@h+TPs&XeX@T`k> zVY&lpPu~FNb?DI+E(Jl3y4*@P8Rs<T{D|l9ARM|$vm$UQ2AsyZFA~Nb;N13aIFdxK zFZNYMBFSC1aAYTEO-<x-!XUN*rxU|c$7+POZdu<tFoccc{b^zvF94ON8f+Uf93|pT zJmDFuA!jgf2&lPVUY-ix=lv<V<$a_Ul1`t6n-6hr>&99rBH*^~do)9xt1Goo<W{x= zd@l%6+9%dR(cjxV1;-HKUX`+@EUI&QxfXiQ-RG+Y{CC_7%7>FA`Z7V{Mh)_&iVBxs zn%SaK23{gl4lCukk|tMfQSj@6vLRw_6q2qtzN%}Yx48om(%hJ6AJdI;#y+SRkTMaW zEuS{f7tU#_TyAQW$bg)&o}9=vg^!y)^Le^mwxb9GB_HijjT!a9?u`09w+9<_I-YJ- zXoK!$9jWcKKYvJv>p05i<@KG9y$Vv4P>MT0S!L)}THE>9Pe`)bKCaFha4E53)-9dp zuk8Z{*{7t=+lrZ~?OcnVEZ3ks%nTX`B2T9)a22Rh(lxz+H>R#{d-i*$aC;*hbF?j0 z*6Mn`e!#H8$DkOTGK3;^njAj_D-85_ohjDuEN1{?zrRVos%?AqDa@=BodJ!RS4?>I zDL6;W)CLGx4?X&EQg{s&$FL#Ku4d~qK!~wKy2Scco%Xr}dKJpuc+4;hpu)2=^RV`Y ziYphI+zH7=$}|zx3XUDtVIr{ZW~ybCFd_q^n>(yjEi-Eu6{CK4wQO3z99$n5sY}xC zc>J=o5l)*m57%{2s}496>sYNP90FnhC6Jzx+K#t}r#1DwJo_YU-mr?b9oPQ>>e3kK z(vBNmIj-ATawHxLjx?V#wH>>Eeqe3K^&dY43nNNN&Dwe%s}i}9)7+-r66&46OVz64 zc}rQV?Rfo<PvMbxHLIA=Nn>>LOcqv5vbg-BtnK*TU(ZxcrCK73F4c;CmtHln+OEN0 zZ;Y)$<-KR{1bP9Eu23o)qi@{!(uv<);@5bxSzP1!Mow2ZGECGGTw9fpQjt+<EHV~J z6FB-t)zCIFw)d9=E;K^Kl&sQAh$bhRu*?qN<`zY0nw-D&G}{ysv<!%S;f=TbX#Vp> zo;1rs(!PGtmR6tGvhmfQage{!ivp5+!+1EP8Ce3WEEC-%wI_2J?^vxjHFV|2!C>9- zzo)A?UCY-(xBtyNXsBLZ3*ElC7gMrmpbkzRRt)>@Y9$Y53e=}wT!(^a)pDv*C$I-g zbD({D6jFNgy^0F+8SeVbTeZ+bpUGDZrVCJZ|7%dzL6|)XF8g6iXTYH0TgBGRIlZDP zwE^=R8)NX(7O~w@G}(&?d=}{l-0*})(QtcIM=l0hq(sMRJu#oKi*4BgYx32Z8NIB| zktlX;=L;%gKte`?^0manZfhNlM5*y#-}yqZq*^xIIgf}5=GLmq)jW|#3kX!jMo<PM zRSH%;ps9B|v-CjOd#ETf9Vfm4pmMbghvU}<o_kI%uMa%;*&M9Q0-{&*Cj9<IuCCxM z&2~QM035g`Hm4(br7YG4K9@rCH1OH~++^#$RQ9r28~DN7jv6*w^@Sq;a1<AMO{PGo zfS@R$|M*#nEE~fQLBOefY@g^ASsu=V68`EYDJ4aBOR2HwhPWPj?YqoSz4|CMRBNH1 z+}C2fePpe*k4~(gk+t))Rilupg<i`Xu|Z#pdfp)*NA8s$!SE$IwmY5ZmuAWxRV+|5 zlO3zA;Sv09U7QQMS8d9st$%SH(ZgBL!>xZA^2%s^TPViMXxsJ^L`HQgoq9>Psay~n zh+J%RCqORSw*NjS7i_!9>lQ+Qqe?iAEQTLoLF;vSOg8jpklm46flMCjSgp6|kDA5; z|B>1*^DXCK8iPvLc9rXUG0p^*?^^iq=AAi(+T~rz?;t+jyGC|REU3mD{A5TGW@M(e zYjXWC%$Qxtm(PL2REKkcYfu_kZ-aj-TUgE=7QoH$w~%HF1b1N*g&P(k5k9<tiJdLd z@Bzg;V&Cm8eT3qXR<@DEqlSDQB8Y%OMNO{uB1UqxI&VnbTM|1;Bv6oWrAvoUv?oFK zx?ymnHX!~0#^7boG))tGUP}>rtVx+$8xZrz-MbC&_TfGeXr^$fn+}nNSLhTU5dR#f zcm&jKV03D;?Lwb(sB|FrXY^2M1yNcrY6{HnQVm|`%8HlpBpr|6n$Q8UX`a((F@k^@ z4lZe-s$?KAvXne{r`6JBX$fp%<F){H6nCJOq&rsYNlRLL>VWt10SEw8*tGQU^T7K^ z0(me0VDqr5tPec#PdLZGv<*D*!!t0y36EJgR8YW~g1KlZWS*hZMZzRoEz%r-<6fcP z1wr3OpE_SHt!?}0JMLX4pyAg!YS}fbteQ4%x|)FqM8|wVj&^aRt{c!Npp02yfB~Td z1QyWvJLM8s|2o`lQ%0D#XLLXwu)@SmM&{6MSR*K02uSrpnYMWjQxFRLq=nHxkRU&C z!Gi>MEUlvu>2FfC%R0d|Q2l}kB!;lzF1St5J5Sj5VwG&BvH|+j(S4%5d6#Y~d31`2 z5}b$4Z1D&zS4(5=*>b|uT!g_0wJbrC&o0Q|F{(;0GtB2r^Y@H&<W(?_`<U7z)WF=@ z^KXYB-XI9MHn8Wzh;2!nU$;!PJYtA!mM}Vo(!X<{T(?xXK+38w!Dd2y1JM{}XX=m~ zsVk&K-N5(9^!fs1$Lb4p2;3QbL0$uF_Il{LCuelX%s{>(SBLub)4H6ig|7PqY*fTY zl66Bbo#apO&D{_{L+~BC{_i$f9;FtF%|Q$wioM^Hds(V&-yv+oBYR`}949@R9NQgD zMMY=d8C-$Z&EJD>?~n!SHqS@yzvZVID5z@>U<X~G>u2Q7*LG8`Q@)Q~xYVr=yFrgG zQNlooU-;o&RZXp$>jPi7cHY*Bj}?ofVtnyW0C%ClAjRGK8OT4`0J{ig6kZW_ZNOc4 zZz&LoeDQs!y|d1_<HMeV+w`*b9EM>|prAq!9o>D#TZKhcb5*TcS`S5U$dTL^?py~f zJ*sF*5mXCq{U!U?AjpHXnYRhvNdq4Z>w-$fS2kx<xG`MSNVrxDow+fmm}{XkH#un_ z2-3Vwu>m*+#QQbhlPlW{$-~K`j#)DEj<u)_)PK1l#r8(`Wu&;YI~q;(0yX3((mW~# z**kXbu7iF-_AXGl`k20R9g73y`gZ&-U52>$Tkn|xh5FX(2;#)3f9Ix$&#j}ivuETv zjKS@bRl`18$29?6gBbT)rvZlCFPla0F|P+@`}WJn6%*D3oWM74=%uxR8{XSOGtlW9 z?g!4>h$~KF52(7~%cn4fqe0-5g*@ZH4S$7wLB0@AiQzkVb-$js533aoe)0+5yc@{B z@vS7xYbJ>C$MhWBIa?(00?P<O$`Sjt4*-1_qhwW*sl?atyI?Z>WG3CkZPYQ*444c( ze(YL6vJ9BAv7XYoz90ZV2Q<Pt;CqQG(Z^I8rxNEOCs29j7-T~rC2tquVHp%628#ph z+bZAOJS@+vxwUOCo;;bg;A7RakEwKPJ9um_ehg3t{yQ<F0KWhT(6RE^0~I{1`f)|A zoL38uU|?n|T9}v_k}>aPw)uE_7WVPz^Uhrom&n^bX3DzSoiI|{`q-VPYy~dO#E*Be z1jb|Aoakoj<2P@ftmb6ADtCSBPrrLgUCh+BzJA?ll5v_>Ap8cKT-*B7mu0$&LUI*k z>4Pko*krY20}>&R-^^kahVXrgSU9%Bwy8^Gd!N%l$UH={T`%3j7OcFMftfL~Mn#uy z)^<Jr3d!>YCIXSskhOU6@dMR-SuU0!F$imyxP)aABZgU!=f8hYu0kebt`yKCIIv(7 znFs=t4bV22#2v>m%NW}J3tt8+wC_iJ1}ilDfi5#xq2cfG87%0cLk0^&AeO-zv7<3? z-r)C@f%I;DF5kjBx%cI==V%|(S(l!P*#6=_H&Ythzx+XGx^Dk!s&g`8`wRa{k`W`d z?Jw=981sR#PHx_#LC!5%we2tbi}$OsX_D(!=i!H<Jl{DdJ^^Fo$`V9ssj(D9WU=(V zX2i>I0mXfZfmucN>pM-PSZr^lm#QN)pMptJ-&Y6N9s${&??v5wp&ox^?Gk~hj~TcA zpB%##F8|T7eV4^E{)E6K@~n^fCpuM7G23SN*j9c_Kd@c#kb^kYVN&JkLSG&V$wlyN zmmp<vk5_e_i54`IY6HJ`YD0=<Vo7OtY^<lXJzt1`!)o6BcWL~N_A%wdplR^yue9Yi z%czdj2EYD&>ZuHV?Ha;-@Dd0A_Q>WLSQ{P8ufR_~c~kSvjIimO@6+_8dTlWOD9Q&N z8(eSMqrjULDMch3ON005_Fn?!275>#sWE5k;fnF0uaxX1Q-h1fyeQ-J3c6LY$<6`M zy)n+Y!5g*;!R{^%ZidEPW+Z+38)TUuZZ#jpTcf8M^m&5Z*9|vYV}9dTTeehw`<jnD yvAJg)a~#`V-}>06FI@BK1KO6*mTQAH9t0ga4cZM5bXEDUw`}>)e{cOU{rf+BA~U%F literal 0 HcmV?d00001 diff --git a/bibformat/4ht/tmp_files/test.html b/bibformat/4ht/tmp_files/test.html new file mode 100644 index 0000000..96054cc --- /dev/null +++ b/bibformat/4ht/tmp_files/test.html @@ -0,0 +1,461 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd--> +<html xml:lang="de" xmlns="http://www.w3.org/1999/xhtml" +> +<head><title> + + + + + + + +

1 Dummy

+

+

+

Edwards_2017

+

+

+
authoryear
+

Edwards 2017 +

+
year
+

2017 +

+

+

Riggs:2016aa

+

+

+
authoryear
+

Riggs 2016 +

+
year
+

2016 + +

+

+

Bruckler:2001aa

+

+

+
authoryear
+

Brückler und Nimeth 2001 +

+
year
+

2001 +

+

+

Zdenek:1939aa

+

+

+
authoryear
+

Zdeněk Wirth 1939 +

+
year
+

1939 +

+

+

Caraffa_2011

+ +

+

+
authoryear
+

Caraffa 2011 +

+
year
+

2011 +

+

+

Uhlikova:2010aa

+

+

+
authoryear
+

Uhlíková 2010 +

+
year
+

2010 +

+

+

Noll:1992aa

+

+

+
authoryear
+

Noll 1992 + +

+
year
+

1992 +

+

+

Schwarz:1931aa

+

+

+
authoryear
+

Schwarz 1931 +

+
year
+

1931 +

+

+

Schwartz_1995

+

+

+
authoryear
+

Schwartz 1995 +

+
year
+

1995 + +

+

+

Faber:2015ab

+

+

+
authoryear
+

Faber 2015a +

+
year
+

2015a +

+

+

Rohacek:2010aa

+

+

+
authoryear
+

Jiří und Uhlíková 2010 +

+
year
+

2010 +

+

+

Lachnit:2005aa

+ +

+

+
authoryear
+

Lachnit 2005 +

+
year
+

2005 +

+

+

Groll:1865aa

+

+

+
authoryear
+

Verlags-Catalog von Andreas Groll, Photograph in Wien 1865 [Vienna 1864] +

+
year
+

1865 [Vienna 1864] +

+

+

Schlosser:1934aa

+

+

+
authoryear
+

Schlosser 1934 + +

+
year
+

1934 +

+

+

Eitelberger:1863ab

+

+

+
authoryear
+

Eitelberger 1863 +

+
year
+

1863 +

+

+

Wirth:1939aa

+

+

+
authoryear
+

Zdenĕk Wirth 1939–1940 +

+
year
+

1939–1940 + +

+

+

Faber:2015aa

+

+

+
authoryear
+

Faber 2015b +

+
year
+

2015b +

+

+

Trnkova:2015aa

+

+

+
authoryear
+

Trnková 2015 +

+
year
+

2015 +

+

+

Trnkova:2010aa

+ +

+

+
authoryear
+

Trnková 2010 +

+
year
+

2010 +

+

+

Frodl:1988aa

+

+

+
authoryear
+

Frodl 1988 +

+
year
+

1988 +

+

+

Literatur

+

+

+
+

Brückler, Theodor und Ulrike Nimeth (2001). Personenlexikon zur Österreichischen + Denkmlapflege. Vol. 7. Horn: Berger. +

+
+ +

Caraffa, Costanza (2011). From Photo Libraries to Photo Archives: On the + Epistemological Potential of Art-Historical Photo Collections. In: Photo Archives and + the Photographic Memory of Art History. Hrsg. von Costanza Caraffa. Berlin und + Munich: Deutscher Kunstverlag, 11–44. +

+
+

Edwards, Elizabeth (2017). Location, Location: A Polemic of Photographs and + Institutional Practices. Science Museum Group Journal 7 (Spring 2017). doi: + 10.15180/170709. url: http://dx.doi.org/10.15180/170709. +

+
+

Eitelberger, Rudolf von (1863). Der Kupferstich und die Fotografie. Zeitschrift fur + Fotografie und Stereoskopie 7:123–126. +

+
+

Faber, Monika (2015a). ‘… mit aller Kraft auf die Photographie verlegt …’: + Annäherungen an das Berufsbild eines frühen Fotografen. In: Andreas Groll: Wiens + erster moderner Fotograf. 1812–1872. Hrsg. von Monika Faber. Salzburg: Fotohof + edition, 27–95. +

+
+

– Hrsg. (2015b). Andreas Groll: Wiens erster moderner Fotograf. 1812–1872. Salzburg: + Fotohof edition. +

+
+

Frodl, Walter (1988). Idee und Verwirklichung: Das Werden der staatlichen + Denkmalpflege in Österreich. Wien, Köln und Graz: Böhlau. +

+
+

Jiří, Roháček und Kristina Uhlíková, Hrsg. (2010). Zdeněk Wirth pohledem dnešní + doby. Prague: Artefactum. +

+
+

Lachnit, Edwin (2005). Die Wiener Schule der Kunstgeschichte und die Kunst ihrer + Zeit: zum Verhältnis von Methode und Forschungsgegenstand am Beginn der Moderne. + Vienna, Cologne und Weimar: Böhlau. +

+
+

Noll, Jindřich (1992). Josef Schulz 1840–1917. Prague: Národní galerie. +

+
+

Riggs, Christina (2016). Photography and Antiquity in the Archive, or How Howard + Carter Moved the Road to the Valley of the Kings. History of Photography 40(3): + 267–282. + +

+
+

Schlosser, Julius von (1934). Die Wiener Schule der Kunstgeschichte: Rückblick auf + ein Säkulum deutscher Gelehrtenarbeit in Österreich. Mitteilungen des Instituts für + Österreichische Geschichtsforschung 13(2):141–228. +

+
+

Schwartz, Joan M. (1995). ‘We Make Our Tools and Our Tools Make Us”: Lessons + from Photographs for the Practice, Politics, and Poetics of Diplomatics’. Archivaria: + The Journal of the Association of Canadian Archivists 40:40–74. +

+
+

Schwarz, Heinrich (1931). David Octavius Hill: der Meister der Photographie. Leipzig: + Insel-Verlag. +

+
+

Trnková, Petra, Hrsg. (2010). Oudadate Pix: Revealing a Photographic Archive. Prague: + Artefactum. +

+
+

– (2015). Archäologischer Frühling: Aufnahmen historischer Baudenkmäler in + Böhmen. In: Andreas Groll: Wiens erster moderner Fotograf. 1812–1872. Salzburg: + Fotohof edition, 237–245. +

+
+

Uhlíková, Kristina (2010). Zdeněk Wirth, první dvě životní etapy (1878–1939). + Prague: Národní památkový ústav. +

+
+

Verlags-Catalog von Andreas Groll, Photograph in Wien (1865 [Vienna 1864]). +

+
+

Wirth, Zdenĕk (1939–1940). První fotograf Prahy. Umění 12:361–376. +

+
+

Wirth, Zdeněk, Hrsg. (1939). Sto let české fotografie 1839–1939. Prague: + Umělecko-průmyslové museum.

+ + + + + diff --git a/bibformat/4ht/tmp_files/test.idv b/bibformat/4ht/tmp_files/test.idv new file mode 100644 index 0000000000000000000000000000000000000000..15dbf0a45bde78eb524c72a4e340d915b652f0f3 GIT binary patch literal 429 zcmey)#MnIPfQ&T*5HP=xRtQOrP{=PWDJU&bFfuT-)H5*FGcvO>G%~X62C85LDI)~_ z13~X3kg5eB;u8=n79lziq_nd*_k z!1dV}j5$)1i*gMOEKPTT!DmsKX-hsJ%a&w#0w&7oa~ zc6}DURkkVvS+1l6B)1Q&6Qmmk;S89-fn9w)KY(7)LJlXU{zbiviyU(p*ccdb*^A4~ SxZHv(1bza8U6tuR2mk;pE|ky! literal 0 HcmV?d00001 diff --git a/bibformat/4ht/tmp_files/test.lg b/bibformat/4ht/tmp_files/test.lg new file mode 100644 index 0000000..70a9993 --- /dev/null +++ b/bibformat/4ht/tmp_files/test.lg @@ -0,0 +1,153 @@ +htfcss: eccc1000 font-variant: small-caps; +htfcss: ecbx font-weight: bold; +htfcss: ecsx font-weight: bold; +htfcss: ecbi font-weight: bold; font-style: italic; +htfcss: ecit font-style: italic; font-family: monospace; +htfcss: ecss font-family: sans-serif; +htfcss: ecff font-family: fantasy; +htfcss: ecti font-style: italic; +htfcss: ectt font-family: monospace; +htfcss: ecbx font-weight: bold; +htfcss: ecsx font-weight: bold; +htfcss: ecbi font-weight: bold; font-style: italic; +htfcss: ecit font-style: italic; font-family: monospace; +htfcss: ecss font-family: sans-serif; +htfcss: ecff font-family: fantasy; +htfcss: ecti font-style: italic; +htfcss: ectt font-family: monospace; +htfcss: ecbx font-weight: bold; +htfcss: ecsx font-weight: bold; +htfcss: ecbi font-weight: bold; font-style: italic; +htfcss: ecit font-style: italic; font-family: monospace; +htfcss: ecss font-family: sans-serif; +htfcss: ecff font-family: fantasy; +htfcss: ecti font-style: italic; +htfcss: ectt font-family: monospace; +File: test.html +File: test.css +File: test.tmp +Font_Class(4,"4"): +Css: p.noindent { text-indent: 0em } +Css: td p.noindent { text-indent: 0em; margin-top:0em; } +Css: p.nopar { text-indent: 0em; } +Css: p.indent{ text-indent: 1.5em } +Css: @media print {div.crosslinks {visibility:hidden;}} +Css: a img { border-top: 0; border-left: 0; border-right: 0; } +Font_Css("4"): .small-caps{font-variant: small-caps; } +Font_Css("10"): .htf-cmbx {font-weight: bold; font-style:normal;} +Font_Css("12"): .htf-calligraphy {font-family:cursive} +Font_Css("14"): .htf-italic {font-style: italic;} +Font_Css("16"): .htf-bold {font-weight: bold;} +Font_Css("12"): .htf-calligraphy-bold {font-family:cursive ; font-weight: bold; } +Css: center { margin-top:1em; margin-bottom:1em; } +Css: td center { margin-top:0em; margin-bottom:0em; } +Css: .Canvas { position:relative; } +Css: img.math{vertical-align:middle;} +Css: li p.indent { text-indent: 0em } +Css: li p:first-child{ margin-top:0em; } +Css: li p:last-child, li div:last-child { margin-bottom:0.5em; } +Css: li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } +Css: .enumerate1 {list-style-type:decimal;} +Css: .enumerate2 {list-style-type:lower-alpha;} +Css: .enumerate3 {list-style-type:lower-roman;} +Css: .enumerate4 {list-style-type:upper-alpha;} +Css: div.newtheorem { margin-bottom: 2em; margin-top: 2em;} +Css: .obeylines-h,.obeylines-v {white-space: nowrap; } +Css: div.obeylines-v p { margin-top:0; margin-bottom:0; } +Css: .overline{ text-decoration:overline; } +Css: .overline img{ border-top: 1px solid black; } +Css: td.displaylines {text-align:center; white-space:nowrap;} +Css: .centerline {text-align:center;} +Css: .rightline {text-align:right;} +Css: div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } +Css: .fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +Css: div.fbox {display:table} +Css: div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +Css: div.minipage{width:100%;} +Css: div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} +Css: div.center div {text-align: left;} +Css: div.flushright, div.flushright div.flushright {text-align: right;} +Css: div.flushright div {text-align: left;} +Css: div.flushleft {text-align: left;} +Css: .underline{ text-decoration:underline; } +Css: .underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } +Css: .framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +Css: .framebox-c {text-align:center;} +Css: .framebox-l {text-align:left;} +Css: .framebox-r {text-align:right;} +Css: span.thank-mark{ vertical-align: super } +Css: span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +Css: div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } +Css: table.tabular td p{margin-top:0em;} +Css: table.tabular {margin-left: auto; margin-right: auto;} +Css: td p:first-child{ margin-top:0em; } +Css: td p:last-child{ margin-bottom:0em; } +Css: div.td00{ margin-left:0pt; margin-right:0pt; } +Css: div.td01{ margin-left:0pt; margin-right:5pt; } +Css: div.td10{ margin-left:5pt; margin-right:0pt; } +Css: div.td11{ margin-left:5pt; margin-right:5pt; } +Css: table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +Css: td.td00{ padding-left:0pt; padding-right:0pt; } +Css: td.td01{ padding-left:0pt; padding-right:5pt; } +Css: td.td10{ padding-left:5pt; padding-right:0pt; } +Css: td.td11{ padding-left:5pt; padding-right:5pt; } +Css: table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +Css: .hline hr, .cline hr{ height : 1px; margin:0px; } +Css: .tabbing-right {text-align:right;} +Css: span.TEX {letter-spacing: -0.125em; } +Css: span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} +Css: a span.TEX span.E {text-decoration: none; } +Css: span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} +Css: span.LATEX span.TEX{ position:relative; left: -0.4em; } +Css: div.float, div.figure {margin-left: auto; margin-right: auto;} +Css: div.float img {text-align:center;} +Css: div.figure img {text-align:center;} +Css: .marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} +Css: .marginpar p{margin-top:0.4em; margin-bottom:0.4em;} +Css: table.equation {width:100%;} +Css: .equation td{text-align:center; } +Css: td.equation { margin-top:1em; margin-bottom:1em; } +Css: td.equation-label { width:5%; text-align:center; } +Css: td.eqnarray4 { width:5%; white-space: normal; } +Css: td.eqnarray2 { width:5%; } +Css: table.eqnarray-star, table.eqnarray {width:100%;} +Css: div.eqnarray{text-align:center;} +Css: div.array {text-align:center;} +Css: div.pmatrix {text-align:center;} +Css: table.pmatrix {width:100%;} +Css: span.pmatrix img{vertical-align:middle;} +Css: div.pmatrix {text-align:center;} +Css: table.pmatrix {width:100%;} +Css: span.bar-css {text-decoration:overline;} +Css: img.cdots{vertical-align:middle;} +Css: .partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} +Css: .index-item, .index-subitem, .index-subsubitem {display:block} +Css: div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} +Css: div.caption span.id{font-weight: bold; white-space: nowrap; } +Css: h1.partHead{text-align: center} +Css: p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +Css: p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +Css: .paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} +Css: .subparagraphHead, .likesubparagraphHead { font-weight: bold;} +Css: .quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} +Css: .verse{white-space:nowrap; margin-left:2em} +Css: div.maketitle {text-align:center;} +Css: h2.titleHead{text-align:center;} +Css: div.maketitle{ margin-bottom: 2em; } +Css: div.author, div.date {text-align:center;} +Css: div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } +Css: div.author{white-space: nowrap;} +Font_Size: 11 +Css: .quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } +Css: .abstract p {margin-left:5%; margin-right:5%;} +Css: div.abstract {width:100%;} +Css: span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +Css: dt.printshorthands{float:left; clear:left; margin-right:1em;} +Css: dd.thebibliography { text-indent: -2em; margin-left: 2em;} +Css: dd.thebibliography p:first-child{ text-indent: -2em; } +Css: dt.thebibliography{float:left; clear:left; margin-right:1em;} +--- characters --- +Font("ecrm","1095","10","100") +Font("ectt","1095","10","100") +Font("ecti","1095","10","100") +Font("eccc1095","","10","100") diff --git a/bibformat/4ht/tmp_files/test.run.xml b/bibformat/4ht/tmp_files/test.run.xml new file mode 100644 index 0000000..d242bb6 --- /dev/null +++ b/bibformat/4ht/tmp_files/test.run.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + latex + + test.bcf + + + test.bbl + + + blx-dm.def + blx-compat.def + biblatex.def + standard.bbx + authoryear.bbx + authoryear.cbx + biblatex.cfg + german.lbx + + + + biber + + biber + test + + + test.bcf + + + test.bbl + + + test.bbl + + + test.bcf + + + ../fo.bib + + + diff --git a/bibformat/4ht/tmp_files/test.tex b/bibformat/4ht/tmp_files/test.tex new file mode 100644 index 0000000..04b9006 --- /dev/null +++ b/bibformat/4ht/tmp_files/test.tex @@ -0,0 +1,188 @@ +\documentclass{scrartcl} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[german]{babel} +\newcommand{\EOAbibtweaks}{ +% Remove pp from references +\DeclareFieldFormat{postnote}{##1} +% Remove quotation marks from certain titles +\DeclareFieldFormat[thesis]{title}{\mkbibemph{##1}} +\DeclareFieldFormat[article]{title}{##1} +\DeclareFieldFormat[incollection]{title}{##1} +\DeclareFieldFormat[inproceedings]{title}{##1} +\DeclareFieldFormat[inbook]{title}{\mkbibemph{##1}} +\DeclareFieldFormat{title}{\mkbibemph{##1}} +% Remove pp from bibliography at all +\DeclareFieldFormat{pages}{##1}% +% Remove "In:" from articles +\renewbibmacro{in:}{% + \ifentrytype{article}{}{% + \printtext{\bibstring{in}\intitlepunct}}} +% Delete Vol. as praefix +\DeclareFieldFormat*{volume}{##1} +% Use : for pages of an article, use . for the rest +\renewcommand*{\bibpagespunct}{% +\ifentrytype{article}% +{% +\iffieldundef{Number}% +{\addcolon\hspace{0pt}}% +{}% +}% +{,\space}% +} +% Group Volume and Issue in {Brackets} +\renewbibmacro*{journal+issuetitle}{% + \usebibmacro{journal}% + \setunit*{\addspace}% + \iffieldundef{series} + {} + {\newunit + \printfield{series}% + \setunit{\addspace}}% + \printfield{volume}% + \iffieldundef{number} + {} + {\mkbibparens{\printfield{number}}}% + \setunit{\addcomma\space}% + \printfield{eid}% + \setunit{\addspace}% + \usebibmacro{issue+date}% + \setunit{\addcolon\space}% + \usebibmacro{issue}% + \newunit} +% Bug fix for Windows +\defbibheading{none}[]{} +} +\usepackage[autostyle]{csquotes} +\usepackage[mincitenames=1,maxcitenames=3,maxbibnames=100,style=authoryear,backend=biber,autolang=hyphen]{biblatex} +\EOAbibtweaks +\bibliography{../fo.bib} +\begin{document} +% \maketitle + +\section{Dummy} + + +\subsection*{Edwards_2017} +\subsubsection*{authoryear} +\cite{Edwards_2017} +\subsubsection*{year} +\cite*{Edwards_2017} + +\subsection*{Riggs:2016aa} +\subsubsection*{authoryear} +\cite{Riggs:2016aa} +\subsubsection*{year} +\cite*{Riggs:2016aa} + +\subsection*{Bruckler:2001aa} +\subsubsection*{authoryear} +\cite{Bruckler:2001aa} +\subsubsection*{year} +\cite*{Bruckler:2001aa} + +\subsection*{Zdenek:1939aa} +\subsubsection*{authoryear} +\cite{Zdenek:1939aa} +\subsubsection*{year} +\cite*{Zdenek:1939aa} + +\subsection*{Caraffa_2011} +\subsubsection*{authoryear} +\cite{Caraffa_2011} +\subsubsection*{year} +\cite*{Caraffa_2011} + +\subsection*{Uhlikova:2010aa} +\subsubsection*{authoryear} +\cite{Uhlikova:2010aa} +\subsubsection*{year} +\cite*{Uhlikova:2010aa} + +\subsection*{Noll:1992aa} +\subsubsection*{authoryear} +\cite{Noll:1992aa} +\subsubsection*{year} +\cite*{Noll:1992aa} + +\subsection*{Schwarz:1931aa} +\subsubsection*{authoryear} +\cite{Schwarz:1931aa} +\subsubsection*{year} +\cite*{Schwarz:1931aa} + +\subsection*{Schwartz_1995} +\subsubsection*{authoryear} +\cite{Schwartz_1995} +\subsubsection*{year} +\cite*{Schwartz_1995} + +\subsection*{Faber:2015ab} +\subsubsection*{authoryear} +\cite{Faber:2015ab} +\subsubsection*{year} +\cite*{Faber:2015ab} + +\subsection*{Rohacek:2010aa} +\subsubsection*{authoryear} +\cite{Rohacek:2010aa} +\subsubsection*{year} +\cite*{Rohacek:2010aa} + +\subsection*{Lachnit:2005aa} +\subsubsection*{authoryear} +\cite{Lachnit:2005aa} +\subsubsection*{year} +\cite*{Lachnit:2005aa} + +\subsection*{Groll:1865aa} +\subsubsection*{authoryear} +\cite{Groll:1865aa} +\subsubsection*{year} +\cite*{Groll:1865aa} + +\subsection*{Schlosser:1934aa} +\subsubsection*{authoryear} +\cite{Schlosser:1934aa} +\subsubsection*{year} +\cite*{Schlosser:1934aa} + +\subsection*{Eitelberger:1863ab} +\subsubsection*{authoryear} +\cite{Eitelberger:1863ab} +\subsubsection*{year} +\cite*{Eitelberger:1863ab} + +\subsection*{Wirth:1939aa} +\subsubsection*{authoryear} +\cite{Wirth:1939aa} +\subsubsection*{year} +\cite*{Wirth:1939aa} + +\subsection*{Faber:2015aa} +\subsubsection*{authoryear} +\cite{Faber:2015aa} +\subsubsection*{year} +\cite*{Faber:2015aa} + +\subsection*{Trnkova:2015aa} +\subsubsection*{authoryear} +\cite{Trnkova:2015aa} +\subsubsection*{year} +\cite*{Trnkova:2015aa} + +\subsection*{Trnkova:2010aa} +\subsubsection*{authoryear} +\cite{Trnkova:2010aa} +\subsubsection*{year} +\cite*{Trnkova:2010aa} + +\subsection*{Frodl:1988aa} +\subsubsection*{authoryear} +\cite{Frodl:1988aa} +\subsubsection*{year} +\cite*{Frodl:1988aa} + + +\printbibliography +\end{document} \ No newline at end of file diff --git a/bibformat/4ht/tmp_files/test.tmp b/bibformat/4ht/tmp_files/test.tmp new file mode 100644 index 0000000..41b58e2 --- /dev/null +++ b/bibformat/4ht/tmp_files/test.tmp @@ -0,0 +1,2 @@ + +/* css.sty */ \ No newline at end of file diff --git a/bibformat/4ht/tmp_files/test.xref b/bibformat/4ht/tmp_files/test.xref new file mode 100644 index 0000000..46a5f5e --- /dev/null +++ b/bibformat/4ht/tmp_files/test.xref @@ -0,0 +1,65 @@ +\:CrossWord{)F1F-}{test.html}{1}% +\:CrossWord{)Qx1-10001}{1}{1}% +\:CrossWord{)Qx1-20001}{1}{1}% +\:CrossWord{)Qx1-30001}{1}{1}% +\:CrossWord{)Qx1-40001}{1}{1}% +\:CrossWord{)Qx1-50001}{1}{1}% +\:CrossWord{)Qx1-60001}{1}{1}% +\:CrossWord{)Qx1-70001}{1}{1}% +\:CrossWord{)Qx1-80001}{1}{2}% +\:CrossWord{)Qx1-90001}{1}{2}% +\:CrossWord{)Qx1-100001}{1}{2}% +\:CrossWord{)Qx1-110001}{1}{2}% +\:CrossWord{)Qx1-120001}{1}{2}% +\:CrossWord{)Qx1-130001}{1}{2}% +\:CrossWord{)Qx1-140001}{1}{2}% +\:CrossWord{)Qx1-150001}{1}{3}% +\:CrossWord{)Qx1-160001}{1}{3}% +\:CrossWord{)Qx1-170001}{1}{3}% +\:CrossWord{)Qx1-180001}{1}{3}% +\:CrossWord{)Qx1-190001}{1}{3}% +\:CrossWord{)Qx1-200001}{1}{3}% +\:CrossWord{)Qx1-210001}{1}{3}% +\:CrossWord{)Qx1-220001}{1}{4}% +\:CrossWord{)Qx1-230001}{1}{4}% +\:CrossWord{)Qx1-240001}{1}{4}% +\:CrossWord{)Qx1-250001}{1}{4}% +\:CrossWord{)Qx1-260001}{1}{4}% +\:CrossWord{)Qx1-270001}{1}{4}% +\:CrossWord{)Qx1-280001}{1}{4}% +\:CrossWord{)Qx1-290001}{1}{5}% +\:CrossWord{)Qx1-300001}{1}{5}% +\:CrossWord{)Qx1-310001}{1}{5}% +\:CrossWord{)Qx1-320001}{1}{5}% +\:CrossWord{)Qx1-330001}{1}{5}% +\:CrossWord{)Qx1-340001}{1}{5}% +\:CrossWord{)Qx1-350001}{1}{5}% +\:CrossWord{)Qx1-360001}{1}{6}% +\:CrossWord{)Qx1-370001}{1}{6}% +\:CrossWord{)Qx1-380001}{1}{6}% +\:CrossWord{)Qx1-390001}{1}{6}% +\:CrossWord{)Qx1-400001}{1}{6}% +\:CrossWord{)Qx1-410001}{1}{6}% +\:CrossWord{)Qx1-420001}{1}{6}% +\:CrossWord{)Qx1-430001}{1}{7}% +\:CrossWord{)Qx1-440001}{1}{7}% +\:CrossWord{)Qx1-450001}{1}{7}% +\:CrossWord{)Qx1-460001}{1}{7}% +\:CrossWord{)Qx1-470001}{1}{7}% +\:CrossWord{)Qx1-480001}{1}{7}% +\:CrossWord{)Qx1-490001}{1}{7}% +\:CrossWord{)Qx1-500001}{1}{8}% +\:CrossWord{)Qx1-510001}{1}{8}% +\:CrossWord{)Qx1-520001}{1}{8}% +\:CrossWord{)Qx1-530001}{1}{8}% +\:CrossWord{)Qx1-540001}{1}{8}% +\:CrossWord{)Qx1-550001}{1}{8}% +\:CrossWord{)Qx1-560001}{1}{8}% +\:CrossWord{)Qx1-570001}{1}{9}% +\:CrossWord{)Qx1-580001}{1}{9}% +\:CrossWord{)Qx1-590001}{1}{9}% +\:CrossWord{)Qx1-600001}{1}{9}% +\:CrossWord{)Qx1-610001}{1}{9}% +\:CrossWord{)Qx1-620001}{1}{9}% +\:CrossWord{)Qpage.9}{1}{9}% +\:CrossWord{)QX0-}{1}{9}% diff --git a/bibformat/chicago-author-date-custom.csl b/bibformat/chicago-author-date-custom.csl new file mode 100644 index 0000000..fb8b489 --- /dev/null +++ b/bibformat/chicago-author-date-custom.csl @@ -0,0 +1,645 @@ + + From 7f13889cafe8643a94341d4d1f5b61f5d22e4915 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 4 Apr 2019 12:42:33 +0200 Subject: [PATCH 007/132] removed commented legacy code --- eoatex2imxml.py | 54 ------------------------------------------------- 1 file changed, 54 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index 4e667f0..5a01ad1 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -180,33 +180,6 @@ if not os.path.exists( DEBUG_DIR ): os.mkdir( DEBUG_DIR ) -''' -# Check for folder and necessary files -if not os.path.exists(CONVERT_DIR): - logging.info(f"The directory {CONVERT_DIR} has not been created yet. Creating it for you") - time.sleep(1) - os.makedirs(CONVERT_DIR) -if not os.path.exists(CONVERT_DIR / "publication.cfg"): - logging.info(f"The publication.cfg file is missing in {CONVERT_DIR} directory.") - if os.path.exists(INPUT_DIR / "publication.cfg"): - shutil.copy(INPUT_DIR / "publication.cfg", CONVERT_DIR) - logging.info(f"Copied from {INPUT_DIR}.") - else: - logging.error("Found no publication.cfg. Exiting") - sys.exit() -if not os.path.exists(CONVERT_DIR / "cover.jpg"): - logging.info(f"The file cover.jpg in {CONVERT_DIR} directory is missing.") - if os.path.exists(INPUT_DIR / "Cover.jpg"): - shutil.copy("Cover.jpg", CONVERT_DIR / "cover.jpg") - logging.info("Copied from current directory.") - else: - logging.error("No coverfile found. You can create a temporary one with the mkimage.py script") - sys.exit() -# if os.path.exists(os.getcwd() + "/pre_xml.tex") == False: -# print ("pre_xml fehlt") -# sys.exit() -''' - # Copy Support-Files from /Library/MPIWG to current directory shutil.copy(SUPPORT_PATH / "classes.dtd", OUTPUT_DIR) shutil.copy(SUPPORT_PATH / "mathml2-qname-1.mod", OUTPUT_DIR) @@ -215,16 +188,6 @@ copy_dir_overwrite(SUPPORT_PATH / "iso8879", (OUTPUT_DIR / "iso8879")) copy_dir_overwrite(SUPPORT_PATH / "iso9573-13", (OUTPUT_DIR / "iso9573-13")) copy_dir_overwrite(SUPPORT_PATH / "mathml", (OUTPUT_DIR / "mathml")) -''' -shutil.copy(SUPPORT_PATH / "classes.dtd", os.getcwd()) -shutil.copy(SUPPORT_PATH / "mathml2-qname-1.mod", os.getcwd()) -shutil.copy(SUPPORT_PATH / "mathml2.dtd", os.getcwd()) -copy_dir_overwrite(SUPPORT_PATH / "html", (os.getcwd() + "/html")) -copy_dir_overwrite(SUPPORT_PATH / "iso8879", (os.getcwd() + "/iso8879")) -copy_dir_overwrite(SUPPORT_PATH / "iso9573-13", (os.getcwd() + "/iso9573-13")) -copy_dir_overwrite(SUPPORT_PATH / "mathml", (os.getcwd() + "/mathml")) -# shutil.copytree(SUPPORT_PATH + "mathml2", (os.getcwd() + "/mathml2")) -''' ######################################## # Certain functions for specific tasks # @@ -515,14 +478,8 @@ def run_tralics( fixed_tex_file_path, "xml" ) - # other possible tralics options: - # -output_dir DIR - # -output_file FILENAME - # Convert TeX to XML via Tralics - logging.info( f"executing {TRALICS_PATH_EXEC}. log file: {TRALICS_LOG_PATH}" ) - # input_dir = Path(input_file).absolute().parent exec_command( "{cmd} -log_file {log_file} -confdir {conf_dir}/tralics_conf -config {conf_dir}/tralics.tcf -utf8 -utf8output -output_dir={output_dir} -input_dir={input_dir} -input_file={input_file}".format( cmd = TRALICS_PATH_EXEC, @@ -534,17 +491,6 @@ def run_tralics( ), ignore_fail = True # :-D ) - ''' - exec_command( - f"{TRALICS_PATH_EXEC} -log_file {TRALICS_LOG_PATH} -confdir {TRALICS_PATH_LIB}/tralics_conf -config {TRALICS_PATH_LIB}/tralics.tcf -utf8 -utf8output -output_dir={output_dir} -input_dir={input_dir} -input_file={input_file}", - ignore_fail = True # :-D - ) - Kommando = \ - f"{TRALICS_PATH_EXEC} -log_file {TRALICS_LOG_PATH} -confdir {TRALICS_PATH_LIB}/tralics_conf -config {TRALICS_PATH_LIB}/tralics.tcf -utf8 -utf8output {input_file}" - Argumente = shlex.split(Kommando) - Prozess = subprocess.call(Argumente) - logging.debug(f"Tralics command: {Kommando}") - ''' run_tralics( input_file = INPUT_PATH_NO_EXT + '.tex', From 5730c4861e3150582ba2f4eb9adc3e4b78bd0885 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 4 Apr 2019 17:28:36 +0200 Subject: [PATCH 008/132] continued refactoring and adding comments, removed obsolete commented code. --- eoatex2imxml.py | 853 ++++++++++++++++++----------------------- utils/libeoaconvert.py | 1 - 2 files changed, 381 insertions(+), 473 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index 5a01ad1..b5007a9 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -271,40 +271,29 @@ def TeX2PNG(LaTeXCode, Type, Chapter, Number): return LaTeXCode # def TeX2PNG ends here -def make_bibchecker(bib_database, set_citations): +def make_latex_bibl_file( + bib_database, + set_citations, + files +): """Construct a separate latex file with bibliography. The HTML bibliography is still not perfectly formatted like the LaTeX version. To check both files, a separate file is made that and which is then also converted in the various formats. """ - - tmp_latex = open(TEMPLATE_PATH / "largebib.tex", "r") - largebib_template = tmp_latex.read() - tmp_latex.close() - - tmp_xml = open(TEMPLATE_PATH / "largebib-xml.tex", "r") - largebib_xml_template = tmp_xml.read() - tmp_xml.close() - string_citations = ", ".join(set_citations) - - largebib_template_string = string.Template(largebib_template) - largebib_replacement = largebib_template_string.substitute(INSERT_BIB_DATABASE = bib_database, INSERT_CITEKEYS = string_citations) - - largebib_template_string_xml = string.Template(largebib_xml_template) - largebib_replacement_xml = largebib_template_string_xml.substitute(INSERT_BIB_DATABASE = bib_database, INSERT_CITEKEYS = string_citations) - - tmp_latex_file = DEBUG_DIR / "debug_onlybib.tex" - tmp_latex = open(tmp_latex_file, "w") - tmp_latex.write(largebib_replacement) - tmp_latex.close() - - tmp_xml_file = DEBUG_DIR / "debug_onlybib-xml.tex" - tmp_xml = open(tmp_xml_file, "w") - tmp_xml.write(largebib_replacement_xml) - tmp_xml.close() -# def make_bibchecker ends here + for (input_path, output_path) in files: + with open(input_path, "r") as tmp_latex: + largebib_template = tmp_latex.read() + largebib_template_string = string.Template( largebib_template ) + largebib_replacement = largebib_template_string.substitute( + INSERT_BIB_DATABASE = bib_database, + INSERT_CITEKEYS = string_citations + ) + with open(output_path, "w") as tmp_latex: + tmp_latex.write(largebib_replacement) +# def make_latex_bibl_file ends here def sanitize_bibentry(bibEntry): """Some additional cleanup actions""" @@ -315,6 +304,7 @@ def sanitize_bibentry(bibEntry): return(bibEntry.strip()) # def sanitize_bibentry ends here +''' def createBibEntryAuthorYear(bibEntry, boolSameAuthor): """Function to create a complete Entry of a publication (epub & django) for author-year citation""" strBibEntry = "" @@ -373,6 +363,7 @@ def createBibEntryAuthorYear(bibEntry, boolSameAuthor): return sanitize_bibentry(strBibEntry) # def createBibEntryAuthorYear ends here +''' def createBibEntryNumeric(bibEntry): """Function to create a complete Entry of a publication (epub & django) for numeric citation""" @@ -492,6 +483,7 @@ def run_tralics( ignore_fail = True # :-D ) +# .tex -> .xml run_tralics( input_file = INPUT_PATH_NO_EXT + '.tex', TRALICS_PATH_LIB = TRALICS_PATH_LIB, @@ -527,8 +519,7 @@ def fix_underscore_and_eoatranscripted( logging.info("-----------------------------------------------------") logging.info("Move EOAlanguage from into attribute of EOAchapter") -intChapterNumber = 1 -for xmlChapter in xmlChapters: +for intChapterNumber, xmlChapter in enumerate(xmlChapters, start=1): xmlLanguage = xmlChapter.find(".//EOAlanguage") if xmlLanguage is not None: strLanguage = xmlLanguage.text or "english" @@ -536,7 +527,6 @@ def fix_underscore_and_eoatranscripted( xmlLanguage.text = None logging.info("The language of Chapter %d is %s." % (intChapterNumber, strLanguage)) xmlChapter = etree.strip_tags(xmlChapter, "EOAlanguage") - intChapterNumber += 1 ############################################################## # Numbering and Typesetting various Elements # @@ -1137,7 +1127,9 @@ def fix_underscore_and_eoatranscripted( if matched_citation is not None: set_citations.add(matched_citation.group(1)) +logging.info("page labels:") logging.info(dictPagelabels) +logging.info("citations:") logging.info(set_citations) logging.info("-----------------------------------------------------") @@ -1166,118 +1158,49 @@ def fix_underscore_and_eoatranscripted( ############################################################## # Preparing the Bibliography # ############################################################## -if xmlTree.find(".//EOAbibliographydatabase") is not None: - bib_database = xmlTree.find(".//EOAbibliographydatabase").text - HAS_BIBLIOGRAPHY = True -else: - logging.waruning("No database found.") - input("Do you want to continue? Press enter.") - HAS_BIBLIOGRAPHY = False -bib_type = xmlTree.find(".//EOAbibliographytype").text -if bib_type not in ["monograph", "anthology", "monograph-numeric", "anthology-numeric"]: - logging.error(f"The bibtype must be one of {','.join[bib_type]}. Exiting") - sys.exit() +def bibl_info_from_xml( + xmlTree +): + if xmlTree.find(".//EOAbibliographydatabase") is not None: + bib_database = xmlTree.find(".//EOAbibliographydatabase").text + else: + return None + + bib_type = xmlTree.find(".//EOAbibliographytype").text + if bib_type not in ["monograph", "anthology", "monograph-numeric", "anthology-numeric"]: + raise( Exception(f"The bibtype must be one of {','.join[bib_type]}. Exiting") ) -# the new solution: pandoc-citeproc -interim_bib_json_file = INPUT_PATH_NO_EXT + "-bib.json" -citeproc_command = "pandoc-citeproc --bib2json %s" % bib_database + ".bib" -logging.debug(f"Running citeproc with the following command: {citeproc_command}") -citeproc_arguments = shlex.split(citeproc_command) -citeproc_process = subprocess.Popen(citeproc_arguments, stdout=subprocess.PIPE) -citeproc_json = citeproc_process.stdout.read() -citations_json = json.loads(citeproc_json) -# for x in citations_json: -# print(x["title"]) - -logging.debug(f"Dumping bib json file: {interim_bib_json_file}.") -with open(interim_bib_json_file, 'w') as ibjf: - json.dump(citeproc_json.decode('utf-8'), ibjf) - - - -#################### -# the old solution # -#################### -# # Copy interim .bbl-File to interim bib.tex file -# interim_bibtex_file = INPUT_PATH_NO_EXT + "bib.tex" -# try: -# shutil.copy(BIBERFILE, interim_bibtex_file) -# except FileNotFoundError: -# print("%s has not been created yet. Switch TeX distribution to TeXLive2016, run biber_2.1 -O biber2-1.bbl %s to obtain this file" % (BIBERFILE, INPUT_PATH_NO_EXT)) -# # Read all lines of Bibliographic TeX -# tmpFile = open(interim_bibtex_file, "r") -# tmpLines = tmpFile.readlines() -# tmpFile.close() - -# # First line should link to Bibliographic Praeambel -# tmpLines[0] = "\\include{%spre_bib}\n" % TEMPLATE_PATH -# # Remove unwanted lines -# for i in range(18,0,-1): -# del tmpLines[i] -# # Save changes -# tmpFile = open(interim_bibtex_file, "w") -# tmpFile.writelines(tmpLines) -# tmpFile.close() -# # TeX has been sanitized, now tralics to make it intermediate XML -# print("TeX has been sanitized, now tralics to make it intermediate XML") -# Kommando = "%s -log_file %s -confdir %s/tralics_conf -config %s/tralics.tcf -utf8 -utf8output -entnames=false %sbib.tex" % (TRALICS_PATH_EXEC, INPUT_PATH_NO_EXT + "-bib-tralics.log", TRALICS_PATH_LIB, TRALICS_PATH_LIB, INPUT_PATH_NO_EXT) -# Argumente = shlex.split(Kommando) -# Prozess = subprocess.call(Argumente) -# # Sanitize XML to make it useable -# tmpFile = open((INPUT_PATH_NO_EXT) + "bib.xml", "r") -# tmpContent = tmpFile.read() -# tmpFile.close() -# listReplace = [ r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"", -# r"uniquename=(.*?),hash=(.*?)", -# r"hash=(.*?)", -# ] -# for strReplace in listReplace: -# tmpContent = re.sub(strReplace, "", tmpContent) - -# # Put Back Underscore _ -# tmpContent = re.sub(r"", "_", tmpContent) - -# # Remove empty Lines -# tmpContent = re.sub(r"\n\n", "\n", tmpContent) - -# # Put back Ampersand -# tmpContent = re.sub(r"&", "&", tmpContent) -# tmpFile = open((INPUT_PATH_NO_EXT) + "bib.xml", "w") -# tmpFile.write(tmpContent) -# tmpFile.close() - -# # TeXML has been sanitized, now load xml-Tree -# xmlParser2 = etree.XMLParser(no_network=False,load_dtd=False) -# xmlBibTree = etree.parse((INPUT_PATH_NO_EXT + "bib.xml"), xmlParser2) -# xml_bib_entries = xmlBibTree.findall(".//entry") - -########################### -# end of the old solution # -########################### - -make_bibchecker(bib_database, set_citations) - -def print_bibliography( + return (bib_type, bib_database) + +# .bib -> .json +# (return json data as python dict) +def write_json_bibl( + bibl_info, + output_file, +): + (bib_type, bib_database) = bibl_info + # the new solution: pandoc-citeproc + # interim_bib_json_file = INPUT_PATH_NO_EXT + "-bib.json" + citeproc_command = "pandoc-citeproc --bib2json %s" % bib_database + ".bib" + logging.debug(f"Running citeproc with the following command: {citeproc_command}") + citeproc_arguments = shlex.split(citeproc_command) + citeproc_process = subprocess.Popen(citeproc_arguments, stdout=subprocess.PIPE) + citeproc_json = citeproc_process.stdout.read() + citations_json = json.loads(citeproc_json) + # for x in citations_json: + # print(x["title"]) + + logging.debug(f"Dumping bib json file: {output_file}.") + with open(output_file, 'w') as ibjf: + json.dump(citeproc_json.decode('utf-8'), ibjf) + return citations_json + +def add_bibliography_to_xml( print_bibl_element, - xml_context, + chapter_element, + bib_database, + citations_json, tmp_citation_filename ): bibliography_keyword = print_bibl_element.get("keyword") @@ -1290,11 +1213,8 @@ def print_bibliography( xmlBibliographyDiv = etree.Element("div") xmlBibliography.addnext(xmlBibliographyDiv) - citekeys = xml_context.xpath(".//citekey/text()") - nocite_elements = xml_context.xpath(".//nocite") - - # citekeys = xmlChapter.xpath(".//citekey/text()") - # nocite_elements = xmlChapter.xpath(".//nocite") + citekeys = chapter_element.xpath(".//citekey/text()") + nocite_elements = chapter_element.xpath(".//nocite") if nocite_elements: logging.debug(f"Found {libeoaconvert.plural(len(nocite_elements), 'nocite command')}.") @@ -1329,345 +1249,247 @@ def print_bibliography( for entry in fixed_entries: xmlBibliographyDiv.append(entry) -# If Bibliography-Type is monograph search for EOAbibliography and make it all -if bib_type == "monograph": - - tmp_citation_filename = TEMP_DIR / "used_citations-monograph" - if xmlTree.find(".//EOAprintbibliography") is not None: - # to insert here: with keywords we can have multiple bibliographies - xmlBibliography = xmlTree.find(".//EOAprintbibliography") - print_bibliography( - xmlBibliography, - xmlTree, - tmp_citation_filename - ) +bibl_info = bibl_info_from_xml( + xmlTree +) +if bibl_info is None: + logging.warning("No bibliography database found.") -# If Bibliography-Type is anthology search for EOAbibliography and make one per chapter -if bib_type == "anthology": +if bibl_info is not None: + logging.info( ".bib -> .json") + citations_json = write_json_bibl( + bibl_info, + output_file = TEMP_DIR / (INPUT_PATH_NO_EXT + "-bib.json") + ) + + (bib_type, bib_database) = bibl_info logging.debug(f"bib type is {bib_type}") - intChapterNumber = 1 - for xmlChapter in xmlChapters: - logging.debug(f"Looking at chapter {intChapterNumber}.") - tmp_citation_filename = TEMP_DIR / ("used_citations-anthology-chapter_{:02d}".format(intChapterNumber)) - if xmlChapter.find(".//EOAprintbibliography") is not None: - xmlBibliography = xmlChapter.find(".//EOAprintbibliography") + ## only for debugging (?) + make_latex_bibl_file( + bib_database = bib_database, + set_citations = set_citations, + files = [ + (TEMPLATE_PATH / "largebib.tex", DEBUG_DIR / "debug_onlybib.tex"), + (TEMPLATE_PATH / "largebib-xml.tex", DEBUG_DIR / "debug_onlybib-xml.tex"), + ] + ) - print_bibliography( + # If Bibliography-Type is monograph search for EOAbibliography and make it all + if bib_type == "monograph": + tmp_citation_filename = TEMP_DIR / "used_citations-monograph" + if xmlTree.find(".//EOAprintbibliography") is not None: + # to insert here: with keywords we can have multiple bibliographies + xmlBibliography = xmlTree.find(".//EOAprintbibliography") + + add_bibliography_to_xml( xmlBibliography, - xmlChapter, - tmp_citation_filename + xmlTree, + bib_database = bibl_info[1], + citations_json = citations_json, + tmp_citation_filename = tmp_citation_filename ) - else: - # create an empty file - logging.debug("No bibliography found.") - open(TEMP_DIR / (tmp_citation_filename + "_nocitations"), 'a').close() - - """ - - References -
- -
-

Abril Castelló, Vidal (1987). Las Casas contra Vitoria, 1550–1552: La revolución de la duodécima réplica. Causas y consecuencias. Revista de Indias 47(179):83–101.

-

Agrawal, Arun (1995). Dismantling the Divide Between Indigenous and Scientific Knowledge. Development and Change 26:413–439.

-
-
- - """ - - - ############### - # old version # - ############### - # xmlRefsections = xmlBibTree.findall(".//refsection") - # for xmlRefsection in xmlRefsections: - # if xmlRefsection.find(".//number").text == str(intChapterNumber): - # break - # xml_bib_entries = xmlRefsection.findall(".//entry") - # intNumberOfEntry = 0 - # for xmlEntry in xml_bib_entries: - # if intNumberOfEntry == 0: - # # Don't check for previous author if first entry of the Bibliography - # bibEntry = Bibitem(xmlEntry) - # strNewentry = "

" + createBibEntryAuthorYear(bibEntry, boolSameAuthor=False) + "

" - # xmlNew = etree.fromstring(strNewentry) - # xmlBibliographyDiv.append(xmlNew) - # else: - # bibEntry = Bibitem(xmlEntry) - # # Check if author of previous Entry is the same - # bibEntryPrevious = Bibitem(xml_bib_entries[intNumberOfEntry - 1]) - # if bibEntry.fullauthorlastfirst() == bibEntryPrevious.fullauthorlastfirst(): - # print(bibEntry.citekey()) - # strNewentry = "

" + createBibEntryAuthorYear(bibEntry, boolSameAuthor=True) + "

" - # xmlNew = etree.fromstring(strNewentry) - # xmlBibliographyDiv.append(xmlNew) - # else: - # print(bibEntry.citekey()) - # strNewentry = "

" + createBibEntryAuthorYear(bibEntry, boolSameAuthor=False) + "

" - # xmlNew = etree.fromstring(strNewentry) - # xmlBibliographyDiv.append(xmlNew) - # intNumberOfEntry += 1 - - ###################### - # end of old version # - ###################### + # If Bibliography-Type is anthology search for EOAbibliography and make one per chapter + elif bib_type == "anthology": + for intChapterNumber, xmlChapter in enumerate(xmlChapters, start = 1): + logging.debug(f"Looking at chapter {intChapterNumber}.") + tmp_citation_filename = TEMP_DIR / ("used_citations-anthology-chapter_{:02d}".format(intChapterNumber)) + if xmlChapter.find(".//EOAprintbibliography") is not None: + xmlBibliography = xmlChapter.find(".//EOAprintbibliography") + + add_bibliography_to_xml( + xmlBibliography, + xmlChapter, + bib_database = bibl_info[1], + citations_json = citations_json, + tmp_citation_filename = tmp_citation_filename + ) - intChapterNumber += 1 -# for the time being -strCitation = "" + else: + # create an empty file + logging.debug("No bibliography found.") + open(TEMP_DIR / (tmp_citation_filename + "_nocitations"), 'a').close() -# Bibliographies are done, now for the citations -if bib_type == "anthology" or bib_type == "monograph": - intChapterNumber = 1 + """ + + References +
+ +
+

Abril Castelló, Vidal (1987). Las Casas contra Vitoria, 1550–1552: La revolución de la duodécima réplica. Causas y consecuencias. Revista de Indias 47(179):83–101.

+

Agrawal, Arun (1995). Dismantling the Divide Between Indigenous and Scientific Knowledge. Development and Change 26:413–439.

+
+
+
+ """ - if bib_type == "monograph": - tmp_citation_filename = "used_citations-monograph" - tmp_path_html = TEMP_DIR / (tmp_citation_filename + ".html") - with open(tmp_path_html, "r") as formatted_citations: - form_cit = BeautifulSoup(formatted_citations, "html.parser") + # for the time being + strCitation = "" - for xmlChapter in xmlChapters: - logging.info("-----------------------------------------------------") - logging.info("Processing References for Chapter " + str(intChapterNumber)) - xmlCitations = xmlChapter.xpath(".//EOAciteauthoryear | .//EOAciteyear | .//EOAcitemanual") + # Bibliographies are done, now for the citations + if bib_type == "anthology" or bib_type == "monograph": + intChapterNumber = 1 - if bib_type == "anthology": - tmp_citation_filename = "used_citations-anthology-chapter_{:02d}".format(intChapterNumber) + if bib_type == "monograph": + tmp_citation_filename = "used_citations-monograph" tmp_path_html = TEMP_DIR / (tmp_citation_filename + ".html") - no_cite_path = TEMP_DIR / (tmp_citation_filename + "_nocitations") - if os.path.exists(tmp_path_html): - with open(tmp_path_html, "r") as formatted_citations: - form_cit = BeautifulSoup(formatted_citations, "html.parser") - elif os.path.exists(no_cite_path): - logging.debug("no citations in this chapter") - intChapterNumber += 1 - continue - - counter_citations = 1 - - for xmlCitation in xmlCitations: - string_citekey = xmlCitation.find("./citekey").text - progress(counter_citations, len(xmlCitations),"Processing reference %s of %s: %s" % (counter_citations, len(xmlCitations), string_citekey)) - # If Bibliography-Type is anthology find Refsection for this Chapter - ############### - # old version # - ############### - # if bib_type == "anthology": - # print("Yes, it's anthology time!") - # xmlRefsections = xmlBibTree.findall(".//refsection") - # for xmlRefsection in xmlRefsections: - # if xmlRefsection.find(".//number").text == str(intChapterNumber): - # break - # xml_bib_entries = xmlRefsection.findall(".//entry") - - ################### - # end old version # - ################### - # If Bibliography-Type is monograph find all entries, forget about refsection - - ############### - # old version # - ############### - """ - if bib_type == "monograph": - xml_bib_entries = xmlBibTree.findall(".//entry") - for xmlEntry in xml_bib_entries: - bibEntry = Bibitem(xmlEntry) - if bibEntry.citekey() == xmlCitation.find("./citekey").text: - if xmlCitation.tag == "EOAciteauthoryear": - strCitation = bibEntry.shortauthor() + " " + bibEntry.labelyear() - if bibEntry.labelyearsuffix() is not None: - strCitation = strCitation + bibEntry.labelyearsuffix() - strTitle = bibEntry.title() - if xmlCitation.tag == "EOAciteyear": - strCitation = bibEntry.labelyear() - if bibEntry.labelyearsuffix() is not None: - strCitation = strCitation + bibEntry.labelyearsuffix() - strTitle = bibEntry.title() - if xmlCitation.tag == "EOAcitemanual": - cite_text = xmlCitation.find("citetext") - if cite_text.getchildren(): - tmp_string = xmlCitation.find("citetext") - tmp_string = cite_text.getchildren()[0] - strCitation = etree.tostring(tmp_string) - # BAUSTELLE!!!!! - # tmp_string2 = etree.tostring(tmp_string) - # tmp_string3 = tmp_string2.decode() - # strCitation = tmp_string3.replace("<", "<") - else: - strCitation = xmlCitation.find("citetext").text - strTitle = bibEntry.title() - if xmlCitation.find("./page") is not None and xmlCitation.find("./page").text is not None: - strCitation = strCitation + ", " + xmlCitation.find("./page").text - """ - ###################### - # end of old version # - ###################### - - ############### - # new version # - ############### - - # string_citekey = xmlCitation.find("./citekey").text - for entry in citations_json: - if entry["id"] == string_citekey: - current_citation = entry - strTitle = current_citation["title"] - - # [1:-1] to remove parentheses around citations - try: - citeauthoryear_value = form_cit.select("#citeauthoryear ~ p > span[data-cites='%s']" % string_citekey)[0].text[1:-1] - except IndexError: - logging.error("Could not find {}. Exiting.".format(string_citekey)) - sys.exit() - data_title_value = citeauthoryear_value - if xmlCitation.tag == "EOAciteauthoryear": - strCitation = citeauthoryear_value - elif xmlCitation.tag == "EOAciteyear": - strCitation = form_cit.select("#citeyear ~ p > span[data-cites='%s']" % string_citekey)[0].text[1:-1] - elif xmlCitation.tag == "EOAcitemanual": - cite_text = xmlCitation.find("citetext") - if cite_text.getchildren(): - tmp_string = xmlCitation.find("citetext") - tmp_string = cite_text.getchildren()[0] - strCitation = etree.tostring(tmp_string) - # BAUSTELLE!!!!! - # tmp_string2 = etree.tostring(tmp_string) - # tmp_string3 = tmp_string2.decode() - # strCitation = tmp_string3.replace("<", "<") - else: - strCitation = xmlCitation.find("citetext").text - - if xmlCitation.find("./page") is not None and xmlCitation.find("./page").text is not None: - pages_text = libeoaconvert.gettext(xmlCitation.find("./page")) - strCitation = strCitation + ", " + pages_text - data_title_value = data_title_value + ", " + pages_text - # strCitation = strCitation + ", " + xmlCitation.find("./page").text - - ###################### - # end of new version # - ###################### - - # Hier den XML-Tag durch die Quellenangabe ersetzen - tmpTail = xmlCitation.tail - xmlCitation.clear() - xmlCitation.tag = "span" - xmlCitation.set("rel", "popover") - xmlCitation.set("class", "citation") - xmlCitation.set("citekey", string_citekey) - xmlCitation.text = strCitation - xmlCitation.tail = tmpTail - # Create Link to be used for website in a popover - xmlCitation.set("data-toggle", "popover") - xmlCitation.set("html", "true") - xmlCitation.set("data-placement", "bottom") - xmlCitation.set("data-title", data_title_value) - try: - xmlCitation.set("data-content", strTitle) - except: - xmlCitation.set("data-content", "missing") - counter_citations += 1 - intChapterNumber += 1 + with open(tmp_path_html, "r") as formatted_citations: + form_cit = BeautifulSoup(formatted_citations, "html.parser") + + for xmlChapter in xmlChapters: + logging.info("-----------------------------------------------------") + logging.info("Processing References for Chapter " + str(intChapterNumber)) + xmlCitations = xmlChapter.xpath(".//EOAciteauthoryear | .//EOAciteyear | .//EOAcitemanual") + + if bib_type == "anthology": + tmp_citation_filename = "used_citations-anthology-chapter_{:02d}".format(intChapterNumber) + tmp_path_html = TEMP_DIR / (tmp_citation_filename + ".html") + no_cite_path = TEMP_DIR / (tmp_citation_filename + "_nocitations") + if os.path.exists(tmp_path_html): + with open(tmp_path_html, "r") as formatted_citations: + form_cit = BeautifulSoup(formatted_citations, "html.parser") + elif os.path.exists(no_cite_path): + logging.debug("no citations in this chapter") + intChapterNumber += 1 + continue -# 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: - dictCitekeysNumbers = {} - dictCitekeysTitles = {} - xmlBibliography = xmlTree.find(".//EOAprintbibliography") - xmlBibliography.clear() - xmlBibliography.tag = "div" - xmlBibliography.getparent().tag = "div" - xml_bib_entries = xmlBibTree.findall(".//entry") - intNumberOfEntry = 1 - for xmlEntry in xml_bib_entries: - # Go through all entries and assign a number to the citekey - bibEntry = Bibitem(xmlEntry) - strCitekey = bibEntry.citekey() - dictCitekeysNumbers[strCitekey] = str(intNumberOfEntry) - dictCitekeysTitles[strCitekey] = str(bibEntry.title()) - strNewentry = "

[" + str(intNumberOfEntry) + "] " + createBibEntryNumeric(bibEntry) + "

" - xmlNew = etree.fromstring(strNewentry) - xmlBibliography.append(xmlNew) - intNumberOfEntry += 1 - # Now for the references via EOAcitenumeric - xmlCitenumerics = xmlTree.findall(".//EOAcitenumeric") - for xmlCitenumeric in xmlCitenumerics: - logging.info(etree.tostring(xmlCitenumeric)) - strPopover = "" - tmpCitekeys = xmlCitenumeric.find(".//citekey").text - tmpCitekeys = re.sub(" ", "", tmpCitekeys) - tmpCitekeys = re.sub("\n", "", tmpCitekeys) - listCitekeys = re.split("\,", tmpCitekeys) - listCitenumbers = [] - for strCitekey in listCitekeys: - listCitenumbers.append(dictCitekeysNumbers[strCitekey]) - # Create Text to be used on the website in a popover - strPopover = strPopover + "[" + dictCitekeysNumbers[strCitekey] + "] " + dictCitekeysTitles[strCitekey] + " " - listCitenumbers = sorted(listCitenumbers, key=int) - strResult = "[" + listCitenumbers[0] - intNumberOfSequentialCite = 0 - for i in range(1,len(listCitenumbers)): - intPreviousCitenumber = int(listCitenumbers[i-1]) - intCurrentCitenumber = int(listCitenumbers[i]) - if i == (len(listCitenumbers)-1): - if (intPreviousCitenumber + 1) == intCurrentCitenumber: - if intNumberOfSequentialCite == 0: - strResult = strResult + "," + str(listCitenumbers[i]) - else: - strResult = strResult + "-" + str(listCitenumbers[i]) - intNumberOfSequentialCite == 0 - else: - strResult = strResult + "," + str(listCitenumbers[i]) - break - intNextCitenumber = int(listCitenumbers[i+1]) - if (intCurrentCitenumber + 1) != intNextCitenumber: - if intNumberOfSequentialCite != 0: - strResult = strResult + "-" + str(intCurrentCitenumber) - intNumberOfSequentialCite = 0 + counter_citations = 1 + + for xmlCitation in xmlCitations: + string_citekey = xmlCitation.find("./citekey").text + progress(counter_citations, len(xmlCitations),"Processing reference %s of %s: %s" % (counter_citations, len(xmlCitations), string_citekey)) + # If Bibliography-Type is anthology find Refsection for this Chapter + ############### + # old version # + ############### + # if bib_type == "anthology": + # print("Yes, it's anthology time!") + # xmlRefsections = xmlBibTree.findall(".//refsection") + # for xmlRefsection in xmlRefsections: + # if xmlRefsection.find(".//number").text == str(intChapterNumber): + # break + # xml_bib_entries = xmlRefsection.findall(".//entry") + + ################### + # end old version # + ################### + # If Bibliography-Type is monograph find all entries, forget about refsection + + ############### + # old version # + ############### + """ + if bib_type == "monograph": + xml_bib_entries = xmlBibTree.findall(".//entry") + for xmlEntry in xml_bib_entries: + bibEntry = Bibitem(xmlEntry) + if bibEntry.citekey() == xmlCitation.find("./citekey").text: + if xmlCitation.tag == "EOAciteauthoryear": + strCitation = bibEntry.shortauthor() + " " + bibEntry.labelyear() + if bibEntry.labelyearsuffix() is not None: + strCitation = strCitation + bibEntry.labelyearsuffix() + strTitle = bibEntry.title() + if xmlCitation.tag == "EOAciteyear": + strCitation = bibEntry.labelyear() + if bibEntry.labelyearsuffix() is not None: + strCitation = strCitation + bibEntry.labelyearsuffix() + strTitle = bibEntry.title() + if xmlCitation.tag == "EOAcitemanual": + cite_text = xmlCitation.find("citetext") + if cite_text.getchildren(): + tmp_string = xmlCitation.find("citetext") + tmp_string = cite_text.getchildren()[0] + strCitation = etree.tostring(tmp_string) + # BAUSTELLE!!!!! + # tmp_string2 = etree.tostring(tmp_string) + # tmp_string3 = tmp_string2.decode() + # strCitation = tmp_string3.replace("<", "<") + else: + strCitation = xmlCitation.find("citetext").text + strTitle = bibEntry.title() + if xmlCitation.find("./page") is not None and xmlCitation.find("./page").text is not None: + strCitation = strCitation + ", " + xmlCitation.find("./page").text + """ + ###################### + # end of old version # + ###################### + + ############### + # new version # + ############### + + # string_citekey = xmlCitation.find("./citekey").text + for entry in citations_json: + if entry["id"] == string_citekey: + current_citation = entry + strTitle = current_citation["title"] + + # [1:-1] to remove parentheses around citations + try: + citeauthoryear_value = form_cit.select("#citeauthoryear ~ p > span[data-cites='%s']" % string_citekey)[0].text[1:-1] + except IndexError: + logging.error("Could not find {}. Exiting.".format(string_citekey)) + sys.exit() + data_title_value = citeauthoryear_value + if xmlCitation.tag == "EOAciteauthoryear": + strCitation = citeauthoryear_value + elif xmlCitation.tag == "EOAciteyear": + strCitation = form_cit.select("#citeyear ~ p > span[data-cites='%s']" % string_citekey)[0].text[1:-1] + elif xmlCitation.tag == "EOAcitemanual": + cite_text = xmlCitation.find("citetext") + if cite_text.getchildren(): + tmp_string = xmlCitation.find("citetext") + tmp_string = cite_text.getchildren()[0] + strCitation = etree.tostring(tmp_string) + # BAUSTELLE!!!!! + # tmp_string2 = etree.tostring(tmp_string) + # tmp_string3 = tmp_string2.decode() + # strCitation = tmp_string3.replace("<", "<") else: - strResult = strResult + "," + str(intCurrentCitenumber) - continue - if (intPreviousCitenumber + 1) == intCurrentCitenumber: - intNumberOfSequentialCite += 1 - continue - else: - strResult = strResult + "," + str(intCurrentCitenumber) - intNumberOfSequentialCite = 0 - strResult = strResult + "]" - xmlCitenumeric.text = strResult - # Create Link to be used for website - xmlCitenumeric.set("data-toggle", "popover") - xmlCitenumeric.set("html", "true") - xmlCitenumeric.set("data-content", strPopover) - xmlCitenumeric.set("class","citation") - xmlCitenumeric.set("data-placement", "bottom") - xmlCitenumeric.set("data-title", strResult) - -# author is missing! -# print("xmlBibliography") -# print(etree.tostring(xmlBibliography)) -# input() - -# Numeric citations for the individual chapters -if bib_type == "anthology-numeric": - intChapterNumber = 1 - for xmlChapter in xmlChapters: - logging.info("Processing Bibliography") - if xmlChapter.find(".//EOAprintbibliography") is not None: + strCitation = xmlCitation.find("citetext").text + + if xmlCitation.find("./page") is not None and xmlCitation.find("./page").text is not None: + pages_text = libeoaconvert.gettext(xmlCitation.find("./page")) + strCitation = strCitation + ", " + pages_text + data_title_value = data_title_value + ", " + pages_text + # strCitation = strCitation + ", " + xmlCitation.find("./page").text + + ###################### + # end of new version # + ###################### + + # Hier den XML-Tag durch die Quellenangabe ersetzen + tmpTail = xmlCitation.tail + xmlCitation.clear() + xmlCitation.tag = "span" + xmlCitation.set("rel", "popover") + xmlCitation.set("class", "citation") + xmlCitation.set("citekey", string_citekey) + xmlCitation.text = strCitation + xmlCitation.tail = tmpTail + # Create Link to be used for website in a popover + xmlCitation.set("data-toggle", "popover") + xmlCitation.set("html", "true") + xmlCitation.set("data-placement", "bottom") + xmlCitation.set("data-title", data_title_value) + try: + xmlCitation.set("data-content", strTitle) + except: + xmlCitation.set("data-content", "missing") + counter_citations += 1 + intChapterNumber += 1 + + # 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: dictCitekeysNumbers = {} dictCitekeysTitles = {} - xmlBibliography = xmlChapter.find(".//EOAprintbibliography") - #xmlBibliography.clear() + xmlBibliography = xmlTree.find(".//EOAprintbibliography") + xmlBibliography.clear() xmlBibliography.tag = "div" xmlBibliography.getparent().tag = "div" - xmlRefsections = xmlBibTree.findall(".//refsection") - for xmlRefsection in xmlRefsections: - if xmlRefsection.find(".//number").text == str(intChapterNumber): - break - xml_bib_entries = xmlRefsection.findall(".//entry") + xml_bib_entries = xmlBibTree.findall(".//entry") intNumberOfEntry = 1 for xmlEntry in xml_bib_entries: # Go through all entries and assign a number to the citekey @@ -1680,18 +1502,16 @@ def print_bibliography( xmlBibliography.append(xmlNew) intNumberOfEntry += 1 # Now for the references via EOAcitenumeric - xmlCitenumerics = xmlChapter.xpath(".//EOAcitenumeric | .//EOAciteauthoryear | .//EOAciteyear") - logging.info("Found numeric citation in chapter " + str(intChapterNumber)) + xmlCitenumerics = xmlTree.findall(".//EOAcitenumeric") for xmlCitenumeric in xmlCitenumerics: + logging.info(etree.tostring(xmlCitenumeric)) strPopover = "" tmpCitekeys = xmlCitenumeric.find(".//citekey").text tmpCitekeys = re.sub(" ", "", tmpCitekeys) tmpCitekeys = re.sub("\n", "", tmpCitekeys) - logging.info(tmpCitekeys) listCitekeys = re.split("\,", tmpCitekeys) listCitenumbers = [] for strCitekey in listCitekeys: - logging.info(strCitekey) listCitenumbers.append(dictCitekeysNumbers[strCitekey]) # Create Text to be used on the website in a popover strPopover = strPopover + "[" + dictCitekeysNumbers[strCitekey] + "] " + dictCitekeysTitles[strCitekey] + " " @@ -1727,13 +1547,102 @@ def print_bibliography( intNumberOfSequentialCite = 0 strResult = strResult + "]" xmlCitenumeric.text = strResult - # Create Link to be used for website in a popover + # Create Link to be used for website xmlCitenumeric.set("data-toggle", "popover") - xmlCitenumeric.set("data-placement", "bottom") - xmlCitenumeric.set("data-title", " " + strResult) + xmlCitenumeric.set("html", "true") xmlCitenumeric.set("data-content", strPopover) xmlCitenumeric.set("class","citation") - intChapterNumber += 1 + xmlCitenumeric.set("data-placement", "bottom") + xmlCitenumeric.set("data-title", strResult) + + # author is missing! + # print("xmlBibliography") + # print(etree.tostring(xmlBibliography)) + # input() + + # Numeric citations for the individual chapters + if bib_type == "anthology-numeric": + intChapterNumber = 1 + for xmlChapter in xmlChapters: + logging.info("Processing Bibliography") + if xmlChapter.find(".//EOAprintbibliography") is not None: + dictCitekeysNumbers = {} + dictCitekeysTitles = {} + xmlBibliography = xmlChapter.find(".//EOAprintbibliography") + #xmlBibliography.clear() + xmlBibliography.tag = "div" + xmlBibliography.getparent().tag = "div" + xmlRefsections = xmlBibTree.findall(".//refsection") + for xmlRefsection in xmlRefsections: + if xmlRefsection.find(".//number").text == str(intChapterNumber): + break + xml_bib_entries = xmlRefsection.findall(".//entry") + intNumberOfEntry = 1 + for xmlEntry in xml_bib_entries: + # Go through all entries and assign a number to the citekey + bibEntry = Bibitem(xmlEntry) + strCitekey = bibEntry.citekey() + dictCitekeysNumbers[strCitekey] = str(intNumberOfEntry) + dictCitekeysTitles[strCitekey] = str(bibEntry.title()) + strNewentry = "

[" + str(intNumberOfEntry) + "] " + createBibEntryNumeric(bibEntry) + "

" + xmlNew = etree.fromstring(strNewentry) + xmlBibliography.append(xmlNew) + intNumberOfEntry += 1 + # Now for the references via EOAcitenumeric + xmlCitenumerics = xmlChapter.xpath(".//EOAcitenumeric | .//EOAciteauthoryear | .//EOAciteyear") + logging.info("Found numeric citation in chapter " + str(intChapterNumber)) + for xmlCitenumeric in xmlCitenumerics: + strPopover = "" + tmpCitekeys = xmlCitenumeric.find(".//citekey").text + tmpCitekeys = re.sub(" ", "", tmpCitekeys) + tmpCitekeys = re.sub("\n", "", tmpCitekeys) + logging.info(tmpCitekeys) + listCitekeys = re.split("\,", tmpCitekeys) + listCitenumbers = [] + for strCitekey in listCitekeys: + logging.info(strCitekey) + listCitenumbers.append(dictCitekeysNumbers[strCitekey]) + # Create Text to be used on the website in a popover + strPopover = strPopover + "[" + dictCitekeysNumbers[strCitekey] + "] " + dictCitekeysTitles[strCitekey] + " " + listCitenumbers = sorted(listCitenumbers, key=int) + strResult = "[" + listCitenumbers[0] + intNumberOfSequentialCite = 0 + for i in range(1,len(listCitenumbers)): + intPreviousCitenumber = int(listCitenumbers[i-1]) + intCurrentCitenumber = int(listCitenumbers[i]) + if i == (len(listCitenumbers)-1): + if (intPreviousCitenumber + 1) == intCurrentCitenumber: + if intNumberOfSequentialCite == 0: + strResult = strResult + "," + str(listCitenumbers[i]) + else: + strResult = strResult + "-" + str(listCitenumbers[i]) + intNumberOfSequentialCite == 0 + else: + strResult = strResult + "," + str(listCitenumbers[i]) + break + intNextCitenumber = int(listCitenumbers[i+1]) + if (intCurrentCitenumber + 1) != intNextCitenumber: + if intNumberOfSequentialCite != 0: + strResult = strResult + "-" + str(intCurrentCitenumber) + intNumberOfSequentialCite = 0 + else: + strResult = strResult + "," + str(intCurrentCitenumber) + continue + if (intPreviousCitenumber + 1) == intCurrentCitenumber: + intNumberOfSequentialCite += 1 + continue + else: + strResult = strResult + "," + str(intCurrentCitenumber) + intNumberOfSequentialCite = 0 + strResult = strResult + "]" + xmlCitenumeric.text = strResult + # Create Link to be used for website in a popover + xmlCitenumeric.set("data-toggle", "popover") + xmlCitenumeric.set("data-placement", "bottom") + xmlCitenumeric.set("data-title", " " + strResult) + xmlCitenumeric.set("data-content", strPopover) + xmlCitenumeric.set("class","citation") + intChapterNumber += 1 # this is somewhat luzzini-specific bib_parent_element = xmlBibliography.getparent() diff --git a/utils/libeoaconvert.py b/utils/libeoaconvert.py index 6c5c117..5b12bd5 100644 --- a/utils/libeoaconvert.py +++ b/utils/libeoaconvert.py @@ -36,7 +36,6 @@ def enable_preamble( o.write( "\input{preambel/pre_xml}\n" ) o.write( i.read() ) - def get_bigfoot_data(chapter): """ footnotes are per-chapter From 1793c57b61cfd1291fa16cea71868ad9f5350233 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Sat, 6 Apr 2019 21:22:32 +0200 Subject: [PATCH 009/132] use htlatex (instead of pandoc) to generate the citations --- eoatex2imxml.py | 23 +++-- utils/bib2html.py | 208 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 226 insertions(+), 5 deletions(-) create mode 100755 utils/bib2html.py diff --git a/eoatex2imxml.py b/eoatex2imxml.py index b5007a9..ce56645 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -22,6 +22,7 @@ from utils.libeoabibitem import Bibitem import utils.libeoaconvert as libeoaconvert from utils.load_config import load_config, exec_command, check_executable, copy_dir_overwrite +import utils.bib2html as bib2html # imports import argparse @@ -1237,6 +1238,16 @@ def add_bibliography_to_xml( logging.info( "citekeys: ") logging.info( len( citekeys ) ) csl_file = BASE_DIR / CONFIG['Auxiliaries']['CSL_FILE'] + + formatted_references = bib2html.main( + bib_file = Path(bib_database).with_suffix( ".bib" ), + citekeys = citekeys, + tex_template = BASE_DIR / "bibformat" / "4ht" / "bibliography4ht.tex", + language = strLanguage, + temp_dir = tmp_citation_filename + ) + + ''' formatted_references = libeoaconvert.format_citations( citations_to_format, bib_database + ".bib", @@ -1244,6 +1255,7 @@ def add_bibliography_to_xml( tmp_citation_filename, csl_file )[0] + ''' fixed_entries = libeoaconvert.fix_bib_entries(formatted_references) for entry in fixed_entries: @@ -1255,16 +1267,17 @@ def add_bibliography_to_xml( if bibl_info is None: logging.warning("No bibliography database found.") +else: + + (bib_type, bib_database) = bibl_info + logging.debug(f"bib type is {bib_type}") -if bibl_info is not None: logging.info( ".bib -> .json") citations_json = write_json_bibl( bibl_info, output_file = TEMP_DIR / (INPUT_PATH_NO_EXT + "-bib.json") ) - (bib_type, bib_database) = bibl_info - logging.debug(f"bib type is {bib_type}") ## only for debugging (?) make_latex_bibl_file( bib_database = bib_database, @@ -1277,7 +1290,7 @@ def add_bibliography_to_xml( # If Bibliography-Type is monograph search for EOAbibliography and make it all if bib_type == "monograph": - tmp_citation_filename = TEMP_DIR / "used_citations-monograph" + tmp_citation_filename = TEMP_DIR / "bib2html" / "used_citations-monograph" if xmlTree.find(".//EOAprintbibliography") is not None: # to insert here: with keywords we can have multiple bibliographies xmlBibliography = xmlTree.find(".//EOAprintbibliography") @@ -1294,7 +1307,7 @@ def add_bibliography_to_xml( elif bib_type == "anthology": for intChapterNumber, xmlChapter in enumerate(xmlChapters, start = 1): logging.debug(f"Looking at chapter {intChapterNumber}.") - tmp_citation_filename = TEMP_DIR / ("used_citations-anthology-chapter_{:02d}".format(intChapterNumber)) + tmp_citation_filename = TEMP_DIR / "bib2html" / ("used_citations-anthology-chapter_{:02d}".format(intChapterNumber)) if xmlChapter.find(".//EOAprintbibliography") is not None: xmlBibliography = xmlChapter.find(".//EOAprintbibliography") diff --git a/utils/bib2html.py b/utils/bib2html.py new file mode 100755 index 0000000..7fadf0b --- /dev/null +++ b/utils/bib2html.py @@ -0,0 +1,208 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8; mode: python -*- + +""" +Docstring goes here +""" + +__version__ = "1.0" +__date__ = "20190313" +__author__ = "kthoden@mpiwg-berlin.mpg.de" + +import argparse +import os +import subprocess +import shlex +import logging +import string +from lxml import etree +from pathlib import Path + +BASE_DIR = Path( __file__ ).resolve().parent.parent +SCRIPT_PATH = Path( __file__ ) +SCRIPT_NAME = SCRIPT_PATH.name + +# logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s - %(message)s') + +NS_MAP = {"x" : 'http://www.w3.org/1999/xhtml'} + +def transform_reference(reference_element, dialect='html'): + """Formatting transformation for reference element""" + + string_from_xml = etree.tostring(reference_element).decode('utf-8') + removed_linebreak = string_from_xml.replace("\n", "") + removed_namespace = removed_linebreak.replace('

', '

') + cleaned_element = etree.fromstring(removed_namespace) + + links = cleaned_element.xpath("a", namespaces=NS_MAP) + for link in links: + link.tag = "tagtobestripped" + + ecti_span = cleaned_element.xpath("span[@class='ecti-1095']", namespaces=NS_MAP) + for ecti in ecti_span: + if dialect == 'tei': + ecti.tag = "hi" + ecti.set("rend", "italic") + else: + ecti.tag = "em" + ecti.attrib.pop('class') + + ectt_span = cleaned_element.xpath("x:span[@class='ectt-1095']", namespaces=NS_MAP) + for ectt in ectt_span: + if dialect == 'tei': + ectt.tag = "hi" + ectt.set("rend", "monospace") + else: + ecti.tag = "code" + ectt.attrib.pop('class') + + etree.strip_tags(cleaned_element, "tagtobestripped") + + return cleaned_element +# def transform_reference ends here + +def write_dummy_latex( + citekeys, + bibfile, + language, + template_path, + tmp_filename +): + """Prepare a latex file""" + + allcitekeys = "" + + for key in citekeys: + allcitekeys += """ +\subsection*{%s} +\subsubsection*{authoryear} +\cite{%s} +\subsubsection*{year} +\cite*{%s}\n""" % (key, key, key) + + with open(template_path, "r") as tmp_template: + template = tmp_template.read() + + fill_in_template = string.Template(template) + + bibfile_path = \ + bibfile if bibfile.is_absolute() else Path.cwd() / bibfile + substitions = fill_in_template.substitute( + language = language, + # language = translations[language], + bibfile = bibfile_path, + # bibfile = '../' + bibfile, + citations = allcitekeys + ) + + with open(tmp_filename, "w") as texfile: + texfile.write(substitions) + + logging.info(f"Wrote {tmp_filename}") +# def write_dummy_latex ends here + + +def run_htlatex(tmp_filename): + """Create HTML file from temporary LaTeX file""" + + command = f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'" + arguments = shlex.split(command) + logging.info("Using external command htlatex with command %s" % command) + subprocess.call(arguments) + + command = f"biber {tmp_filename}" + arguments = shlex.split(command) + logging.info("Using external command biber with command %s" % command) + subprocess.call(arguments) + + command = f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'" + arguments = shlex.split(command) + logging.info("Using external command htlatex with command %s" % command) + subprocess.call(arguments) +# def run_htlatex ends here + + +def main( + bib_file, + citekeys, + tex_template, + language, + temp_dir, + tmp_filename = "temp" +): + temp_dir = Path( temp_dir ) + tmp_filename = Path( tmp_filename ) + + if not temp_dir.exists(): + os.makedirs( temp_dir ) + + write_dummy_latex( + citekeys, + bib_file, + language, + template_path = tex_template, + tmp_filename = temp_dir / tmp_filename . with_suffix( ".tex" ) + ) + + wd = Path.cwd() + os.chdir( temp_dir ) + run_htlatex(tmp_filename) + os.chdir( wd ) + + tmp_path_html = (temp_dir / tmp_filename).with_suffix( ".html" ) + + xml_tree = etree.parse( str(tmp_path_html) ) + + reference_list = xml_tree.xpath(f"//x:dl[@class='thebibliography']", namespaces=NS_MAP)[0] + entries = reference_list.xpath(f"x:dt", namespaces=NS_MAP) + + reference_div = etree.fromstring("""

""") + + for entry in entries: + entry_citekey = entry.get("id").replace("X0-", "") + reference_string = entry.xpath(f"following-sibling::x:dd[1]/x:p", namespaces=NS_MAP)[0] + formatted_reference = transform_reference(reference_string) + wrapper_div = etree.fromstring(f"""
""") + wrapper_div.append(formatted_reference) + reference_div.append(wrapper_div) + return reference_div + + """ +

References

+
+
+

Appadurai, Arjun, ed. (1986). The Social Life of Things: Commodities in Cultural Perspective. Cambridge, UK: Cambridge University Press.

+
+ """ + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument( + "bibfile", + help="File that contains the bibliography") + parser.add_argument( + "--tex-template", + default = BASE_DIR / "bibformat" / "4ht" / "bibliography4ht.tex", + help="the latex template to use for the bibliography" + ) + parser.add_argument( + "--temp-dir", + default = "tmp_files", + help="where to store temporary files" + ) + args = parser.parse_args() + citekeys = ["Edwards_2017", "Riggs:2016aa", "Bruckler:2001aa", "Zdenek:1939aa", "Caraffa_2011", "Uhlikova:2010aa", "Noll:1992aa", "Schwarz:1931aa", "Schwartz_1995", "Faber:2015ab", "Rohacek:2010aa", "Lachnit:2005aa", "Groll:1865aa", "Schlosser:1934aa", "Eitelberger:1863ab", "Wirth:1939aa", "Faber:2015aa", "Trnkova:2015aa", "Trnkova:2010aa", "Frodl:1988aa"] + language = "de" + + translations = {"de" : "german", "en" : "english", "it" : "italian", "fr" : "french"} + + temp_dir = Path( args.temp_dir ) + references_in_html = main( + bib_file = args.bibfile, + citekeys = citekeys, + tex_template = args.tex_template, + language = translations[language], + temp_dir = args.temp_dir + ) + print( etree.tostring( references_in_html ) ) +# finis From 779f189918633412f1cf5667b7ffe59d9ed106c9 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Mon, 8 Apr 2019 14:39:10 +0200 Subject: [PATCH 010/132] wrapper script for tei->html. flexible output redir when running executables. --- tei2html.py | 103 +++++++++++++++++++++++++++++++++++++++++++ utils/load_config.py | 35 +++++++++++---- 2 files changed, 130 insertions(+), 8 deletions(-) create mode 100755 tei2html.py diff --git a/tei2html.py b/tei2html.py new file mode 100755 index 0000000..997644c --- /dev/null +++ b/tei2html.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8; mode: python -*- + +"A converter from TEI to HTML." + +__version__ = "1.0" +__date__ = "20190408" +__author__ = "sgfroerer@mpiwg-berlin.mpg.de" + +from utils.load_config import load_config, check_executable, exec_command, ToFile +import utils.libeoaconvert as libeoaconvert + +import logging +import argparse +from pathlib import Path + +# things to be done +# assign ids top to bottom for the following elements: +# div1 div2 div3 note item table EOAfigure EOAequation formula theorem + +BASE_DIR = Path( __file__ ).resolve().parent +SCRIPT_NAME = Path( __file__).stem + +def check_executables(): + check_executable( "saxon" ) + +def main( + input_file, + root_dir +): + """Main function""" + + exec_command( + "saxon -t -s:{input_file} -xsl:{xslt_file} domain={root_dir}".format( + xslt_file = (BASE_DIR / SCRIPT_NAME) . with_suffix( ".xsl" ), + input_file = input_file, + root_dir = root_dir + ), + ) + +# def main ends here + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + formatter_class=argparse.ArgumentDefaultsHelpFormatter + ) + parser.add_argument( + "-c", "--config", + default = BASE_DIR / "config" / "eoaconvert.cfg", + help="Name of config file" + ) + parser.add_argument( + "-l", "--log-file", + default = Path("logs", SCRIPT_NAME).with_suffix(".log"), + help="logfile" + ) + parser.add_argument( + "--log-level", + default = "INFO", + help="log level: choose between DEBUG, INFO, WARNING, ERROR, CRITICAL" + ) + parser.add_argument( + "--root-dir", + default = Path.cwd(), + help="internal html links on the page will use this location as a prefix" + ) + parser.add_argument( + "-f", "--filename", + required = True, + help="Name of main EOA-TEI file" + ) + + ''' + TODO: support output directory + parser.add_argument( + "-o", "--output-dir", + default = ".", + help="where to dump all output files" + ) + ''' + + args = parser.parse_args() + + CONFIG_FILE = args.config + + print("The configfile is '%s'." % CONFIG_FILE) + print("The logfile is '%s'." % args.log_file) + + CONFIG = load_config( + CONFIG_FILE, + args.log_level, + args.log_file, + ) + + check_executables() + + # run main: + main( + input_file = args.filename, + root_dir = args.root_dir + ) + +# finis diff --git a/utils/load_config.py b/utils/load_config.py index f1d3ebd..bf396b9 100644 --- a/utils/load_config.py +++ b/utils/load_config.py @@ -24,10 +24,18 @@ def copy_dir_overwrite( src, dst ): shutil.rmtree( dst ) shutil.copytree( src, dst) +class ToFile: + def __init__( self, filename ): + self.filename = filename + +class ToLog: + pass + def exec_command( command, error_msg = "ERROR while running {command}", wd = None, + output_to = ToLog(), log_level = "INFO", ignore_fail = False ): @@ -37,24 +45,35 @@ def exec_command( ) arguments = shlex.split(command) + + if isinstance( output_to, ToFile ): + stdout_file = open( output_to.filename, "w") + if isinstance( output_to, ToLog ): + stdout_file = PIPE + else: + stdout_file = None process = subprocess.Popen( arguments, cwd = wd, - stdout=PIPE, - stderr=PIPE + stdout= stdout_file, + stderr= STDOUT, ) - def check_io(): + def check_io(stream): while True: - output = process.stdout.readline() + output = stream.readline() if output: - logging.debug( output.decode().strip() ) + logging.debug( "> " + output.decode().strip() ) else: break - + # keep checking stdout/stderr until the child exits - while process.poll() is None: - check_io() + logging.debug( f"{command} output:" ) + if isinstance( output_to, ToFile ): + stdout_file.close() + elif isinstance( output_to, ToLog ): + while process.poll() is None: + check_io(process.stdout) ret = process.wait() # 0 means success if (not ignore_fail) and ret != 0: From 2440ab996226c586ff5f41d17ce7d8017e336db6 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Mon, 8 Apr 2019 17:53:41 +0200 Subject: [PATCH 011/132] current working dir irrelevant for eoatex2pdf.py --- eoatex2pdf.py | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/eoatex2pdf.py b/eoatex2pdf.py index f07a9e8..c1eb84d 100755 --- a/eoatex2pdf.py +++ b/eoatex2pdf.py @@ -7,6 +7,7 @@ from pathlib import Path import logging import os +import sys import shutil import pathlib @@ -22,30 +23,38 @@ def main( check_executable( "xelatex" ) if( not os.path.exists( output_dir ) ): os.makedirs( output_dir ) - fixed_file_path = Path(output_dir) / input_file + input_file = Path( input_file ) + input_dir = input_file.resolve().parent + output_dir = Path( output_dir ) + fixed_file_path = output_dir / input_file.name libeoaconvert.enable_preamble( input_file, fixed_file_path, "pdf" ) copy_dir_overwrite( - Path(input_file).parent / "texfiles", - Path(output_dir) / "texfiles" + input_file.resolve().parent / "texfiles", + output_dir / "texfiles" ) - + output_dir = output_dir.resolve() + cwd = Path.cwd() + os.chdir( input_dir ) + logging.info( "cd {}".format( input_dir ) ) exec_command( - f"xelatex --output-directory={output_dir} {fixed_file_path}", + f"xelatex --output-directory={output_dir} {input_file.name}", ) exec_command( - "biber {}".format( Path(input_file).stem ), + "biber {}".format( input_file.stem ), wd = output_dir ) exec_command( - f"xelatex --output-directory={output_dir} {fixed_file_path}", + f"xelatex --output-directory={output_dir} {input_file.name}", ) exec_command( - f"xelatex --output-directory={output_dir} {fixed_file_path}", + f"xelatex --output-directory={output_dir} {input_file.name}", ) + logging.info( "cd {}".format( cwd ) ) + os.chdir( cwd ) if __name__ == '__main__': parser = argparse.ArgumentParser( @@ -58,7 +67,8 @@ def main( ) parser.add_argument( "-o", "--output-dir", - default = "./latex-out" + default = "./latex-out", + help = "output directory" ) parser.add_argument( "-c", "--config", From d83aa9956682708791dcd4aee43aaf4128ffb213 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Wed, 10 Apr 2019 12:55:00 +0200 Subject: [PATCH 012/132] eoatex2imxl: fixed/completed using htlatex for bibl. and references formatting --- eoatex2imxml.py | 136 ++++++++++++++++++++++++----------------- utils/bib2html.py | 132 ++++++++++++++++++++++++++++++++++----- utils/libeoaconvert.py | 13 ++-- utils/load_config.py | 10 ++- 4 files changed, 212 insertions(+), 79 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index ce56645..449dfe8 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -21,7 +21,7 @@ from utils.libeoabibitem import Bibitem import utils.libeoaconvert as libeoaconvert -from utils.load_config import load_config, exec_command, check_executable, copy_dir_overwrite +from utils.load_config import load_config, exec_command, check_executable, copy_dir_overwrite, ToLog, ToFile import utils.bib2html as bib2html # imports @@ -59,8 +59,9 @@ help="Name of config file" ) parser.add_argument( - "-l", "--log-file", - default = Path("logs", SCRIPT_NAME).with_suffix(".log"), + "-l", "--log-dir", + default = Path("logs"), + # default = Path("logs", SCRIPT_NAME).with_suffix(".log"), help="logfile" ) parser.add_argument( @@ -117,7 +118,8 @@ CONFIG = load_config( CONFIG_FILE, args.log_level, - args.log_file, + (Path(args.log_dir) / SCRIPT_NAME) . with_suffix( ".log" ), + # args.log_file, ) ######################## @@ -141,9 +143,14 @@ # Paths: ############################ INPUT_DIR = Path( args.filename ).resolve().parent -INPUT_PATH_NO_EXT = args.filename +INPUT_PATH = Path( args.filename ) +if INPUT_PATH.suffix == '': + INPUT_PATH = INPUT_PATH.with_suffix( ".tex" ) +elif INPUT_PATH.suffix != ".tex": + raise( Exception( "input file matching '*.tex' expected" ) ) OUTPUT_DIR = Path( args.output_dir ) LATEX_DIR = Path ( args.latex_dir ) +LOG_DIR = Path( args.log_dir ) CONVERT_DIR = OUTPUT_DIR / "CONVERT" # CONVERT_DIR = os.getcwd() + os.path.sep + "CONVERT" @@ -151,7 +158,9 @@ DEBUG_DIR = OUTPUT_DIR / "debug" # where to output the xml file: -XML_FILE = OUTPUT_DIR / (INPUT_PATH_NO_EXT + ".xml") +XML_FILE = (OUTPUT_DIR / INPUT_PATH.name) .with_suffix( ".xml" ) + +BIB2HTML_FILENAME = "temp" ################################################# @@ -461,34 +470,35 @@ def cleanup(): def run_tralics( input_file, TRALICS_PATH_LIB, - TRALICS_LOG_PATH, + log_path, output_dir = OUTPUT_DIR, ): - fixed_tex_file_path = output_dir / Path(input_file).name + fixed_tex_file_path = output_dir / input_file.name libeoaconvert.enable_preamble( input_file, fixed_tex_file_path, "xml" ) # Convert TeX to XML via Tralics - logging.info( f"executing {TRALICS_PATH_EXEC}. log file: {TRALICS_LOG_PATH}" ) + logging.info( f"executing {TRALICS_PATH_EXEC}. log file: {log_path}" ) exec_command( - "{cmd} -log_file {log_file} -confdir {conf_dir}/tralics_conf -config {conf_dir}/tralics.tcf -utf8 -utf8output -output_dir={output_dir} -input_dir={input_dir} -input_file={input_file}".format( + "{cmd} -confdir {conf_dir}/tralics_conf -config {conf_dir}/tralics.tcf -utf8 -utf8output -output_dir={output_dir} -input_dir={input_dir} -input_file={input_file}".format( cmd = TRALICS_PATH_EXEC, - log_file = TRALICS_LOG_PATH, + # log_file = log_filename, conf_dir = TRALICS_PATH_LIB, output_dir = output_dir, - input_dir = output_dir, - input_file = input_file, + input_dir = input_file.parent, + input_file = fixed_tex_file_path, ), + output_to = ToFile( log_path ), ignore_fail = True # :-D ) # .tex -> .xml run_tralics( - input_file = INPUT_PATH_NO_EXT + '.tex', + input_file = INPUT_PATH, TRALICS_PATH_LIB = TRALICS_PATH_LIB, - TRALICS_LOG_PATH = (INPUT_PATH_NO_EXT + "-tralics.log"), + log_path = LOG_DIR / SCRIPT_NAME / (INPUT_PATH.stem + "-tralics.log"), output_dir = OUTPUT_DIR ) @@ -1177,10 +1187,9 @@ def bibl_info_from_xml( # .bib -> .json # (return json data as python dict) def write_json_bibl( - bibl_info, + bib_database, output_file, ): - (bib_type, bib_database) = bibl_info # the new solution: pandoc-citeproc # interim_bib_json_file = INPUT_PATH_NO_EXT + "-bib.json" citeproc_command = "pandoc-citeproc --bib2json %s" % bib_database + ".bib" @@ -1200,9 +1209,8 @@ def write_json_bibl( def add_bibliography_to_xml( print_bibl_element, chapter_element, - bib_database, citations_json, - tmp_citation_filename + formatted_references ): bibliography_keyword = print_bibl_element.get("keyword") if bibliography_keyword: @@ -1239,24 +1247,6 @@ def add_bibliography_to_xml( logging.info( len( citekeys ) ) csl_file = BASE_DIR / CONFIG['Auxiliaries']['CSL_FILE'] - formatted_references = bib2html.main( - bib_file = Path(bib_database).with_suffix( ".bib" ), - citekeys = citekeys, - tex_template = BASE_DIR / "bibformat" / "4ht" / "bibliography4ht.tex", - language = strLanguage, - temp_dir = tmp_citation_filename - ) - - ''' - formatted_references = libeoaconvert.format_citations( - citations_to_format, - bib_database + ".bib", - strLanguage, - tmp_citation_filename, - csl_file - )[0] - ''' - fixed_entries = libeoaconvert.fix_bib_entries(formatted_references) for entry in fixed_entries: xmlBibliographyDiv.append(entry) @@ -1274,8 +1264,8 @@ def add_bibliography_to_xml( logging.info( ".bib -> .json") citations_json = write_json_bibl( - bibl_info, - output_file = TEMP_DIR / (INPUT_PATH_NO_EXT + "-bib.json") + INPUT_DIR / bib_database, + output_file = TEMP_DIR / (INPUT_PATH.stem + "-bib.json") ) ## only for debugging (?) @@ -1290,33 +1280,58 @@ def add_bibliography_to_xml( # If Bibliography-Type is monograph search for EOAbibliography and make it all if bib_type == "monograph": - tmp_citation_filename = TEMP_DIR / "bib2html" / "used_citations-monograph" + # tmp_citation_filename = TEMP_DIR / "bib2html" / tmp if xmlTree.find(".//EOAprintbibliography") is not None: # to insert here: with keywords we can have multiple bibliographies xmlBibliography = xmlTree.find(".//EOAprintbibliography") + citekeys = xmlTree.xpath(".//citekey/text()") + formatted_bibl_info = bib2html.main( + bib_file = (INPUT_DIR / bib_database).with_suffix( ".bib" ), + citekeys = citekeys, + tex_template = BASE_DIR / "bibformat" / "4ht" / "bibliography4ht.tex", + language = strLanguage, + temp_dir = TEMP_DIR / "bib2html" / "monograph-tmp", + output_file = TEMP_DIR / "bib2html" / "used_citations-monograph.html", + log_dir = LOG_DIR / SCRIPT_NAME / "bib2html" + ) + formatted_references = formatted_bibl_info['references'] + + logging.debug( "formatted bibliography:" ) + logging.debug( etree.tostring(formatted_references) ) add_bibliography_to_xml( - xmlBibliography, - xmlTree, - bib_database = bibl_info[1], - citations_json = citations_json, - tmp_citation_filename = tmp_citation_filename + xmlBibliography, + xmlTree, + citations_json, + formatted_references ) # If Bibliography-Type is anthology search for EOAbibliography and make one per chapter elif bib_type == "anthology": for intChapterNumber, xmlChapter in enumerate(xmlChapters, start = 1): logging.debug(f"Looking at chapter {intChapterNumber}.") - tmp_citation_filename = TEMP_DIR / "bib2html" / ("used_citations-anthology-chapter_{:02d}".format(intChapterNumber)) + # tmp_citation_filename = TEMP_DIR / "bib2html" / ("used_citations-anthology-chapter_{:02d}".format(intChapterNumber)) if xmlChapter.find(".//EOAprintbibliography") is not None: xmlBibliography = xmlChapter.find(".//EOAprintbibliography") + citekeys = xmlChapter.xpath(".//citekey/text()") + formatted_bibl_info = bib2html.main( + bib_file = (INPUT_DIR / bib_database).with_suffix( ".bib" ), + citekeys = citekeys, + tex_template = BASE_DIR / "bibformat" / "4ht" / "bibliography4ht.tex", + language = strLanguage, + temp_dir = TEMP_DIR / "bib2html" / "chapter_{:02d}-tmp".format( intChapterNumber ), + output_file = TEMP_DIR / "bib2html" / "used_citations-anthology-chapter_{:02d}.html".format( intChapterNumber ), + log_dir = LOG_DIR / SCRIPT_NAME / "bib2html" + ) + formatted_citations = formatted_bibl_info['references'] + logging.debug( "formatted bibliography:" ) + logging.debug( etree.tostring(formatted_references) ) add_bibliography_to_xml( - xmlBibliography, - xmlChapter, - bib_database = bibl_info[1], - citations_json = citations_json, - tmp_citation_filename = tmp_citation_filename + xmlBibliography, + xmlChapter, + citations_json, + formatted_references ) else: @@ -1346,7 +1361,7 @@ def add_bibliography_to_xml( if bib_type == "monograph": tmp_citation_filename = "used_citations-monograph" - tmp_path_html = TEMP_DIR / (tmp_citation_filename + ".html") + tmp_path_html = (TEMP_DIR / "bib2html" / tmp_citation_filename) .with_suffix( ".html" ) with open(tmp_path_html, "r") as formatted_citations: form_cit = BeautifulSoup(formatted_citations, "html.parser") @@ -1357,15 +1372,21 @@ def add_bibliography_to_xml( if bib_type == "anthology": tmp_citation_filename = "used_citations-anthology-chapter_{:02d}".format(intChapterNumber) - tmp_path_html = TEMP_DIR / (tmp_citation_filename + ".html") - no_cite_path = TEMP_DIR / (tmp_citation_filename + "_nocitations") + tmp_path_html = (TEMP_DIR / "bib2html" / tmp_citation_filename / BIB2HTML_FILENAME) .with_suffix( ".html" ) + # no_cite_path = TEMP_DIR / "bib2html" / (tmp_citation_filename + "_nocitations") if os.path.exists(tmp_path_html): with open(tmp_path_html, "r") as formatted_citations: form_cit = BeautifulSoup(formatted_citations, "html.parser") + else: + logging.debug("no citations in this chapter") + intChapterNumber += 1 + continue + ''' elif os.path.exists(no_cite_path): logging.debug("no citations in this chapter") intChapterNumber += 1 continue + ''' counter_citations = 1 @@ -1440,7 +1461,8 @@ def add_bibliography_to_xml( # [1:-1] to remove parentheses around citations try: - citeauthoryear_value = form_cit.select("#citeauthoryear ~ p > span[data-cites='%s']" % string_citekey)[0].text[1:-1] + citeauthoryear_value = form_cit.select("#citeauthoryear ~ p > span[data-cites='%s']" % string_citekey)[0].text + # citeauthoryear_value = form_cit.select("#citeauthoryear ~ p > span[data-cites='%s']" % string_citekey)[0].text[1:-1] except IndexError: logging.error("Could not find {}. Exiting.".format(string_citekey)) sys.exit() @@ -1461,6 +1483,7 @@ def add_bibliography_to_xml( # strCitation = tmp_string3.replace("<", "<") else: strCitation = xmlCitation.find("citetext").text + logging.info( "formatted citation: {}".format( strCitation ) ) if xmlCitation.find("./page") is not None and xmlCitation.find("./page").text is not None: pages_text = libeoaconvert.gettext(xmlCitation.find("./page")) @@ -1713,8 +1736,7 @@ def add_bibliography_to_xml( pickle.dump(data_to_pickle, f, pickle.HIGHEST_PROTOCOL) grep_command = "grep -A1 -B2 'argument of \\\EOAfn' {}".format( - # INPUT_PATH_NO_EXT - OUTPUT_DIR / (INPUT_PATH_NO_EXT + "-tralics.log") + LOG_DIR / SCRIPT_NAME / (INPUT_PATH.stem + "-tralics.log") ) grep_command_arguments = shlex.split(grep_command) grep_result = subprocess.Popen(grep_command_arguments, stdout=subprocess.PIPE) diff --git a/utils/bib2html.py b/utils/bib2html.py index 7fadf0b..6865d5e 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -9,12 +9,15 @@ __date__ = "20190313" __author__ = "kthoden@mpiwg-berlin.mpg.de" +from utils.load_config import exec_command, ToFile, ToLog + import argparse import os import subprocess import shlex import logging import string +import shutil from lxml import etree from pathlib import Path @@ -102,9 +105,25 @@ def write_dummy_latex( # def write_dummy_latex ends here -def run_htlatex(tmp_filename): +def run_htlatex( + tmp_filename, + log_dir +): """Create HTML file from temporary LaTeX file""" + exec_command( + f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", + output_to = ToFile( Path(log_dir) / "htlatex1.log" ) + ) + exec_command( + f"biber {tmp_filename}", + output_to = ToFile( Path(log_dir) / "biber.log" ) + ) + exec_command( + f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", + output_to = ToFile( Path(log_dir) / "htlatex2.log" ) + ) +''' command = f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'" arguments = shlex.split(command) logging.info("Using external command htlatex with command %s" % command) @@ -119,8 +138,71 @@ def run_htlatex(tmp_filename): arguments = shlex.split(command) logging.info("Using external command htlatex with command %s" % command) subprocess.call(arguments) + ''' # def run_htlatex ends here +def create_citations(citekeys, xml_tree, style): + """Create citations""" + + if style in ["authoryear", "year"]: + pass + else: + logging.error("Unrecognized citation format, choose 'authoryear' or 'year'. Exiting") + sys.exit() + + surrounding_div = etree.fromstring(f"

cite{style}

") + + p_element = etree.Element("p") + + for citekey in citekeys: + ligated_citekey = fix_citekey(citekey) + if style == "authoryear": + format_citation = xml_tree.xpath(f"//x:h4[text() = '{ligated_citekey}']/following-sibling::x:p[2]/text()", namespaces=NS_MAP)[0].strip() + else: + format_citation = xml_tree.xpath(f"//x:h4[text() = '{ligated_citekey}']/following-sibling::x:p[3]/text()", namespaces=NS_MAP)[0].strip() + span_element = etree.fromstring(f"""{format_citation}""") + # logging.debug(citekey, ligated_citekey) + + p_element.append(span_element) + + surrounding_div.insert(1, p_element) + + return(surrounding_div) +# def create_citations ends here + + +def fix_citekey(citekey): + """Remove ligatures from citekey""" + + replacements = { + "ff" : "ff", + } + + for replacement in replacements.keys(): + ligated_citekey = citekey.replace(replacement, replacements[replacement]) + + return ligated_citekey +# def fix_citekey ends here + + +def create_reference_list(reference_list): + """Create HTML snippet for list of references""" + + entries = reference_list.xpath(f"x:dt", namespaces=NS_MAP) + + reference_div = etree.fromstring("""
""") + + for entry in entries: + entry_citekey = entry.get("id").replace("X0-", "") + reference_string = entry.xpath(f"following-sibling::x:dd[1]/x:p", namespaces=NS_MAP)[0] + formatted_reference = transform_reference(reference_string) + wrapper_div = etree.fromstring(f"""
""") + wrapper_div.append(formatted_reference) + reference_div.append(wrapper_div) + + return reference_div +# def create_reference_list ends here + def main( bib_file, @@ -128,14 +210,19 @@ def main( tex_template, language, temp_dir, - tmp_filename = "temp" + output_file, + # tmp_filename = "temp", + log_dir = "logs" ): temp_dir = Path( temp_dir ) - tmp_filename = Path( tmp_filename ) + output_file = Path( output_file ) + # tmp_filename = Path( tmp_filename ) if not temp_dir.exists(): os.makedirs( temp_dir ) + tmp_filename = Path(output_file.name) . with_suffix( "" ) + write_dummy_latex( citekeys, bib_file, @@ -145,27 +232,40 @@ def main( ) wd = Path.cwd() + log_dir = log_dir.resolve() os.chdir( temp_dir ) - run_htlatex(tmp_filename) + run_htlatex( + tmp_filename . with_suffix( "" ), + # tmp_filename, + log_dir = log_dir + ) os.chdir( wd ) - tmp_path_html = (temp_dir / tmp_filename).with_suffix( ".html" ) + tmp_path_html = temp_dir / tmp_filename . with_suffix( ".html" ) + xml_tree = etree.parse(str(tmp_path_html)) - xml_tree = etree.parse( str(tmp_path_html) ) + citation_authoryear = create_citations(citekeys, xml_tree, "authoryear") + citation_year = create_citations(citekeys, xml_tree, "year") reference_list = xml_tree.xpath(f"//x:dl[@class='thebibliography']", namespaces=NS_MAP)[0] - entries = reference_list.xpath(f"x:dt", namespaces=NS_MAP) + reference_div = create_reference_list(reference_list) - reference_div = etree.fromstring("""
""") + html_element = etree.Element("html") + html_element.insert(0, citation_authoryear) + html_element.insert(1, citation_year) + html_element.insert(2, reference_div) - for entry in entries: - entry_citekey = entry.get("id").replace("X0-", "") - reference_string = entry.xpath(f"following-sibling::x:dd[1]/x:p", namespaces=NS_MAP)[0] - formatted_reference = transform_reference(reference_string) - wrapper_div = etree.fromstring(f"""
""") - wrapper_div.append(formatted_reference) - reference_div.append(wrapper_div) - return reference_div + # print(etree.tostring(html_element)) + + tree = etree.ElementTree(html_element) + logging.info("writing '%s'" % output_file) + tree.write(str(output_file), pretty_print=True, xml_declaration=True, encoding="utf-8") + + return { + "references": reference_div, + "citation_authoryear": citation_authoryear, + "citation_year": citation_year, + } """

References

diff --git a/utils/libeoaconvert.py b/utils/libeoaconvert.py index 5b12bd5..6ffdd92 100644 --- a/utils/libeoaconvert.py +++ b/utils/libeoaconvert.py @@ -3,6 +3,8 @@ """A collection of functions for the different conversion steps""" +from utils.load_config import exec_command, ToLog, ToFile + import os import sys import subprocess @@ -211,7 +213,8 @@ def format_citations( bibdata, language, tmp_filename, - csl_file + csl_file, + log_to = ToLog ): """Return a formatted xmlstring of the used citations""" @@ -237,10 +240,10 @@ def format_citations( # citation_formatter.write("@%s\n" % entry) citation_formatter.write("\n# References\n") - command = "pandoc -o %s -t html --filter=pandoc-citeproc --bibliography=%s --csl=%s %s" % (tmp_path_html, bibdata, csl_file, tmp_path_md) - arguments = shlex.split(command) - logging.info("Using external command pandoc with command %s" % command) - subprocess.call(arguments) + exec_command( + f"pandoc -o {tmp_path_html} -t html --filter=pandoc-citeproc --bibliography={bibdata} --csl={csl_file} {tmp_path_md}", + output_to = log_to + ) with open(tmp_path_html, "r") as ding: dd = soupparser.fromstring(ding, features="html.parser") diff --git a/utils/load_config.py b/utils/load_config.py index bf396b9..32fe0e1 100644 --- a/utils/load_config.py +++ b/utils/load_config.py @@ -47,8 +47,16 @@ def exec_command( arguments = shlex.split(command) if isinstance( output_to, ToFile ): + log_file = Path( output_to.filename ) + log_dir = log_file.resolve().parent + logging.log( + getattr(logging,log_level), + f"logfile '{log_file}'", + ) + if not (log_dir.exists() and log_dir.is_dir()): + os.makedirs( log_dir ) stdout_file = open( output_to.filename, "w") - if isinstance( output_to, ToLog ): + elif isinstance( output_to, ToLog ): stdout_file = PIPE else: stdout_file = None From 0c6361e52cd21c84b71798583a828d7e54cb3e5d Mon Sep 17 00:00:00 2001 From: EsGeh Date: Wed, 10 Apr 2019 12:56:56 +0200 Subject: [PATCH 013/132] depend on later version of python "lxml" library --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 36a792e..5ddeaf3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -lxml==3.8.0 +lxml==4.3.3 beautifulsoup4==4.7.1 bibtexparser==1.1.0 bs4==0.0.1 From 8ebc766c9b443ed985d4ca83ecf74b83f551aa4a Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 11 Apr 2019 15:30:59 +0200 Subject: [PATCH 014/132] refactoring: split code into seperate functions. --- eoatex2imxml.py | 1266 ++++++++++++++++++++++++----------------------- 1 file changed, 656 insertions(+), 610 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index ca87550..12ef882 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -520,654 +520,612 @@ def fix_underscore_and_eoatranscripted( xml_file = XML_FILE ) -# Complete XML-Document in xmlTree -xmlParser = etree.XMLParser(no_network=False,load_dtd=True) #resolve_entities=False -xmlTree = etree.parse(str(XML_FILE), xmlParser) -xmlChapters = xmlTree.findall("//div1") +def parseXML( input_file ): + # Complete XML-Document in xmlTree + xmlParser = etree.XMLParser(no_network=False,load_dtd=True) #resolve_entities=False + xmlTree = etree.parse(str(input_file), xmlParser) + # Cleanup of not needed tags in advance. To be cleaned: + etree.strip_elements(xmlTree, with_tail=False, *['error']) + return xmlTree + +def xmltrans_move_eoalanguage( xmlChapters ): + for intChapterNumber, xmlChapter in enumerate(xmlChapters, start=1): + xmlLanguage = xmlChapter.find(".//EOAlanguage") + if xmlLanguage is not None: + strLanguage = xmlLanguage.text or "english" + xmlChapter.set("language", strLanguage) + xmlLanguage.text = None + logging.info("The language of Chapter %d is %s." % (intChapterNumber, strLanguage)) + xmlChapter = etree.strip_tags(xmlChapter, "EOAlanguage") -# Cleanup of not needed tags in advance. To be cleaned: -etree.strip_elements(xmlTree, with_tail=False, *['error']) - -logging.info("-----------------------------------------------------") -logging.info("Move EOAlanguage from into attribute of EOAchapter") -for intChapterNumber, xmlChapter in enumerate(xmlChapters, start=1): - xmlLanguage = xmlChapter.find(".//EOAlanguage") - if xmlLanguage is not None: - strLanguage = xmlLanguage.text or "english" - xmlChapter.set("language", strLanguage) - xmlLanguage.text = None - logging.info("The language of Chapter %d is %s." % (intChapterNumber, strLanguage)) - xmlChapter = etree.strip_tags(xmlChapter, "EOAlanguage") ############################################################## # Numbering and Typesetting various Elements # ############################################################## # Figure out how to number (like essay or regular) -try: - strSerie = xmlTree.find(".//EOAseries").text or "regular" -except AttributeError: - logging.error("\n\nYou are most probably using the preamble for the PDF output. Exiting.") - sys.exit() - -if strSerie == "Essay": - strNumberingType = "essay" -else: - strNumberingType = "regular" - -# Dictionaries containing UIDs and Numbers -dictChapters = {} -dictFigures = {} -dictEquations = {} -dictSections = {} -dictFootnotes = {} -dictPagelabels = {} -dictTables = {} -dictLists = {} -dictTheorems = {} - -set_citations = set() +def get_series( xmlTree ): + try: + return (xmlTree.find(".//EOAseries").text or "regular") + except AttributeError: + logging.error("\n\nYou are most probably using the preamble for the PDF output. Exiting.") + sys.exit() -logging.info("-----------------------------------------------------") -logging.info("Numbering Chapters") -Chapternumber = 1 -for xmlChapter in xmlChapters: - if xmlChapter.get('rend') != "nonumber": - Chapteruid = xmlChapter.get('id') - dictChapters[Chapteruid] = str(Chapternumber) - Chapternumber += 1 +def number_chapters( xmlChapters ): + dictChapters = {} + Chapternumber = 1 + for xmlChapter in xmlChapters: + if xmlChapter.get('rend') != "nonumber": + Chapteruid = xmlChapter.get('id') + dictChapters[Chapteruid] = str(Chapternumber) + Chapternumber += 1 + return dictChapters # EOAequation, EOAsubequation and EOAequationarray Numbering per Chapter -intChapterNumber = 1 -logging.info("-----------------------------------------------------") -logging.info("Processing .//EOAequation | .//EOAequationarray | .//EOAsubequations") -for xmlChapter in xmlChapters: - intEquationnumber = 1 - xmlDinge = xmlChapter.xpath(".//EOAequation | .//EOAequationarray | .//EOAsubequations") - logging.info("Working on Chapter %d which contains %d formulæ." % (intChapterNumber, len(xmlDinge))) - for xmlDing in xmlDinge: - if xmlDing.tag == "EOAequationarray": - # tmpNumberinArray is only being used for filename - tmpNumberinArray = intEquationnumber - # tmpDictNumberLabel used to insert the attribute value into - tmpDictNumberLabel = {} - # Numbering is being done by -Tags - xmlMathmlrows = xmlDing.findall(".//{http://www.w3.org/1998/Math/MathML}mtr") - for xmlMathmlrow in xmlMathmlrows: - if "Label" in xmlMathmlrow.attrib: - # Label dem Dictionary für die Euqations hinzufügen +def process_equations( xmlChapters, dictChapters, strNumberingType): + dictEquations = {} + for intChapterNumber, xmlChapter in enumerate(xmlChapters, start=1): + intEquationnumber = 1 + xmlDinge = xmlChapter.xpath(".//EOAequation | .//EOAequationarray | .//EOAsubequations") + logging.info("Working on Chapter %d which contains %d formulæ." % (intChapterNumber, len(xmlDinge))) + for xmlDing in xmlDinge: + if xmlDing.tag == "EOAequationarray": + # tmpNumberinArray is only being used for filename + tmpNumberinArray = intEquationnumber + # tmpDictNumberLabel used to insert the attribute value into + tmpDictNumberLabel = {} + # Numbering is being done by -Tags + xmlMathmlrows = xmlDing.findall(".//{http://www.w3.org/1998/Math/MathML}mtr") + for xmlMathmlrow in xmlMathmlrows: + if "Label" in xmlMathmlrow.attrib: + # Label dem Dictionary für die Euqations hinzufügen + if xmlChapter.get("rend") != "nonumber": + dictEquations[xmlMathmlrow.get("Label")] = str(dictChapters[xmlChapter.get('id')]) + "." + str(intEquationnumber) + tmpDictNumberLabel[str(dictChapters[xmlChapter.get('id')]) + "." + str(intEquationnumber)] = xmlMathmlrow.get("Label") + if xmlChapter.get("rend") == "nonumber": + dictEquations[xmlMathmlrow.get("Label")] = str(intEquationnumber) + tmpDictNumberLabel[str(intEquationnumber)] = xmlMathmlrow.get("Label") + intEquationnumber += 1 + xmlRohTeX = xmlDing.find(".//texmath") + xmlNew = etree.Element('EOAequationarray') + # Blank lines need to be removed otherwise TeX won't work + textSourcecode = os.linesep.join([s for s in xmlRohTeX.text.splitlines() if s]) + # \rowattributeunknown has to be deleted, its an artefact + textSourcecode = re.sub("\\\\rowattributeunknown", "", textSourcecode) + # Push Down loop to parse the raw code + textFormel = "" + boolBackslash = False + for Buchstabe in textSourcecode: + if Buchstabe == "\n": + continue + if Buchstabe == "\\": + if boolBackslash == False: + textFormel += Buchstabe + boolBackslash = True + continue + if boolBackslash == True: + textFormel += Buchstabe + str_latexcode = TeX2PNG(textFormel, "EOAequationarray", str(intChapterNumber), str(tmpNumberinArray)) + if xmlChapter.get("rend") != "nonumber": + tmpXML = etree.Element("EOAequation", filename=("EOAequationarray" + "_" + str(intChapterNumber) + "_" + str(tmpNumberinArray) + ".png"), number=(str(dictChapters[xmlChapter.get('id')]) + "." + str(tmpNumberinArray))) + if xmlChapter.get("rend") == "nonumber": + tmpXML = etree.Element("EOAequation", filename=("EOAequationarray" + "_" + str(intChapterNumber) + "_" + str(tmpNumberinArray) + ".png"), number=(str(tmpNumberinArray))) + tmpXML.set("TeX", str_latexcode) + # Put Label into EOAequation + if xmlChapter.get("rend") != "nonumber": + strTempKey = str(dictChapters[xmlChapter.get('id')]) + "." + str(tmpNumberinArray) + if xmlChapter.get("rend") == "nonumber": + strTempKey = str(tmpNumberinArray) + if strTempKey in tmpDictNumberLabel: + #tmpXML.set("label", tmpDictNumberLabel[(str(dictChapters[xmlChapter.get('id')]) + "." + str(tmpNumberinArray))]) + tmpXML.set("label", tmpDictNumberLabel[strTempKey]) + xmlNew.append(tmpXML) + textFormel = "" + boolBackslash = False + tmpNumberinArray += 1 + continue + if Buchstabe != "\\": + textFormel += Buchstabe + boolBackslash = False + # Typeset last equation + str_latexcode = TeX2PNG(textFormel, "EOAequationarray", str(intChapterNumber), str(tmpNumberinArray)) + if xmlChapter.get("rend") != "nonumber": + tmpXML = etree.Element("EOAequation", filename=("EOAequationarray" + "_" + str(intChapterNumber) + "_" + str(tmpNumberinArray) + ".png"), number=(dictChapters[xmlChapter.get('id')] + "." + str(tmpNumberinArray))) + if xmlChapter.get("rend") == "nonumber": + tmpXML = etree.Element("EOAequation", filename=("EOAequationarray" + "_" + str(intChapterNumber) + "_" + str(tmpNumberinArray) + ".png"), number=(str(tmpNumberinArray))) + tmpXML.set("TeX", str_latexcode) + # Put Label into EOAequation + if xmlChapter.get("rend") != "nonumber": + strTempKey = str(dictChapters[xmlChapter.get('id')]) + "." + str(tmpNumberinArray) + if xmlChapter.get("rend") == "nonumber": + strTempKey = str(tmpNumberinArray) + if strTempKey in tmpDictNumberLabel: + logging.info(strTempKey) + logging.info(tmpDictNumberLabel) + logging.info(dictChapters) + tmpXML.set("label", tmpDictNumberLabel[strTempKey]) + xmlNew.append(tmpXML) + xmlDing.getparent().replace(xmlDing, xmlNew) + # enclosing

-Tag of the Subequations is not wanted, transformed to to be deleted later on + #xmlNew.getparent().tag = "temp" + continue + if xmlDing.tag == "EOAsubequations": + # Enclosing

-Tag of the EOAsubequations needs to be removed + xmlDing.getparent().tag = "temp" + xmlSubequations = xmlDing.findall('.//EOAequation') + listCharacters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] + tmpI = 0 + # Insert Number of this Subequation into dictEquations + xmlAnchor = xmlDing.find(".//anchor") + logging.info(xmlAnchor) + if xmlChapter.get("rend") != "nonumber": + dictEquations[xmlAnchor.get('id')] = dictChapters[xmlChapter.get('id')] + "." + str(intEquationnumber) + if xmlChapter.get("rend") == "nonumber": + dictEquations[xmlAnchor.get('id')] = str(intEquationnumber) + # Delete anchor + xmlAnchor.getparent().remove(xmlAnchor) + for xmlSubequation in xmlSubequations: + # Enclosing

-Tag of the EOAsubequation needs to be removed + #xmlSubequation.getparent().tag = "temp" + # Numbering Subequations with characters + strSubequationNumber = str(intEquationnumber) + listCharacters[tmpI] + tmpI += 1 + textSourcecode = xmlSubequation.find('.//texmath').text + # Blank lines need to be removed otherwise TeX won't work + textSourcecode = os.linesep.join([s for s in textSourcecode.splitlines() if s]) + str_latexcode = TeX2PNG(textSourcecode, "EOAequation", str(intChapterNumber), strSubequationNumber) + xmlAnchor = xmlSubequation.find(".//anchor") + # Clear Equation + xmlSubequation.clear() if xmlChapter.get("rend") != "nonumber": - dictEquations[xmlMathmlrow.get("Label")] = str(dictChapters[xmlChapter.get('id')]) + "." + str(intEquationnumber) - tmpDictNumberLabel[str(dictChapters[xmlChapter.get('id')]) + "." + str(intEquationnumber)] = xmlMathmlrow.get("Label") + xmlSubequation.set("filename", "EOAequation" + "_" + str(intChapterNumber) + "_" + strSubequationNumber + ".png") + xmlSubequation.set("number", dictChapters[xmlChapter.get('id')] + "." + strSubequationNumber) + xmlSubequation.set("uid", xmlAnchor.get('id')) if xmlChapter.get("rend") == "nonumber": - dictEquations[xmlMathmlrow.get("Label")] = str(intEquationnumber) - tmpDictNumberLabel[str(intEquationnumber)] = xmlMathmlrow.get("Label") + xmlSubequation.set("filename", "EOAequation" + "_" + str(intChapterNumber) + "_" + strSubequationNumber + ".png") + xmlSubequation.set("number", strSubequationNumber) + xmlSubequation.set("uid", xmlAnchor.get('id')) + xmlSubequation.set("id", xmlAnchor.get('id')) + xmlSubequation.set("TeX", str_latexcode) + # Insert Number of this Equation into dictEquations + if strNumberingType == "regular": + dictEquations[xmlAnchor.get('id')] = str(dictChapters[xmlChapter.get('id')]) + "." + strSubequationNumber + if strNumberingType == "essay": + dictEquations[xmlAnchor.get('id')] = strSubequationNumber + # TODO: Anchor direkt unter Subequation aufheben, und der ersten Equation zuordnen, so dass auf 8.16 bei 8.16a und 8.16b verlinkt werden kann + xmlDing.tag = "temp" + # enclosing

-Tag of the Subequations is not wanted, transformed to to be deleted later on + #xmlDing.getparent().tag = "temp" intEquationnumber += 1 - xmlRohTeX = xmlDing.find(".//texmath") - xmlNew = etree.Element('EOAequationarray') - # Blank lines need to be removed otherwise TeX won't work - textSourcecode = os.linesep.join([s for s in xmlRohTeX.text.splitlines() if s]) - # \rowattributeunknown has to be deleted, its an artefact - textSourcecode = re.sub("\\\\rowattributeunknown", "", textSourcecode) - # Push Down loop to parse the raw code - textFormel = "" - boolBackslash = False - for Buchstabe in textSourcecode: - if Buchstabe == "\n": + continue + if xmlDing.tag == "EOAequation": + # Check, if Equation has already been found in a Subeqation + xmlAnchor = xmlDing.find("anchor") + if xmlAnchor == None: continue - if Buchstabe == "\\": - if boolBackslash == False: - textFormel += Buchstabe - boolBackslash = True - continue - if boolBackslash == True: - textFormel += Buchstabe - str_latexcode = TeX2PNG(textFormel, "EOAequationarray", str(intChapterNumber), str(tmpNumberinArray)) - if xmlChapter.get("rend") != "nonumber": - tmpXML = etree.Element("EOAequation", filename=("EOAequationarray" + "_" + str(intChapterNumber) + "_" + str(tmpNumberinArray) + ".png"), number=(str(dictChapters[xmlChapter.get('id')]) + "." + str(tmpNumberinArray))) - if xmlChapter.get("rend") == "nonumber": - tmpXML = etree.Element("EOAequation", filename=("EOAequationarray" + "_" + str(intChapterNumber) + "_" + str(tmpNumberinArray) + ".png"), number=(str(tmpNumberinArray))) - tmpXML.set("TeX", str_latexcode) - # Put Label into EOAequation - if xmlChapter.get("rend") != "nonumber": - strTempKey = str(dictChapters[xmlChapter.get('id')]) + "." + str(tmpNumberinArray) - if xmlChapter.get("rend") == "nonumber": - strTempKey = str(tmpNumberinArray) - if strTempKey in tmpDictNumberLabel: - #tmpXML.set("label", tmpDictNumberLabel[(str(dictChapters[xmlChapter.get('id')]) + "." + str(tmpNumberinArray))]) - tmpXML.set("label", tmpDictNumberLabel[strTempKey]) - xmlNew.append(tmpXML) - textFormel = "" - boolBackslash = False - tmpNumberinArray += 1 - continue - if Buchstabe != "\\": - textFormel += Buchstabe - boolBackslash = False - # Typeset last equation - str_latexcode = TeX2PNG(textFormel, "EOAequationarray", str(intChapterNumber), str(tmpNumberinArray)) - if xmlChapter.get("rend") != "nonumber": - tmpXML = etree.Element("EOAequation", filename=("EOAequationarray" + "_" + str(intChapterNumber) + "_" + str(tmpNumberinArray) + ".png"), number=(dictChapters[xmlChapter.get('id')] + "." + str(tmpNumberinArray))) - if xmlChapter.get("rend") == "nonumber": - tmpXML = etree.Element("EOAequation", filename=("EOAequationarray" + "_" + str(intChapterNumber) + "_" + str(tmpNumberinArray) + ".png"), number=(str(tmpNumberinArray))) - tmpXML.set("TeX", str_latexcode) - # Put Label into EOAequation - if xmlChapter.get("rend") != "nonumber": - strTempKey = str(dictChapters[xmlChapter.get('id')]) + "." + str(tmpNumberinArray) - if xmlChapter.get("rend") == "nonumber": - strTempKey = str(tmpNumberinArray) - if strTempKey in tmpDictNumberLabel: - logging.info(strTempKey) - logging.info(tmpDictNumberLabel) - logging.info(dictChapters) - tmpXML.set("label", tmpDictNumberLabel[strTempKey]) - xmlNew.append(tmpXML) - xmlDing.getparent().replace(xmlDing, xmlNew) - # enclosing

-Tag of the Subequations is not wanted, transformed to to be deleted later on - #xmlNew.getparent().tag = "temp" - continue - if xmlDing.tag == "EOAsubequations": - # Enclosing

-Tag of the EOAsubequations needs to be removed - xmlDing.getparent().tag = "temp" - xmlSubequations = xmlDing.findall('.//EOAequation') - listCharacters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] - tmpI = 0 - # Insert Number of this Subequation into dictEquations - xmlAnchor = xmlDing.find(".//anchor") - logging.info(xmlAnchor) - if xmlChapter.get("rend") != "nonumber": - dictEquations[xmlAnchor.get('id')] = dictChapters[xmlChapter.get('id')] + "." + str(intEquationnumber) - if xmlChapter.get("rend") == "nonumber": - dictEquations[xmlAnchor.get('id')] = str(intEquationnumber) - # Delete anchor - xmlAnchor.getparent().remove(xmlAnchor) - for xmlSubequation in xmlSubequations: - # Enclosing

-Tag of the EOAsubequation needs to be removed - #xmlSubequation.getparent().tag = "temp" - # Numbering Subequations with characters - strSubequationNumber = str(intEquationnumber) + listCharacters[tmpI] - tmpI += 1 - textSourcecode = xmlSubequation.find('.//texmath').text + if xmlAnchor.get('id') in dictEquations: + continue + if xmlDing.find('.//texmath') is not None: + textSourcecode = xmlDing.find('.//texmath').text + else: + textSourcecode = xmlDing.text # Blank lines need to be removed otherwise TeX won't work textSourcecode = os.linesep.join([s for s in textSourcecode.splitlines() if s]) - str_latexcode = TeX2PNG(textSourcecode, "EOAequation", str(intChapterNumber), strSubequationNumber) - xmlAnchor = xmlSubequation.find(".//anchor") - # Clear Equation - xmlSubequation.clear() + str_latexcode = TeX2PNG(textSourcecode, "EOAequation", intChapterNumber, intEquationnumber) + #print ("Got:") + #print (str_latexcode) if xmlChapter.get("rend") != "nonumber": - xmlSubequation.set("filename", "EOAequation" + "_" + str(intChapterNumber) + "_" + strSubequationNumber + ".png") - xmlSubequation.set("number", dictChapters[xmlChapter.get('id')] + "." + strSubequationNumber) - xmlSubequation.set("uid", xmlAnchor.get('id')) + xmlDing.set("filename", "EOAequation" + "_" + str(intChapterNumber) + "_" + str(intEquationnumber) + ".png") + xmlDing.set("number", dictChapters[xmlChapter.get('id')] + "." + str(intEquationnumber)) + xmlDing.set("uid", xmlAnchor.get('id')) if xmlChapter.get("rend") == "nonumber": - xmlSubequation.set("filename", "EOAequation" + "_" + str(intChapterNumber) + "_" + strSubequationNumber + ".png") - xmlSubequation.set("number", strSubequationNumber) - xmlSubequation.set("uid", xmlAnchor.get('id')) - xmlSubequation.set("id", xmlAnchor.get('id')) - xmlSubequation.set("TeX", str_latexcode) + xmlDing.set("filename", "EOAequation" + "_" + str(intChapterNumber) + "_" + str(intEquationnumber) + ".png") + xmlDing.set("number", str(intEquationnumber)) + xmlDing.set("uid", xmlAnchor.get('id')) + xmlDing.set("id", xmlAnchor.get('id')) + xmlDing.set("TeX", str_latexcode) + #xmlDing.getparent().replace(xmlDing, xmlNew) # Insert Number of this Equation into dictEquations if strNumberingType == "regular": - dictEquations[xmlAnchor.get('id')] = str(dictChapters[xmlChapter.get('id')]) + "." + strSubequationNumber + dictEquations[xmlAnchor.get('id')] = \ + str(dictChapters[xmlChapter.get('id')]) + "." + str(intEquationnumber) if strNumberingType == "essay": - dictEquations[xmlAnchor.get('id')] = strSubequationNumber - # TODO: Anchor direkt unter Subequation aufheben, und der ersten Equation zuordnen, so dass auf 8.16 bei 8.16a und 8.16b verlinkt werden kann - xmlDing.tag = "temp" - # enclosing

-Tag of the Subequations is not wanted, transformed to to be deleted later on - #xmlDing.getparent().tag = "temp" - intEquationnumber += 1 - continue - if xmlDing.tag == "EOAequation": - # Check, if Equation has already been found in a Subeqation - xmlAnchor = xmlDing.find("anchor") - if xmlAnchor == None: + dictEquations[xmlAnchor.get('id')] = str(intEquationnumber) + intEquationnumber += 1 continue - if xmlAnchor.get('id') in dictEquations: + +def process_unnumbered_equations( xmlChapters ): + for intChapterNumber, xmlChapter in enumerate(xmlChapters, start=1): + tempImagenumber = 1 + xmlDinge = xmlChapter.xpath(".//EOAequationnonumber | .//EOAequationarraynonumber") + logging.info("Working on Chapter %d which contains %d formulæ." % (intChapterNumber, len(xmlDinge))) + # print ("Working on Chapter " + str(intChapterNumber)) + # print ("Es wurden " + str(len(xmlDinge)) + " Formeln gefunden") + for xmlDing in xmlDinge: + if xmlDing.tag == "EOAequationarraynonumber": + if xmlDing.find(".//texmath") is not None: + textSourcecode = xmlDing.find(".//texmath").text + else: + textSourcecode = xmlDing.text + xmlNew = etree.Element('EOAequationarraynonumber') + # Blank lines need to be removed otherwise TeX won't work + textSourcecode = os.linesep.join([s for s in textSourcecode.splitlines() if s]) + # \rowattributeunknown has to be deleted, its an artefact + textSourcecode = re.sub("\\\\rowattributeunknown", "", textSourcecode) + # TODO: HIer überprüfen, ob und inwiefern es ausreichend ist, EOAequationarraynonumber in eine Grafik zu packen + str_latexcode = TeX2PNG(textSourcecode, "EOAequationarraynonumber", str(intChapterNumber), str(tempImagenumber)) + xmlNew = etree.Element("EOAequationnonumber", filename=("EOAequationarraynonumber" + "_" + str(intChapterNumber) + "_" + str(tempImagenumber) + ".png")) + xmlNew.set("TeX", str_latexcode) + xmlDing.getparent().replace(xmlDing, xmlNew) + tempImagenumber += 1 continue - if xmlDing.find('.//texmath') is not None: - textSourcecode = xmlDing.find('.//texmath').text - else: - textSourcecode = xmlDing.text - # Blank lines need to be removed otherwise TeX won't work - textSourcecode = os.linesep.join([s for s in textSourcecode.splitlines() if s]) - str_latexcode = TeX2PNG(textSourcecode, "EOAequation", intChapterNumber, intEquationnumber) - #print ("Got:") - #print (str_latexcode) - if xmlChapter.get("rend") != "nonumber": - xmlDing.set("filename", "EOAequation" + "_" + str(intChapterNumber) + "_" + str(intEquationnumber) + ".png") - xmlDing.set("number", dictChapters[xmlChapter.get('id')] + "." + str(intEquationnumber)) - xmlDing.set("uid", xmlAnchor.get('id')) - if xmlChapter.get("rend") == "nonumber": - xmlDing.set("filename", "EOAequation" + "_" + str(intChapterNumber) + "_" + str(intEquationnumber) + ".png") - xmlDing.set("number", str(intEquationnumber)) - xmlDing.set("uid", xmlAnchor.get('id')) - xmlDing.set("id", xmlAnchor.get('id')) - xmlDing.set("TeX", str_latexcode) - #xmlDing.getparent().replace(xmlDing, xmlNew) - # Insert Number of this Equation into dictEquations - if strNumberingType == "regular": - dictEquations[xmlAnchor.get('id')] = \ - str(dictChapters[xmlChapter.get('id')]) + "." + str(intEquationnumber) - if strNumberingType == "essay": - dictEquations[xmlAnchor.get('id')] = str(intEquationnumber) - intEquationnumber += 1 - continue - intChapterNumber += 1 - -intChapterNumber = 1 -logging.info("-----------------------------------------------------") -logging.info("Processing .//EOAequationnonumber | .//EOAequationarraynonumber") -for xmlChapter in xmlChapters: - tempImagenumber = 1 - xmlDinge = xmlChapter.xpath(".//EOAequationnonumber | .//EOAequationarraynonumber") - logging.info("Working on Chapter %d which contains %d formulæ." % (intChapterNumber, len(xmlDinge))) - # print ("Working on Chapter " + str(intChapterNumber)) - # print ("Es wurden " + str(len(xmlDinge)) + " Formeln gefunden") - for xmlDing in xmlDinge: - if xmlDing.tag == "EOAequationarraynonumber": - if xmlDing.find(".//texmath") is not None: - textSourcecode = xmlDing.find(".//texmath").text - else: - textSourcecode = xmlDing.text - xmlNew = etree.Element('EOAequationarraynonumber') - # Blank lines need to be removed otherwise TeX won't work - textSourcecode = os.linesep.join([s for s in textSourcecode.splitlines() if s]) - # \rowattributeunknown has to be deleted, its an artefact - textSourcecode = re.sub("\\\\rowattributeunknown", "", textSourcecode) - # TODO: HIer überprüfen, ob und inwiefern es ausreichend ist, EOAequationarraynonumber in eine Grafik zu packen - str_latexcode = TeX2PNG(textSourcecode, "EOAequationarraynonumber", str(intChapterNumber), str(tempImagenumber)) - xmlNew = etree.Element("EOAequationnonumber", filename=("EOAequationarraynonumber" + "_" + str(intChapterNumber) + "_" + str(tempImagenumber) + ".png")) - xmlNew.set("TeX", str_latexcode) - xmlDing.getparent().replace(xmlDing, xmlNew) - tempImagenumber += 1 - continue - # Push Down loop to parse the raw code (Wird vorerst nicht ausgeführt) - textFormel = "" - boolBackslash = False - for Buchstabe in textSourcecode: - if Buchstabe == "\n": - continue - if Buchstabe == "\\": - if boolBackslash == False: - textFormel += Buchstabe - boolBackslash = True + ''' + # Push Down loop to parse the raw code (Wird vorerst nicht ausgeführt) + textFormel = "" + boolBackslash = False + for Buchstabe in textSourcecode: + if Buchstabe == "\n": continue - if boolBackslash == True: + if Buchstabe == "\\": + if boolBackslash == False: + textFormel += Buchstabe + boolBackslash = True + continue + if boolBackslash == True: + textFormel += Buchstabe + str_latexcode = TeX2PNG(textFormel, "EOAequationarraynonumber", str(intChapterNumber), str(tempImagenumber)) + tmpXML = etree.Element("EOAequationnonumber", filename=("EOAequationarraynonumber" + "_" + str(intChapterNumber) + "_" + str(tempImagenumber) + ".png")) + tmpXML.set("TeX", str_latexcode) + xmlNew.append(tmpXML) + textFormel = "" + boolBackslash = False + tempImagenumber += 1 + continue + if Buchstabe != "\\": textFormel += Buchstabe - str_latexcode = TeX2PNG(textFormel, "EOAequationarraynonumber", str(intChapterNumber), str(tempImagenumber)) - tmpXML = etree.Element("EOAequationnonumber", filename=("EOAequationarraynonumber" + "_" + str(intChapterNumber) + "_" + str(tempImagenumber) + ".png")) - tmpXML.set("TeX", str_latexcode) - xmlNew.append(tmpXML) - textFormel = "" boolBackslash = False - tempImagenumber += 1 - continue - if Buchstabe != "\\": - textFormel += Buchstabe - boolBackslash = False - # Typeset last equation - str_latexcode = TeX2PNG(textFormel, "EOAequationarraynonumber", str(intChapterNumber), str(tempImagenumber)) - tmpXML = etree.Element("EOAequationnonumber", filename=("EOAequationarraynonumber" + "_" + str(intChapterNumber) + "_" + str(tempImagenumber) + ".png")) - tmpXML.set("TeX", str_latexcode) - xmlNew.append(tmpXML) - xmlDing.getparent().replace(xmlDing, xmlNew) - continue - if xmlDing.tag == "EOAequationnonumber": - textSourcecode = xmlDing.find('.//texmath').text - # Blank lines need to be removed otherwise TeX won't work - textSourcecode = os.linesep.join([s for s in textSourcecode.splitlines() if s]) - str_latexcode = TeX2PNG(textSourcecode, "EOAequationnonumber", str(intChapterNumber), tempImagenumber) - # TODO: HTML-Code für das fertige Bild einfügen (Ist dieser ToDo noch aktuell?) - xmlNew = etree.Element("EOAequationnonumber", filename=("EOAequationnonumber" + "_" + str(intChapterNumber) + "_" + str(tempImagenumber) + ".png")) - - xmlNew.set("TeX", str_latexcode) - - xmlDing.getparent().replace(xmlDing, xmlNew) - tempImagenumber += 1 - continue - intChapterNumber += 1 - -logging.info("-----------------------------------------------------") -logging.info("Converting EOAineq") -intChapterNumber = 1 -intEOAineqRunningOrder = 1 -dictEOAineqs = {} -strTeXEquations = "" -all_ineq = xmlTree.findall(".//EOAineq") -# if all_ineq is not None: -if len(all_ineq) > 0: - logging.info("Found " + str(len(all_ineq)) + " formulas") + # Typeset last equation + str_latexcode = TeX2PNG(textFormel, "EOAequationarraynonumber", str(intChapterNumber), str(tempImagenumber)) + tmpXML = etree.Element("EOAequationnonumber", filename=("EOAequationarraynonumber" + "_" + str(intChapterNumber) + "_" + str(tempImagenumber) + ".png")) + tmpXML.set("TeX", str_latexcode) + xmlNew.append(tmpXML) + xmlDing.getparent().replace(xmlDing, xmlNew) + continue + ''' + if xmlDing.tag == "EOAequationnonumber": + textSourcecode = xmlDing.find('.//texmath').text + # Blank lines need to be removed otherwise TeX won't work + textSourcecode = os.linesep.join([s for s in textSourcecode.splitlines() if s]) + str_latexcode = TeX2PNG(textSourcecode, "EOAequationnonumber", str(intChapterNumber), tempImagenumber) + # TODO: HTML-Code für das fertige Bild einfügen (Ist dieser ToDo noch aktuell?) + xmlNew = etree.Element("EOAequationnonumber", filename=("EOAequationnonumber" + "_" + str(intChapterNumber) + "_" + str(tempImagenumber) + ".png")) - for xmlChapter in xmlChapters: - logging.info("Chapter " + str(intChapterNumber)) - xmlEOAineqs = xmlChapter.findall(".//EOAineq") - intEOAineqnumber = 1 - for xmlEOAineq in xmlEOAineqs: - if xmlEOAineq.find('.//texmath') is not None: - strSourceCode = xmlEOAineq.find('.//texmath').text - else: - strSourceCode = xmlEOAineq.text - - progress(intEOAineqnumber, len(xmlEOAineqs),"Processing EOAineq %s of %s." % (intEOAineqnumber, len(xmlEOAineqs))) - - strSourceCode = os.linesep.join([s for s in strSourceCode.splitlines() if s]) - - # this occurred once in sources 11 - strSourceCode = strSourceCode.replace(r"\@root", r"\root") - - strTeXEquations = strTeXEquations + "$" + strSourceCode + "$\n\\newpage\n" - # Add intEOAineqRunningOrder : Filename to dictionary - strFilename = "EOAineq_" + str(intChapterNumber) + "_" + str(intEOAineqnumber) - dictEOAineqs[intEOAineqRunningOrder] = strFilename - # Prepare XML - tmpTail = xmlEOAineq.tail - xmlEOAineq.clear() - xmlEOAineq.tail = tmpTail - xmlEOAineq.set("src", strFilename + ".png") - xmlEOAineq.set("TeX", strSourceCode) - # increment integers - intEOAineqRunningOrder += 1 - intEOAineqnumber +=1 - intChapterNumber += 1 + xmlNew.set("TeX", str_latexcode) - dictRebindedCommands = { - "\|ket\|" : r"\\ket", - "\|braket\|" : r"\\braket", - "\|bra\|" : r"\\bra", - "\|Bra\|" : r"\\Bra", - "\|Ket\|" : r"\\Ket", - "\slashed\|" : r"\\slashed" - } - for strCommand in dictRebindedCommands.keys(): - strTeXEquations = re.sub(strCommand, dictRebindedCommands[strCommand], strTeXEquations) - - tmp = open(TEMPLATE_PATH / "formula.tex", "r") - Template = tmp.read() - tmp.close() - # Get tmp-directory for this user account - # tmpDir = os.getenv("TMPDIR") - # use local tmpdir - formula_tmp_dir = TEMP_DIR / "formulas2png" + xmlDing.getparent().replace(xmlDing, xmlNew) + tempImagenumber += 1 + continue - # Make directory items if it doesn't already exist - items_dir = OUTPUT_DIR / "items" - if not os.path.exists( items_dir): - os.mkdir( items_dir ) - s = string.Template(Template) - e = s.substitute(DERINHALT=strTeXEquations) - tmpFile = formula_tmp_dir / "EOAinline.tex" - tmp = open(tmpFile, "w") - tmp.write(e) - tmp.close() - logging.info("Typesetting all Inline Equations") - Kommando = "xelatex --halt-on-error " + str(tmpFile.absolute()) - Argumente = shlex.split(Kommando) - Datei = open(TEMP_DIR / 'xelatex-run.log', 'w') - Ergebnis = subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) - logging.info("Splitting all Inline Equations") - pdf_burst("EOAinline.pdf", formula_tmp_dir) - logging.info("Converting %s split pages into PNG-Images" % len(dictEOAineqs.keys())) - counter_dictEOAineqs = 1 - for intRunningOrder in dictEOAineqs.keys(): - # provide more status information here in output! - progress(counter_dictEOAineqs, len(dictEOAineqs.keys()),"Splitting all inline equations, image %s of %s" % (counter_dictEOAineqs, len(dictEOAineqs.keys()))) - Kommando = "{cmd} {arg1} {arg2}".format( - cmd = PDFCROP_EXEC, - arg1 = (formula_tmp_dir / ("EOAformulas_" + str(intRunningOrder) + ".pdf")).absolute(), - arg2 = (formula_tmp_dir / (dictEOAineqs[intRunningOrder] + ".pdf")).absolute() - ) - # Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAineqs[intRunningOrder] + ".pdf" +def process_inline_equations( xmlChapters ): + intEOAineqRunningOrder = 1 + dictEOAineqs = {} + strTeXEquations = "" + all_ineq = xmlTree.findall(".//EOAineq") + # if all_ineq is not None: + if len(all_ineq) > 0: + logging.info("Found " + str(len(all_ineq)) + " formulas") + + for intChapterNumber, xmlChapter in enumerate(xmlChapters, start=1): + logging.info("Chapter " + str(intChapterNumber)) + xmlEOAineqs = xmlChapter.findall(".//EOAineq") + intEOAineqnumber = 1 + for xmlEOAineq in xmlEOAineqs: + if xmlEOAineq.find('.//texmath') is not None: + strSourceCode = xmlEOAineq.find('.//texmath').text + else: + strSourceCode = xmlEOAineq.text + + progress(intEOAineqnumber, len(xmlEOAineqs),"Processing EOAineq %s of %s." % (intEOAineqnumber, len(xmlEOAineqs))) + + strSourceCode = os.linesep.join([s for s in strSourceCode.splitlines() if s]) + + # this occurred once in sources 11 + strSourceCode = strSourceCode.replace(r"\@root", r"\root") + + strTeXEquations = strTeXEquations + "$" + strSourceCode + "$\n\\newpage\n" + # Add intEOAineqRunningOrder : Filename to dictionary + strFilename = "EOAineq_" + str(intChapterNumber) + "_" + str(intEOAineqnumber) + dictEOAineqs[intEOAineqRunningOrder] = strFilename + # Prepare XML + tmpTail = xmlEOAineq.tail + xmlEOAineq.clear() + xmlEOAineq.tail = tmpTail + xmlEOAineq.set("src", strFilename + ".png") + xmlEOAineq.set("TeX", strSourceCode) + # increment integers + intEOAineqRunningOrder += 1 + intEOAineqnumber +=1 + + dictRebindedCommands = { + "\|ket\|" : r"\\ket", + "\|braket\|" : r"\\braket", + "\|bra\|" : r"\\bra", + "\|Bra\|" : r"\\Bra", + "\|Ket\|" : r"\\Ket", + "\slashed\|" : r"\\slashed" + } + for strCommand in dictRebindedCommands.keys(): + strTeXEquations = re.sub(strCommand, dictRebindedCommands[strCommand], strTeXEquations) + + tmp = open(TEMPLATE_PATH / "formula.tex", "r") + Template = tmp.read() + tmp.close() + # Get tmp-directory for this user account + # tmpDir = os.getenv("TMPDIR") + # use local tmpdir + formula_tmp_dir = TEMP_DIR / "formulas2png" + + # Make directory items if it doesn't already exist + items_dir = OUTPUT_DIR / "items" + if not os.path.exists( items_dir): + os.mkdir( items_dir ) + s = string.Template(Template) + e = s.substitute(DERINHALT=strTeXEquations) + tmpFile = formula_tmp_dir / "EOAinline.tex" + tmp = open(tmpFile, "w") + tmp.write(e) + tmp.close() + logging.info("Typesetting all Inline Equations") + Kommando = "xelatex --halt-on-error " + str(tmpFile.absolute()) Argumente = shlex.split(Kommando) - subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) + Datei = open(TEMP_DIR / 'xelatex-run.log', 'w') + Ergebnis = subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) + logging.info("Splitting all Inline Equations") + pdf_burst("EOAinline.pdf", formula_tmp_dir) + logging.info("Converting %s split pages into PNG-Images" % len(dictEOAineqs.keys())) + counter_dictEOAineqs = 1 + for intRunningOrder in dictEOAineqs.keys(): + # provide more status information here in output! + progress(counter_dictEOAineqs, len(dictEOAineqs.keys()),"Splitting all inline equations, image %s of %s" % (counter_dictEOAineqs, len(dictEOAineqs.keys()))) + Kommando = "{cmd} {arg1} {arg2}".format( + cmd = PDFCROP_EXEC, + arg1 = (formula_tmp_dir / ("EOAformulas_" + str(intRunningOrder) + ".pdf")).absolute(), + arg2 = (formula_tmp_dir / (dictEOAineqs[intRunningOrder] + ".pdf")).absolute() + ) + # Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAineqs[intRunningOrder] + ".pdf" + Argumente = shlex.split(Kommando) + subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) + + Kommando = "{cmd} convert -density 144 {arg1} {arg2}".format( + cmd = GM_PATH, + arg1 = (formula_tmp_dir / (dictEOAineqs[intRunningOrder] + ".pdf")).absolute(), + arg2 = (items_dir / (dictEOAineqs[intRunningOrder] + ".png")).absolute() + ) + #Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + dictEOAineqs[intRunningOrder] + ".pdf " + os.getenv("PWD") + "/items/" + dictEOAineqs[intRunningOrder] + ".png" + Argumente = shlex.split(Kommando) + subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) + counter_dictEOAineqs += 1 - Kommando = "{cmd} convert -density 144 {arg1} {arg2}".format( - cmd = GM_PATH, - arg1 = (formula_tmp_dir / (dictEOAineqs[intRunningOrder] + ".pdf")).absolute(), - arg2 = (items_dir / (dictEOAineqs[intRunningOrder] + ".png")).absolute() - ) - #Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + dictEOAineqs[intRunningOrder] + ".pdf " + os.getenv("PWD") + "/items/" + dictEOAineqs[intRunningOrder] + ".png" + else: + logging.info("Found no EOAineq. Continuing") + +def process_eoachem( xmlChapters ): + int_EOAchem_running_order = 1 + dictEOAchems = {} + str_tex_chem = "" + all_chem = xmlTree.findall(".//EOAchem") + # if all_chem is not None: + if len(all_chem) > 0: + logging.info("Found " + str(len(all_chem)) + " chemical formulas") + + for intChapterNumber, xmlChapter in enumerate(xmlChapters, start=1): + logging.info("Chapter " + str(intChapterNumber)) + xmlEOAchems = xmlChapter.findall(".//EOAchem") + int_EOAchem_number = 1 + for xml_EOAchem in xmlEOAchems: + + str_chem_text = xml_EOAchem.text + + progress(int_EOAchem_number, len(xmlEOAchems),"Processing EOAchem %s of %s." % (int_EOAchem_number, len(xmlEOAchems))) + + str_chem_text = os.linesep.join([s for s in str_chem_text.splitlines() if s]) + str_tex_chem = str_tex_chem + "\ce{" + str_chem_text + "}\n\\newpage\n" + # Add int_EOAchem_running_order : Filename to dictionary + strFilename = "EOAchem_" + str(intChapterNumber) + "_" + str(int_EOAchem_number) + dictEOAchems[int_EOAchem_running_order] = strFilename + # Prepare XML + tmpTail = xml_EOAchem.tail + xml_EOAchem.clear() + xml_EOAchem.tail = tmpTail + xml_EOAchem.set("src", strFilename + ".png") + xml_EOAchem.set("TeX", str_chem_text) + # increment integers + int_EOAchem_running_order += 1 + int_EOAchem_number +=1 + + tmp = open(TEMPLATE_PATH / "formula.tex", "r") + Template = tmp.read() + tmp.close() + # Get tmp-directory for this user account + # tmpDir = os.getenv("TMPDIR") + # use local tmpdir + formula_tmp_dir = TEMP_DIR / "formulas2png/" + + # Make directory items if it doesn't already exist + items_dir = OUTPUT_DIR / "items" + if not os.path.exists( items_dir ): + os.mkdir( items_dir ) + s = string.Template(Template) + e = s.substitute(DERINHALT=str_tex_chem) + tmpFile = formula_tmp_dir / "EOAchem.tex" + tmp = open(tmpFile, "w") + tmp.write(e) + tmp.close() + logging.info("Typesetting all inline Chemical formulas") + Kommando = "xelatex --halt-on-error " + str(tmpFile.absolute()) Argumente = shlex.split(Kommando) - subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) - counter_dictEOAineqs += 1 - -else: - logging.info("Found no EOAineq. Continuing") - + Datei = open(TEMP_DIR / 'xelatex-run.log', 'w') + Ergebnis = subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) + logging.info("Splitting all Inline Chemical formulas") + pdf_burst("EOAchem.pdf", formula_tmp_dir) + logging.info("Converting %s split pages into PNG-Images" % len(dictEOAchems.keys())) + counter_dictEOAchems = 1 + for intRunningOrder in dictEOAchems.keys(): + # provide more status information here in output! + progress(counter_dictEOAchems, len(dictEOAchems.keys()),"Splitting all inline equations, image %s of %s" % (counter_dictEOAchems, len(dictEOAchems.keys()))) + Kommando = "{cmd} {arg1} {arg2}".format( + cmd=PDFCROP_EXEC, + arg1=(formula_tmp_dir / ("EOAformulas_" + str(intRunningOrder) + ".pdf")).absolute(), + arg2=(formula_tmp_dir / (dictEOAchems[intRunningOrder] + ".pdf")).absolute() + ) + # Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAchems[intRunningOrder] + ".pdf" + Argumente = shlex.split(Kommando) + subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) + + Kommando = "{cmd} convert -density 144 {arg1} {arg2}".format( + cmd=GM_PATH, + arg1 = (formula_tmp_dir / (dictEOAchems[intRunningOrder] + ".pdf")).absolute(), + arg2 = (items_dir / (dictEOAchems[intRunningOrder] + ".png")).absolute() + ) + # Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + dictEOAchems[intRunningOrder] + ".pdf " + os.getenv("PWD") + "/items/" + dictEOAchems[intRunningOrder] + ".png" + Argumente = shlex.split(Kommando) + subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) + counter_dictEOAchems += 1 -########### -# Formula # -########### -logging.info("-----------------------------------------------------") -logging.info("Converting EOAchem") -intChapterNumber = 1 -int_EOAchem_running_order = 1 -dictEOAchems = {} -str_tex_chem = "" -all_chem = xmlTree.findall(".//EOAchem") -# if all_chem is not None: -if len(all_chem) > 0: - logging.info("Found " + str(len(all_chem)) + " chemical formulas") + else: + logging.info("Found no EOAchem. Continuing") +def process_figures( xmlChapters ): + dictFigures = {} for xmlChapter in xmlChapters: - logging.info("Chapter " + str(intChapterNumber)) - xmlEOAchems = xmlChapter.findall(".//EOAchem") - int_EOAchem_number = 1 - for xml_EOAchem in xmlEOAchems: - - str_chem_text = xml_EOAchem.text - - progress(int_EOAchem_number, len(xmlEOAchems),"Processing EOAchem %s of %s." % (int_EOAchem_number, len(xmlEOAchems))) - - str_chem_text = os.linesep.join([s for s in str_chem_text.splitlines() if s]) - str_tex_chem = str_tex_chem + "\ce{" + str_chem_text + "}\n\\newpage\n" - # Add int_EOAchem_running_order : Filename to dictionary - strFilename = "EOAchem_" + str(intChapterNumber) + "_" + str(int_EOAchem_number) - dictEOAchems[int_EOAchem_running_order] = strFilename - # Prepare XML - tmpTail = xml_EOAchem.tail - xml_EOAchem.clear() - xml_EOAchem.tail = tmpTail - xml_EOAchem.set("src", strFilename + ".png") - xml_EOAchem.set("TeX", str_chem_text) - # increment integers - int_EOAchem_running_order += 1 - int_EOAchem_number +=1 - intChapterNumber += 1 - - tmp = open(TEMPLATE_PATH / "formula.tex", "r") - Template = tmp.read() - tmp.close() - # Get tmp-directory for this user account - # tmpDir = os.getenv("TMPDIR") - # use local tmpdir - formula_tmp_dir = TEMP_DIR / "formulas2png/" - - # Make directory items if it doesn't already exist - items_dir = OUTPUT_DIR / "items" - if not os.path.exists( items_dir ): - os.mkdir( items_dir ) - s = string.Template(Template) - e = s.substitute(DERINHALT=str_tex_chem) - tmpFile = formula_tmp_dir / "EOAchem.tex" - tmp = open(tmpFile, "w") - tmp.write(e) - tmp.close() - logging.info("Typesetting all inline Chemical formulas") - Kommando = "xelatex --halt-on-error " + str(tmpFile.absolute()) - Argumente = shlex.split(Kommando) - Datei = open(TEMP_DIR / 'xelatex-run.log', 'w') - Ergebnis = subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) - logging.info("Splitting all Inline Chemical formulas") - pdf_burst("EOAchem.pdf", formula_tmp_dir) - logging.info("Converting %s split pages into PNG-Images" % len(dictEOAchems.keys())) - counter_dictEOAchems = 1 - for intRunningOrder in dictEOAchems.keys(): - # provide more status information here in output! - progress(counter_dictEOAchems, len(dictEOAchems.keys()),"Splitting all inline equations, image %s of %s" % (counter_dictEOAchems, len(dictEOAchems.keys()))) - Kommando = "{cmd} {arg1} {arg2}".format( - cmd=PDFCROP_EXEC, - arg1=(formula_tmp_dir / ("EOAformulas_" + str(intRunningOrder) + ".pdf")).absolute(), - arg2=(formula_tmp_dir / (dictEOAchems[intRunningOrder] + ".pdf")).absolute() - ) - # Kommando = PDFCROP_EXEC + " " + formula_tmp_dir + "EOAformulas_" + str(intRunningOrder) + ".pdf " + formula_tmp_dir + dictEOAchems[intRunningOrder] + ".pdf" - Argumente = shlex.split(Kommando) - subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) - - Kommando = "{cmd} convert -density 144 {arg1} {arg2}".format( - cmd=GM_PATH, - arg1 = (formula_tmp_dir / (dictEOAchems[intRunningOrder] + ".pdf")).absolute(), - arg2 = (items_dir / (dictEOAchems[intRunningOrder] + ".png")).absolute() - ) - # Kommando = GM_PATH + " convert -density 144 " + formula_tmp_dir + dictEOAchems[intRunningOrder] + ".pdf " + os.getenv("PWD") + "/items/" + dictEOAchems[intRunningOrder] + ".png" - Argumente = shlex.split(Kommando) - subprocess.call(Argumente,cwd=formula_tmp_dir,stdout=Datei) - counter_dictEOAchems += 1 - -else: - logging.info("Found no EOAchem. Continuing") - -############### -# Formula end # -############### - -logging.info("-----------------------------------------------------") -logging.info("EOAFigure Numbering per Chapter") -for xmlChapter in xmlChapters: - Figurenumber = 1 - xmlFigures = xmlChapter.xpath(".//EOAfigure | .//EOAlsfigure") - for xmlFigure in xmlFigures: - shortcaption = xmlFigure.find("shortcaption") - if shortcaption and shortcaption.text == "1": - shortcaption.tag = "temp" - xmlAnchor = xmlFigure.find("anchor") - # Check if Figure is in a numbered Chapter - # Otherwise just put the Number of the figure - if xmlChapter.get('id'): - dictFigures[xmlAnchor.get('id')] = \ - str(dictChapters[xmlChapter.get('id')]) + "." + str(Figurenumber) - else: - dictFigures[xmlAnchor.get('id')] = str(Figurenumber) - xmlFigure.set("id", xmlAnchor.get("id")) - Figurenumber += 1 - -logging.info("-----------------------------------------------------") -logging.info("Numbering Theorems") -for xmlChapter in xmlChapters: - xmlTheorems = xmlChapter.findall(".//theorem") - for xmlTheorem in xmlTheorems: - strUID = xmlTheorem.get("id") - strNumber = xmlTheorem.get("id-text") - dictTheorems[strUID] = strNumber + Figurenumber = 1 + xmlFigures = xmlChapter.xpath(".//EOAfigure | .//EOAlsfigure") + for xmlFigure in xmlFigures: + shortcaption = xmlFigure.find("shortcaption") + if shortcaption and shortcaption.text == "1": + shortcaption.tag = "temp" + xmlAnchor = xmlFigure.find("anchor") + # Check if Figure is in a numbered Chapter + # Otherwise just put the Number of the figure + if xmlChapter.get('id'): + dictFigures[xmlAnchor.get('id')] = \ + str(dictChapters[xmlChapter.get('id')]) + "." + str(Figurenumber) + else: + dictFigures[xmlAnchor.get('id')] = str(Figurenumber) + xmlFigure.set("id", xmlAnchor.get("id")) + Figurenumber += 1 + return dictFigures -logging.info("-----------------------------------------------------") -logging.info("Section, Subsection,... Numbering per Chapter") -intChapterNumber = 1 -for xmlChapter in xmlChapters: - strUID = xmlChapter.get("id") - #dictChapters[strUID] = str(intChapterNumber) - xmlSections = xmlChapter.findall("div2") - intSectionNumber = 1 - for xmlSection in xmlSections: - if xmlSection.get("rend") == "nonumber": - continue - strUID = xmlSection.get("id") - if xmlChapter.get("rend") != "nonumber": - dictSections[strUID] = str(intChapterNumber) + "." + str(intSectionNumber) - if xmlChapter.get("rend") == "nonumber": - dictSections[strUID] = str(intSectionNumber) - xmlSubsections = xmlSection.findall("div3") - intSubsectionNumber = 1 - for xmlSubsection in xmlSubsections: - if xmlSubsection.get("rend") == "nonumber": +def number_theorems( xmlChapters ): + dictTheorems = {} + for xmlChapter in xmlChapters: + xmlTheorems = xmlChapter.findall(".//theorem") + for xmlTheorem in xmlTheorems: + strUID = xmlTheorem.get("id") + strNumber = xmlTheorem.get("id-text") + dictTheorems[strUID] = strNumber + return dictTheorems + +def number_sections( xmlChapters ): + dictSections = {} + intChapterNumber = 1 + for xmlChapter in xmlChapters: + strUID = xmlChapter.get("id") + #dictChapters[strUID] = str(intChapterNumber) + xmlSections = xmlChapter.findall("div2") + intSectionNumber = 1 + for xmlSection in xmlSections: + if xmlSection.get("rend") == "nonumber": continue - strUID = xmlSubsection.get("id") + strUID = xmlSection.get("id") if xmlChapter.get("rend") != "nonumber": - dictSections[strUID] = str(intChapterNumber) + "." + str(intSectionNumber) + "." + str(intSubsectionNumber) + dictSections[strUID] = str(intChapterNumber) + "." + str(intSectionNumber) if xmlChapter.get("rend") == "nonumber": - dictSections[strUID] = str(intSectionNumber) + "." + str(intSubsectionNumber) - intSubsectionNumber += 1 - intSectionNumber += 1 - if xmlChapter.get("rend") != "nonumber": - intChapterNumber += 1 - -logging.info("-----------------------------------------------------") -logging.info("Numbering of Footnotes per Chapter") -intChapterNumber = 1 -for xmlChapter in xmlChapters: - intNoteNumber = 1 - xmlFootnotes = xmlChapter.findall(".//note") - for xmlFootnote in xmlFootnotes: - strUID = xmlFootnote.get("id") - dictFootnotes[strUID] = str(intNoteNumber) - intNoteNumber += 1 - -# here was OU's footnote code, now in libeoaconvert -# def get_bigfoot_data(chapter) - -# bigfoot needs to be integrated into -# 'fndict': {'uid11': '2', 'uid12': '3', 'uid9': '1'}, - - -logging.info("-----------------------------------------------------") -logging.info("Numbering of Lists per Chapter") -for xmlChapter in xmlChapters: - xmlListitems = xmlChapter.findall(".//item") - for xmlListitem in xmlListitems: - strUID = xmlListitem.get("id") - strItemNumber = xmlListitem.get("id-text") - dictLists[strUID] = strItemNumber - -logging.info("-----------------------------------------------------") -logging.info("Working on Page Numbers for References") -listAuxFiles = glob.glob( str(LATEX_DIR /"*.aux") ) -if len(listAuxFiles) == 0: - logging.error("No aux file found. Exiting") - sys.exit(1) -else: - for strFile in listAuxFiles: - tmpFile = open(strFile, "r") - lines = tmpFile.readlines() - tmpFile.close() - for line in lines: - # hyperref makes the lines much much longer - # \newlabel{BL}{{1.1}{4}{Forschungsüberblick zur Literatur über Alvarus Thomas}{section.1.1}{}} - # \newlabel{BL}{{1.1}{4}} - matched_label = re.match(r'\\newlabel\{(.*?)\}\{\{(.*?)\}\{(.*?)\}', line) - # matchObjectLabel = re.match(r'\newlabel\{(.*?)\}', line) - if matched_label: - # matchObjectPage = re.match(r'(.*?)\}\{(\d{1,})\}\}$', line) - # if matchObjectPage: - dictPagelabels[matched_label.group(1)] = matched_label.group(3) - # parsing out information on cite works - matched_citation = re.match(r'\\abx@aux@cite{(.*?)}', line) - if matched_citation is not None: - set_citations.add(matched_citation.group(1)) - -logging.info("page labels:") -logging.info(dictPagelabels) -logging.info("citations:") -logging.info(set_citations) - -logging.info("-----------------------------------------------------") -logging.info("Numbering of Tables per Chapter") -intChapterNumber = 1 -for xmlChapter in xmlChapters: - intTableNumber = 1 - xmlTables = xmlChapter.findall(".//EOAtable") - for xmlTable in xmlTables: - xmlTableLabel = xmlTable.find(".//EOAtablelabel") - strTableCaption = xmlTable.find(".//EOAtablecaption").text - if strTableCaption == "nonumber": - continue - if not xmlTableLabel.text or xmlTableLabel.text == "": - xmlTableLabel.text = "table" + str(intChapterNumber) + str(intTableNumber) - strUID = xmlTableLabel.text - logging.debug(f"XML table label: {strUID}") + dictSections[strUID] = str(intSectionNumber) + xmlSubsections = xmlSection.findall("div3") + intSubsectionNumber = 1 + for xmlSubsection in xmlSubsections: + if xmlSubsection.get("rend") == "nonumber": + continue + strUID = xmlSubsection.get("id") + if xmlChapter.get("rend") != "nonumber": + dictSections[strUID] = str(intChapterNumber) + "." + str(intSectionNumber) + "." + str(intSubsectionNumber) + if xmlChapter.get("rend") == "nonumber": + dictSections[strUID] = str(intSectionNumber) + "." + str(intSubsectionNumber) + intSubsectionNumber += 1 + intSectionNumber += 1 if xmlChapter.get("rend") != "nonumber": - dictTables[strUID] = dictChapters[xmlChapter.get('id')] + "." + str(intTableNumber) - if xmlChapter.get("rend") == "nonumber": - dictTables[strUID] = str(intTableNumber) - intTableNumber += 1 - logging.debug(f"Tables in this chapter: {dictTables}.") - intChapterNumber += 1 + intChapterNumber += 1 + return dictSections + +def number_footnotes( xmlChapters ): + dictFootnotes = {} + for xmlChapter in xmlChapters: + intNoteNumber = 1 + xmlFootnotes = xmlChapter.findall(".//note") + for xmlFootnote in xmlFootnotes: + strUID = xmlFootnote.get("id") + dictFootnotes[strUID] = str(intNoteNumber) + intNoteNumber += 1 + return dictFootnotes + +def number_lists( xmlChapters ): + dictLists = {} + for xmlChapter in xmlChapters: + xmlListitems = xmlChapter.findall(".//item") + for xmlListitem in xmlListitems: + strUID = xmlListitem.get("id") + strItemNumber = xmlListitem.get("id-text") + dictLists[strUID] = strItemNumber + return dictLists + +def process_page_references( latex_dir, set_citations ): + dictPagelabels = {} + listAuxFiles = glob.glob( str(latex_dir / "*.aux") ) + if len(listAuxFiles) == 0: + raise( Exception("No aux file found. Exiting") ) + else: + for strFile in listAuxFiles: + tmpFile = open(strFile, "r") + lines = tmpFile.readlines() + tmpFile.close() + for line in lines: + # hyperref makes the lines much much longer + # \newlabel{BL}{{1.1}{4}{Forschungsüberblick zur Literatur über Alvarus Thomas}{section.1.1}{}} + # \newlabel{BL}{{1.1}{4}} + matched_label = re.match(r'\\newlabel\{(.*?)\}\{\{(.*?)\}\{(.*?)\}', line) + # matchObjectLabel = re.match(r'\newlabel\{(.*?)\}', line) + if matched_label: + # matchObjectPage = re.match(r'(.*?)\}\{(\d{1,})\}\}$', line) + # if matchObjectPage: + dictPagelabels[matched_label.group(1)] = matched_label.group(3) + # parsing out information on cite works + matched_citation = re.match(r'\\abx@aux@cite{(.*?)}', line) + if matched_citation is not None: + set_citations.add(matched_citation.group(1)) + return dictPagelabels + +def number_tables( xmlChapters ): + dictTables = {} + for intChapterNumber, xmlChapter in enumerate(xmlChapters): + intTableNumber = 1 + xmlTables = xmlChapter.findall(".//EOAtable") + for xmlTable in xmlTables: + xmlTableLabel = xmlTable.find(".//EOAtablelabel") + strTableCaption = xmlTable.find(".//EOAtablecaption").text + if strTableCaption == "nonumber": + continue + if not xmlTableLabel.text or xmlTableLabel.text == "": + xmlTableLabel.text = "table" + str(intChapterNumber) + str(intTableNumber) + strUID = xmlTableLabel.text + logging.debug(f"XML table label: {strUID}") + if xmlChapter.get("rend") != "nonumber": + dictTables[strUID] = dictChapters[xmlChapter.get('id')] + "." + str(intTableNumber) + if xmlChapter.get("rend") == "nonumber": + dictTables[strUID] = str(intTableNumber) + intTableNumber += 1 + logging.debug(f"Tables in this chapter: {dictTables}.") + return dictTables ############################################################## # Preparing the Bibliography # @@ -1263,6 +1221,92 @@ def add_bibliography_to_xml( for entry in fixed_entries: print_bibl_element.append(entry) +############################################################## +# actual script # +############################################################## + +xmlTree = parseXML( input_file = XML_FILE ) +xmlChapters = xmlTree.findall("//div1") + +logging.info("-----------------------------------------------------") +logging.info("Move EOAlanguage from into attribute of EOAchapter") +xmltrans_move_eoalanguage( xmlChapters ) + +strSerie = get_series( xmlTree ) + +if strSerie == "Essay": + strNumberingType = "essay" +else: + strNumberingType = "regular" + +set_citations = set() + +logging.info("-----------------------------------------------------") +logging.info("Numbering Chapters") +dictChapters = number_chapters( xmlChapters ) +# print( dictSections ) + +logging.info("-----------------------------------------------------") +logging.info("Processing .//EOAequation | .//EOAequationarray | .//EOAsubequations") +dictEquations = process_equations( xmlChapters, dictChapters, strNumberingType ) + +logging.info("-----------------------------------------------------") +logging.info("Processing .//EOAequationnonumber | .//EOAequationarraynonumber") +process_unnumbered_equations( xmlChapters ) + +logging.info("-----------------------------------------------------") +logging.info("Converting EOAineq") +process_inline_equations( xmlChapters ) + +logging.info("-----------------------------------------------------") +logging.info("Converting EOAchem") +process_eoachem( xmlChapters ) + +logging.info("-----------------------------------------------------") +logging.info("EOAFigure Numbering per Chapter") +dictFigures = process_figures( xmlChapters ) + +logging.info("-----------------------------------------------------") +logging.info( "Numbering Theorems" ) +dictTheorems = number_theorems( xmlChapters ) + +logging.info("-----------------------------------------------------") +logging.info("Section, Subsection,... Numbering per Chapter") + +dictSections = number_sections( xmlChapters ) + +logging.info("-----------------------------------------------------") +logging.info("Numbering of Footnotes per Chapter") +dictFootnotes = number_footnotes( xmlChapters ) + +# here was OU's footnote code, now in libeoaconvert +# def get_bigfoot_data(chapter) + +# bigfoot needs to be integrated into +# 'fndict': {'uid11': '2', 'uid12': '3', 'uid9': '1'}, + + +logging.info("-----------------------------------------------------") +logging.info("Numbering of Lists per Chapter") +dictLists = number_lists( xmlChapters ) + +logging.info("-----------------------------------------------------") +logging.info("Working on Page Numbers for References") +dictPagelabels = process_page_references( LATEX_DIR, set_citations ) +logging.info("page labels:") +logging.info(dictPagelabels) + +logging.info("citations:") +logging.info(set_citations) + +logging.info("-----------------------------------------------------") +logging.info("Numbering of Tables per Chapter") +dictTables = number_tables( xmlChapters ) + +############################################################## +# Preparing the Bibliography # +############################################################## + bibl_info = bibl_info_from_xml( xmlTree ) @@ -1296,6 +1340,8 @@ def add_bibliography_to_xml( if len(xmlBibliographies) > 0: logging.debug(f"Found {libeoaconvert.plural(len(xmlBibliographies), 'bibliography', plural='bibliographies')}.") citekeys = xmlTree.xpath(".//citekey/text()") + # use language of the first chapter: + strLanguage = xmlChapters[0].get( "language" ) formatted_bibl_info = bib2html.main( bib_file = (INPUT_DIR / bib_database).with_suffix( ".bib" ), citekeys = citekeys, @@ -1322,13 +1368,13 @@ def add_bibliography_to_xml( # If Bibliography-Type is anthology search for EOAbibliography and make one per chapter elif bib_type == "anthology": - logging.debug(f"bib type is {bib_type}") for intChapterNumber, xmlChapter in enumerate(xmlChapters, start = 1): logging.debug(f"Looking at chapter {intChapterNumber}.") # tmp_citation_filename = TEMP_DIR / "bib2html" / ("used_citations-anthology-chapter_{:02d}".format(intChapterNumber)) xmlBibliographies = xmlChapter.findall(".//EOAprintbibliography") if len(xmlBibliographies) > 0: + strLanguage = xmlChapter.get( "language" ) citekeys = xmlChapter.xpath(".//citekey/text()") formatted_bibl_info = bib2html.main( bib_file = (INPUT_DIR / bib_database).with_suffix( ".bib" ), @@ -1372,7 +1418,6 @@ def add_bibliography_to_xml( # Bibliographies are done, now for the citations if bib_type == "anthology" or bib_type == "monograph": - intChapterNumber = 1 if bib_type == "monograph": tmp_citation_filename = "used_citations-monograph" @@ -1380,6 +1425,7 @@ def add_bibliography_to_xml( with open(tmp_path_html, "r") as formatted_citations: form_cit = BeautifulSoup(formatted_citations, "html.parser") + intChapterNumber = 1 for xmlChapter in xmlChapters: logging.info("-----------------------------------------------------") logging.info("Processing References for Chapter " + str(intChapterNumber)) From 6db03fa11a9e427870cd253724f1c5beeb69633f Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 11 Apr 2019 15:54:01 +0200 Subject: [PATCH 015/132] changed default cmd args paths. fixed pickle data exported by eoatex2imxml --- eoatex2imxml.py | 5 +++-- eoatex2pdf.py | 2 +- imxml2django.py | 4 ++-- imxml2epub.py | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index 12ef882..fccb81b 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -86,12 +86,12 @@ ) parser.add_argument( "--latex-dir", - default = "./latex-out", + default = "./output/latex", help="directory where to find the output generated by eoatex2pdf.py" ) parser.add_argument( "-o", "--output-dir", - default = "./imxml", + default = "./output/imxml", help="where to dump all output files" ) parser.add_argument( @@ -733,6 +733,7 @@ def process_equations( xmlChapters, dictChapters, strNumberingType): dictEquations[xmlAnchor.get('id')] = str(intEquationnumber) intEquationnumber += 1 continue + return dictEquations def process_unnumbered_equations( xmlChapters ): for intChapterNumber, xmlChapter in enumerate(xmlChapters, start=1): diff --git a/eoatex2pdf.py b/eoatex2pdf.py index c1eb84d..f1a5ca3 100755 --- a/eoatex2pdf.py +++ b/eoatex2pdf.py @@ -67,7 +67,7 @@ def main( ) parser.add_argument( "-o", "--output-dir", - default = "./latex-out", + default = "./output/latex", help = "output directory" ) parser.add_argument( diff --git a/imxml2django.py b/imxml2django.py index d56d24e..1548473 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -69,12 +69,12 @@ ) parser.add_argument( "-i", "--input-dir", - default = "./imxml", + default = "./output/imxml", help="directory containing the intermediate xml generated by eoatex2imxml.py" ) parser.add_argument( "-o", "--output-dir", - default = "./django", + default = "./output/django", help="where to dump all output files" ) diff --git a/imxml2epub.py b/imxml2epub.py index b05c537..fb905c7 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -62,12 +62,12 @@ ) parser.add_argument( "-i", "--input-dir", - default = "./imxml", + default = "./output/imxml", help="directory containing the intermediate xml generated by eoatex2imxml.py" ) parser.add_argument( "-o", "--output-dir", - default = "./epub", + default = "./output/epub", help="where to dump all output files" ) From 7e526abf422178ab758a76d4c83dfee2baabda5c Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 11 Apr 2019 16:12:41 +0200 Subject: [PATCH 016/132] changed default log dir --- eoatex2imxml.py | 2 +- eoatex2pdf.py | 2 +- imxml2django.py | 2 +- imxml2epub.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index fccb81b..e8456e2 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -60,7 +60,7 @@ ) parser.add_argument( "-l", "--log-dir", - default = Path("logs"), + default = Path("output/logs"), # default = Path("logs", SCRIPT_NAME).with_suffix(".log"), help="logfile" ) diff --git a/eoatex2pdf.py b/eoatex2pdf.py index f1a5ca3..c68c613 100755 --- a/eoatex2pdf.py +++ b/eoatex2pdf.py @@ -77,7 +77,7 @@ def main( ) parser.add_argument( "-l", "--log-file", - default = Path("logs", SCRIPT_NAME).with_suffix(".log"), + default = Path("output/logs", SCRIPT_NAME).with_suffix(".log"), help="logfile" ) parser.add_argument( diff --git a/imxml2django.py b/imxml2django.py index 1548473..31e9272 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -49,7 +49,7 @@ ) parser.add_argument( "-l", "--log-file", - default = Path("logs", SCRIPT_NAME).with_suffix(".log"), + default = Path("output/logs", SCRIPT_NAME).with_suffix(".log"), help="logfile" ) parser.add_argument( diff --git a/imxml2epub.py b/imxml2epub.py index fb905c7..9f6378f 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -46,7 +46,7 @@ ) parser.add_argument( "-l", "--log-file", - default = Path( "logs", SCRIPT_NAME).with_suffix( ".log" ), + default = Path( "output/logs", SCRIPT_NAME).with_suffix( ".log" ), help="logfile" ) parser.add_argument( From 7255bcc0e5b3a0c283f850381ac1bece663ece19 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 11 Apr 2019 17:45:15 +0200 Subject: [PATCH 017/132] when a command fails, write make a log entry --- utils/load_config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/load_config.py b/utils/load_config.py index 32fe0e1..c3c27e1 100644 --- a/utils/load_config.py +++ b/utils/load_config.py @@ -85,6 +85,7 @@ def check_io(stream): ret = process.wait() # 0 means success if (not ignore_fail) and ret != 0: + logging.error( error_msg.format( command = command) ) raise( Exception( error_msg.format( command=command ) ) ) def check_executable( executable_name ): From f7d3a0453dd64972792b673f13c6ba8236a1294b Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 15 Apr 2019 14:34:58 +0200 Subject: [PATCH 018/132] xelatex stops on first error, otherwise the script hangs endlessly --- eoatex2pdf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eoatex2pdf.py b/eoatex2pdf.py index c68c613..1a59928 100755 --- a/eoatex2pdf.py +++ b/eoatex2pdf.py @@ -41,17 +41,17 @@ def main( os.chdir( input_dir ) logging.info( "cd {}".format( input_dir ) ) exec_command( - f"xelatex --output-directory={output_dir} {input_file.name}", + f"xelatex --halt-on-error --output-directory={output_dir} {input_file.name}", ) exec_command( "biber {}".format( input_file.stem ), wd = output_dir ) exec_command( - f"xelatex --output-directory={output_dir} {input_file.name}", + f"xelatex --halt-on-error --output-directory={output_dir} {input_file.name}", ) exec_command( - f"xelatex --output-directory={output_dir} {input_file.name}", + f"xelatex --halt-on-error --output-directory={output_dir} {input_file.name}", ) logging.info( "cd {}".format( cwd ) ) os.chdir( cwd ) From fa782e6cc39e216a06c4a43130f9bf10884e6460 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Mon, 15 Apr 2019 15:05:52 +0200 Subject: [PATCH 019/132] eagerly check for executables in bib2html, improve util to exec commands --- eoatex2imxml.py | 4 +++- utils/bib2html.py | 29 +++++++++++------------------ utils/load_config.py | 5 +++-- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index e8456e2..ed95757 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -172,6 +172,8 @@ check_executable( GM_PATH ) check_executable( TRALICS_PATH_EXEC ) check_executable( PDFCROP_EXEC ) +logging.info( "checking executables 'utils.bib2html' needs...:" ) +bib2html.check_executables() if not os.path.exists(TRALICS_PATH_LIB): logging.error(f"Cannot find the Tralics configuration at {TRALICS_PATH_LIB}. Exiting.") @@ -491,7 +493,7 @@ def run_tralics( input_file = fixed_tex_file_path, ), output_to = ToFile( log_path ), - ignore_fail = True # :-D + exit_code_ok = lambda _: True ) # .tex -> .xml diff --git a/utils/bib2html.py b/utils/bib2html.py index 6865d5e..1061843 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -9,7 +9,7 @@ __date__ = "20190313" __author__ = "kthoden@mpiwg-berlin.mpg.de" -from utils.load_config import exec_command, ToFile, ToLog +from utils.load_config import exec_command, ToFile, ToLog, check_executable import argparse import os @@ -29,6 +29,11 @@ NS_MAP = {"x" : 'http://www.w3.org/1999/xhtml'} +def check_executables(): + check_executable( "htlatex" ) + check_executable( "tidy" ) + check_executable( "biber" ) + def transform_reference(reference_element, dialect='html'): """Formatting transformation for reference element""" @@ -122,28 +127,12 @@ def run_htlatex( f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", output_to = ToFile( Path(log_dir) / "htlatex2.log" ) ) - -''' - command = f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'" - arguments = shlex.split(command) - logging.info("Using external command htlatex with command %s" % command) - subprocess.call(arguments) - - command = f"biber {tmp_filename}" - arguments = shlex.split(command) - logging.info("Using external command biber with command %s" % command) - subprocess.call(arguments) - - command = f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'" - arguments = shlex.split(command) - logging.info("Using external command htlatex with command %s" % command) - subprocess.call(arguments) - ''' # def run_htlatex ends here def create_citations(citekeys, xml_tree, style): """Create citations""" + logging.debug("creating citations") if style in ["authoryear", "year"]: pass else: @@ -155,6 +144,7 @@ def create_citations(citekeys, xml_tree, style): p_element = etree.Element("p") for citekey in citekeys: + logging.debug(f"working on citekey: {citekey}" ) ligated_citekey = fix_citekey(citekey) if style == "authoryear": format_citation = xml_tree.xpath(f"//x:h4[text() = '{ligated_citekey}']/following-sibling::x:p[2]/text()", namespaces=NS_MAP)[0].strip() @@ -291,6 +281,9 @@ def main( help="where to store temporary files" ) args = parser.parse_args() + + check_executables() + citekeys = ["Edwards_2017", "Riggs:2016aa", "Bruckler:2001aa", "Zdenek:1939aa", "Caraffa_2011", "Uhlikova:2010aa", "Noll:1992aa", "Schwarz:1931aa", "Schwartz_1995", "Faber:2015ab", "Rohacek:2010aa", "Lachnit:2005aa", "Groll:1865aa", "Schlosser:1934aa", "Eitelberger:1863ab", "Wirth:1939aa", "Faber:2015aa", "Trnkova:2015aa", "Trnkova:2010aa", "Frodl:1988aa"] language = "de" diff --git a/utils/load_config.py b/utils/load_config.py index c3c27e1..47f4305 100644 --- a/utils/load_config.py +++ b/utils/load_config.py @@ -37,7 +37,8 @@ def exec_command( wd = None, output_to = ToLog(), log_level = "INFO", - ignore_fail = False + # ignore_fail = False + exit_code_ok = lambda x: x == 0, ): logging.log( getattr(logging,log_level), @@ -84,7 +85,7 @@ def check_io(stream): check_io(process.stdout) ret = process.wait() # 0 means success - if (not ignore_fail) and ret != 0: + if (not exit_code_ok(ret)) and ret != 0: logging.error( error_msg.format( command = command) ) raise( Exception( error_msg.format( command=command ) ) ) From 01d72b2a7153cded6a2a3c97fad6c7f72655ed25 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Mon, 15 Apr 2019 15:07:44 +0200 Subject: [PATCH 020/132] fixed ligature-problem and unescaped '&' in (x)html problem. --- utils/bib2html.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index 1061843..13a1e9d 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -164,14 +164,19 @@ def create_citations(citekeys, xml_tree, style): def fix_citekey(citekey): """Remove ligatures from citekey""" + # import unicodedata + + ''' replacements = { "ff" : "ff", + "ffi" : "ffi", } for replacement in replacements.keys(): ligated_citekey = citekey.replace(replacement, replacements[replacement]) - return ligated_citekey + ''' + return citekey # def fix_citekey ends here @@ -232,7 +237,24 @@ def main( os.chdir( wd ) tmp_path_html = temp_dir / tmp_filename . with_suffix( ".html" ) - xml_tree = etree.parse(str(tmp_path_html)) + tmp_path_html_fixed1 = temp_dir / tmp_filename . with_suffix( ".1.html" ) + tmp_path_html_fixed2 = temp_dir / tmp_filename . with_suffix( ".2.html" ) + + # htlatex seems to produce incorrect xhtml. + # We have to fix it by running ... + exec_command( + f"tidy -numeric -output {tmp_path_html_fixed1} {tmp_path_html}", + exit_code_ok = lambda x: x in (0,1) + ) + import fileinput, unicodedata + + with open( tmp_path_html_fixed2, "w") as out_file: + for line in fileinput.input(tmp_path_html_fixed1): + out_file.write( + unicodedata.normalize("NFKD", line) + ) + + xml_tree = etree.parse(str(tmp_path_html_fixed2)) citation_authoryear = create_citations(citekeys, xml_tree, "authoryear") citation_year = create_citations(citekeys, xml_tree, "year") From 7f02564695c8a870267a5f33681d133d57c4c140 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 15 Apr 2019 15:55:01 +0200 Subject: [PATCH 021/132] Use htxelatex instead of htlatex --- utils/bib2html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index 6865d5e..b179572 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -111,7 +111,7 @@ def run_htlatex( ): """Create HTML file from temporary LaTeX file""" exec_command( - f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", + f"htxelatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", output_to = ToFile( Path(log_dir) / "htlatex1.log" ) ) exec_command( @@ -119,7 +119,7 @@ def run_htlatex( output_to = ToFile( Path(log_dir) / "biber.log" ) ) exec_command( - f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", + f"htxelatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", output_to = ToFile( Path(log_dir) / "htlatex2.log" ) ) From 7ee39adc0ef70db84d730d435e69d9fd6eee5330 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Mon, 15 Apr 2019 17:02:38 +0200 Subject: [PATCH 022/132] bib2html should hold on error. --- utils/bib2html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index 13a1e9d..bd6164c 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -116,7 +116,7 @@ def run_htlatex( ): """Create HTML file from temporary LaTeX file""" exec_command( - f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", + f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8' '' '--halt-on-error'", output_to = ToFile( Path(log_dir) / "htlatex1.log" ) ) exec_command( @@ -124,7 +124,7 @@ def run_htlatex( output_to = ToFile( Path(log_dir) / "biber.log" ) ) exec_command( - f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", + f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8' '' '--halt-on-error'", output_to = ToFile( Path(log_dir) / "htlatex2.log" ) ) # def run_htlatex ends here From fea6336b00b13632a0581784c0f708cbfc7e00d2 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Mon, 15 Apr 2019 17:21:00 +0200 Subject: [PATCH 023/132] added super helpful comments --- utils/bib2html.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index bd6164c..94e7c1c 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -241,13 +241,15 @@ def main( tmp_path_html_fixed2 = temp_dir / tmp_filename . with_suffix( ".2.html" ) # htlatex seems to produce incorrect xhtml. - # We have to fix it by running ... + # We have to fix it + # (this will e.g. replace '&' by '&'): exec_command( f"tidy -numeric -output {tmp_path_html_fixed1} {tmp_path_html}", exit_code_ok = lambda x: x in (0,1) ) import fileinput, unicodedata + # normalize unicode, e.g. replace ligatures (like " "ff" -> "ff"): with open( tmp_path_html_fixed2, "w") as out_file: for line in fileinput.input(tmp_path_html_fixed1): out_file.write( From b49148da2c526916a584f0a2a25bb5bd0359028b Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 15 Apr 2019 17:37:51 +0200 Subject: [PATCH 024/132] Updated template --- bibformat/4ht/bibliography4ht.tex | 42 ++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/bibformat/4ht/bibliography4ht.tex b/bibformat/4ht/bibliography4ht.tex index 5172190..8c5f9af 100644 --- a/bibformat/4ht/bibliography4ht.tex +++ b/bibformat/4ht/bibliography4ht.tex @@ -50,19 +50,55 @@ \setunit{\addcolon\space}% \usebibmacro{issue}% \newunit} + +% origdate, thanks to https://tex.stackexchange.com/questions/134644/how-to-get-automatically-origdate-with-the-date-in-a-citation +\DeclareFieldFormat{origdate}{\mkbibbrackets{##1}} +\renewbibmacro*{cite:labeldate+extradate}{% + \iffieldundef{origyear} + {} + {\printorigdate + \setunit{\addspace}}% + \iffieldundef{labelyear} + {} + {\printtext[bibhyperref]{\printlabeldateextra}}} + +\DeclareCiteCommand{\citeorigyear} + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}} + {\printfield{origyear}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\renewbibmacro*{date+extradate}{% + \iffieldundef{origyear} + {} + {\printorigdate + \setunit{\addspace}}% + \iffieldundef{labelyear} + {} + {\printtext[parens]{% + \iflabeldateisdate + {\printdateextra} + {\printlabeldateextra}}}} + % Bug fix for Windows \defbibheading{none}[]{} } \usepackage[autostyle]{csquotes} -\usepackage[mincitenames=1,maxcitenames=3,maxbibnames=100,style=authoryear,backend=biber,autolang=hyphen]{biblatex} +{\usepackage[mincitenames=1,maxcitenames=3,maxbibnames=100,style=authoryear,backend=biber,autolang=hyphen,dateabbrev=false,datecirca=true,dateuncertain=true,dateera=christian,urldate=long]{biblatex} \EOAbibtweaks \bibliography{$bibfile} \begin{document} % \maketitle -\section{Dummy} +\section{Citations} $citations \printbibliography -\end{document} \ No newline at end of file +\end{document} +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: From 4f0078fa313f03731994b6d2ff237627be221984 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 15 Apr 2019 17:38:12 +0200 Subject: [PATCH 025/132] Reverted to htlatex --- utils/bib2html.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index 8033542..13dc14b 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -116,7 +116,7 @@ def run_htlatex( ): """Create HTML file from temporary LaTeX file""" exec_command( - f"htxelatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", + f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", output_to = ToFile( Path(log_dir) / "htlatex1.log" ) ) exec_command( @@ -124,7 +124,7 @@ def run_htlatex( output_to = ToFile( Path(log_dir) / "biber.log" ) ) exec_command( - f"htxelatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", + f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8'", output_to = ToFile( Path(log_dir) / "htlatex2.log" ) ) # def run_htlatex ends here @@ -239,7 +239,7 @@ def main( tmp_path_html = temp_dir / tmp_filename . with_suffix( ".html" ) tmp_path_html_fixed1 = temp_dir / tmp_filename . with_suffix( ".1.html" ) tmp_path_html_fixed2 = temp_dir / tmp_filename . with_suffix( ".2.html" ) - + # htlatex seems to produce incorrect xhtml. # We have to fix it by running ... exec_command( From dda1dd73390307875170bb7087868e4c7419ede5 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 12 Apr 2019 16:22:42 +0200 Subject: [PATCH 026/132] Ident after floats made optional --- tei2eoatex.xsl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index 9ce6ec2..f5a6276 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -10,6 +10,7 @@ + @@ -153,10 +154,13 @@ contexts, a double replacement is performed. - + \noindent + + + + + + \EOAchapter + + + nonumber + + + + + { + + }{ + + + + { + + }{ + + + + + + + } + + + }\EOAlabel{ + + } + + + \input{ + + } + + \EOApart{ From 3d3f73c37e5fc9db40fb056d39fe3fe840380fb7 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 15 Apr 2019 12:53:14 +0200 Subject: [PATCH 030/132] Indent floats rule corrected --- tei2eoatex.xsl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index 08c5cab..1c3839c 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -154,7 +154,11 @@ contexts, a double replacement is performed. - + + \noindent + + + \noindent From 3cc86742014ed99849989eb1460b7eb1d4ab85a6 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Wed, 17 Apr 2019 12:55:18 +0200 Subject: [PATCH 031/132] experimental: multiple bibliographies with keywords --- bibformat/4ht/bibliography4ht.tex | 3 +- eoatex2imxml.py | 220 +++++++++++++++++++----------- utils/bib2html.py | 40 +++++- 3 files changed, 175 insertions(+), 88 deletions(-) diff --git a/bibformat/4ht/bibliography4ht.tex b/bibformat/4ht/bibliography4ht.tex index 8c5f9af..15cc7b6 100644 --- a/bibformat/4ht/bibliography4ht.tex +++ b/bibformat/4ht/bibliography4ht.tex @@ -96,7 +96,8 @@ \section{Citations} $citations -\printbibliography +$bibliographies + \end{document} %%% Local Variables: %%% mode: latex diff --git a/eoatex2imxml.py b/eoatex2imxml.py index ed95757..dbb44d5 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1170,15 +1170,59 @@ def write_json_bibl( json.dump(citeproc_json.decode('utf-8'), ibjf) return citations_json -def add_bibliography_to_xml( - print_bibl_elements, - chapter_element, +def insert_bibliographies( + xml_element, + language, citations_json, - formatted_references + ## paths: + bib_file, + tex_template, + temp_dir, + output_file, + log_dir, ): - if len(print_bibl_elements) == 1 and xmlBibliographies[0].get("keyword"): - logging.warning("Found a keyword in bibliography although there is only one.") + keyword_to_print_bibl_el = find_print_bibliography( + xml_element, + citations_json + ) + logging.info( "keywords:" ) + logging.info( keyword_to_print_bibl_el.keys() ) + if len(keyword_to_print_bibl_el) > 0: + logging.debug(f"Found {libeoaconvert.plural(len(keyword_to_print_bibl_el), 'bibliography', plural='bibliographies')}.") + citekeys = citekeys_from_xml( xml_element ) + bib_keywords_sanity_check( + keyword_to_print_bibl_el, + citations_json, + citekeys + ) + # use language of the first chapter: + formatted_bibl_info = bib2html.main( + bib_file = bib_file, + citekeys = citekeys, + tex_template = tex_template, + language = language, + temp_dir = temp_dir, + output_file = output_file, + log_dir = log_dir, + keywords = keyword_to_print_bibl_el.keys() + ) + formatted_bibliographies = formatted_bibl_info['references'] + + add_bibliography_to_xml( + keyword_to_print_bibl_el, + xml_element, + citations_json, + formatted_bibliographies + ) + else: + # create an empty file + logging.debug("No bibliography found.") + # open(TEMP_DIR / (tmp_citation_filename + "_nocitations"), 'a').close() + return keyword_to_print_bibl_el +def citekeys_from_xml( + chapter_element +): citekeys = chapter_element.xpath(".//citekey/text()") nocite_elements = chapter_element.xpath(".//nocite") @@ -1195,34 +1239,74 @@ def add_bibliography_to_xml( logging.debug(f"Found {libeoaconvert.plural(len(set(nocitekeys)), 'nocite key')}.") logging.debug(f"Adding nocite keys to the other cite keys.") citekeys += nocitekeys + return citekeys + +def find_print_bibliography( + xml_context_element, + citations_json +): + """ + return a dict keyword -> print_bibl_el + """ + ret_list = {} + print_bibl_elements = xml_context_element.findall(".//EOAprintbibliography") + 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 + +def bib_keywords_sanity_check( + keyword_to_print_bibl_el, + # print_bibl_elements, + citations_json, + citekeys - for print_bibl_element in print_bibl_elements: - print_bibl_element.clear() - print_bibl_element.tag = "div" - bibliography_keyword = print_bibl_element.get("keyword") - if len(print_bibl_elements) > 1 and not bibliography_keyword: +): + if len(keyword_to_print_bibl_el) == 1 and keyword_to_print_bibl_el.keys()[0] != "": + logging.warning("Found a keyword in bibliography although there is only one.") + + for keyword, print_bibl_element in keyword_to_print_bibl_el.items(): + logging.debug( f"print_bibl_element: {etree.tostring(print_bibl_element)}" ) + if len(keyword_to_print_bibl_el) > 1 and keyword == "": logging.error(f"No bibliography keyword found. Since there is more than one bibliography, all bibliographies are required to have a keyword. Exiting ") sys.exit(1) - if bibliography_keyword: - logging.debug(f"Found bibliography keyword {bibliography_keyword}") - print_bibl_element.set("keyword", bibliography_keyword) + if keyword != "": + logging.debug(f"Found bibliography keyword {keyword}") - bib_parent = print_bibl_element.getparent() - bib_parent.tag = "div" - - # create bibliographies per keyword - if bibliography_keyword: + # just for debugging (?): logging.info("We want to collect the entries matching the keywords from the database.") - citations_with_keyword = [x["id"] for x in citations_json if bibliography_keyword in x["keyword"]] - logging.debug(f"Found {libeoaconvert.plural(len(citations_with_keyword), 'citation')} with keyword {bibliography_keyword} in database.") + citations_with_keyword = [x["id"] for x in citations_json if keyword in x["keyword"]] + logging.debug(f"Found {libeoaconvert.plural(len(citations_with_keyword), 'citation')} with keyword {keyword} in database.") citations_to_format = [x for x in citations_with_keyword if x in citekeys] - logging.debug(f"Found {libeoaconvert.plural(len(citations_to_format), 'citation')} with keyword {bibliography_keyword} that are actually cited.") + logging.debug(f"Found {libeoaconvert.plural(len(citations_to_format), 'citation')} with keyword {keyword} that are actually cited.") + +def add_bibliography_to_xml( + keyword_to_print_bibl_el, + chapter_element, + citations_json, + formatted_bibliographies +): + for keyword, print_bibl_el in keyword_to_print_bibl_el.items(): + formatted_bibl = formatted_bibliographies[keyword] + logging.debug( f"insert formatted bibliography for keyword {keyword}:" ) + logging.debug( etree.tostring( formatted_bibl ) ) + + fixed_entries = libeoaconvert.fix_bib_entries( formatted_bibl ) + + print_bibl_el.clear() + if keyword != "" : + print_bibl_el.set("keyword", keyword) + print_bibl_el.tag = "div" + bib_parent = print_bibl_el.getparent() + bib_parent.tag = "div" - fixed_entries = libeoaconvert.fix_bib_entries(formatted_references) for entry in fixed_entries: - print_bibl_element.append(entry) + print_bibl_el.append(entry) ############################################################## # actual script # @@ -1314,6 +1398,7 @@ def add_bibliography_to_xml( xmlTree ) + if bibl_info is None: logging.warning("No bibliography database found.") else: @@ -1339,69 +1424,33 @@ def add_bibliography_to_xml( # If Bibliography-Type is monograph search for EOAbibliography and make it all if bib_type == "monograph": - xmlBibliographies = xmlTree.findall(".//EOAprintbibliography") - if len(xmlBibliographies) > 0: - logging.debug(f"Found {libeoaconvert.plural(len(xmlBibliographies), 'bibliography', plural='bibliographies')}.") - citekeys = xmlTree.xpath(".//citekey/text()") - # use language of the first chapter: - strLanguage = xmlChapters[0].get( "language" ) - formatted_bibl_info = bib2html.main( + keyword_to_print_bibl_el = insert_bibliographies( + xmlTree, + xmlChapters[0].get( "language" ), + citations_json, + ## paths: bib_file = (INPUT_DIR / bib_database).with_suffix( ".bib" ), - citekeys = citekeys, tex_template = BASE_DIR / "bibformat" / "4ht" / "bibliography4ht.tex", - language = strLanguage, temp_dir = TEMP_DIR / "bib2html" / "monograph-tmp", output_file = TEMP_DIR / "bib2html" / "used_citations-monograph.html", - log_dir = LOG_DIR / SCRIPT_NAME / "bib2html" - ) - formatted_references = formatted_bibl_info['references'] - - logging.debug( "formatted bibliography:" ) - logging.debug( etree.tostring(formatted_references) ) - add_bibliography_to_xml( - xmlBibliographies, - xmlTree, - citations_json, - formatted_references - ) - else: - # create an empty file - logging.debug("No bibliography found.") - # open(TEMP_DIR / (tmp_citation_filename + "_nocitations"), 'a').close() + log_dir = LOG_DIR / SCRIPT_NAME / "bib2html", + ) # If Bibliography-Type is anthology search for EOAbibliography and make one per chapter elif bib_type == "anthology": for intChapterNumber, xmlChapter in enumerate(xmlChapters, start = 1): logging.debug(f"Looking at chapter {intChapterNumber}.") - # tmp_citation_filename = TEMP_DIR / "bib2html" / ("used_citations-anthology-chapter_{:02d}".format(intChapterNumber)) - xmlBibliographies = xmlChapter.findall(".//EOAprintbibliography") - if len(xmlBibliographies) > 0: - - strLanguage = xmlChapter.get( "language" ) - citekeys = xmlChapter.xpath(".//citekey/text()") - formatted_bibl_info = bib2html.main( + keyword_to_print_bibl_el = insert_bibliographies( + xmlChapter, + xmlChapter.get("language"), + citations_json, + ## paths: bib_file = (INPUT_DIR / bib_database).with_suffix( ".bib" ), - citekeys = citekeys, tex_template = BASE_DIR / "bibformat" / "4ht" / "bibliography4ht.tex", - language = strLanguage, temp_dir = TEMP_DIR / "bib2html" / "chapter_{:02d}-tmp".format( intChapterNumber ), output_file = TEMP_DIR / "bib2html" / "used_citations-anthology-chapter_{:02d}.html".format( intChapterNumber ), log_dir = LOG_DIR / SCRIPT_NAME / "bib2html" - ) - formatted_references = formatted_bibl_info['references'] - logging.debug( "formatted bibliography:" ) - logging.debug( etree.tostring(formatted_references) ) - add_bibliography_to_xml( - xmlBibliographies, - xmlChapter, - citations_json, - formatted_references - ) - - else: - # create an empty file - logging.debug("No bibliography found.") - # open(TEMP_DIR / (tmp_citation_filename + "_nocitations"), 'a').close() + ) """ @@ -1706,16 +1755,21 @@ def add_bibliography_to_xml( intChapterNumber += 1 # this is somewhat luzzini-specific -bib_parent_element = xmlBibliographies[0].getparent() -upper_div = bib_parent_element.xpath("./ancestor::div1")[0] -previous_div0 = upper_div.getparent() - -# possible culprit for not finding the index -# other_content = bib_parent_element.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") -other_content = upper_div.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") -if len(other_content) > 0: - for element in other_content: - previous_div0.append(element) +def do_something_funny_about_indices(): + print_bibl_elements = xmlTree.findall(".//EOAprintbibliography") + if len(print_bibl_elements) > 0: + bib_parent_element = print_bibl_elements[0].getparent() + # bib_parent_element = xmlBibliographies[0].getparent() + upper_div = bib_parent_element.xpath("./ancestor::div1")[0] + previous_div0 = upper_div.getparent() + # possible culprit for not finding the index + # other_content = bib_parent_element.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") + other_content = upper_div.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") + if len(other_content) > 0: + for element in other_content: + previous_div0.append(element) + +do_something_funny_about_indices() etree.strip_tags(xmlTree, "tagtobestripped") etree.strip_elements(xmlTree, "elementtobestripped", with_tail=False) diff --git a/utils/bib2html.py b/utils/bib2html.py index c893e86..c6b4bc3 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -73,6 +73,7 @@ def write_dummy_latex( citekeys, bibfile, language, + keywords, template_path, tmp_filename ): @@ -93,6 +94,13 @@ def write_dummy_latex( fill_in_template = string.Template(template) + bibliographies = "" + for keyword in keywords: + bibliographies += \ + f""" +\chapter{{{keyword}}} +\printbibliography[keyword={{{keyword}}}]\n""" + bibfile_path = \ bibfile if bibfile.is_absolute() else Path.cwd() / bibfile substitions = fill_in_template.substitute( @@ -100,7 +108,8 @@ def write_dummy_latex( # language = translations[language], bibfile = bibfile_path, # bibfile = '../' + bibfile, - citations = allcitekeys + citations = allcitekeys, + bibliographies = bibliographies ) with open(tmp_filename, "w") as texfile: @@ -116,7 +125,7 @@ def run_htlatex( ): """Create HTML file from temporary LaTeX file""" exec_command( - f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8' '' '--halt-on-error'", + f"htxelatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8' '' '--interaction=nonstopmode'", output_to = ToFile( Path(log_dir) / "htlatex1.log" ) ) exec_command( @@ -124,7 +133,7 @@ def run_htlatex( output_to = ToFile( Path(log_dir) / "biber.log" ) ) exec_command( - f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8' '' '--halt-on-error'", + f"htxelatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8' '' '--interaction=nonstopmode'", output_to = ToFile( Path(log_dir) / "htlatex2.log" ) ) # def run_htlatex ends here @@ -207,21 +216,26 @@ def main( temp_dir, output_file, # tmp_filename = "temp", + keywords = [""], log_dir = "logs" ): + ''' temp_dir = Path( temp_dir ) output_file = Path( output_file ) # tmp_filename = Path( tmp_filename ) if not temp_dir.exists(): os.makedirs( temp_dir ) + ''' tmp_filename = Path(output_file.name) . with_suffix( "" ) + ''' write_dummy_latex( citekeys, bib_file, language, + keywords, template_path = tex_template, tmp_filename = temp_dir / tmp_filename . with_suffix( ".tex" ) ) @@ -238,8 +252,10 @@ def main( tmp_path_html = temp_dir / tmp_filename . with_suffix( ".html" ) tmp_path_html_fixed1 = temp_dir / tmp_filename . with_suffix( ".1.html" ) + ''' tmp_path_html_fixed2 = temp_dir / tmp_filename . with_suffix( ".2.html" ) + ''' # htlatex seems to produce incorrect xhtml. # We have to fix it # (this will e.g. replace '&' by '&'): @@ -255,12 +271,27 @@ def main( out_file.write( unicodedata.normalize("NFKD", line) ) + ''' xml_tree = etree.parse(str(tmp_path_html_fixed2)) citation_authoryear = create_citations(citekeys, xml_tree, "authoryear") citation_year = create_citations(citekeys, xml_tree, "year") + bibliographies_dict = {} + + for keyword in keywords: + bibliography_el = xml_tree.xpath( + f"//x:body/x:p[text() = '{keyword}']/following-sibling::x:dl[1]", + namespaces = NS_MAP + ) + if( len(bibliography_el) != 1 ): + logging.error( f"error parsing bibliography with keyword '{keyword}'" ) + sys.exit( 1 ) + bibliographies_dict[keyword] = bibliography_el[0] + + ''' + xml_tree.xpath(f"//x:dl[@class='thebibliography']", namespaces=NS_MAP)[0] reference_list = xml_tree.xpath(f"//x:dl[@class='thebibliography']", namespaces=NS_MAP)[0] reference_div = create_reference_list(reference_list) @@ -274,9 +305,10 @@ def main( tree = etree.ElementTree(html_element) logging.info("writing '%s'" % output_file) tree.write(str(output_file), pretty_print=True, xml_declaration=True, encoding="utf-8") + ''' return { - "references": reference_div, + "references": bibliographies_dict, "citation_authoryear": citation_authoryear, "citation_year": citation_year, } From 698aecf3d1fb94e535cb8c8f67e824f11ddb6b6e Mon Sep 17 00:00:00 2001 From: EsGeh Date: Wed, 17 Apr 2019 13:58:30 +0200 Subject: [PATCH 032/132] fixed accidentally broken script (had forgotten to uncomment code). --- utils/bib2html.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index c6b4bc3..d2c5b48 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -219,18 +219,15 @@ def main( keywords = [""], log_dir = "logs" ): - ''' temp_dir = Path( temp_dir ) output_file = Path( output_file ) # tmp_filename = Path( tmp_filename ) if not temp_dir.exists(): os.makedirs( temp_dir ) - ''' tmp_filename = Path(output_file.name) . with_suffix( "" ) - ''' write_dummy_latex( citekeys, bib_file, @@ -252,10 +249,8 @@ def main( tmp_path_html = temp_dir / tmp_filename . with_suffix( ".html" ) tmp_path_html_fixed1 = temp_dir / tmp_filename . with_suffix( ".1.html" ) - ''' tmp_path_html_fixed2 = temp_dir / tmp_filename . with_suffix( ".2.html" ) - ''' # htlatex seems to produce incorrect xhtml. # We have to fix it # (this will e.g. replace '&' by '&'): @@ -271,7 +266,6 @@ def main( out_file.write( unicodedata.normalize("NFKD", line) ) - ''' xml_tree = etree.parse(str(tmp_path_html_fixed2)) @@ -290,7 +284,6 @@ def main( sys.exit( 1 ) bibliographies_dict[keyword] = bibliography_el[0] - ''' xml_tree.xpath(f"//x:dl[@class='thebibliography']", namespaces=NS_MAP)[0] reference_list = xml_tree.xpath(f"//x:dl[@class='thebibliography']", namespaces=NS_MAP)[0] reference_div = create_reference_list(reference_list) @@ -305,7 +298,6 @@ def main( tree = etree.ElementTree(html_element) logging.info("writing '%s'" % output_file) tree.write(str(output_file), pretty_print=True, xml_declaration=True, encoding="utf-8") - ''' return { "references": bibliographies_dict, From 387e9522da1079a9faab999555399615b4e8a186 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Wed, 17 Apr 2019 14:08:29 +0200 Subject: [PATCH 033/132] index creation should work in pdf generation now ( fixes#27 ) --- eoatex2pdf.py | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/eoatex2pdf.py b/eoatex2pdf.py index 1a59928..cc680a1 100755 --- a/eoatex2pdf.py +++ b/eoatex2pdf.py @@ -28,30 +28,43 @@ def main( output_dir = Path( output_dir ) fixed_file_path = output_dir / input_file.name libeoaconvert.enable_preamble( - input_file, - fixed_file_path, - "pdf" + input_file = input_file, + output_file = fixed_file_path, + pdf_or_xml = "pdf" ) copy_dir_overwrite( - input_file.resolve().parent / "texfiles", + input_dir / "texfiles", output_dir / "texfiles" ) + copy_dir_overwrite( + input_dir / "preambel", + output_dir / "preambel" + ) + if (input_dir / "images").exists(): + copy_dir_overwrite( + input_dir / "images", + output_dir / "images" + ) + if (input_dir / "facsim").exists(): + copy_dir_overwrite( + input_dir / "facsim", + output_dir / "facsim" + ) output_dir = output_dir.resolve() cwd = Path.cwd() - os.chdir( input_dir ) - logging.info( "cd {}".format( input_dir ) ) + os.chdir( output_dir ) + logging.info( "cd {}".format( output_dir ) ) exec_command( - f"xelatex --halt-on-error --output-directory={output_dir} {input_file.name}", + f"xelatex --halt-on-error {input_file.name}", ) exec_command( "biber {}".format( input_file.stem ), - wd = output_dir ) exec_command( - f"xelatex --halt-on-error --output-directory={output_dir} {input_file.name}", + f"xelatex --halt-on-error {input_file.name}", ) exec_command( - f"xelatex --halt-on-error --output-directory={output_dir} {input_file.name}", + f"xelatex --halt-on-error {input_file.name}", ) logging.info( "cd {}".format( cwd ) ) os.chdir( cwd ) From 08c5098ffdc7ff630d7462cf41f98a025c3598e9 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Wed, 17 Apr 2019 15:12:57 +0200 Subject: [PATCH 034/132] cleaning dead code --- utils/bib2html.py | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index d2c5b48..6a13de7 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -20,6 +20,7 @@ import shutil from lxml import etree from pathlib import Path +import sys BASE_DIR = Path( __file__ ).resolve().parent.parent SCRIPT_PATH = Path( __file__ ) @@ -154,13 +155,11 @@ def create_citations(citekeys, xml_tree, style): for citekey in citekeys: logging.debug(f"working on citekey: {citekey}" ) - ligated_citekey = fix_citekey(citekey) if style == "authoryear": - format_citation = xml_tree.xpath(f"//x:h4[text() = '{ligated_citekey}']/following-sibling::x:p[2]/text()", namespaces=NS_MAP)[0].strip() + format_citation = xml_tree.xpath(f"//x:h4[text() = '{citekey}']/following-sibling::x:p[2]/text()", namespaces=NS_MAP)[0].strip() else: - format_citation = xml_tree.xpath(f"//x:h4[text() = '{ligated_citekey}']/following-sibling::x:p[3]/text()", namespaces=NS_MAP)[0].strip() + format_citation = xml_tree.xpath(f"//x:h4[text() = '{citekey}']/following-sibling::x:p[3]/text()", namespaces=NS_MAP)[0].strip() span_element = etree.fromstring(f"""{format_citation}""") - # logging.debug(citekey, ligated_citekey) p_element.append(span_element) @@ -169,26 +168,6 @@ def create_citations(citekeys, xml_tree, style): return(surrounding_div) # def create_citations ends here - -def fix_citekey(citekey): - """Remove ligatures from citekey""" - - # import unicodedata - - ''' - replacements = { - "ff" : "ff", - "ffi" : "ffi", - } - - for replacement in replacements.keys(): - ligated_citekey = citekey.replace(replacement, replacements[replacement]) - return ligated_citekey - ''' - return citekey -# def fix_citekey ends here - - def create_reference_list(reference_list): """Create HTML snippet for list of references""" From c928b723b5f02fb7df4436f4fa664e8e9eda92eb Mon Sep 17 00:00:00 2001 From: EsGeh Date: Wed, 17 Apr 2019 15:20:22 +0200 Subject: [PATCH 035/132] fix pdf generation: fetch inline pictures before running latex. --- eoatex2pdf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eoatex2pdf.py b/eoatex2pdf.py index cc680a1..828139e 100755 --- a/eoatex2pdf.py +++ b/eoatex2pdf.py @@ -40,6 +40,11 @@ def main( input_dir / "preambel", output_dir / "preambel" ) + if (input_dir / "inline").exists(): + copy_dir_overwrite( + input_dir / "inline", + output_dir / "inline" + ) if (input_dir / "images").exists(): copy_dir_overwrite( input_dir / "images", From d92e643a992ad65f33a5a4cb31df182cf5e93352 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Tue, 23 Apr 2019 12:04:55 +0200 Subject: [PATCH 036/132] generating pdf or imxml should work with one or multiple bibliographies now --- eoatex2imxml.py | 2 +- utils/bib2html.py | 23 +++++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index dbb44d5..f5255b3 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1265,7 +1265,7 @@ def bib_keywords_sanity_check( citekeys ): - if len(keyword_to_print_bibl_el) == 1 and keyword_to_print_bibl_el.keys()[0] != "": + if len(keyword_to_print_bibl_el) == 1 and list(keyword_to_print_bibl_el.keys())[0] != "": logging.warning("Found a keyword in bibliography although there is only one.") for keyword, print_bibl_element in keyword_to_print_bibl_el.items(): diff --git a/utils/bib2html.py b/utils/bib2html.py index 6a13de7..efc1d10 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -30,6 +30,9 @@ NS_MAP = {"x" : 'http://www.w3.org/1999/xhtml'} +BIBLIOGRAPHY_CHAPTER_NO_KEYWORD = "BIBLIOGRAPHY" +BIBLIOGRAPHY_CHAPTER = "BIBLIOGRAPHY {keyword}" + def check_executables(): check_executable( "htlatex" ) check_executable( "tidy" ) @@ -97,9 +100,17 @@ def write_dummy_latex( bibliographies = "" for keyword in keywords: - bibliographies += \ - f""" -\chapter{{{keyword}}} + if keyword == "": + chapter_heading = BIBLIOGRAPHY_CHAPTER_NO_KEYWORD + bibliographies += \ + f""" +\chapter{{{chapter_heading}}} +\printbibliography\n""" + else: + chapter_heading = BIBLIOGRAPHY_CHAPTER.format( keyword=keyword ) + bibliographies += \ + f""" +\chapter{{{chapter_heading}}} \printbibliography[keyword={{{keyword}}}]\n""" bibfile_path = \ @@ -254,8 +265,12 @@ def main( bibliographies_dict = {} for keyword in keywords: + if keyword == "": + chapter_heading = BIBLIOGRAPHY_CHAPTER_NO_KEYWORD + else: + chapter_heading = BIBLIOGRAPHY_CHAPTER.format( keyword = keyword ) bibliography_el = xml_tree.xpath( - f"//x:body/x:p[text() = '{keyword}']/following-sibling::x:dl[1]", + f"//x:body/x:p[text() = '{chapter_heading}']/following-sibling::x:dl[1]", namespaces = NS_MAP ) if( len(bibliography_el) != 1 ): From 3cf3d560c3d2569db680a35ee9c97c40a14de773 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 23 Apr 2019 16:13:49 +0200 Subject: [PATCH 037/132] Using EOAchapterauthor in favour of EOAauthor --- tei2eoatex.xsl | 655 ++++++++++++++++++++++++++++--------------------- 1 file changed, 371 insertions(+), 284 deletions(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index 1c3839c..f926d9c 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -584,33 +584,39 @@ contexts, a double replacement is performed. - - - - - - \EOAchapter + + - - nonumber - - - - - { - - }{ - + + - { - - }{ - + - + + \EOAchapter + + + nonumber + + + + + { + + }{ + + + + { + + }{ + + + + } @@ -666,12 +672,25 @@ contexts, a double replacement is performed. + } + + + + + + + \EOAlabel{ + + } + + + - \EOAauthor{ + \EOAchapterauthor{ @@ -679,7 +698,7 @@ contexts, a double replacement is performed. } - \EOAauthor{ + \EOAchapterauthor{ @@ -690,7 +709,7 @@ contexts, a double replacement is performed. } - \EOAauthor{ + \EOAchapterauthor{ @@ -707,295 +726,363 @@ contexts, a double replacement is performed. - - } - - - + + { + + } - \EOAlabel{ - - } + {none} - \input{ + \input{ } - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - \EOAchapter - - - nonumber - - - - - - - - { - - }{ - - - - { - - }{ - - - - - - - + + + \EOAchapter + + + nonumber + + + + + + + + { + + }{ + + + + { + + }{ + + + + + - - - } - - - + + and + + + + } - \EOAlabel{ - - } + - - \input{ - - } - - - - - - - + + --> + } + + + + + + \EOAlabel{ + + } + + + + + + + + \EOAchapterauthor{ + + + + + } + + + \EOAchapterauthor{ + + + + + and + + + } + + + \EOAchapterauthor{ + + + + + + , + + + and + + + + } + right + + + + + + + + + { + + } + + + {none} + + + + \input{ + + } + + + + + + + + + + + + + + - - - - - - - - - - \noindent\textbf{ - - - - - }\par - + + + + + + + + + + \noindent\textbf{ + + + + + }\par + + \noindent + + \\ + \noindent - + \\ - - \noindent - - \\ - - \noindent - - \\ - - - + + \noindent + + \\ + + - - + + + - - - - \pagestyle{empty} \pagenumbering{roman} \setcounter{page}{1} ⸎ - - \begin{center} \Large{ - - }\\ \vspace{2mm} \large{ + + + + \pagestyle{empty} \pagenumbering{roman} \setcounter{page}{1} ⸎ + + \begin{center} \Large{ + + }\\ \vspace{2mm} \large{ + + } \end{center} \newpage + + \begin{center} \large \EOAbold{ + + } \end{center} + \vspace{15mm} \noindent\EOAbold{ + + }\\[2mm] + + + \vspace{10mm} \noindent\EOAbold{Edition Open Access Development Team}\\[2mm] + + \vspace{10mm} \noindent + + \vspace{3pt} \noindent + + \newpage + + \begin{minipage}[t]{90mm} + \vspace*{12mm} \begin{center} \Large { + + }\\ \vspace{2mm} + + \large{ - } \end{center} \newpage - - \begin{center} \large \EOAbold{ - - } \end{center} - \vspace{15mm} \noindent\EOAbold{ - - }\\[2mm] - - - \vspace{10mm} \noindent\EOAbold{Edition Open Access Development Team}\\[2mm] - - \vspace{10mm} \noindent - - \vspace{3pt} \noindent - - \newpage - - \begin{minipage}[t]{90mm} - \vspace*{12mm} \begin{center} \Large { - - }\\ \vspace{2mm} - - \large{ - - } - - \end{center} \vspace{10mm} \begin{center} \large + } + + \end{center} \vspace{10mm} \begin{center} \large - - - - + + + + - - - - - - - - - - - - - - \end{center} \vspace{126mm} \begin{center} \large {\EOAbold{ - - }} \end{center} \end{minipage}\newpage - - \begin{flushleft} \noindent - - \\ \noindent - - \\ \vspace{4mm} \noindent Submitted by: - + + + + + + + + + + + + + + \end{center} \vspace{126mm} \begin{center} \large {\EOAbold{ + + }} \end{center} \end{minipage}\newpage + + \begin{flushleft} \noindent + + \\ \noindent + + \\ \vspace{4mm} \noindent Submitted by: + + + + + \\ \vspace{4mm} + + \noindent Editorial Team:\\ + - + - \\ \vspace{4mm} - - \noindent Editorial Team:\\ - - - - - \\ - - \vspace{4mm} \noindent Image Processing: \\ - Digitization group of the Max Planck Institute for the History of Science\\ - - - \noindent Scholarly Support: - - - - - \noindent Financial Support: - - - - \vspace{4mm} \noindent Cover Image:\\ \noindent - - \\ \vspace{4mm} \noindent - - \end{flushleft} - \vfill \begin{flushleft} \begin{footnotesize} \noindent ISBN - - \\ First published - - by - - ,\\ Max Planck Institute for the History of Science\\ - - \\ - Printed and distributed by\\ - - \\ - Published under - \\ - - \\[2mm] The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available in the Internet at http://dnb.d-nb.de. - \end{footnotesize} \end{flushleft} \newpage \normalsize - - \noindent \small\EOAbold{ - - }\\ \vspace{6pt} \noindent - - \vspace{30pt} \noindent\small\EOAbold{Scientific Board}\\ \vspace{3pt} - \begin{footnotesize} \noindent - - \end{footnotesize} \clearpage \mbox{} - - - - \vspace*{25mm} \begin{center} - - \end{center} \clearpage \mbox{} - - - - \pagestyle{fancy} - - + + \vspace{4mm} \noindent Image Processing: \\ + Digitization group of the Max Planck Institute for the History of Science\\ + + + \noindent Scholarly Support: + + + + + \noindent Financial Support: + + + + \vspace{4mm} \noindent Cover Image:\\ \noindent + + \\ \vspace{4mm} \noindent + + \end{flushleft} + \vfill \begin{flushleft} \begin{footnotesize} \noindent ISBN + + \\ First published + + by + + ,\\ Max Planck Institute for the History of Science\\ + + \\ + Printed and distributed by\\ + + \\ + Published under + + \\ + + \\[2mm] The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available in the Internet at http://dnb.d-nb.de. + \end{footnotesize} \end{flushleft} \newpage \normalsize + + \noindent \small\EOAbold{ + + }\\ \vspace{6pt} \noindent + + \vspace{30pt} \noindent\small\EOAbold{Scientific Board}\\ \vspace{3pt} + \begin{footnotesize} \noindent + + \end{footnotesize} \clearpage \mbox{} + + + + \vspace*{25mm} \begin{center} + + \end{center} \clearpage \mbox{} + + + + \pagestyle{fancy} + + From db30e89a159af608d1957233d0171e1b20416cf0 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Tue, 23 Apr 2019 16:14:14 +0200 Subject: [PATCH 038/132] fixed html bibliography generation: output should be the same as before. --- eoatex2imxml.py | 3 +-- utils/bib2html.py | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index f5255b3..aaf8c3c 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1195,7 +1195,6 @@ def insert_bibliographies( citations_json, citekeys ) - # use language of the first chapter: formatted_bibl_info = bib2html.main( bib_file = bib_file, citekeys = citekeys, @@ -1402,7 +1401,6 @@ def add_bibliography_to_xml( if bibl_info is None: logging.warning("No bibliography database found.") else: - (bib_type, bib_database) = bibl_info logging.debug(f"bib type is {bib_type}") @@ -1426,6 +1424,7 @@ def add_bibliography_to_xml( if bib_type == "monograph": keyword_to_print_bibl_el = insert_bibliographies( xmlTree, + # use language of the first chapter: xmlChapters[0].get( "language" ), citations_json, ## paths: diff --git a/utils/bib2html.py b/utils/bib2html.py index efc1d10..b254c7f 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -42,7 +42,7 @@ def transform_reference(reference_element, dialect='html'): """Formatting transformation for reference element""" string_from_xml = etree.tostring(reference_element).decode('utf-8') - removed_linebreak = string_from_xml.replace("\n", "") + removed_linebreak = string_from_xml.replace("\n", " ") removed_namespace = removed_linebreak.replace('

', '

') cleaned_element = etree.fromstring(removed_namespace) @@ -269,6 +269,7 @@ def main( chapter_heading = BIBLIOGRAPHY_CHAPTER_NO_KEYWORD else: chapter_heading = BIBLIOGRAPHY_CHAPTER.format( keyword = keyword ) + # '

...
bibliography_el = xml_tree.xpath( f"//x:body/x:p[text() = '{chapter_heading}']/following-sibling::x:dl[1]", namespaces = NS_MAP @@ -276,16 +277,21 @@ def main( if( len(bibliography_el) != 1 ): logging.error( f"error parsing bibliography with keyword '{keyword}'" ) sys.exit( 1 ) - bibliographies_dict[keyword] = bibliography_el[0] + bibliography_el = bibliography_el[0] - xml_tree.xpath(f"//x:dl[@class='thebibliography']", namespaces=NS_MAP)[0] - reference_list = xml_tree.xpath(f"//x:dl[@class='thebibliography']", namespaces=NS_MAP)[0] - reference_div = create_reference_list(reference_list) + reference_div = create_reference_list(bibliography_el) + bibliographies_dict[keyword] = reference_div html_element = etree.Element("html") html_element.insert(0, citation_authoryear) html_element.insert(1, citation_year) - html_element.insert(2, reference_div) + for keyword in keywords: + bibl_el = etree.SubElement( + html_element, + "div", + **({} if keyword == "" else { 'keyword': keyword } ) + ) + bibl_el.append( bibliographies_dict[keyword] ) # print(etree.tostring(html_element)) From 57587d37d6d8d6b74a77624057c6d40c1da6187a Mon Sep 17 00:00:00 2001 From: EsGeh Date: Tue, 23 Apr 2019 16:28:58 +0200 Subject: [PATCH 039/132] some citations were chopped, should be ok now --- eoatex2imxml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index aaf8c3c..36a72d9 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1543,7 +1543,7 @@ def add_bibliography_to_xml( if xmlCitation.tag == "EOAciteauthoryear": strCitation = citeauthoryear_value elif xmlCitation.tag == "EOAciteyear": - strCitation = form_cit.select("#citeyear ~ p > span[data-cites='%s']" % string_citekey)[0].text[1:-1] + strCitation = form_cit.select("#citeyear ~ p > span[data-cites='%s']" % string_citekey)[0].text elif xmlCitation.tag == "EOAcitemanual": cite_text = xmlCitation.find("citetext") if cite_text.getchildren(): From 812b7e5951caf5037392fb4fd8fe5528943182f4 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Tue, 23 Apr 2019 16:30:07 +0200 Subject: [PATCH 040/132] cleaning up dead commented code --- utils/bib2html.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index b254c7f..f0cbce3 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -293,8 +293,6 @@ def main( ) bibl_el.append( bibliographies_dict[keyword] ) - # print(etree.tostring(html_element)) - tree = etree.ElementTree(html_element) logging.info("writing '%s'" % output_file) tree.write(str(output_file), pretty_print=True, xml_declaration=True, encoding="utf-8") From 593bb1214b140212a5016e75409c650298f2aedc Mon Sep 17 00:00:00 2001 From: EsGeh Date: Tue, 23 Apr 2019 17:07:46 +0200 Subject: [PATCH 041/132] dummy cover generation script picks an image with the right file suffix --- mkimage.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/mkimage.py b/mkimage.py index bbfcb98..11ad51d 100755 --- a/mkimage.py +++ b/mkimage.py @@ -38,21 +38,20 @@ def get_cover_image(image_path): """Choose a random landscape image from publications in this volume""" - import random - - candidates = os.listdir(image_path) - + import random, glob + extensions = ("png", "jpg") + candidates = [] + for extension in extensions: + path = f"{image_path}/**/*.{extension}" + candidates.extend( + glob.glob( path, recursive = True) + ) for image in candidates: - if image == ".DS_Store": - candidates.remove(image) - continue - tmp_image = Image.open(image_path + "/" + str(image)) + tmp_image = Image.open(str(image)) ratio = calculate_ratio(tmp_image) if ratio < 1: candidates.remove(image) - chosen_image = random.choice(candidates) - return chosen_image # def get_cover_image ends here @@ -209,7 +208,7 @@ def create_cover(metadata_dict, image_directory, cover_filename, image_is_file): text_draw.multiline_text((ptcenter,DIMENSIONS[1]-400), press_text_joined, font=small_font, align="center") if image_is_file == False: - image_on_cover = Image.open(os.path.join(image_directory, get_cover_image(image_directory))) + image_on_cover = Image.open(get_cover_image(image_directory)) else: image_on_cover = Image.open(image_directory) From 5db6ad0729f9745f03d8224bae0a4c2f9d7db429 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Tue, 23 Apr 2019 18:50:34 +0200 Subject: [PATCH 042/132] fixed and simplified imxml2django facsimile handling --- imxml2django.py | 2 +- utils/libeoaconvert.py | 63 ++++++++++++++++++++---------------------- 2 files changed, 31 insertions(+), 34 deletions(-) diff --git a/imxml2django.py b/imxml2django.py index 31e9272..82a009c 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -1127,7 +1127,7 @@ def check_publication_cfg(configuration_file): strImageFileDir = re.sub("/", "", strImageFileDir) strImageFileName = os.path.basename(strImageFile) shutil.copy( - INPUT_DIR / strImageFile, + PUBLICATION_DIR / strImageFile, CONVERT_DIR / "django/images" / (strImageFileDir + strImageFileName) ) # shutil.copy(os.getcwd() + "/" + strImageFile, os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName) diff --git a/utils/libeoaconvert.py b/utils/libeoaconvert.py index 6ffdd92..ce10d8f 100644 --- a/utils/libeoaconvert.py +++ b/utils/libeoaconvert.py @@ -71,34 +71,33 @@ def sanitizeImage( ): """Adjust and convert image for epub standard""" - if not os.path.exists(Path(tmp_dir) / "tmp_images/"): - os.makedirs(os.path.expanduser(Path(tmp_dir) / "tmp_images/")) + tmp_dir = Path( tmp_dir ) + strImagepath = Path( strImagepath ) + if not (tmp_dir / "tmp_images").exists(): + os.makedirs(tmp_dir / "tmp_images/") - tmp_image_dir = Path(tmp_dir) / "tmp_images/" - xelatex_sanitizeimage_logfile = open( Path(tmp_dir) / 'xelatex-run-images.log', 'w') + tmp_image_dir = tmp_dir / "tmp_images" logging.debug(strImagepath) - strCommand = GM_PATH + " identify -format \"%w\" " + str(strImagepath) - listArguments = shlex.split(strCommand) - exeShell = subprocess.check_output(listArguments, shell=False, universal_newlines=True) - intImageWidth = int(exeShell) + intImageWidth = int(subprocess.check_output( + shlex.split( f"{GM_PATH} identify -format \"%w\" {strImagepath}" ), + universal_newlines=True + )) if intImageWidth > 700: - strCommand = GM_PATH + " convert " + str(strImagepath) + " -resize 700x\\> " + str(strImagepath) - listArguments = shlex.split(strCommand) - subprocess.check_output(listArguments, shell=False) - strCommand = GM_PATH + " identify -format \"%h\" " + str(strImagepath) - listArguments = shlex.split(strCommand) - exeShell = subprocess.check_output(listArguments, shell=False, universal_newlines=True) - intImageHeight = int(exeShell) + exec_command( + f"{GM_PATH} convert {strImagepath} -resize 700x\\> {strImagepath}" + ) + intImageHeight = int( subprocess.check_output( + shlex.split( f"{GM_PATH} identify -format \"%h\" {strImagepath}" ), + universal_newlines=True + )) if intImageHeight > 1000: - strCommand = GM_PATH + " convert " + str(strImagepath) + " -resize x1000\\> " + str(strImagepath) - listArguments = shlex.split(strCommand) - subprocess.check_output(listArguments, shell=False) - strCommand = GM_PATH + " identify -format \"%m\" " + str(strImagepath) - listArguments = shlex.split(strCommand) - exeShell = subprocess.check_output(listArguments, shell=False, universal_newlines=True) - strFileFormat = str(exeShell) - strFileFormat = strFileFormat.strip() + exec_command( + f"{GM_PATH} convert {strImagepath} -resize x1000\\> {strImagepath}" + ) + strFileFormat = str( subprocess.check_output( + shlex.split( f"{GM_PATH} identify -format \"%m\" {strImagepath}" ) + )).strip() if strFileFormat == "JPEG": pass # print("looking at jpeg file") @@ -119,17 +118,15 @@ def sanitizeImage( # strImagepath = strNewImagepath + ".png" elif strFileFormat == "PDF": strNewImagepath = os.path.splitext(str(strImagepath))[0] - clipped_file = strImagepath.replace(".pdf", "-clipped.pdf") - - Kommando = PDFCROP_EXEC + " --margins 10 --clip --hires " + str(strImagepath) + " " + clipped_file - logging.debug(Kommando) + clipped_file = str(strImagepath).replace(".pdf", "-clipped.pdf") - Argumente = shlex.split(Kommando) - subprocess.call(Argumente, cwd=tmp_image_dir, stdout=xelatex_sanitizeimage_logfile) - - strCommand = GM_PATH + " convert -density 400 " + clipped_file + " " + strNewImagepath + ".png" - listArguments = shlex.split(strCommand) - subprocess.call(listArguments) + exec_command( + f"{PDFCROP_EXEC} --margins 10 --clip --hires {strImagepath} {clipped_file}", + # wd = tmp_image_dir + ) + exec_command( + f"{GM_PATH} convert -density 400 {clipped_file} {strNewImagepath}.png" + ) logging.debug("Removing two files: %s and %s " % (clipped_file, strImagepath)) os.remove(clipped_file) os.remove(strImagepath) From d22976608b482401c7583b09b7184884eb40ba19 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Wed, 24 Apr 2019 17:12:27 +0200 Subject: [PATCH 043/132] fix non-ascii problems with bibliography representing them as xml entities --- bibformat/4ht/bibliography4ht.tex | 5 +++ utils/bib2html.py | 54 ++++++++++++++++++++++++++++--- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/bibformat/4ht/bibliography4ht.tex b/bibformat/4ht/bibliography4ht.tex index 15cc7b6..9d60796 100644 --- a/bibformat/4ht/bibliography4ht.tex +++ b/bibformat/4ht/bibliography4ht.tex @@ -91,6 +91,11 @@ \bibliography{$bibfile} \begin{document} % \maketitle +\makeatletter +\def\hshchr{\expandafter\@gobble\string\#} +\def\ampchr{\expandafter\@gobble\string\&} +\def\entity#1{\HCode{\ampchr\hshchr#1;}} +\makeatother \section{Citations} diff --git a/utils/bib2html.py b/utils/bib2html.py index f0cbce3..6f4d70e 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -33,6 +33,15 @@ BIBLIOGRAPHY_CHAPTER_NO_KEYWORD = "BIBLIOGRAPHY" BIBLIOGRAPHY_CHAPTER = "BIBLIOGRAPHY {keyword}" +def latex_escape_non_ascii( input_str ): + output = "" + for c in input_str: + if ord(c) > 0x7F: + output += "\entity{{{}}}".format( ord(c) ) + else: + output += c + return output + def check_executables(): check_executable( "htlatex" ) check_executable( "tidy" ) @@ -82,6 +91,7 @@ def write_dummy_latex( tmp_filename ): """Prepare a latex file""" + tmp_dir = tmp_filename.parent allcitekeys = "" @@ -112,20 +122,45 @@ def write_dummy_latex( f""" \chapter{{{chapter_heading}}} \printbibliography[keyword={{{keyword}}}]\n""" + + bibfile_orig = (tmp_dir / (bibfile.stem + "_orig")) . with_suffix( ".bib" ) + bibfile_local = tmp_dir / bibfile.name + shutil.copyfile( + bibfile, + bibfile_orig + ) + import fileinput, unicodedata + with open( bibfile_local, "w") as out_file: + for line in fileinput.input(bibfile_orig): + out_file.write( + latex_escape_non_ascii( + line + ) + ) bibfile_path = \ bibfile if bibfile.is_absolute() else Path.cwd() / bibfile substitions = fill_in_template.substitute( language = language, # language = translations[language], - bibfile = bibfile_path, + bibfile = bibfile.name, + # bibfile = bibfile_path, # bibfile = '../' + bibfile, citations = allcitekeys, bibliographies = bibliographies ) + # (just for debugging: save with unescaped non-ascii characters) + with open(tmp_dir / (tmp_filename.name + ".orig"), "w") as texfile: + texfile.write( + substitions + ) with open(tmp_filename, "w") as texfile: - texfile.write(substitions) + texfile.write( + latex_escape_non_ascii( + substitions + ) + ) logging.info(f"Wrote {tmp_filename}") # def write_dummy_latex ends here @@ -137,7 +172,8 @@ def run_htlatex( ): """Create HTML file from temporary LaTeX file""" exec_command( - f"htxelatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8' '' '--interaction=nonstopmode'", + f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8,fn-in' ' -utf8' '' '--interaction=nonstopmode'", + # f"htxelatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8' '' '--interaction=nonstopmode'", output_to = ToFile( Path(log_dir) / "htlatex1.log" ) ) exec_command( @@ -145,7 +181,8 @@ def run_htlatex( output_to = ToFile( Path(log_dir) / "biber.log" ) ) exec_command( - f"htxelatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8' '' '--interaction=nonstopmode'", + f"htlatex {tmp_filename}.tex 'xhtml,charset=utf-8,fn-in' ' -utf8' '' '--interaction=nonstopmode'", + # f"htxelatex {tmp_filename}.tex 'xhtml,charset=utf-8' ' -cunihtf -utf8' '' '--interaction=nonstopmode'", output_to = ToFile( Path(log_dir) / "htlatex2.log" ) ) # def run_htlatex ends here @@ -230,22 +267,29 @@ def main( wd = Path.cwd() log_dir = log_dir.resolve() os.chdir( temp_dir ) + logging.info(f"cd {temp_dir}") run_htlatex( tmp_filename . with_suffix( "" ), # tmp_filename, log_dir = log_dir ) + logging.info(f"cd {wd}") os.chdir( wd ) tmp_path_html = temp_dir / tmp_filename . with_suffix( ".html" ) + tmp_path_html_utf8 = (temp_dir / (str(tmp_filename) + "-utf8")) . with_suffix( ".html" ) tmp_path_html_fixed1 = temp_dir / tmp_filename . with_suffix( ".1.html" ) tmp_path_html_fixed2 = temp_dir / tmp_filename . with_suffix( ".2.html" ) + exec_command( + f"iconv -f ISO-8859-1 -t UTF-8 --output={tmp_path_html_utf8} {tmp_path_html}" + ) + # htlatex seems to produce incorrect xhtml. # We have to fix it # (this will e.g. replace '&' by '&'): exec_command( - f"tidy -numeric -output {tmp_path_html_fixed1} {tmp_path_html}", + f"tidy -numeric -output {tmp_path_html_fixed1} {tmp_path_html_utf8}", exit_code_ok = lambda x: x in (0,1) ) import fileinput, unicodedata From e57cce7c9a5315c1cd7401a683875f1b5857dbaa Mon Sep 17 00:00:00 2001 From: EsGeh Date: Thu, 25 Apr 2019 13:31:10 +0200 Subject: [PATCH 044/132] citations in temporary html are represented as html table --- utils/bib2html.py | 48 +++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index 6f4d70e..9964cb8 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -21,6 +21,7 @@ from lxml import etree from pathlib import Path import sys +import textwrap BASE_DIR = Path( __file__ ).resolve().parent.parent SCRIPT_PATH = Path( __file__ ) @@ -94,14 +95,10 @@ def write_dummy_latex( tmp_dir = tmp_filename.parent allcitekeys = "" - + allcitekeys += "\\begin{tabular}{l l l}\n" for key in citekeys: - allcitekeys += """ -\subsection*{%s} -\subsubsection*{authoryear} -\cite{%s} -\subsubsection*{year} -\cite*{%s}\n""" % (key, key, key) + allcitekeys += f"\\verb|{key}| &\\cite{{{key}}}&\\cite*{{{key}}}\\\\\n" + allcitekeys += "\\end{tabular}\n" with open(template_path, "r") as tmp_template: template = tmp_template.read() @@ -113,15 +110,21 @@ def write_dummy_latex( if keyword == "": chapter_heading = BIBLIOGRAPHY_CHAPTER_NO_KEYWORD bibliographies += \ - f""" -\chapter{{{chapter_heading}}} -\printbibliography\n""" + textwrap.dedent( + f""" + \chapter{{{chapter_heading}}} + \printbibliography + """ + ) else: chapter_heading = BIBLIOGRAPHY_CHAPTER.format( keyword=keyword ) bibliographies += \ - f""" -\chapter{{{chapter_heading}}} -\printbibliography[keyword={{{keyword}}}]\n""" + textwrap.dedent( + f""" + \chapter{{{chapter_heading}}} + \printbibliography[keyword={{{keyword}}}] + """ + ) bibfile_orig = (tmp_dir / (bibfile.stem + "_orig")) . with_suffix( ".bib" ) bibfile_local = tmp_dir / bibfile.name @@ -202,11 +205,24 @@ def create_citations(citekeys, xml_tree, style): p_element = etree.Element("p") for citekey in citekeys: - logging.debug(f"working on citekey: {citekey}" ) + logging.debug( f"working on citekey: '{citekey}', style: '{style}'" ) + citation_el = None if style == "authoryear": - format_citation = xml_tree.xpath(f"//x:h4[text() = '{citekey}']/following-sibling::x:p[2]/text()", namespaces=NS_MAP)[0].strip() + citation_el = xml_tree.xpath( + f"//x:table/x:tr/x:td[.//x:span[text() = '{citekey}'] ]/following-sibling::x:td[1]/text()", + namespaces=NS_MAP + ) else: - format_citation = xml_tree.xpath(f"//x:h4[text() = '{citekey}']/following-sibling::x:p[3]/text()", namespaces=NS_MAP)[0].strip() + citation_el = xml_tree.xpath( + f"//x:table/x:tr/x:td[.//x:span[text() = '{citekey}'] ]/following-sibling::x:td[2]/text()", + namespaces=NS_MAP + ) + if( len(citation_el) == 0 ): + logging.error( f"error parsing formatted citation: '{citekey}', style: '{style}'" ) + sys.exit( 1 ) + + format_citation = citation_el[0].strip() + logging.debug( f"formatted: '{format_citation}'" ) span_element = etree.fromstring(f"""{format_citation}""") p_element.append(span_element) From bf0c0415d5e7197460359e5d6973fbecd58b6146 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 29 Apr 2019 16:53:43 +0200 Subject: [PATCH 045/132] Attribute name change --- tei2imxml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index 7593981..88f1476 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -605,11 +605,11 @@ def handle_refs_hyperimage(ref): figure_width = etree.SubElement(fig_p_element, "width").text = "60" #whatever #

images/1.jpg33

- if figure_type == "hiviewer": + if figure_type == "hitrue": # display image in hyperimage viewer, not in lightbox # hi_id needs to be looked up in hi_figures.csv logging.debug("Found figure for hiviewer.") - hi_id = figure.get("corresp")[1:] + hi_id = figure.attrib["{http://www.w3.org/XML/1998/namespace}id"] hi_code = hi_lookup(hi_id) figure.set("hielement", hi_code) else: From 61407f1ec80632da260d3e3c6b11b411797e86e9 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 29 Apr 2019 16:54:14 +0200 Subject: [PATCH 046/132] Hyperimage specific processing --- tei2eoatex.xsl | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index f926d9c..9230d7f 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -414,10 +414,6 @@ contexts, a double replacement is performed. } - - \refstepcounter{figure}⸎ - - @@ -462,7 +458,9 @@ contexts, a double replacement is performed. - + + + \EOAfigure{ }{ @@ -484,6 +482,17 @@ contexts, a double replacement is performed. {ht} + + + + + + + + + \refstepcounter{figure}⸎ + + From ceb272424e02688ae16b2f6f1f16aaf09b174001 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 29 Apr 2019 16:54:32 +0200 Subject: [PATCH 047/132] More identifiers --- tei2eoatex.xsl | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index 9230d7f..4f8d203 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -1054,8 +1054,24 @@ contexts, a double replacement is performed. \\ \vspace{4mm} \noindent \end{flushleft} - \vfill \begin{flushleft} \begin{footnotesize} \noindent ISBN + \vfill \begin{flushleft} \begin{footnotesize} + + +\noindent ISBN + \\ + + + +\noindent e-ISBN [PDF] + + \\ + + + +\noindent e-ISBN [EPUB] + + \\ First published by From 7709c8039c77318be8f177a0708ce2bbd5216358 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 29 Apr 2019 16:54:54 +0200 Subject: [PATCH 048/132] Make image processing configurable --- tei2eoatex.xsl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index 4f8d203..658c91e 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -1036,9 +1036,16 @@ contexts, a double replacement is performed. \\ - \vspace{4mm} \noindent Image Processing: \\ - Digitization group of the Max Planck Institute for the History of Science\\ - + \vspace{4mm} + +\noindent Image Processing: \\ + + + + + \\ + + \noindent Scholarly Support: From 088deef4c887ae61b7757721bda434e559826381 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 29 Apr 2019 16:55:08 +0200 Subject: [PATCH 049/132] xpath changes --- tei2eoatex.xsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index 658c91e..13b9040 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -597,10 +597,10 @@ contexts, a double replacement is performed. - + - + From 0b90e16704a42b34e2a6fd99337c991341fb296a Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 29 Apr 2019 17:06:07 +0200 Subject: [PATCH 050/132] Subtitles can be wrapped, as well --- mkimage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mkimage.py b/mkimage.py index 11ad51d..650f86b 100755 --- a/mkimage.py +++ b/mkimage.py @@ -191,7 +191,10 @@ def create_cover(metadata_dict, image_directory, cover_filename, image_is_file): text_draw.multiline_text((ttcenter, 200), title_text_joined, font=big_bold_font, align="center") if len(subtitle_text) > 0: - text_draw.text((centered(subtitle_text, medium_font), 350), subtitle_text, font=medium_font, fill=fill_colour_top) + subtitle_lines = textwrap.wrap(subtitle_text, width=40) + subtitle_lines_joined = "\n".join(subtitle_lines) + subtitle_center = centered(subtitle_lines_joined, medium_font) + text_draw.multiline_text((subtitle_center, 350), subtitle_lines_joined, font=medium_font, fill=fill_colour_top, align="center") authors_text_lines = textwrap.wrap(authors_text, width=50) authors_text_joined = "\n".join(authors_text_lines) From 0453711b6f3cb1c84854715272aea9f15bdd76e4 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 6 May 2019 12:46:49 +0200 Subject: [PATCH 051/132] Hyperimage exception --- tei2eoatex.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index 13b9040..91b91a5 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -154,7 +154,7 @@ contexts, a double replacement is performed. - + \noindent From 30835121fc11a0d567cc891ba839a7b65482da7e Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 6 May 2019 17:53:53 +0200 Subject: [PATCH 052/132] in scrartcl, there are no chapters --- utils/bib2html.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index 9964cb8..f48ec10 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -108,24 +108,24 @@ def write_dummy_latex( bibliographies = "" for keyword in keywords: if keyword == "": - chapter_heading = BIBLIOGRAPHY_CHAPTER_NO_KEYWORD + section_heading = BIBLIOGRAPHY_CHAPTER_NO_KEYWORD bibliographies += \ textwrap.dedent( f""" - \chapter{{{chapter_heading}}} + \section{{{section_heading}}} \printbibliography """ ) else: - chapter_heading = BIBLIOGRAPHY_CHAPTER.format( keyword=keyword ) + section_heading = BIBLIOGRAPHY_CHAPTER.format( keyword=keyword ) bibliographies += \ textwrap.dedent( f""" - \chapter{{{chapter_heading}}} + \section{{{section_heading}}} \printbibliography[keyword={{{keyword}}}] """ ) - + bibfile_orig = (tmp_dir / (bibfile.stem + "_orig")) . with_suffix( ".bib" ) bibfile_local = tmp_dir / bibfile.name shutil.copyfile( @@ -326,12 +326,12 @@ def main( for keyword in keywords: if keyword == "": - chapter_heading = BIBLIOGRAPHY_CHAPTER_NO_KEYWORD + section_heading = BIBLIOGRAPHY_CHAPTER_NO_KEYWORD else: - chapter_heading = BIBLIOGRAPHY_CHAPTER.format( keyword = keyword ) + section_heading = BIBLIOGRAPHY_CHAPTER.format( keyword = keyword ) # '
...
bibliography_el = xml_tree.xpath( - f"//x:body/x:p[text() = '{chapter_heading}']/following-sibling::x:dl[1]", + f"//x:body/x:p[text() = '{section_heading}']/following-sibling::x:dl[1]", namespaces = NS_MAP ) if( len(bibliography_el) != 1 ): From 0e67499f9fbf0c9f2a911e43b7d89b8da36a46b2 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 7 May 2019 15:14:25 +0200 Subject: [PATCH 053/132] Remove headings from bibliographies --- utils/bib2html.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index f48ec10..ad6bb63 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -112,8 +112,8 @@ def write_dummy_latex( bibliographies += \ textwrap.dedent( f""" - \section{{{section_heading}}} - \printbibliography + \section*{{{section_heading}}} + \printbibliography[heading=none] """ ) else: @@ -121,8 +121,8 @@ def write_dummy_latex( bibliographies += \ textwrap.dedent( f""" - \section{{{section_heading}}} - \printbibliography[keyword={{{keyword}}}] + \section*{{{section_heading}}} + \printbibliography*[heading=none, keyword={{{keyword}}}] """ ) From 9b7f5751410ea66ee0e7a0314f9d0feba4149bfa Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 7 May 2019 15:15:20 +0200 Subject: [PATCH 054/132] No output parameter on MacOS --- utils/bib2html.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index ad6bb63..71da114 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -298,7 +298,8 @@ def main( tmp_path_html_fixed2 = temp_dir / tmp_filename . with_suffix( ".2.html" ) exec_command( - f"iconv -f ISO-8859-1 -t UTF-8 --output={tmp_path_html_utf8} {tmp_path_html}" + f"iconv -f ISO-8859-1 -t UTF-8 {tmp_path_html}", + output_to = ToFile( tmp_path_html_utf8 ) ) # htlatex seems to produce incorrect xhtml. From be70839b82c0b49f5d6813afc52111b77ae699a2 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 7 May 2019 15:15:44 +0200 Subject: [PATCH 055/132] Mended XPath --- utils/bib2html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index 71da114..26de90b 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -332,7 +332,7 @@ def main( section_heading = BIBLIOGRAPHY_CHAPTER.format( keyword = keyword ) # '
...
bibliography_el = xml_tree.xpath( - f"//x:body/x:p[text() = '{section_heading}']/following-sibling::x:dl[1]", + f"//x:body/x:h3[text() = '{section_heading}']/following-sibling::x:dl[1]", namespaces = NS_MAP ) if( len(bibliography_el) != 1 ): From db48bc33378d5b5334b8bf7393d14e742d27e900 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 8 May 2019 10:22:33 +0200 Subject: [PATCH 056/132] Adding option to skip biber run --- eoatex2pdf.py | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/eoatex2pdf.py b/eoatex2pdf.py index 828139e..7139e69 100755 --- a/eoatex2pdf.py +++ b/eoatex2pdf.py @@ -18,7 +18,8 @@ def main( input_file, - output_dir + output_dir, + nobiber ): check_executable( "xelatex" ) if( not os.path.exists( output_dir ) ): @@ -59,12 +60,16 @@ def main( cwd = Path.cwd() os.chdir( output_dir ) logging.info( "cd {}".format( output_dir ) ) - exec_command( - f"xelatex --halt-on-error {input_file.name}", - ) - exec_command( - "biber {}".format( input_file.stem ), - ) + if nobiber: + logging.info("Skipping biber and running only two passes of XeLaTeX.") + pass + else: + exec_command( + f"xelatex --halt-on-error {input_file.name}", + ) + exec_command( + "biber {}".format( input_file.stem ), + ) exec_command( f"xelatex --halt-on-error {input_file.name}", ) @@ -103,6 +108,12 @@ def main( default = "INFO", help="log level: choose between DEBUG, INFO, WARNING, ERROR, CRITICAL" ) + parser.add_argument( + "--no-biber", + action="store_true", + default = False, + help="Run only two passes of XeLaTeX and no biber." + ) args = parser.parse_args() load_config( @@ -113,5 +124,6 @@ def main( main( input_file = args.filename, - output_dir = args.output_dir + output_dir = args.output_dir, + nobiber = args.no_biber ) From 962cc823d557f22d5dd600163a03707e80bbfefb Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 8 May 2019 15:23:21 +0200 Subject: [PATCH 057/132] Make hex value configurable. It doesn't need to start at 128 --- utils/bib2html.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index 26de90b..e41d958 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -36,8 +36,12 @@ def latex_escape_non_ascii( input_str ): output = "" + + # set hex value here, orginal value was 7f + escape_threshold = "ff" + for c in input_str: - if ord(c) > 0x7F: + if ord(c) > int(escape_threshold, 16): output += "\entity{{{}}}".format( ord(c) ) else: output += c From e1a26f040d2efe3c5657f23eb902e60d6cc3ea3e Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 8 May 2019 15:24:24 +0200 Subject: [PATCH 058/132] Using make4ht for conversion --- utils/bib2html.py | 61 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index e41d958..6e3ca77 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -173,6 +173,41 @@ def write_dummy_latex( # def write_dummy_latex ends here +def create_makefile(tmp_filename): + """Create a makefile + + Found on https://tex.stackexchange.com/questions/162626 + """ + + makefile_input = """local filter = require "make4ht-filter" +local process = filter{"cleanspan", "fixligatures", "hruletohr"} +Make:add("biber", "biber ${input}") +Make:htlatex() +Make:biber() +Make:htlatex() +Make:htlatex() +Make:match("html$",process) + """ + + with open(tmp_filename, "w") as makefile: + makefile.write(makefile_input) + + logging.info(f"Wrote {tmp_filename}.") +# def create_makefile ends here + + +def run_mk4_makefile( + tmp_filename, + log_dir +): + """Create HTML from LaTeX using makefile""" + + exec_command( + f"make4ht {tmp_filename}" +) +# def run_mk4_makefile ends here + + def run_htlatex( tmp_filename, log_dir @@ -288,11 +323,21 @@ def main( log_dir = log_dir.resolve() os.chdir( temp_dir ) logging.info(f"cd {temp_dir}") - run_htlatex( + + tmp_path_makefile = tmp_filename . with_suffix( ".mk4" ) + create_makefile(tmp_path_makefile) + + run_mk4_makefile( tmp_filename . with_suffix( "" ), # tmp_filename, log_dir = log_dir ) + + # run_htlatex( + # tmp_filename . with_suffix( "" ), + # # tmp_filename, + # log_dir = log_dir + # ) logging.info(f"cd {wd}") os.chdir( wd ) @@ -313,16 +358,16 @@ def main( f"tidy -numeric -output {tmp_path_html_fixed1} {tmp_path_html_utf8}", exit_code_ok = lambda x: x in (0,1) ) - import fileinput, unicodedata + # import fileinput, unicodedata # normalize unicode, e.g. replace ligatures (like " "ff" -> "ff"): - with open( tmp_path_html_fixed2, "w") as out_file: - for line in fileinput.input(tmp_path_html_fixed1): - out_file.write( - unicodedata.normalize("NFKD", line) - ) + # with open( tmp_path_html_fixed2, "w") as out_file: + # for line in fileinput.input(tmp_path_html_fixed1): + # out_file.write( + # unicodedata.normalize("NFKD", line) + # ) - xml_tree = etree.parse(str(tmp_path_html_fixed2)) + xml_tree = etree.parse(str(tmp_path_html_fixed1)) citation_authoryear = create_citations(citekeys, xml_tree, "authoryear") citation_year = create_citations(citekeys, xml_tree, "year") From 696e07f9bd77a342a638ce9ef9bb51d7565d2529 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 8 May 2019 15:24:51 +0200 Subject: [PATCH 059/132] Tag cleanup --- utils/bib2html.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index 6e3ca77..8dab526 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -73,7 +73,7 @@ def transform_reference(reference_element, dialect='html'): ecti.tag = "em" ecti.attrib.pop('class') - ectt_span = cleaned_element.xpath("x:span[@class='ectt-1095']", namespaces=NS_MAP) + ectt_span = cleaned_element.xpath("span[@class='ectt-1095']", namespaces=NS_MAP) for ectt in ectt_span: if dialect == 'tei': ectt.tag = "hi" @@ -82,6 +82,10 @@ def transform_reference(reference_element, dialect='html'): ecti.tag = "code" ectt.attrib.pop('class') + eccc_span = cleaned_element.xpath("span[@class='eccc1095-']", namespaces=NS_MAP) + for eccc in eccc_span: + eccc.tag = "tagtobestripped" + etree.strip_tags(cleaned_element, "tagtobestripped") return cleaned_element From 740122136cfdccf61c45ed2b35399108e17fc9f7 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 8 May 2019 17:48:36 +0200 Subject: [PATCH 060/132] django conversion goes into output/django, not CONVERT --- imxml2django.py | 118 ++++++++++++++++++++++++------------------------ 1 file changed, 58 insertions(+), 60 deletions(-) diff --git a/imxml2django.py b/imxml2django.py index 82a009c..086b65c 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-02-15 15:23:43 (kthoden)> +# Time-stamp: <2019-05-08 17:31:18 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -106,7 +106,7 @@ OUTPUT_DIR = Path( args.output_dir ) PUBLICATION_DIR = Path( args.publication_dir ) TEMP_DIR = OUTPUT_DIR / "tmp_files" -CONVERT_DIR = OUTPUT_DIR / "CONVERT" +# CONVERT_DIR = OUTPUT_DIR / "CONVERT" DEBUG_DIR = OUTPUT_DIR / "debug" ############################ @@ -120,40 +120,31 @@ check_executable( PDFCROP_EXEC ) if not TEMP_DIR.exists(): - os.makedirs( TEMP_DIR ) -if not CONVERT_DIR.exists(): - os.makedirs( CONVERT_DIR ) + os.makedirs( TEMP_DIR ) +# if not CONVERT_DIR.exists(): +# os.makedirs( CONVERT_DIR ) if not DEBUG_DIR.exists(): - os.makedirs( DEBUG_DIR ) + os.makedirs( DEBUG_DIR ) # Check for folder and necessary files -if not os.path.exists(CONVERT_DIR): - logging.info(f"The directory {CONVERT_DIR} has not been created yet. Creating it for you") - time.sleep(1) - os.makedirs(CONVERT_DIR) -if not os.path.exists(CONVERT_DIR / "publication.cfg"): - logging.info(f"The publication.cfg file is missing in {CONVERT_DIR} directory.") - if os.path.exists(PUBLICATION_DIR / "publication.cfg"): - shutil.copy(PUBLICATION_DIR / "publication.cfg", CONVERT_DIR) - logging.info(f"Copied from {PUBLICATION_DIR}.") - else: - logging.error("Found no publication.cfg. Exiting") - sys.exit( 1 ) -if not os.path.exists(CONVERT_DIR / "cover.jpg"): - logging.info(f"The file cover.jpg in {CONVERT_DIR} directory is missing.") - if os.path.exists(PUBLICATION_DIR / "Cover.jpg"): - shutil.copy(PUBLICATION_DIR / "Cover.jpg", CONVERT_DIR / "cover.jpg") - logging.info("Copied from current directory.") - else: - logging.error("No coverfile found. You can create a temporary one with the mkimage.py script") - sys.exit( 1 ) -# if os.path.exists(os.getcwd() + "/pre_xml.tex") == False: -# print ("pre_xml fehlt") -# sys.exit() - -# if os.path.exists(os.getcwd() + "/pre_xml.tex") == False: -# print ("pre_xml fehlt") -# sys.exit() +# if not os.path.exists(CONVERT_DIR): +# logging.info(f"The directory {CONVERT_DIR} has not been created yet. Creating it for you") +# time.sleep(1) +# os.makedirs(CONVERT_DIR) +logging.info(f"The publication.cfg file is missing in django directory.") +if os.path.exists(PUBLICATION_DIR / "publication.cfg"): + shutil.copy(PUBLICATION_DIR / "publication.cfg", OUTPUT_DIR) + logging.info(f"Copied from {PUBLICATION_DIR}.") +else: + logging.error("Found no publication.cfg. Exiting") + sys.exit( 1 ) +logging.info(f"The file cover.jpg in django directory is missing.") +if os.path.exists(PUBLICATION_DIR / "Cover.jpg"): + shutil.copy(PUBLICATION_DIR / "Cover.jpg", OUTPUT_DIR / "cover.jpg") + logging.info("Copied from current directory.") +else: + logging.error("No coverfile found. You can create a temporary one with the mkimage.py script") + sys.exit( 1 ) ########################################### # Loading data from first conversion step # @@ -188,11 +179,15 @@ ############################################################################ """) # Create django File Structure -if not os.path.exists(CONVERT_DIR / "django"): - os.mkdir(CONVERT_DIR / "django") - os.mkdir(CONVERT_DIR / "django" / "images") - os.mkdir(CONVERT_DIR / "django" / "images" / "embedded") - os.mkdir(CONVERT_DIR / "django" / "files") +# if not os.path.exists(CONVERT_DIR / "django"): +# os.mkdir(CONVERT_DIR / "django") + # os.mkdir(CONVERT_DIR / "django" / "images") +if not os.path.exists(OUTPUT_DIR / "images"): + os.mkdir(OUTPUT_DIR / "images") +if not os.path.exists(OUTPUT_DIR / "images" / "embedded"): + os.mkdir(OUTPUT_DIR / "images" / "embedded") +if not os.path.exists(OUTPUT_DIR / "files"): + os.mkdir(OUTPUT_DIR / "files") # Create empty xmlTree xmlEOAdocument = etree.Element("EOAdocument") @@ -336,9 +331,9 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid strCommand = "{cmd} convert {arg1} -resize 250x250\\> {arg2}".format( cmd = GM_PATH, arg1 = PUBLICATION_DIR / strImageFileString, - arg2 = CONVERT_DIR / "django/images/embedded" / (strImageFileDir + strImageFileName), + arg2 = OUTPUT_DIR / "images/embedded" / (strImageFileDir + strImageFileName), ) - + # strCommand = GM_PATH + " convert " + os.getcwd() + "/" + strImageFileString + " -resize 250x250\\> " + os.getcwd() + "/CONVERT/django/images/embedded/" + strImageFileDir + strImageFileName listArguments = shlex.split(strCommand) subprocess.check_output(listArguments, shell=False) @@ -377,7 +372,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid strImageFileNamewoSuffix = os.path.splitext(strImageFileName)[0] shutil.copy( PUBLICATION_DIR / strImageFileString, - CONVERT_DIR / "django/images" / (strImageFileDir + strImageFileName) + OUTPUT_DIR / "images" / (strImageFileDir + strImageFileName) ) # shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName) xmlEOAfigure.set("file", strImageFileDir + strImageFileName) @@ -402,14 +397,14 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid strImageFileNamewoSuffix = os.path.splitext(strImageFileName)[0] shutil.copy( PUBLICATION_DIR / strImageFileString, - CONVERT_DIR / "django/images" / (strImageFileDir + strImageFileName) + OUTPUT_DIR / "images" / (strImageFileDir + strImageFileName) ) logging.debug("Django figure %s." % strImageFileName) # yellow if os.path.splitext(strImageFileName)[1].lower() == ".pdf": - logging.debug("Found a PDF file") + logging.debug(f"""Found a PDF file: {OUTPUT_DIR / "images" / (strImageFileDir + strImageFileName)}""") strImageFilepath = libeoaconvert.sanitizeImage( - CONVERT_DIR / "django/images" / (strImageFileDir + strImageFileName), + OUTPUT_DIR / "images" / (strImageFileDir + strImageFileName), TEMP_DIR, # os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName, GM_PATH, @@ -652,7 +647,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid xmlEOAequation.set("label", xmlEquation.get("label")) shutil.copy( INPUT_DIR / "items" /xmlEquation.get("filename"), - CONVERT_DIR / "django/images/" + OUTPUT_DIR / "images/" ) # shutil.copy(os.getcwd() + "/items/" + xmlEquation.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlEOAequation.set("TeX", xmlEquation.get("TeX")) @@ -669,7 +664,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid xmlEOAequation.set("filename", xmlEquation.get("filename")) shutil.copy( INPUT_DIR / "items" / xmlEquation.get("filename"), - CONVERT_DIR / "django/images/" + OUTPUT_DIR / "images/" ) # shutil.copy(os.getcwd() + "/items/" + xmlEquation.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlEOAequation.set("TeX", xmlEquation.get("TeX")) @@ -683,7 +678,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid xmlResult.set("TeX", xmlElement.get("TeX")) shutil.copy( INPUT_DIR / "items" / xmlElement.get("filename"), - CONVERT_DIR / "django/images/" + OUTPUT_DIR / "images/" ) # shutil.copy(os.getcwd() + "/items/" + xmlElement.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlResult.set("number", "") @@ -702,7 +697,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid xmlEOAequation.set("uid", xmlEquation.get("uid")) shutil.copy( INPUT_DIR / "items" / xmlEquation.get("filename"), - CONVERT_DIR / "django/images/" + OUTPUT_DIR / "images/" ) # shutil.copy(os.getcwd() + "/items/" + xmlEquation.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlEOAequation.set("filename", xmlEquation.get("filename")) @@ -718,7 +713,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid xmlResult.set("uid", xmlElement.get("uid")) shutil.copy( INPUT_DIR / "items" / xmlElement.get("filename"), - CONVERT_DIR / "django/images/" + OUTPUT_DIR / "images/" ) # shutil.copy(os.getcwd() + "/items/" + xmlElement.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlResult.set("filename", xmlElement.get("filename")) @@ -1128,7 +1123,7 @@ def check_publication_cfg(configuration_file): strImageFileName = os.path.basename(strImageFile) shutil.copy( PUBLICATION_DIR / strImageFile, - CONVERT_DIR / "django/images" / (strImageFileDir + strImageFileName) + OUTPUT_DIR / "images" / (strImageFileDir + strImageFileName) ) # shutil.copy(os.getcwd() + "/" + strImageFile, os.getcwd() + "/CONVERT/django/images/" + strImageFileDir + strImageFileName) intObjectNumber += 1 @@ -1158,7 +1153,7 @@ def check_publication_cfg(configuration_file): strCommand = "{cmd} {src} -o {dst}".format( cmd = curl, src = strImageSrc, - dst = CONVERT_DIR / "django/images" / ("facsupplements_" + str(intFacNumber) + "_" + str(intFacPageNumber) + "_" + str(intFacImgNumber) + ".jpg") + dst = OUTPUT_DIR / "images" / ("facsupplements_" + str(intFacNumber) + "_" + str(intFacPageNumber) + "_" + str(intFacImgNumber) + ".jpg") ) # strCommand = "curl " + strImageSrc + " -o CONVERT/django/images/facsupplements_" + str(intFacNumber) + "_" + str(intFacPageNumber) + "_" + str(intFacImgNumber) + ".jpg" listArguments = shlex.split(strCommand) @@ -1220,7 +1215,7 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe cwd = os.getcwd() shutil.copy( "%s/items/%s" % (cwd, kid.get("filename")), - "%s/CONVERT/django/images/" % cwd, + "%s/images/" % cwd, ) foot.append(kid) destination.append(foot) @@ -1310,7 +1305,7 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe if xmlElement.tag == "EOAequationnonumber": shutil.copy( PUBLICATION_DIR / "items" / xmlElement.get("filename"), - CONVERT_DIR / "django/images/" + OUTPUT_DIR / "images/" ) # shutil.copy(os.getcwd() + "/items/" + xmlElement.get("filename"), os.getcwd() + "/CONVERT/django/images/") xmlEOAfootnote.append(xmlElement) @@ -1385,7 +1380,7 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe xmlInlineEquation.set("alt", xmlInlineEquation.get("TeX")) shutil.copy( INPUT_DIR / "items" / xmlInlineEquation.get("src"), - CONVERT_DIR / "django/images" / xmlInlineEquation.get("src") + OUTPUT_DIR / "images" / xmlInlineEquation.get("src") ) # shutil.copy(os.getcwd() + "/items/" + xmlInlineEquation.get("src"), os.getcwd() + "/CONVERT/django/images/" + xmlInlineEquation.get("src")) @@ -1397,7 +1392,7 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe xml_inline_chem.set("alt", xml_inline_chem.get("TeX")) shutil.copy( INPUT_DIR / "items" / xml_inline_chem.get("src"), - CONVERT_DIR / "django/images" / xml_inline_chem.get("src") + OUTPUT_DIR / "images" / xml_inline_chem.get("src") ) # shutil.copy(os.getcwd() + "/items/" + xml_inline_chem.get("src"), os.getcwd() + "/CONVERT/django/images/" + xml_inline_chem.get("src")) @@ -1411,14 +1406,17 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe strInlineElementFilePath = xmlInlineElement.text strInlineElementFileName = os.path.basename(strInlineElementFilePath) strInlineElementDirName = os.path.dirname(strInlineElementFilePath) + strInlineElementSubDirName = os.path.dirname(strInlineElementFilePath).split(os.path.sep)[-1] xmlInlineElement.text = None - xmlInlineElement.set("src", strInlineElementDirName + strInlineElementFileName) + xmlInlineElement.set("src", strInlineElementSubDirName + strInlineElementFileName) + logging.debug(f"{strInlineElementDirName} is dirname, {strInlineElementFileName} is filename/basepath") + logging.debug(f"""copy from {PUBLICATION_DIR / strInlineElementDirName / strInlineElementFileName} to {OUTPUT_DIR / "images/embedded" / (strInlineElementDirName + strInlineElementFileName)}""") shutil.copy( PUBLICATION_DIR / strInlineElementDirName / strInlineElementFileName, - CONVERT_DIR / "django/images/embedded" / (strInlineElementDirName + strInlineElementFileName) + OUTPUT_DIR / "images/embedded" / (strInlineElementSubDirName + strInlineElementFileName) ) # shutil.copy(os.getcwd() + "/" + strInlineElementDirName + "/" + strInlineElementFileName, os.getcwd() + "/CONVERT/django/images/embedded/" + strInlineElementDirName + strInlineElementFileName) - strNewImagePath = CONVERT_DIR / "django/images/embedded" / (strInlineElementDirName + strInlineElementFileName) + strNewImagePath = OUTPUT_DIR / "images/embedded" / (strInlineElementSubDirName + strInlineElementFileName) # strNewImagePath = os.getcwd() + "/CONVERT/django/images/embedded/" + strInlineElementDirName + strInlineElementFileName strCommand = GM_PATH + " convert " + str(strNewImagePath) + " -resize 20x20 " + str(strNewImagePath) listArguments = shlex.split(strCommand) @@ -1784,11 +1782,11 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe # Save xmlDjangoTree # ############################################################################ -tmpFile = open( CONVERT_DIR / "django/Django.xml", "w") +tmpFile = open( OUTPUT_DIR / "Django.xml", "w") tmpResult = etree.tostring(xmlDjangoTree, pretty_print=True, encoding="unicode") tmpFile.write(tmpResult) tmpFile.close() -logging.debug("Wrote Django.xml") +logging.debug(f"Wrote {OUTPUT_DIR}/Django.xml.") if args.checkpublicationcfg: check_publication_cfg(PUBLICATION_DIR / "publication.cfg") From cee43de9799d5449c087362e22ddc43c8a99218b Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 8 May 2019 17:49:50 +0200 Subject: [PATCH 061/132] File format checking repaired --- utils/libeoaconvert.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils/libeoaconvert.py b/utils/libeoaconvert.py index ce10d8f..cf6e6c6 100644 --- a/utils/libeoaconvert.py +++ b/utils/libeoaconvert.py @@ -95,9 +95,10 @@ def sanitizeImage( exec_command( f"{GM_PATH} convert {strImagepath} -resize x1000\\> {strImagepath}" ) - strFileFormat = str( subprocess.check_output( + strFileFormat_bytes = subprocess.check_output( shlex.split( f"{GM_PATH} identify -format \"%m\" {strImagepath}" ) - )).strip() + ) + strFileFormat = strFileFormat_bytes.decode("utf-8").strip() if strFileFormat == "JPEG": pass # print("looking at jpeg file") @@ -131,6 +132,9 @@ def sanitizeImage( os.remove(clipped_file) os.remove(strImagepath) strImagepath = strNewImagepath + ".png" + else: + logging.error("Image format not recognized. Exiting.") + sys.exit( 1 ) # print ("Hier ein Pfad zu einem Bild:") # print (strImagepath) From 68cc107d4dc05a72194bbb83a2b8a12485692f53 Mon Sep 17 00:00:00 2001 From: kthoden Date: Thu, 9 May 2019 15:14:37 +0200 Subject: [PATCH 062/132] Removed old code --- eoatex2imxml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index 36a72d9..aff894f 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-03-29 15:46:46 (kthoden)> +# Time-stamp: <2019-05-09 15:13:58 (kthoden)> """ Converts Latex files into a customized DocBook XML file. From 6e6ec4447b962adf6fc5fa7be3378b5a9c0ccfeb Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 10 May 2019 13:29:50 +0200 Subject: [PATCH 063/132] Fix insertion of citations --- eoatex2imxml.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index aff894f..fdf2f26 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-09 15:13:58 (kthoden)> +# Time-stamp: <2019-05-09 15:36:08 (kthoden)> """ Converts Latex files into a customized DocBook XML file. @@ -1468,6 +1468,10 @@ def add_bibliography_to_xml( strCitation = "" # Bibliographies are done, now for the citations + # turn + # Renn2012a + # into + # 2012 if bib_type == "anthology" or bib_type == "monograph": if bib_type == "monograph": @@ -1481,10 +1485,11 @@ def add_bibliography_to_xml( logging.info("-----------------------------------------------------") logging.info("Processing References for Chapter " + str(intChapterNumber)) xmlCitations = xmlChapter.xpath(".//EOAciteauthoryear | .//EOAciteyear | .//EOAcitemanual") - + logging.debug(f"Found {libeoaconvert.plural(len(xmlCitations), 'citation')}.") if bib_type == "anthology": tmp_citation_filename = "used_citations-anthology-chapter_{:02d}".format(intChapterNumber) - tmp_path_html = (TEMP_DIR / "bib2html" / tmp_citation_filename / BIB2HTML_FILENAME) .with_suffix( ".html" ) + tmp_path_html = (TEMP_DIR / "bib2html" / tmp_citation_filename ) .with_suffix( ".html" ) + logging.debug(f"Looking for file {tmp_path_html}.") # no_cite_path = TEMP_DIR / "bib2html" / (tmp_citation_filename + "_nocitations") if os.path.exists(tmp_path_html): with open(tmp_path_html, "r") as formatted_citations: From 1f67842f38bfed91da689d55aad5a6d7411ceecb Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 10 May 2019 13:30:01 +0200 Subject: [PATCH 064/132] Remove old code --- eoatex2imxml.py | 91 ------------------------------------------------- 1 file changed, 91 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index fdf2f26..1654ce9 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -316,97 +316,6 @@ def sanitize_bibentry(bibEntry): return(bibEntry.strip()) # def sanitize_bibentry ends here -''' -def createBibEntryAuthorYear(bibEntry, boolSameAuthor): - """Function to create a complete Entry of a publication (epub & django) for author-year citation""" - strBibEntry = "" - if bibEntry.entrytype() not in libeoaconvert.allowed_bibentry_types: - logging.error("You cannot use the entry type %s in entry %s. Allowed entry types are: %s.\n" % (bibEntry.entrytype(), bibEntry.citekey() , ", ".join(libeoaconvert.allowed_bibentry_types))) - sys.exit() - - bool_edited_book = False - book_without_author = False - editor_postfix = bibEntry.fullauthorlastfirst()[1] - if boolSameAuthor == False: - if len(editor_postfix) != 0: - if editor_postfix == "no_author_only_title": - book_without_author = True - strAuthor = bibEntry.title() - else: - bool_edited_book = True - strAuthor = bibEntry.fullauthorlastfirst()[0] + ", " + editor_postfix - else: - strAuthor = bibEntry.fullauthorlastfirst()[0] - if boolSameAuthor == True: - # if there is no author, but a publisher, the localized - # postfix is returned from the function together with the name in a tuple - if len(editor_postfix) != 0: - bool_edited_book = True - strAuthor = "– " + editor_postfix - else: - strAuthor = "–" - # Next line good for debugging - # print(bibEntry.citekey(), strAuthor) - if bibEntry.entrytype() == "book": - if bool_edited_book == True: - strBibEntry = strAuthor + " (" + str(bibEntry.labelyear()) + str(bibEntry.labelyearsuffix()) + "). " + str(bibEntry.title()) + " " + bibEntry.edition() + bibEntry.volumenumeric() + bibEntry.seriesnumber() + bibEntry.note() + str(bibEntry.location()) + bibEntry.pages() + ". " + bibEntry.url() - elif book_without_author == True: - strBibEntry = "" + str(bibEntry.title()) + " " + " (" + str(bibEntry.labelyear()) + str(bibEntry.labelyearsuffix()) + ")." + bibEntry.edition() + bibEntry.volumenumeric() + bibEntry.seriesnumber() + bibEntry.note() + str(bibEntry.location()) + bibEntry.pages() + ". " + bibEntry.url() - else: - strBibEntry = strAuthor + " (" + str(bibEntry.labelyear()) + str(bibEntry.labelyearsuffix()) + "). " + str(bibEntry.title()) + " " + bibEntry.editor() + bibEntry.edition() + bibEntry.volumenumeric() + bibEntry.seriesnumber() + bibEntry.note() + str(bibEntry.location()) + bibEntry.pages() + ". " + bibEntry.url() - if bibEntry.entrytype() == "booklet": - strBibEntry = strAuthor + " (" + str(bibEntry.labelyear()) + str(bibEntry.labelyearsuffix()) + "). " + str(bibEntry.title()) + "" + str(bibEntry.location()) + bibEntry.howpublished() + "." - if bibEntry.entrytype() == "report": - strBibEntry = strAuthor + " (" + bibEntry.labelyear() + bibEntry.labelyearsuffix() + "). " + bibEntry.title() + "" - if bibEntry.entrytype() == "thesis": - strBibEntry = strAuthor + " (" + bibEntry.labelyear() + bibEntry.labelyearsuffix() + "). " + bibEntry.title() + "" + bibEntry.thesistype() + bibEntry.institution() + "." + bibEntry.url() - if bibEntry.entrytype() == "misc": - strBibEntry = strAuthor + " (" + str(bibEntry.labelyear()) + str(bibEntry.labelyearsuffix()) + "). " + str(bibEntry.title()) + " " + bibEntry.howpublished() + ". " + bibEntry.note() + bibEntry.location() + bibEntry.thesistype() + "." + bibEntry.url() - if bibEntry.entrytype() == "incollection": - strBibEntry = strAuthor + " (" + bibEntry.labelyear() + bibEntry.labelyearsuffix() + "). " + bibEntry.title() + bibEntry.booktitle() + ". " + bibEntry.editor() + bibEntry.edition() + bibEntry.volumenumeric() + bibEntry.seriesnumber() + bibEntry.note() + bibEntry.location() + bibEntry.pages() + "." + bibEntry.url() - if bibEntry.entrytype() == "inproceedings": - strBibEntry = strAuthor + " (" + bibEntry.labelyear() + bibEntry.labelyearsuffix() + "). " + bibEntry.title() + bibEntry.booktitle() + bibEntry.editor() + bibEntry.series() + bibEntry.location() + bibEntry.pages() - if bibEntry.entrytype() == "article": - strBibEntry = strAuthor + " (" + str(bibEntry.labelyear()) + str(bibEntry.labelyearsuffix()) + "). " + str(bibEntry.title()) + str(bibEntry.journaltitle()) + bibEntry.volumenumberpages() + ". " + bibEntry.note() + bibEntry.url() - if bibEntry.entrytype() == "newspaper": - strBibEntry = strAuthor + " (" + bibEntry.labelyear() + bibEntry.labelyearsuffix() + "). " + bibEntry.title() + "" - - # print(strBibEntry) - - return sanitize_bibentry(strBibEntry) -# def createBibEntryAuthorYear ends here -''' - -def createBibEntryNumeric(bibEntry): - """Function to create a complete Entry of a publication (epub & django) for numeric citation""" - - strBibEntry = "" - if bibEntry.entrytype() not in libeoaconvert.allowed_bibentry_types: - logging.error("You cannot use the entry type %s in entry %s. Allowed entry types are: %s.\n" % (bibEntry.entrytype(), bibEntry.citekey() , ", ".join(libeoaconvert.allowed_bibentry_types))) - sys.exit() - - strAuthor = bibEntry.fullauthorfirstlast() - if bibEntry.entrytype() == "book": - strBibEntry = strAuthor + ". " + bibEntry.title() + "." + bibEntry.location() + ", " + bibEntry.year() - if bibEntry.entrytype() == "booklet": - strBibEntry = strAuthor + ". " + bibEntry.title() + ". " + bibEntry.howpublished() + ". " + bibEntry.location() + ", " + bibEntry.year() - if bibEntry.entrytype() == "report": - strBibEntry = strAuthor + " (" + bibEntry.labelyear() + bibEntry.labelyearsuffix() + ") " + bibEntry.title() + "." - if bibEntry.entrytype() == "thesis": - strBibEntry = strAuthor + ". " + bibEntry.title() + ". " + bibEntry.thesistype() + bibEntry.institution() + ", " + bibEntry.year() - if bibEntry.entrytype() == "misc": - strBibEntry = strAuthor + ". " + bibEntry.title() + ". " + bibEntry.booktitle() + ". " - if bibEntry.entrytype() == "incollection": - strBibEntry = strAuthor + ". " + bibEntry.title() + ". " + bibEntry.booktitle() + bibEntry.editor() + ". " + bibEntry.location() + ", " + bibEntry.year() + ". " + bibEntry.pages() + "." - if bibEntry.entrytype() == "inproceedings": - strBibEntry = strAuthor + ". " + bibEntry.title() + ". " + bibEntry.booktitle() + ". " + bibEntry.volumenumeric() + bibEntry.year() + ". " + bibEntry.pages() + "." - if bibEntry.entrytype() == "article": - strBibEntry = strAuthor + ". " + bibEntry.title() + "" + bibEntry.journaltitle() + " " + bibEntry.volumenumberpages() + " (" + bibEntry.year() + "):" + bibEntry.pages() + "." - if bibEntry.entrytype() == "newspaper": - strBibEntry = strAuthor + " (" + bibEntry.labelyear() + bibEntry.labelyearsuffix() + ") " + bibEntry.title() + "." - - return strBibEntry -# def createBibEntryNumeric ends here def pdf_burst(input_file, tmpDir): """Split PDF file into single pages""" From 4982d365665983d23f2bff0d0e3d880dd4ea61a0 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 10 May 2019 13:30:30 +0200 Subject: [PATCH 065/132] Fix translation function --- imxml2epub.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index 9f6378f..ea9e852 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-03-29 15:45:37 (kthoden)> +# Time-stamp: <2019-05-10 12:24:01 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -123,10 +123,15 @@ CONVERT_DIR = OUTPUT_DIR / "CONVERT" # DEBUG_DIR = OUTPUT_DIR / "debug" +############################ +# Paths to auxiliary files # +############################ +TRANSLATION_FILE = BASE_DIR / CONFIG['Auxiliaries']['TRANSLATIONS'] + if not TEMP_DIR.exists(): - os.makedirs( TEMP_DIR ) + os.makedirs( TEMP_DIR ) if not CONVERT_DIR.exists(): - os.makedirs( CONVERT_DIR ) + os.makedirs( CONVERT_DIR ) # Check for folder and necessary files if not os.path.exists(CONVERT_DIR): @@ -926,7 +931,10 @@ class FootnoteError(Exception): continue xmlNewFootnotes = etree.Element("div") xmlNewFootnotesHeader = etree.Element("h3") - xmlNewFootnotesHeader.text = libeoaconvert.dictLangFootnotes[libeoaconvert.two_letter_language(xmlChapter.get("language"))] + + translation_xml = etree.parse( str( TRANSLATION_FILE ) ) + dictLangFootnotes = translation_xml.find("//entry[@name='footnotes']").attrib + xmlNewFootnotesHeader.text = dictLangFootnotes[libeoaconvert.two_letter_language(xmlChapter.get("language"))] xmlNewFootnotes.append(xmlNewFootnotesHeader) for grouping, notes in groupings: From 611adc1d510dac23ee1b73d36c39e59f00824439 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 10 May 2019 14:02:58 +0200 Subject: [PATCH 066/132] Fix path --- imxml2epub.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index ea9e852..0b804df 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-10 12:24:01 (kthoden)> +# Time-stamp: <2019-05-10 14:01:17 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -794,7 +794,7 @@ def replace_footnote_equations(footnote): img = etree.Element("img", src="images/%s" % filename, alt="") equation.append(img) shutil.copy( - PUBLICATION_DIR / "items" / filename, + INPUT_DIR / "items" / filename, CONVERT_DIR / "epub/DEBPS/images" / filename ) result = addToContentopf( @@ -967,7 +967,7 @@ class FootnoteError(Exception): xmlIMG = etree.Element("img", src="images/"+ strFilename, alt="") xmlEquationnonumber.append(xmlIMG) shutil.copy( - PUBLICATION_DIR / "items" / strFilename, + INPUT_DIR / "items" / strFilename, CONVERT_DIR / "epub/OEBPS/images" / strFilename ) # shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) @@ -1170,7 +1170,7 @@ class FootnoteError(Exception): xmlInlineEquation.set("alt", xmlInlineEquation.get("TeX")) del xmlInlineEquation.attrib["TeX"] shutil.copy( - PUBLICATION_DIR / "items" / xmlInlineEquation.get("src"), + INPUT_DIR / "items" / xmlInlineEquation.get("src"), CONVERT_DIR / "epub/OEBPS/images" / xmlInlineEquation.get("src") ) # shutil.copy(os.getcwd() + "/items/" + xmlInlineEquation.get("src"), os.getcwd() + "/CONVERT/epub/OEBPS/images/" + xmlInlineEquation.get("src")) @@ -1186,7 +1186,7 @@ class FootnoteError(Exception): xml_inline_chem.set("alt", xml_inline_chem.get("TeX")) del xml_inline_chem.attrib["TeX"] shutil.copy( - PUBLICATION_DIR / "items" / xml_inline_chem.get("src"), + INPUT_DIR / "items" / xml_inline_chem.get("src"), CONVERT_DIR / "epub/OEBPS/images" / xml_inline_chem.get("src") ) # shutil.copy(os.getcwd() + "/items/" + xml_inline_chem.get("src"), os.getcwd() + "/CONVERT/epub/OEBPS/images/" + xml_inline_chem.get("src")) @@ -1254,7 +1254,7 @@ class FootnoteError(Exception): strFilename = xmlEquation.get("filename") # Copy image of Equation shutil.copy( - PUBLICATION_DIR / "items" / strFilename, + INPUT_DIR / "items" / strFilename, CONVERT_DIR / "epub/OEBPS/images" / strFilename ) # shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) @@ -1280,7 +1280,7 @@ class FootnoteError(Exception): strFilename = xmlEquation.get("filename") # Copy image of Equation shutil.copy( - PUBLICATION_DIR / "items" / strFilename, + INPUT_DIR / "items" / strFilename, CONVERT_DIR / "epub/OEBPS/images" / strFilename ) # shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) From 85b0deba39531cea403ae61b7b05c1e823e53d50 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 10 May 2019 14:03:49 +0200 Subject: [PATCH 067/132] Adding subdir --- imxml2epub.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index 0b804df..1076aa6 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-10 14:01:17 (kthoden)> +# Time-stamp: <2019-05-10 14:03:29 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -1207,8 +1207,8 @@ class FootnoteError(Exception): strInlineElementFileName = os.path.basename(strInlineElementFilePath) strInlineElementDirName = os.path.dirname(strInlineElementFilePath) - - strNewImagePath = CONVERT_DIR / "epub/OEBPS/images" / (strInlineElementDirName + strInlineElementFileName) + strInlineElementSubDirName = os.path.dirname(strInlineElementFilePath).split(os.path.sep)[-1] + strNewImagePath = CONVERT_DIR / "epub/OEBPS/images" / Path(strInlineElementSubDirName + strInlineElementFileName) # strNewImagePath = os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strInlineElementDirName + strInlineElementFileName # trouble when there are subdirectories in Image path! # some thing goes wrong here: Images/png_300dpi/A.png @@ -1219,10 +1219,11 @@ class FootnoteError(Exception): ) # shutil.copy(os.getcwd() + "/" + strInlineElementDirName + "/" + strInlineElementFileName, strNewImagePath) # strNewImagePath = os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strInlineElementDirName + strInlineElementFileName - strCommand = GM_PATH + " convert " + strNewImagePath + " -resize 20x20 " + strNewImagePath + strCommand = f"{GM_PATH} convert {strNewImagePath} -resize 20x20 {strNewImagePath}" + # strCommand = GM_PATH + " convert " + str(strNewImagePath) + " -resize 20x20 " + strNewImagePath listArguments = shlex.split(strCommand) subprocess.check_output(listArguments, shell=False) - xmlInlineElement.set("src", "images/" + strInlineElementDirName + strInlineElementFileName) + xmlInlineElement.set("src", strInlineElementSubDirName + strInlineElementFileName) # contentopf, Filename, FileID, Mediatype # # Mediatype should not be hard coded!!! From b2985f27ee6a4039a93516c02f1b3f45ceec146e Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 10 May 2019 15:22:27 +0200 Subject: [PATCH 068/132] Convert colorspace --- imxml2epub.py | 2 +- utils/libeoaconvert.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index 1076aa6..4a5f593 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-10 14:03:29 (kthoden)> +# Time-stamp: <2019-05-10 15:08:05 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. diff --git a/utils/libeoaconvert.py b/utils/libeoaconvert.py index cf6e6c6..19c8468 100644 --- a/utils/libeoaconvert.py +++ b/utils/libeoaconvert.py @@ -85,7 +85,7 @@ def sanitizeImage( )) if intImageWidth > 700: exec_command( - f"{GM_PATH} convert {strImagepath} -resize 700x\\> {strImagepath}" + f"{GM_PATH} convert {strImagepath} -colorspace RGB -resize 700x\\> {strImagepath}" ) intImageHeight = int( subprocess.check_output( shlex.split( f"{GM_PATH} identify -format \"%h\" {strImagepath}" ), @@ -93,12 +93,13 @@ def sanitizeImage( )) if intImageHeight > 1000: exec_command( - f"{GM_PATH} convert {strImagepath} -resize x1000\\> {strImagepath}" + f"{GM_PATH} convert {strImagepath} -colorspace RGB -resize x1000\\> {strImagepath}" ) strFileFormat_bytes = subprocess.check_output( shlex.split( f"{GM_PATH} identify -format \"%m\" {strImagepath}" ) ) strFileFormat = strFileFormat_bytes.decode("utf-8").strip() + logging.debug(f"Image has been recognized as having format {strFileFormat} by {GM_PATH}.") if strFileFormat == "JPEG": pass # print("looking at jpeg file") From 3e22486830e1b7c5d2173ffa2f32054e05ce3ff0 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 10 May 2019 15:23:26 +0200 Subject: [PATCH 069/132] Removed hard-coded extensions --- imxml2epub.py | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index 4a5f593..ca6d2ea 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -182,6 +182,21 @@ dictTables = data["tabdict"] dictPagelabels = data["pagelabeldict"] + +def get_mimetype(filename_suffix): + """Return mimetype of image""" + if filename_suffix.lower() == ".jpg": + mimetype = "jpg" + elif filename_suffix.lower() in [".png", ".pdf"]: + mimetype = "png" + else: + logging.error(f"Found an unrecognized image suffix: {filename_suffix}") + sys.exit(1) + + return mimetype +# def get_mimetype ends here + + def remove_processinginstruction(xml_tree, pi_name): """Remove processing instructions with a specific name""" @@ -644,13 +659,8 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName) ) # shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) - if strImageFileName_Suffix.lower() == ".jpg": - extension_and_mime = "jpg" - elif strImageFileName_Suffix.lower() in [".png", ".pdf"]: - extension_and_mime = "png" - else: - logging.error(f"Found an unrecognized image suffix: {strImageFileName_Suffix}") - sys.exit(1) + + extension_and_mime = get_mimetype(strImageFileName_Suffix) strImageFilepath = libeoaconvert.sanitizeImage( CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName), @@ -719,7 +729,7 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): strImageFileDir = os.path.dirname(strImageFileString) strImageFileDir = re.sub("/", "", strImageFileDir) strImageFileName = os.path.basename(strImageFileString) - strImageFileNamewoSuffix = os.path.splitext(strImageFileName)[0] + strImageFileNamewoSuffix, strImageFileName_Suffix = os.path.splitext(strImageFileName) shutil.copy( PUBLICATION_DIR / strImageFileString, CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName) @@ -733,11 +743,13 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): # shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) # strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, PDFCROP_EXEC) # Add copied file to contentopf + + extension_and_mime = get_mimetype(strImageFileName_Suffix) contentopf = addToContentopf( contentopf, - "images/" + strImageFileDir + strImageFileNamewoSuffix + ".jpg", - strImageFileDir + strImageFileNamewoSuffix + "-nonumber-jpg", - "jpg" + "images/" + strImageFileDir + strImageFileNamewoSuffix + "." + extension_and_mime, + strImageFileDir + strImageFileNamewoSuffix + "-nonumber-" + extension_and_mime, + extension_and_mime ) # contentopf = addToContentopf(contentopf, "images/" + strImageFileDir + strImageFileNamewoSuffix + ".jpg", strImageFileDir + strImageFileNamewoSuffix + "-nonumber-jpg", "jpg") logging.debug("Added a nonumber figure") @@ -746,7 +758,7 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): xmlFigure.clear() xmlFigure.tag = "p" xmlFigureImage = etree.Element("img") - xmlFigureImage.set("src", "images/" + strImageFileDir + strImageFileNamewoSuffix + ".jpg") + xmlFigureImage.set("src", "images/" + strImageFileDir + strImageFileNamewoSuffix + "." + extension_and_mime) xmlFigureImage.set("alt", "") xmlFigureImage.set("style", "width: " + strImageWidth + "%") xmlFigure.append(xmlFigureImage) @@ -1223,13 +1235,13 @@ class FootnoteError(Exception): # strCommand = GM_PATH + " convert " + str(strNewImagePath) + " -resize 20x20 " + strNewImagePath listArguments = shlex.split(strCommand) subprocess.check_output(listArguments, shell=False) - xmlInlineElement.set("src", strInlineElementSubDirName + strInlineElementFileName) + xmlInlineElement.set("src", "images/" + strInlineElementSubDirName + strInlineElementFileName) # contentopf, Filename, FileID, Mediatype # # Mediatype should not be hard coded!!! # base this on file extension extension = strInlineElementFileName.split(".")[-1] - contentopf = addToContentopf(contentopf, "images/" + strInlineElementDirName + strInlineElementFileName, xmlInlineElement.text, extension) + contentopf = addToContentopf(contentopf, "images/" + strInlineElementSubDirName + strInlineElementFileName, xmlInlineElement.text, extension) xmlInlineElement.text = "" logging.info("-----------------------------------------------------") From 2434d68a819f52106963df3072837296ab02ffd1 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 10 May 2019 17:27:21 +0200 Subject: [PATCH 070/132] Debug for epub --- imxml2epub.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index ca6d2ea..adf68f4 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-10 15:08:05 (kthoden)> +# Time-stamp: <2019-05-10 17:26:39 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -121,7 +121,7 @@ PUBLICATION_DIR = Path( args.publication_dir ) TEMP_DIR = OUTPUT_DIR / "tmp_files" CONVERT_DIR = OUTPUT_DIR / "CONVERT" -# DEBUG_DIR = OUTPUT_DIR / "debug" +DEBUG_DIR = OUTPUT_DIR / "debug" ############################ # Paths to auxiliary files # @@ -132,6 +132,8 @@ os.makedirs( TEMP_DIR ) if not CONVERT_DIR.exists(): os.makedirs( CONVERT_DIR ) +if not DEBUG_DIR.exists(): + os.makedirs( DEBUG_DIR ) # Check for folder and necessary files if not os.path.exists(CONVERT_DIR): From 996e338f48f3c6c52b311af00a38ab7fc2f78bbd Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 10 May 2019 17:28:00 +0200 Subject: [PATCH 071/132] Paragraph debugging --- imxml2django.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/imxml2django.py b/imxml2django.py index 086b65c..7c93b69 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-08 17:31:18 (kthoden)> +# Time-stamp: <2019-05-10 16:19:24 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -781,6 +781,10 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid xmlResult = etree.Element("temp") else: xmlElement.tag = "EOAparagraph" + if xmlElement.text: + logging.debug(f"The beginning of this paragraph is: '{xmlElement.text[:40]}…'") + else: + logging.debug(f"This is a paragraph without text.") quoted_paragraph = xmlElement.get("rend") if quoted_paragraph is not None and quoted_paragraph == "quoted": xmlElement.set("rend", "quoted") From 611bc6ddf3f01ecfa3c1689df54aa676c2379ce4 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 13 May 2019 15:25:01 +0200 Subject: [PATCH 072/132] bibformat template file --- data/aux/bibliography4ht.tex | 110 +++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 data/aux/bibliography4ht.tex diff --git a/data/aux/bibliography4ht.tex b/data/aux/bibliography4ht.tex new file mode 100644 index 0000000..9d60796 --- /dev/null +++ b/data/aux/bibliography4ht.tex @@ -0,0 +1,110 @@ +\documentclass{scrartcl} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[$language]{babel} +\newcommand{\EOAbibtweaks}{ +% Remove pp from references +\DeclareFieldFormat{postnote}{##1} +% Remove quotation marks from certain titles +\DeclareFieldFormat[thesis]{title}{\mkbibemph{##1}} +\DeclareFieldFormat[article]{title}{##1} +\DeclareFieldFormat[incollection]{title}{##1} +\DeclareFieldFormat[inproceedings]{title}{##1} +\DeclareFieldFormat[inbook]{title}{\mkbibemph{##1}} +\DeclareFieldFormat{title}{\mkbibemph{##1}} +% Remove pp from bibliography at all +\DeclareFieldFormat{pages}{##1}% +% Remove "In:" from articles +\renewbibmacro{in:}{% + \ifentrytype{article}{}{% + \printtext{\bibstring{in}\intitlepunct}}} +% Delete Vol. as praefix +\DeclareFieldFormat*{volume}{##1} +% Use : for pages of an article, use . for the rest +\renewcommand*{\bibpagespunct}{% +\ifentrytype{article}% +{% +\iffieldundef{Number}% +{\addcolon\hspace{0pt}}% +{}% +}% +{,\space}% +} +% Group Volume and Issue in {Brackets} +\renewbibmacro*{journal+issuetitle}{% + \usebibmacro{journal}% + \setunit*{\addspace}% + \iffieldundef{series} + {} + {\newunit + \printfield{series}% + \setunit{\addspace}}% + \printfield{volume}% + \iffieldundef{number} + {} + {\mkbibparens{\printfield{number}}}% + \setunit{\addcomma\space}% + \printfield{eid}% + \setunit{\addspace}% + \usebibmacro{issue+date}% + \setunit{\addcolon\space}% + \usebibmacro{issue}% + \newunit} + +% origdate, thanks to https://tex.stackexchange.com/questions/134644/how-to-get-automatically-origdate-with-the-date-in-a-citation +\DeclareFieldFormat{origdate}{\mkbibbrackets{##1}} +\renewbibmacro*{cite:labeldate+extradate}{% + \iffieldundef{origyear} + {} + {\printorigdate + \setunit{\addspace}}% + \iffieldundef{labelyear} + {} + {\printtext[bibhyperref]{\printlabeldateextra}}} + +\DeclareCiteCommand{\citeorigyear} + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}} + {\printfield{origyear}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\renewbibmacro*{date+extradate}{% + \iffieldundef{origyear} + {} + {\printorigdate + \setunit{\addspace}}% + \iffieldundef{labelyear} + {} + {\printtext[parens]{% + \iflabeldateisdate + {\printdateextra} + {\printlabeldateextra}}}} + +% Bug fix for Windows +\defbibheading{none}[]{} +} +\usepackage[autostyle]{csquotes} +{\usepackage[mincitenames=1,maxcitenames=3,maxbibnames=100,style=authoryear,backend=biber,autolang=hyphen,dateabbrev=false,datecirca=true,dateuncertain=true,dateera=christian,urldate=long]{biblatex} +\EOAbibtweaks +\bibliography{$bibfile} +\begin{document} +% \maketitle +\makeatletter +\def\hshchr{\expandafter\@gobble\string\#} +\def\ampchr{\expandafter\@gobble\string\&} +\def\entity#1{\HCode{\ampchr\hshchr#1;}} +\makeatother + +\section{Citations} + +$citations + +$bibliographies + +\end{document} +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: From 6b1ded9b33d27464e6c8430c049779f1f094bf66 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 13 May 2019 15:40:57 +0200 Subject: [PATCH 073/132] Create formulas2png only when needed --- eoatex2imxml.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index 1654ce9..e499978 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-09 15:36:08 (kthoden)> +# Time-stamp: <2019-05-13 15:40:43 (kthoden)> """ Converts Latex files into a customized DocBook XML file. @@ -187,8 +187,6 @@ os.mkdir( OUTPUT_DIR ) if not os.path.exists(TEMP_DIR): os.mkdir( TEMP_DIR ) -if not os.path.exists( TEMP_DIR / "formulas2png" ): - os.mkdir( TEMP_DIR / "formulas2png" ) if not os.path.exists( DEBUG_DIR ): os.mkdir( DEBUG_DIR ) @@ -240,6 +238,8 @@ def TeX2PNG(LaTeXCode, Type, Chapter, Number): tmp.close() # Get tmp-directory for this user account # tmpDir = os.getenv("TMPDIR") + if not os.path.exists( TEMP_DIR / "formulas2png" ): + os.mkdir( TEMP_DIR / "formulas2png" ) # use local tmpdir formula_tmp_dir = TEMP_DIR / "formulas2png" From b4885335a374eaf6052785137004e23d30afa414 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 13:35:26 +0200 Subject: [PATCH 074/132] Fixed location of bib template file --- data/aux/bibliography4ht.tex | 1 + eoatex2imxml.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/aux/bibliography4ht.tex b/data/aux/bibliography4ht.tex index 9d60796..d2144af 100644 --- a/data/aux/bibliography4ht.tex +++ b/data/aux/bibliography4ht.tex @@ -85,6 +85,7 @@ % Bug fix for Windows \defbibheading{none}[]{} } +\newcommand\greekfont{} \usepackage[autostyle]{csquotes} {\usepackage[mincitenames=1,maxcitenames=3,maxbibnames=100,style=authoryear,backend=biber,autolang=hyphen,dateabbrev=false,datecirca=true,dateuncertain=true,dateera=christian,urldate=long]{biblatex} \EOAbibtweaks diff --git a/eoatex2imxml.py b/eoatex2imxml.py index e499978..f8c7370 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-13 15:40:43 (kthoden)> +# Time-stamp: <2019-05-14 11:58:08 (kthoden)> """ Converts Latex files into a customized DocBook XML file. @@ -1338,7 +1338,7 @@ def add_bibliography_to_xml( citations_json, ## paths: bib_file = (INPUT_DIR / bib_database).with_suffix( ".bib" ), - tex_template = BASE_DIR / "bibformat" / "4ht" / "bibliography4ht.tex", + tex_template = BASE_DIR / "data" / "aux" / "bibliography4ht.tex", temp_dir = TEMP_DIR / "bib2html" / "monograph-tmp", output_file = TEMP_DIR / "bib2html" / "used_citations-monograph.html", log_dir = LOG_DIR / SCRIPT_NAME / "bib2html", @@ -1354,7 +1354,7 @@ def add_bibliography_to_xml( citations_json, ## paths: bib_file = (INPUT_DIR / bib_database).with_suffix( ".bib" ), - tex_template = BASE_DIR / "bibformat" / "4ht" / "bibliography4ht.tex", + tex_template = BASE_DIR / "data" / "aux" / "bibliography4ht.tex", temp_dir = TEMP_DIR / "bib2html" / "chapter_{:02d}-tmp".format( intChapterNumber ), output_file = TEMP_DIR / "bib2html" / "used_citations-anthology-chapter_{:02d}.html".format( intChapterNumber ), log_dir = LOG_DIR / SCRIPT_NAME / "bib2html" From 126bbe46fd2b7943c3df381b96b076fe01d283bc Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 13:36:11 +0200 Subject: [PATCH 075/132] Function to move index sections upwards --- eoatex2imxml.py | 48 +++++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index f8c7370..06059cd 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1667,23 +1667,37 @@ def add_bibliography_to_xml( xmlCitenumeric.set("class","citation") intChapterNumber += 1 -# this is somewhat luzzini-specific -def do_something_funny_about_indices(): - print_bibl_elements = xmlTree.findall(".//EOAprintbibliography") - if len(print_bibl_elements) > 0: - bib_parent_element = print_bibl_elements[0].getparent() - # bib_parent_element = xmlBibliographies[0].getparent() - upper_div = bib_parent_element.xpath("./ancestor::div1")[0] - previous_div0 = upper_div.getparent() - # possible culprit for not finding the index - # other_content = bib_parent_element.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") - other_content = upper_div.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") - if len(other_content) > 0: - for element in other_content: - previous_div0.append(element) - -do_something_funny_about_indices() - +# index must be child of div0! +# def do_something_funny_about_indices(): +# print_bibl_elements = xmlTree.findall(".//EOAprintbibliography") +# if len(print_bibl_elements) > 0: +# bib_parent_element = print_bibl_elements[0].getparent() +# # bib_parent_element = xmlBibliographies[0].getparent() +# upper_div = bib_parent_element.xpath("./ancestor::div1")[0] +# previous_div0 = upper_div.getparent() +# # possible culprit for not finding the index +# # other_content = bib_parent_element.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") +# other_content = upper_div.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") +# if len(other_content) > 0: +# for element in other_content: +# previous_div0.append(element) +# else: +# logging.debug("Nothing funny about indices.") + +# do_something_funny_about_indices() + +def make_indices_child_of_div0(): + """Move index commands to a higher location""" + + index_sections = xmlTree.xpath(" .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") + logging.debug(f"Found {libeoaconvert.plural(len(index_sections), 'index section')}.") + + if index_sections: + for section in index_sections: + parent_div0 = section.xpath("./ancestor::div0")[0] + parent_div0.append(section) + +make_indices_child_of_div0() etree.strip_tags(xmlTree, "tagtobestripped") etree.strip_elements(xmlTree, "elementtobestripped", with_tail=False) From b897bf8e28123338f63765fb253c64a4906c74a5 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 13:37:05 +0200 Subject: [PATCH 076/132] Path adjustments --- imxml2epub.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index adf68f4..556f78d 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-10 17:26:39 (kthoden)> +# Time-stamp: <2019-05-14 13:36:47 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -1699,7 +1699,7 @@ class FootnoteError(Exception): logging.info("-------------") # check if it has a child element EOAfacsimilepart if bool(xmlPart.findall(".//EOAfacsimilepart")): - htmlChapter = etree.parse(EPUB_FILES + "epubchapter.xml", xmlChapterParser) + htmlChapter = etree.parse(str(EPUB_FILES / "epubchapter.xml"), xmlChapterParser) # Change EOAfacsimilepart into H1 xmlHeadline = xmlPart.find(".//EOAfacsimilepart") xmlHeadline.tag = "h1" @@ -1710,7 +1710,7 @@ class FootnoteError(Exception): # Using Deepcopy, coz a simple append will delete the original htmlChapter.find(".//" + htmlns + "body").append(deepcopy(xmlChild)) # Save Chapter - tmpFileName = CONVERT / ("epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") + tmpFileName = CONVERT_DIR / ("epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") # tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(htmlChapter, pretty_print=True, encoding="unicode") From 82fe6e0de14f48cfec3cc8ee81eeb358466e2f86 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 13:37:36 +0200 Subject: [PATCH 077/132] Headings work better without space --- utils/bib2html.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index 8dab526..33f3438 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -32,7 +32,7 @@ NS_MAP = {"x" : 'http://www.w3.org/1999/xhtml'} BIBLIOGRAPHY_CHAPTER_NO_KEYWORD = "BIBLIOGRAPHY" -BIBLIOGRAPHY_CHAPTER = "BIBLIOGRAPHY {keyword}" +BIBLIOGRAPHY_CHAPTER = "BIBLIOGRAPHY-{keyword}" def latex_escape_non_ascii( input_str ): output = "" @@ -130,7 +130,7 @@ def write_dummy_latex( textwrap.dedent( f""" \section*{{{section_heading}}} - \printbibliography*[heading=none, keyword={{{keyword}}}] + \printbibliography[heading=none, keyword={{{keyword}}}] """ ) @@ -384,6 +384,7 @@ def main( else: section_heading = BIBLIOGRAPHY_CHAPTER.format( keyword = keyword ) # '
...
+ logging.debug(f"Looking for section '{section_heading}' in file '{tmp_path_html_fixed1}'.") bibliography_el = xml_tree.xpath( f"//x:body/x:h3[text() = '{section_heading}']/following-sibling::x:dl[1]", namespaces = NS_MAP From 5bc76bdbfcbdac5ceb05b9957f03a4580921f6bb Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 13:38:00 +0200 Subject: [PATCH 078/132] Path adjustments --- utils/bib2html.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/bib2html.py b/utils/bib2html.py index 33f3438..81e3b6e 100755 --- a/utils/bib2html.py +++ b/utils/bib2html.py @@ -433,7 +433,7 @@ def main( help="File that contains the bibliography") parser.add_argument( "--tex-template", - default = BASE_DIR / "bibformat" / "4ht" / "bibliography4ht.tex", + default = BASE_DIR / "data" / "aux" / "bibliography4ht.tex", help="the latex template to use for the bibliography" ) parser.add_argument( @@ -445,7 +445,6 @@ def main( check_executables() - citekeys = ["Edwards_2017", "Riggs:2016aa", "Bruckler:2001aa", "Zdenek:1939aa", "Caraffa_2011", "Uhlikova:2010aa", "Noll:1992aa", "Schwarz:1931aa", "Schwartz_1995", "Faber:2015ab", "Rohacek:2010aa", "Lachnit:2005aa", "Groll:1865aa", "Schlosser:1934aa", "Eitelberger:1863ab", "Wirth:1939aa", "Faber:2015aa", "Trnkova:2015aa", "Trnkova:2010aa", "Frodl:1988aa"] language = "de" translations = {"de" : "german", "en" : "english", "it" : "italian", "fr" : "french"} From 401fe0fefd3fd9f2a067ba66675742e69b752eee Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 13:38:22 +0200 Subject: [PATCH 079/132] For consistency's sake: no need to input .tex extension --- eoatex2pdf.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/eoatex2pdf.py b/eoatex2pdf.py index 7139e69..aed1228 100755 --- a/eoatex2pdf.py +++ b/eoatex2pdf.py @@ -26,10 +26,17 @@ def main( os.makedirs( output_dir ) input_file = Path( input_file ) input_dir = input_file.resolve().parent + + input_path = Path( input_file ) + if input_path.suffix == '': + input_path = input_path.with_suffix( ".tex" ) + elif input_path.suffix != ".tex": + raise( Exception( "input file matching '*.tex' expected" ) ) + output_dir = Path( output_dir ) fixed_file_path = output_dir / input_file.name libeoaconvert.enable_preamble( - input_file = input_file, + input_file = input_path, output_file = fixed_file_path, pdf_or_xml = "pdf" ) @@ -86,7 +93,7 @@ def main( parser.add_argument( "-f", "--filename", required = True, - help="Name of main EOATeX file" + help="Name of main EOATeX file without .tex extension." ) parser.add_argument( "-o", "--output-dir", From 84c62cd2ffe9e565e4d87eac9a0379bf0a1778ee Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 16:03:51 +0200 Subject: [PATCH 080/132] Function for creation of epub container --- imxml2epub.py | 60 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index 556f78d..58d1bf9 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-14 13:36:47 (kthoden)> +# Time-stamp: <2019-05-14 16:01:49 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -77,8 +77,8 @@ default="termes" ) parser.add_argument( - "-nc", "--nocaption", - help="No captions for figures.", + "-ne", "--no-epub", + help="Disable creation of epub file.", action="store_true" ) @@ -326,21 +326,50 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber): return tocncx # def addToTocncx ends here + +def create_epub_container(filename, OUTPUT_DIR): + """Use zip to create the epub container file""" + + import zipfile + + epub_filename = f"{filename.lower()}-raw.epub" + + output_dir = OUTPUT_DIR.resolve() + cwd = Path.cwd() + os.chdir( output_dir ) + + epubcontainer = zipfile.ZipFile(epub_filename, "w") + epubcontainer.write("mimetype", compresslevel=None) + + epubcontainer.write("META-INF/container.xml") + + for dirname, subdirs, files in os.walk("OEBPS"): + epubcontainer.write(dirname) + for contentfile in files: + epubcontainer.write(os.path.join(dirname, contentfile)) + + epubcontainer.close() + logging.info(f"Wrote {epub_filename}.") + os.chdir( cwd ) +# def create_epub_container ends here + + ############################################################## # Create .epub basic structure # ############################################################## -# Create folder structure for ebook -if not os.path.exists(CONVERT_DIR / "epub"): - os.mkdir(CONVERT_DIR / "epub") - os.mkdir(CONVERT_DIR / "epub" / "META-INF" ) - os.mkdir(CONVERT_DIR / "epub" / "OEBPS" ) - os.mkdir(CONVERT_DIR / "epub" / "OEBPS" / "images" ) - os.mkdir(CONVERT_DIR / "epub" / "OEBPS" / "fonts" ) +if not os.path.exists( OUTPUT_DIR / "META-INF" ): + os.mkdir( OUTPUT_DIR / "META-INF" ) +if not os.path.exists( OUTPUT_DIR / "OEBPS" ): + os.mkdir( OUTPUT_DIR / "OEBPS" ) +if not os.path.exists( OUTPUT_DIR / "OEBPS" / "images" ): + os.mkdir( OUTPUT_DIR / "OEBPS" / "images" ) +if not os.path.exists( OUTPUT_DIR / "OEBPS" / "fonts" ): + os.mkdir( OUTPUT_DIR / "OEBPS" / "fonts" ) # Copy containter.xml and mimetype -shutil.copy(EPUB_FILES / "epubcontainer.xml", CONVERT_DIR / "epub/META-INF/container.xml") -shutil.copy(EPUB_FILES / "epubmimetype", CONVERT_DIR / "epub/mimetype") +shutil.copy(EPUB_FILES / "epubcontainer.xml", OUTPUT_DIR / "META-INF/container.xml") +shutil.copy(EPUB_FILES / "epubmimetype", OUTPUT_DIR / "mimetype") ''' # Copy containter.xml and mimetype shutil.copy(EPUB_FILES + "epubcontainer.xml", os.getcwd() + "/CONVERT/epub/META-INF/container.xml") @@ -1752,4 +1781,11 @@ class FootnoteError(Exception): ergebnis = etree.tostring(xmlEbookTree, pretty_print=True, encoding="unicode") ergebnisdatei.write(ergebnis) ergebnisdatei.close() + +if args.no_epub: + pass +else: + create_epub_container(f"{publication_series}{publication_number}", OUTPUT_DIR) + logging.info("Finished!") +# finis From 30c4c52c34b19b4c41be7be9439b87897e12dc3d Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 16:05:23 +0200 Subject: [PATCH 081/132] Use global translation structure --- data/aux/translations.xml | 1 + imxml2epub.py | 45 +++++++++++++++++---------------------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/data/aux/translations.xml b/data/aux/translations.xml index ac94992..dec34f3 100644 --- a/data/aux/translations.xml +++ b/data/aux/translations.xml @@ -4,4 +4,5 @@ + diff --git a/imxml2epub.py b/imxml2epub.py index 58d1bf9..c426d03 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -120,38 +120,35 @@ OUTPUT_DIR = Path( args.output_dir ) PUBLICATION_DIR = Path( args.publication_dir ) TEMP_DIR = OUTPUT_DIR / "tmp_files" -CONVERT_DIR = OUTPUT_DIR / "CONVERT" +# CONVERT_DIR = OUTPUT_DIR / "CONVERT" DEBUG_DIR = OUTPUT_DIR / "debug" ############################ # Paths to auxiliary files # ############################ TRANSLATION_FILE = BASE_DIR / CONFIG['Auxiliaries']['TRANSLATIONS'] +translation_xml = etree.parse( str( TRANSLATION_FILE ) ) if not TEMP_DIR.exists(): os.makedirs( TEMP_DIR ) -if not CONVERT_DIR.exists(): - os.makedirs( CONVERT_DIR ) +# if not DIR.exists(): +# os.makedirs( CONVERT_DIR ) if not DEBUG_DIR.exists(): os.makedirs( DEBUG_DIR ) # Check for folder and necessary files -if not os.path.exists(CONVERT_DIR): - logging.info(f"The directory {CONVERT_DIR} has not been created yet. Creating it for you") - time.sleep(1) - os.makedirs(CONVERT_DIR) -if not os.path.exists(CONVERT_DIR / "publication.cfg"): - logging.info(f"The publication.cfg file is missing in {CONVERT_DIR} directory.") +if not os.path.exists( OUTPUT_DIR / "publication.cfg"): + logging.info(f"The publication.cfg file is missing in {OUTPUT_DIR} directory.") if os.path.exists(PUBLICATION_DIR / "publication.cfg"): - shutil.copy(PUBLICATION_DIR / "publication.cfg", CONVERT_DIR) + shutil.copy(PUBLICATION_DIR / "publication.cfg", OUTPUT_DIR) logging.info(f"Copied from {PUBLICATION_DIR}.") else: logging.error("Found no publication.cfg. Exiting") sys.exit( 1 ) -if not os.path.exists(CONVERT_DIR / "cover.jpg"): - logging.info(f"The file cover.jpg in {CONVERT_DIR} directory is missing.") +if not os.path.exists( OUTPUT_DIR / "cover.jpg"): + logging.info(f"The file cover.jpg in {OUTPUT_DIR} directory is missing.") if os.path.exists(PUBLICATION_DIR / "Cover.jpg"): - shutil.copy(PUBLICATION_DIR / "Cover.jpg", CONVERT_DIR / "cover.jpg") + shutil.copy(PUBLICATION_DIR / "Cover.jpg", OUTPUT_DIR / "cover.jpg") logging.info("Copied from current directory.") else: logging.error("No coverfile found. You can create a temporary one with the mkimage.py script") @@ -161,7 +158,7 @@ # sys.exit() -lang_dict = {"fig" : {"en" : "Fig.", "de" : "Abb."}} +# lang_dict = {"fig" : {"en" : "Fig.", "de" : "Abb."}} Datei = open( TEMP_DIR / 'intermediate.log', 'w') ''' @@ -733,16 +730,15 @@ def create_epub_container(filename, OUTPUT_DIR): xmlFigureImage.set("style", "width: " + strImageWidth + "%") xmlFigure.append(xmlFigureImage) - if args.nocaption: - pass - else: - xmlFigureCaption.tag = "p" - strFigureCaption = xmlFigureCaption.text or "" - # FIX - xmlFigureCaption.text = lang_dict["fig"][strLanguage] + " " + str(intFigureNumber) + ": " + strFigureCaption - xmlFigure.addnext(xmlFigureCaption) - # Change the tag of the parent

-Tag to

so that it may be removed - #xmlFigure.getparent().tag = "div" + xmlFigureCaption.tag = "p" + strFigureCaption = xmlFigureCaption.text or "" + # FIX + dictLangFigures = translation_xml.find("//entry[@name='fig']").attrib + figures_text = dictLangFigures[libeoaconvert.two_letter_language(xmlChapter.get("language"))] + xmlFigureCaption.text = f"{figures_text} {str(intFigureNumber)}: {strFigureCaption}" + xmlFigure.addnext(xmlFigureCaption) + # Change the tag of the parent

-Tag to

so that it may be removed + #xmlFigure.getparent().tag = "div" xml_figures_hyperimage = xmlEbookTree.xpath(".//EOAfigure[@type='hionly'] | .//EOAlsfigure[@type='hionly']") logging.debug("found %s hyperimage figures" % len(xml_figures_hyperimage)) @@ -975,7 +971,6 @@ class FootnoteError(Exception): xmlNewFootnotes = etree.Element("div") xmlNewFootnotesHeader = etree.Element("h3") - translation_xml = etree.parse( str( TRANSLATION_FILE ) ) dictLangFootnotes = translation_xml.find("//entry[@name='footnotes']").attrib xmlNewFootnotesHeader.text = dictLangFootnotes[libeoaconvert.two_letter_language(xmlChapter.get("language"))] xmlNewFootnotes.append(xmlNewFootnotesHeader) From ea7d1b773a103819a11b1afb7e413f85a5e789d2 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 16:07:14 +0200 Subject: [PATCH 082/132] Flatten output directory --- imxml2epub.py | 62 +++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index c426d03..b6a7b81 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -390,13 +390,13 @@ def create_epub_container(filename, OUTPUT_DIR): font_files = termes_fonts shutil.copy( EPUB_FILES / "eoa-epub-termes.css", - CONVERT_DIR / "epub/OEBPS/eoa-epub.css" + OUTPUT_DIR / "OEBPS/eoa-epub.css" ) # shutil.copy(EPUB_FILES + "eoa-epub-termes.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") elif args.font == "libertine": shutil.copy( EPUB_FILES / "eoa-epub-libertine.css", - CONVERT_DIR / "epub/OEBPS/eoa-epub.css" + OUTPUT_DIR / "OEBPS/eoa-epub.css" ) # shutil.copy(EPUB_FILES + "eoa-epub-libertine.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") font_files = libertine_fonts @@ -404,7 +404,7 @@ def create_epub_container(filename, OUTPUT_DIR): logging.info("Font not recognized, falling back to default.") shutil.copy( EPUB_FILES / "eoa-epub-termes.css", - CONVERT_DIR / "epub/OEBPS/eoa-epub.css" + OUTPUT_DIR / "OEBPS/eoa-epub.css" ) # shutil.copy(EPUB_FILES + "eoa-epub-termes.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") @@ -414,7 +414,7 @@ def create_epub_container(filename, OUTPUT_DIR): for fontfile in font_files: shutil.copy( EPUB_FILES / fontfile, - CONVERT_DIR / "epub/OEBPS/fonts/" + OUTPUT_DIR / "OEBPS/fonts/" ) # shutil.copy(EPUB_FILES + fontfile, os.getcwd() + "/CONVERT/epub/OEBPS/fonts/") @@ -462,7 +462,11 @@ def create_epub_container(filename, OUTPUT_DIR): xmlMetadata = contentopf.find(".//{http://www.idpf.org/2007/opf}metadata") # Prepare Metadata based on Publication.cfg cfgPublication = configparser.RawConfigParser() -cfgPublication.read(CONVERT_DIR / "publication.cfg") +cfgPublication.read( OUTPUT_DIR / "publication.cfg") +publication_series = cfgPublication.get("Technical", "Serie") +publication_number = cfgPublication.get("Technical", "Number") + + # Prepare Author String strAuthorString = cfgPublication.get("Authors", "Author1") if cfgPublication.get("Authors", "Author2") != "": @@ -535,8 +539,8 @@ def create_epub_container(filename, OUTPUT_DIR): xmlItem.set("media-type", "image/jpeg") xmlManifest.append(xmlItem) shutil.copy( - CONVERT_DIR / "cover.jpg", - CONVERT_DIR / "epub/OEBPS/images/" + OUTPUT_DIR / "cover.jpg", + OUTPUT_DIR / "OEBPS/images/" ) # shutil.copy(os.getcwd() + "/CONVERT/Cover.jpg", os.getcwd() + "/CONVERT/epub/OEBPS/images/") xmlItem = etree.Element("item") @@ -544,12 +548,12 @@ def create_epub_container(filename, OUTPUT_DIR): xmlItem.set("href", "cover.xhtml") xmlItem.set("media-type", "application/xhtml+xml") xmlManifest.append(xmlItem) -shutil.copy(EPUB_FILES / "epubcover.xhtml", CONVERT_DIR / "epub/OEBPS/cover.xhtml") +shutil.copy(EPUB_FILES / "epubcover.xhtml", OUTPUT_DIR / "OEBPS/cover.xhtml") # shutil.copy(EPUB_FILES + "epubcover.xhtml", os.getcwd() + "/CONVERT/epub/OEBPS/cover.xhtml") logging.info("-------------------") logging.info("Preparing intro.xhtml") logging.info("-------------------") -if cfgPublication.get("Technical", "Serie") == "Sources": +if publication_series == "Sources": tmpFilePath = EPUB_FILES / "epubintro-sources.xhtml" else: tmpFilePath = EPUB_FILES / "epubintro.xhtml" @@ -572,7 +576,7 @@ def create_epub_container(filename, OUTPUT_DIR): # else: # strIntroHTML = re.sub("AdditionalInformation", "", strIntroHTML) -tmpFilePath = CONVERT_DIR / "epub/OEBPS/intro.xhtml" +tmpFilePath = OUTPUT_DIR / "OEBPS/intro.xhtml" # tmpFilePath = os.getcwd() + "/CONVERT/epub/OEBPS/intro.xhtml" tmpFile = open(tmpFilePath, "w") tmpFile.write(strIntroHTML) @@ -684,14 +688,14 @@ def create_epub_container(filename, OUTPUT_DIR): strImageFileNamewoSuffix, strImageFileName_Suffix = os.path.splitext(strImageFileName) shutil.copy( PUBLICATION_DIR / strImageFileString, - CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName) + OUTPUT_DIR / "OEBPS/images" / (strImageFileDir + strImageFileName) ) # shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) extension_and_mime = get_mimetype(strImageFileName_Suffix) strImageFilepath = libeoaconvert.sanitizeImage( - CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName), + OUTPUT_DIR / "OEBPS/images" / (strImageFileDir + strImageFileName), TEMP_DIR, GM_PATH, PDFCROP_EXEC, @@ -759,10 +763,10 @@ def create_epub_container(filename, OUTPUT_DIR): strImageFileNamewoSuffix, strImageFileName_Suffix = os.path.splitext(strImageFileName) shutil.copy( PUBLICATION_DIR / strImageFileString, - CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName) + OUTPUT_DIR / "OEBPS/images" / (strImageFileDir + strImageFileName) ) strImageFilepath = libeoaconvert.sanitizeImage( - CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName), + OUTPUT_DIR / "OEBPS/images" / (strImageFileDir + strImageFileName), TEMP_DIR, GM_PATH, PDFCROP_EXEC @@ -834,7 +838,7 @@ def replace_footnote_equations(footnote): equation.append(img) shutil.copy( INPUT_DIR / "items" / filename, - CONVERT_DIR / "epub/DEBPS/images" / filename + OUTPUT_DIR / "DEBPS/images" / filename ) result = addToContentopf( result, @@ -1006,7 +1010,7 @@ class FootnoteError(Exception): xmlEquationnonumber.append(xmlIMG) shutil.copy( INPUT_DIR / "items" / strFilename, - CONVERT_DIR / "epub/OEBPS/images" / strFilename + OUTPUT_DIR / "OEBPS/images" / strFilename ) # shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) contentopf = addToContentopf(contentopf, "images/" + strFilename, strFilename, "png") @@ -1209,7 +1213,7 @@ class FootnoteError(Exception): del xmlInlineEquation.attrib["TeX"] shutil.copy( INPUT_DIR / "items" / xmlInlineEquation.get("src"), - CONVERT_DIR / "epub/OEBPS/images" / xmlInlineEquation.get("src") + OUTPUT_DIR / "OEBPS/images" / xmlInlineEquation.get("src") ) # shutil.copy(os.getcwd() + "/items/" + xmlInlineEquation.get("src"), os.getcwd() + "/CONVERT/epub/OEBPS/images/" + xmlInlineEquation.get("src")) xmlInlineEquation.set("src", "images/" + xmlInlineEquation.get("src")) @@ -1225,7 +1229,7 @@ class FootnoteError(Exception): del xml_inline_chem.attrib["TeX"] shutil.copy( INPUT_DIR / "items" / xml_inline_chem.get("src"), - CONVERT_DIR / "epub/OEBPS/images" / xml_inline_chem.get("src") + OUTPUT_DIR / "OEBPS/images" / xml_inline_chem.get("src") ) # shutil.copy(os.getcwd() + "/items/" + xml_inline_chem.get("src"), os.getcwd() + "/CONVERT/epub/OEBPS/images/" + xml_inline_chem.get("src")) xml_inline_chem.set("src", "images/" + xml_inline_chem.get("src")) @@ -1246,7 +1250,7 @@ class FootnoteError(Exception): strInlineElementFileName = os.path.basename(strInlineElementFilePath) strInlineElementDirName = os.path.dirname(strInlineElementFilePath) strInlineElementSubDirName = os.path.dirname(strInlineElementFilePath).split(os.path.sep)[-1] - strNewImagePath = CONVERT_DIR / "epub/OEBPS/images" / Path(strInlineElementSubDirName + strInlineElementFileName) + strNewImagePath = OUTPUT_DIR / "OEBPS/images" / Path(strInlineElementSubDirName + strInlineElementFileName) # strNewImagePath = os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strInlineElementDirName + strInlineElementFileName # trouble when there are subdirectories in Image path! # some thing goes wrong here: Images/png_300dpi/A.png @@ -1294,7 +1298,7 @@ class FootnoteError(Exception): # Copy image of Equation shutil.copy( INPUT_DIR / "items" / strFilename, - CONVERT_DIR / "epub/OEBPS/images" / strFilename + OUTPUT_DIR / "OEBPS/images" / strFilename ) # shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) contentopf = addToContentopf(contentopf, "images/" + strFilename, strFilename, "png") @@ -1320,7 +1324,7 @@ class FootnoteError(Exception): # Copy image of Equation shutil.copy( INPUT_DIR / "items" / strFilename, - CONVERT_DIR / "epub/OEBPS/images" / strFilename + OUTPUT_DIR / "OEBPS/images" / strFilename ) # shutil.copy(os.getcwd() + "/items/" + strFilename, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strFilename) contentopf = addToContentopf(contentopf, "images/" + strFilename, strFilename, "png") @@ -1525,12 +1529,12 @@ class FootnoteError(Exception): # hier shutil.copy( PUBLICATION_DIR / strImageFile, - CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName) + OUTPUT_DIR / "OEBPS/images" / (strImageFileDir + strImageFileName) ) # shutil.copy(os.getcwd() + "/" + strImageFile, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) strImageFilepath = libeoaconvert.sanitizeImage( - CONVERT_DIR / "epub/OEBPS/images" / (strImageFileDir + strImageFileName), + OUTPUT_DIR / "OEBPS/images" / (strImageFileDir + strImageFileName), TEMP_DIR, GM_PATH, PDFCROP_EXEC @@ -1685,7 +1689,7 @@ class FootnoteError(Exception): xmlNew.text = strPartTitle htmlChapter.find(".//" + htmlns + "body").append(xmlNew) # Save Part - tmpFileName = CONVERT_DIR / ("epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") + tmpFileName = OUTPUT_DIR / ("OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") # tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(htmlChapter, pretty_print=True, encoding="unicode") @@ -1703,7 +1707,7 @@ class FootnoteError(Exception): # Using Deepcopy, coz a simple append will delete the original htmlChapter.find(".//" + htmlns + "body").append(deepcopy(xmlChild)) # Save Chapter - tmpFileName = CONVERT_DIR / ("epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") + tmpFileName = OUTPUT_DIR / ("OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") # tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(htmlChapter, pretty_print=True, encoding="unicode") @@ -1734,14 +1738,14 @@ class FootnoteError(Exception): # Using Deepcopy, coz a simple append will delete the original htmlChapter.find(".//" + htmlns + "body").append(deepcopy(xmlChild)) # Save Chapter - tmpFileName = CONVERT_DIR / ("epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") + tmpFileName = OUTPUT_DIR / ("OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") # tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(htmlChapter, pretty_print=True, encoding="unicode") tmpFile.write(tmpResult) tmpFile.close() # Save Chapter - tmpFileName = CONVERT_DIR / ("epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") + tmpFileName = OUTPUT_DIR / ("OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml") # tmpFileName = os.getcwd() + "/CONVERT/epub/OEBPS/chapter" + (str(intTechnicalChapterNumber)) + ".xhtml" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(htmlChapter, pretty_print=True, encoding="unicode") @@ -1753,7 +1757,7 @@ class FootnoteError(Exception): # Content_OPF hinzufügen intTechnicalChapterNumber += 1 -tmpFileName = CONVERT_DIR / "epub/OEBPS/toc.ncx" +tmpFileName = OUTPUT_DIR / "OEBPS/toc.ncx" logging.info("Saving toc.ncx") tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(tocncx, pretty_print=True, encoding="unicode") @@ -1761,7 +1765,7 @@ class FootnoteError(Exception): tmpFile.close() logging.info("Saving content.opf") -tmpFileName = CONVERT_DIR / "epub/OEBPS/content.opf" +tmpFileName = OUTPUT_DIR / "OEBPS/content.opf" tmpFile = open (tmpFileName, "w") tmpResult = etree.tostring(contentopf, pretty_print=True, encoding="unicode") tmpFile.write(tmpResult) From 1f20a1b2ae8a30c551c448d8b03451ebca65311c Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 16:07:29 +0200 Subject: [PATCH 083/132] Variables --- imxml2epub.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index b6a7b81..71bdc70 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -490,7 +490,7 @@ def create_epub_container(filename, OUTPUT_DIR): xmlSubtitle.text = strSubtitleString xmlMetadata.append(xmlSubtitle) # Prepare Identifier -strIdentifier = "MPIWG:" + cfgPublication.get("Technical", "Serie") + cfgPublication.get("Technical", "Number") +strIdentifier = "MPIWG:" + publication_series + publication_number xmlIdentifier = etree.Element("{http://purl.org/dc/elements/1.1/}identifier") xmlIdentifier.text = strIdentifier xmlIdentifier.set("id", "BookId") @@ -563,8 +563,8 @@ def create_epub_container(filename, OUTPUT_DIR): strIntroHTML = re.sub("author", strAuthorString, strIntroHTML) strIntroHTML = re.sub("TITLE", strTitleString, strIntroHTML) strIntroHTML = re.sub("year", cfgPublication.get("Technical", "PublicationYear"), strIntroHTML) -strIntroHTML = re.sub("series", cfgPublication.get("Technical", "Serie"), strIntroHTML) -strIntroHTML = re.sub("number", cfgPublication.get("Technical", "Number"), strIntroHTML) +strIntroHTML = re.sub("series", publication_series, strIntroHTML) +strIntroHTML = re.sub("number", publication_number, strIntroHTML) try: strIntroHTML = re.sub("AdditionalInformation", "

" + cfgPublication.get("General", "AdditionalInformation") + "

", strIntroHTML) @@ -586,7 +586,7 @@ def create_epub_container(filename, OUTPUT_DIR): xmlHead = tocncx.find("//{http://www.daisy.org/z3986/2005/ncx/}head") xmlMeta = etree.Element("meta") xmlMeta.set("name", "dtb:uid") -xmlMeta.set("content", "MPIWG:" + cfgPublication.get("Technical", "Serie") + cfgPublication.get("Technical", "Number")) +xmlMeta.set("content", "MPIWG:" + publication_series + publication_number) xmlHead.append(xmlMeta) xmlTitle = tocncx.find("//{http://www.daisy.org/z3986/2005/ncx/}docTitle") xmlText = etree.Element("text") From cb384ec4e09c26a57c8c59d37c135737d8fb4405 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 16:07:38 +0200 Subject: [PATCH 084/132] Another tag to be removed: EOAtocentry --- imxml2epub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imxml2epub.py b/imxml2epub.py index 71bdc70..2921981 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1668,7 +1668,7 @@ class FootnoteError(Exception): tmpTail = xmlIndexentry.tail or "" xmlIndexentry.clear() xmlIndexentry.tail = tmpTail -etree.strip_tags(xmlEbookTree, "EOAlabel", "EOAindex", "EOApageref", "EOAcitenumeric", "EOAtable", "EOAref", "note", "div", "div2", "div3", "div4", "div5", "citetext", "newpage", "EOAciteyear", "EOAtablelabel" , "hi", "pagebreak", "page", "pagestyle", "EOAcitation", "EOAciteauthoryear", "EOAcitemanual", "EOAprintbibliography", "EOAindexperson", "EOAprintindex", "EOAindexlocation", "EOAprintpersonindex", "EOAprintlocationindex","anchor", "temp", "EOAletterhead", "EOAhifigure") +etree.strip_tags(xmlEbookTree, "EOAlabel", "EOAindex", "EOApageref", "EOAcitenumeric", "EOAtable", "EOAref", "note", "div", "div2", "div3", "div4", "div5", "citetext", "newpage", "EOAciteyear", "EOAtablelabel" , "hi", "pagebreak", "page", "pagestyle", "EOAcitation", "EOAciteauthoryear", "EOAcitemanual", "EOAprintbibliography", "EOAindexperson", "EOAprintindex", "EOAindexlocation", "EOAprintpersonindex", "EOAprintlocationindex","anchor", "temp", "EOAletterhead", "EOAhifigure", "EOAtocentry") etree.strip_attributes(xmlEbookTree, "id-text", "noindent", "type", "label", "spacebefore", "rend") # also contained "id" etree.strip_elements(xmlEbookTree, "citekey", with_tail=False) From 6ca5ae348b8cf4047854cd04d1cc7151f47aa5ea Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 16:40:23 +0200 Subject: [PATCH 085/132] Make license configurable --- data/epub_files/epubintro-sources.xhtml | 5 ++--- data/epub_files/epubintro.xhtml | 5 ++--- imxml2epub.py | 15 +++++++++++++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/data/epub_files/epubintro-sources.xhtml b/data/epub_files/epubintro-sources.xhtml index 7dea7ca..c96f813 100644 --- a/data/epub_files/epubintro-sources.xhtml +++ b/data/epub_files/epubintro-sources.xhtml @@ -14,7 +14,7 @@ Ian T. Baldwin, Gerd Graßhoff, Jürgen Renn, Dagmar Schäfer, Robert Schlögl,

Edition Open Access Development Team
-Lindy Divarci, Samuel Gfrörer, Klaus Thoden, Malte Vogl, Dirk Wintergrün

+Lindy Divarci, Samuel Gfrörer, Klaus Thoden, Malte Vogl

Editor-in-chief
Matteo Valleriani
Max Planck Institute for History of Science, Berlin

Other Editors
Stephen P. Weldon
Department of History of Science, University of Oklahoma
@@ -29,8 +29,7 @@ Robert G. Morrison
Department of Religion, Bowdoin College

First published year
Edition Open Access
http://www.edition-open-access.de
-Published under Creative Commons by-nc-sa 3.0 Germany Licence
-http://creativecommons.org/licenses/by-nc-sa/3.0/de/
+LicenseInformation The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available on the Internet at http://dnb.d-nb.de.

AdditionalInformation diff --git a/data/epub_files/epubintro.xhtml b/data/epub_files/epubintro.xhtml index 4aa076b..025aeb4 100644 --- a/data/epub_files/epubintro.xhtml +++ b/data/epub_files/epubintro.xhtml @@ -14,7 +14,7 @@ Ian T. Baldwin, Gerd Graßhoff, Jürgen Renn, Dagmar Schäfer, Robert Schlögl,

Edition Open Access Development Team
-Lindy Divarci, Samuel Gfrörer, Klaus Thoden, Malte Vogl, Dirk Wintergrün

+Lindy Divarci, Samuel Gfrörer, Klaus Thoden, Malte Vogl

Scientific Board
Markus Antonietti, Ian Baldwin, Antonio Becchi, Fabio Bevilacqua, William G. Boltz, Jens Braarvik, @@ -32,8 +32,7 @@ Gereon Wolters, Zhang Baichun.

First published year
Edition Open Access
http://www.edition-open-access.de
-Published under Creative Commons by-nc-sa 3.0 Germany Licence
-http://creativecommons.org/licenses/by-nc-sa/3.0/de/
+LicenseInformation The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available on the Internet at http://dnb.d-nb.de.

AdditionalInformation diff --git a/imxml2epub.py b/imxml2epub.py index 2921981..d34a399 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-14 16:01:49 (kthoden)> +# Time-stamp: <2019-05-14 16:17:56 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -465,7 +465,7 @@ def create_epub_container(filename, OUTPUT_DIR): cfgPublication.read( OUTPUT_DIR / "publication.cfg") publication_series = cfgPublication.get("Technical", "Serie") publication_number = cfgPublication.get("Technical", "Number") - +publication_license = cfgPublication.get("Technical", "License") # Prepare Author String strAuthorString = cfgPublication.get("Authors", "Author1") @@ -566,6 +566,17 @@ def create_epub_container(filename, OUTPUT_DIR): strIntroHTML = re.sub("series", publication_series, strIntroHTML) strIntroHTML = re.sub("number", publication_number, strIntroHTML) +if publication_license == "by-nc-sa": + license_string = """Published under Creative Commons by-nc-sa 3.0 Germany Licence
+https://creativecommons.org/licenses/by-nc-sa/3.0/de/
""" +elif publication_license == "by-sa": + license_string = """Published under Creative Commons Attribution-ShareAlike 4.0 International Licence
+https://creativecommons.org/licenses/by-sa/4.0/
""" +else: + logging.error("No license found. Exiting") + sys.exit( 1 ) +strIntroHTML = re.sub("LicenseInformation", license_string, strIntroHTML) + try: strIntroHTML = re.sub("AdditionalInformation", "

" + cfgPublication.get("General", "AdditionalInformation") + "

", strIntroHTML) except configparser.NoOptionError: From 226e98ffd405a5efb36a26c4f456842a33aae169 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 17:02:03 +0200 Subject: [PATCH 086/132] Codecleanup --- imxml2epub.py | 102 +++++++++++++++++--------------------------------- 1 file changed, 35 insertions(+), 67 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index d34a399..2cedb23 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-14 16:17:56 (kthoden)> +# Time-stamp: <2019-05-14 17:01:53 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -86,7 +86,8 @@ config_file = args.CONFIG_FILE -print("The config file is ", config_file) +print(f"The config file is {config_file}") +logseparator = "-"*53 + "\n" ################################## # Reading the configuration file # @@ -457,8 +458,7 @@ def create_epub_container(filename, OUTPUT_DIR): -logging.info("-----------------------------------------------------") -logging.info("Preparing content.opf") +logging.info(f"{logseparator}Preparing content.opf") xmlMetadata = contentopf.find(".//{http://www.idpf.org/2007/opf}metadata") # Prepare Metadata based on Publication.cfg cfgPublication = configparser.RawConfigParser() @@ -623,8 +623,7 @@ def create_epub_container(filename, OUTPUT_DIR): # Convert Chapters, Sections, Subsections and Subsubsections to h1, h2, h3, h4 # Insert Number from Dictionary where needed -logging.info("-----------------------------------------------------") -logging.info("Convert EOAChapter to H1") +logging.info(f"{logseparator}Convert EOAChapter to H1") for xmlChapter in xmlChapters: xmlChapter.find("head").tag = "h1" if xmlChapter.get("rend") != "nonumber": @@ -644,8 +643,7 @@ def create_epub_container(filename, OUTPUT_DIR): # logging.info(dictSections) -logging.info("-----------------------------------------------------") -logging.info("Convert EOAsection to H2") +logging.info(f"{logseparator}Convert EOAsection to H2") xmlSections = xmlEbookTree.findall(".//div2") for xmlSection in xmlSections: xmlSection.find("head").tag = "h2" @@ -655,8 +653,7 @@ def create_epub_container(filename, OUTPUT_DIR): logging.info(strHeadline) xmlSection.find("h2").text = str(dictSections[idSection]) + " " + strHeadline -logging.info("-----------------------------------------------------") -logging.info("Convert EOAsubsection to H3") +logging.info(f"{logseparator}Convert EOAsubsection to H3") xmlSubsections = xmlEbookTree.findall(".//div3") for xmlSubsection in xmlSubsections: xmlSubsection.find("head").tag = "h3" @@ -666,8 +663,7 @@ def create_epub_container(filename, OUTPUT_DIR): logging.info(strHeadline) xmlSubsection.find("h3").text = str(dictSections[idSection]) + " " + strHeadline -logging.info("-----------------------------------------------------") -logging.info("Convert EOAsubsubsection to H4") +logging.info(f"{logseparator}Convert EOAsubsubsection to H4") xmlSubsubsections = xmlEbookTree.findall(".//div4") for xmlSubsubsection in xmlSubsubsections: xmlSubsubsection.find("head").tag = "h4" @@ -676,15 +672,13 @@ def create_epub_container(filename, OUTPUT_DIR): #strHeadline = xmlSubsection.find("h4").text #xmlSubsection.find("h3").text = str(dictSections[idSection]) + " " + strHeadline -logging.info("-----------------------------------------------------") -logging.info("Convert EOAparagraph to H5") +logging.info(f"{logseparator}Convert EOAparagraph to H5") xmlParagraphs = xmlEbookTree.findall(".//div5") for xmlParagraph in xmlParagraphs: logging.info("Found a paragraph.") xmlParagraph.find("head").tag = "h5" -logging.info("-----------------------------------------------------") -logging.info("Preparing Figures") +logging.info(f"{logseparator}Preparing Figures") xmlFigures = xmlEbookTree.xpath(".//EOAfigure[not(@type='hionly')] | .//EOAlsfigure[not(@type='hionly')]") for xmlFigure in xmlFigures: # Copy File of the Image @@ -760,8 +754,7 @@ def create_epub_container(filename, OUTPUT_DIR): for fig in xml_figures_hyperimage: fig.tag = "EOAhifigure" -logging.info("-----------------------------------------------------") -logging.info("Preparing not numbered Figures") +logging.info(f"{logseparator}Preparing not numbered Figures") xmlFigures = xmlEbookTree.findall(".//EOAfigurenonumber") for xmlFigure in xmlFigures: # Copy File of the Image @@ -805,9 +798,7 @@ def create_epub_container(filename, OUTPUT_DIR): xmlFigureImage.set("style", "width: " + strImageWidth + "%") xmlFigure.append(xmlFigureImage) -logging.info("-----------------------------------------------------") -logging.info("Preparing Footnotes") - +logging.info(f"{logseparator}Preparing Footnotes") def alph_footnote_index(fndex): """ lowercase Latin footnotes need to support more than 26 values @@ -1068,8 +1059,7 @@ class FootnoteError(Exception): intTechnicalChapterNumber += 1 -logging.info("-----------------------------------------------------") -logging.info("Preparing Lists") +logging.info(f"{logseparator}Preparing Lists") for xmlChapter in xmlChapters: xmlLists = xmlChapter.findall(".//list") for xmlList in xmlLists: @@ -1088,8 +1078,7 @@ class FootnoteError(Exception): for xmlListItem in xmlListItems: xmlListItem.tag = "li" -logging.info("-----------------------------------------------------") -logging.info("Preparing Descriptions") +logging.info(f"{logseparator}Preparing Descriptions") for xmlChapter in xmlChapters: xmlDescriptions = xmlChapter.findall(".//list") for xmlDescription in xmlDescriptions: @@ -1103,8 +1092,7 @@ class FootnoteError(Exception): del xmlChild.attrib["id"] del xmlChild.attrib["id-text"] -logging.info("-----------------------------------------------------") -logging.info("Preparing Blockquotes") +logging.info(f"{logseparator}Preparing Blockquotes") xmlParagraphs = xmlEbookTree.findall(".//p") for xmlParagraph in xmlParagraphs: if xmlParagraph.get("rend") == "quoted": @@ -1123,8 +1111,7 @@ class FootnoteError(Exception): xmlNew.tail = strParagraphTail xmlParagraph.append(xmlNew) -logging.info("-----------------------------------------------------") -logging.info("Preparing Theorems") +logging.info(f"{logseparator}Preparing Theorems") for xmlChapter in xmlChapters: xmlTheorems = xmlChapter.findall(".//theorem") for xmlTheorem in xmlTheorems: @@ -1142,8 +1129,7 @@ class FootnoteError(Exception): del xmlTheorem.attrib["id"] etree.strip_tags(xmlTheorem, "p") -logging.info("-----------------------------------------------------") -logging.info("Preparing Hyperlinks") +logging.info(f"{logseparator}Preparing Hyperlinks") for xmlChapter in xmlChapters: xmlHyperlinks = xmlChapter.findall(".//xref") for xmlHyperlink in xmlHyperlinks: @@ -1157,8 +1143,7 @@ class FootnoteError(Exception): etree.strip_elements(xmlHyperlink, with_tail=True, *['allowbreak']) xmlHyperlink.text = strURL -logging.info("-----------------------------------------------------") -logging.info("Convert emphasized text") +logging.info(f"{logseparator}Convert emphasized text") for xmlChapter in xmlChapters: xmlItalics = xmlChapter.findall(".//hi") for xmlItalic in xmlItalics: @@ -1166,8 +1151,7 @@ class FootnoteError(Exception): xmlItalic.tag = "em" del xmlItalic.attrib["rend"] -logging.info("-----------------------------------------------------") -logging.info("Convert bold text") +logging.info(f"{logseparator}Convert bold text") for xmlChapter in xmlChapters: xmlBolds = xmlChapter.findall(".//hi") for xmlBold in xmlBolds: @@ -1175,38 +1159,33 @@ class FootnoteError(Exception): xmlBold.tag = "b" del xmlBold.attrib["rend"] -logging.info("-----------------------------------------------------") -logging.info("Convert EOAup to ") +logging.info(f"{logseparator}Convert EOAup to ") for xmlChapter in xmlChapters: xmlUps = xmlChapter.findall(".//EOAup") for xmlUp in xmlUps: xmlUp.tag = "sup" -logging.info("-----------------------------------------------------") -logging.info("Convert EOAdown to ") +logging.info(f"{logseparator}Convert EOAdown to ") for xmlChapter in xmlChapters: xmlDowns = xmlChapter.findall(".//EOAdown") for xmlDown in xmlDowns: xmlDown.tag = "sub" -logging.info("-----------------------------------------------------") -logging.info("Convert EOAst to ") +logging.info(f"{logseparator}Convert EOAst to ") for xmlChapter in xmlChapters: xmlStrikeouts = xmlChapter.findall(".//EOAst") for xmlStrikeout in xmlStrikeouts: xmlStrikeout.tag = "span" xmlStrikeout.set("style", "text-decoration: line-through;") -logging.info("-----------------------------------------------------") -logging.info("Convert EOAls to something nice") +logging.info(f"{logseparator}Convert EOAls to something nice") for xmlChapter in xmlChapters: xmlLetterspaceds = xmlChapter.findall(".//EOAls") for xmlLetterspaced in xmlLetterspaceds: xmlLetterspaced.tag = "span" xmlLetterspaced.set("style", "letter-spacing: 0.5em;") -logging.info("-----------------------------------------------------") -logging.info("Convert EOAcaps to something nice") +logging.info(f"{logseparator}Convert EOAcaps to something nice") for xmlChapter in xmlChapters: xmlLetterspaceds = xmlChapter.findall(".//EOAcaps") for xmlLetterspaced in xmlLetterspaceds: @@ -1214,8 +1193,7 @@ class FootnoteError(Exception): xmlLetterspaced.set("style", "font-variant:small-caps;") -logging.info("-----------------------------------------------------") -logging.info("Convert EOAineq into appropriate IMG-Tags") +logging.info(f"{logseparator}Convert EOAineq into appropriate IMG-Tags") for xmlChapter in xmlChapters: xmlInlineEquations = xmlChapter.findall(".//EOAineq") for xmlInlineEquation in xmlInlineEquations: @@ -1230,8 +1208,7 @@ class FootnoteError(Exception): xmlInlineEquation.set("src", "images/" + xmlInlineEquation.get("src")) contentopf = addToContentopf(contentopf, xmlInlineEquation.get("src"), xmlInlineEquation.get("src"), "png") -logging.info("-----------------------------------------------------") -logging.info("Convert EOAchem into appropriate IMG-Tags") +logging.info(f"{logseparator}Convert EOAchem into appropriate IMG-Tags") for xmlChapter in xmlChapters: xml_inline_chems = xmlChapter.findall(".//EOAchem") for xml_inline_chem in xml_inline_chems: @@ -1246,8 +1223,7 @@ class FootnoteError(Exception): xml_inline_chem.set("src", "images/" + xml_inline_chem.get("src")) contentopf = addToContentopf(contentopf, xml_inline_chem.get("src"), xml_inline_chem.get("src"), "png") -logging.info("-----------------------------------------------------") -logging.info("Convert EOAinline into appropriate IMG-Tags") +logging.info(f"{logseparator}Convert EOAinline into appropriate IMG-Tags") for xmlChapter in xmlChapters: xmlInlineElements = xmlChapter.findall(".//EOAinline") for xmlInlineElement in xmlInlineElements: @@ -1285,8 +1261,7 @@ class FootnoteError(Exception): contentopf = addToContentopf(contentopf, "images/" + strInlineElementSubDirName + strInlineElementFileName, xmlInlineElement.text, extension) xmlInlineElement.text = "" -logging.info("-----------------------------------------------------") -logging.info("Preparing Verses") +logging.info(f"{logseparator}Preparing Verses") for xmlChapter in xmlChapters: xml_verses = xmlChapter.findall(".//EOAverse") logging.info(len(xml_verses)) @@ -1299,8 +1274,7 @@ class FootnoteError(Exception): xml_verse.tag = "p" xml_verse.set("class", "verse") -logging.info("-----------------------------------------------------") -logging.info("Preparing Equations") +logging.info(f"{logseparator}Preparing Equations") for xmlChapter in xmlChapters: xmlEquations = xmlChapter.findall(".//EOAequation") for xmlEquation in xmlEquations: @@ -1357,8 +1331,7 @@ class FootnoteError(Exception): xmlEquationarray.tag = "div" -logging.info("-----------------------------------------------------") -logging.info("Preparing Letterheads") +logging.info(f"{logseparator}Preparing Letterheads") for xmlChapter in xmlChapters: xmlLetterheads = xmlChapter.xpath(".//EOAletterhead") for xmlLetterhead in xmlLetterheads: @@ -1379,8 +1352,7 @@ class FootnoteError(Exception): xmlLetterhead.insert(0, xmlHR) xmlLetterhead.insert(5, xmlHR2) -logging.info("-----------------------------------------------------") -logging.info("Preparing Transcriptions") +logging.info(f"{logseparator}Preparing Transcriptions") # TODO: May need rework concerning the right Column for xmlChapter in xmlChapters: etree.strip_elements(xmlChapter, "Facsimilelink") @@ -1425,8 +1397,7 @@ class FootnoteError(Exception): # Remove -logging.info("-----------------------------------------------------") -logging.info("Preparing Tables") +logging.info(f"{logseparator}Preparing Tables") intChapterNumber = 1 for xmlChapter in xmlChapters: xmlTables = xmlChapter.findall(".//EOAtable") @@ -1521,8 +1492,7 @@ class FootnoteError(Exception): logging.info("Finished with that table.") intChapterNumber += 1 -logging.info("-----------------------------------------------------") -logging.info("Preparing Facsimiles") +logging.info(f"{logseparator}Preparing Facsimiles") xmlParts = xmlEbookTree.findall(".//div0") for xmlPart in xmlParts: xmlFacsimiles = xmlPart.findall(".//EOAfacsimilepage") @@ -1574,8 +1544,7 @@ class FootnoteError(Exception): facsimile_image_element.set("alt", "Facsimile page " + facsimile_pagenumber) xmlFacsimile.getparent().replace(xmlFacsimile, facsimile_image_element) -logging.info("-----------------------------------------------------") -logging.info("Preparing Cross-References") +logging.info(f"{logseparator}Preparing Cross-References") for xmlChapter in xmlChapters: xmlReferences = xmlChapter.findall(".//EOAref") @@ -1672,8 +1641,7 @@ class FootnoteError(Exception): # Finish ePub Conversion, save File # ############################################################## -logging.info("-----------------------------------------------------") -logging.info("Cleaning up XML") +logging.info(f"{logseparator}Cleaning up XML") xmlIndexentries = xmlEbookTree.xpath(".//EOAindex | .//EOAindexperson | .//EOAindexlocation") for xmlIndexentry in xmlIndexentries: tmpTail = xmlIndexentry.tail or "" From c69a307613e4310f65315c716b47c4ecf31a5255 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 17:06:33 +0200 Subject: [PATCH 087/132] Removed some commented lines --- imxml2epub.py | 44 +++++--------------------------------------- 1 file changed, 5 insertions(+), 39 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index 2cedb23..76f6eeb 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-14 17:01:53 (kthoden)> +# Time-stamp: <2019-05-14 17:06:15 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -107,12 +107,6 @@ GM_PATH = "gm" PDFCROP_EXEC = "pdfcrop" -# TL_PATH = CONFIG['Executables']['texlive'] -# TEXBIN_PATH = CONFIG['Executables']['texbin'] -# TRALICS_PATH_EXEC = CONFIG['Executables']['tralics_path_exec'] -# TRALICS_PATH_LIB = CONFIG['Executables']['TRALICS_PATH_LIB'] -# SUPPORT_PATH = CONFIG['Executables']['support_path'] -# AUX_TeX_FILES_PATH = CONFIG['Executables']['aux_tex_files_path'] ############################ # Paths: @@ -121,7 +115,6 @@ OUTPUT_DIR = Path( args.output_dir ) PUBLICATION_DIR = Path( args.publication_dir ) TEMP_DIR = OUTPUT_DIR / "tmp_files" -# CONVERT_DIR = OUTPUT_DIR / "CONVERT" DEBUG_DIR = OUTPUT_DIR / "debug" ############################ @@ -132,8 +125,6 @@ if not TEMP_DIR.exists(): os.makedirs( TEMP_DIR ) -# if not DIR.exists(): -# os.makedirs( CONVERT_DIR ) if not DEBUG_DIR.exists(): os.makedirs( DEBUG_DIR ) @@ -154,18 +145,8 @@ else: logging.error("No coverfile found. You can create a temporary one with the mkimage.py script") sys.exit( 1 ) -# if os.path.exists(os.getcwd() + "/pre_xml.tex") == False: -# print ("pre_xml fehlt") -# sys.exit() - -# lang_dict = {"fig" : {"en" : "Fig.", "de" : "Abb."}} - -Datei = open( TEMP_DIR / 'intermediate.log', 'w') -''' -tmpDir = os.getcwd() + "/tmp_files/" -Datei = open('tmp_files/intermediate.log', 'w') -''' +# Datei = open( TEMP_DIR / 'intermediate.log', 'w') xmlTree = etree.parse( str(INPUT_DIR / "tmp_files" / "IntermediateXMLFile.xml") ) @@ -393,13 +374,11 @@ def create_epub_container(filename, OUTPUT_DIR): EPUB_FILES / "eoa-epub-termes.css", OUTPUT_DIR / "OEBPS/eoa-epub.css" ) - # shutil.copy(EPUB_FILES + "eoa-epub-termes.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") elif args.font == "libertine": shutil.copy( EPUB_FILES / "eoa-epub-libertine.css", OUTPUT_DIR / "OEBPS/eoa-epub.css" ) - # shutil.copy(EPUB_FILES + "eoa-epub-libertine.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") font_files = libertine_fonts else: logging.info("Font not recognized, falling back to default.") @@ -407,7 +386,6 @@ def create_epub_container(filename, OUTPUT_DIR): EPUB_FILES / "eoa-epub-termes.css", OUTPUT_DIR / "OEBPS/eoa-epub.css" ) - # shutil.copy(EPUB_FILES + "eoa-epub-termes.css", os.getcwd() + "/CONVERT/epub/OEBPS/eoa-epub.css") otf_id_counter = 1 txt_id_counter = 1 @@ -417,7 +395,6 @@ def create_epub_container(filename, OUTPUT_DIR): EPUB_FILES / fontfile, OUTPUT_DIR / "OEBPS/fonts/" ) - # shutil.copy(EPUB_FILES + fontfile, os.getcwd() + "/CONVERT/epub/OEBPS/fonts/") base_file_name, file_extension = os.path.splitext(fontfile) @@ -542,17 +519,13 @@ def create_epub_container(filename, OUTPUT_DIR): OUTPUT_DIR / "cover.jpg", OUTPUT_DIR / "OEBPS/images/" ) -# shutil.copy(os.getcwd() + "/CONVERT/Cover.jpg", os.getcwd() + "/CONVERT/epub/OEBPS/images/") xmlItem = etree.Element("item") xmlItem.set("id", "cover") xmlItem.set("href", "cover.xhtml") xmlItem.set("media-type", "application/xhtml+xml") xmlManifest.append(xmlItem) shutil.copy(EPUB_FILES / "epubcover.xhtml", OUTPUT_DIR / "OEBPS/cover.xhtml") -# shutil.copy(EPUB_FILES + "epubcover.xhtml", os.getcwd() + "/CONVERT/epub/OEBPS/cover.xhtml") -logging.info("-------------------") -logging.info("Preparing intro.xhtml") -logging.info("-------------------") +logging.info(f"{logseparator}Preparing intro.xhtml") if publication_series == "Sources": tmpFilePath = EPUB_FILES / "epubintro-sources.xhtml" else: @@ -591,9 +564,7 @@ def create_epub_container(filename, OUTPUT_DIR): # tmpFilePath = os.getcwd() + "/CONVERT/epub/OEBPS/intro.xhtml" tmpFile = open(tmpFilePath, "w") tmpFile.write(strIntroHTML) -logging.info("-------------------") -logging.info("Preparing toc.ncx") -logging.info("-------------------") +logging.info(f"{logseparator}Preparing toc.ncx") xmlHead = tocncx.find("//{http://www.daisy.org/z3986/2005/ncx/}head") xmlMeta = etree.Element("meta") xmlMeta.set("name", "dtb:uid") @@ -695,7 +666,6 @@ def create_epub_container(filename, OUTPUT_DIR): PUBLICATION_DIR / strImageFileString, OUTPUT_DIR / "OEBPS/images" / (strImageFileDir + strImageFileName) ) - # shutil.copy(os.getcwd() + "/" + strImageFileString, os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName) extension_and_mime = get_mimetype(strImageFileName_Suffix) @@ -1204,7 +1174,6 @@ class FootnoteError(Exception): INPUT_DIR / "items" / xmlInlineEquation.get("src"), OUTPUT_DIR / "OEBPS/images" / xmlInlineEquation.get("src") ) - # shutil.copy(os.getcwd() + "/items/" + xmlInlineEquation.get("src"), os.getcwd() + "/CONVERT/epub/OEBPS/images/" + xmlInlineEquation.get("src")) xmlInlineEquation.set("src", "images/" + xmlInlineEquation.get("src")) contentopf = addToContentopf(contentopf, xmlInlineEquation.get("src"), xmlInlineEquation.get("src"), "png") @@ -1219,7 +1188,6 @@ class FootnoteError(Exception): INPUT_DIR / "items" / xml_inline_chem.get("src"), OUTPUT_DIR / "OEBPS/images" / xml_inline_chem.get("src") ) - # shutil.copy(os.getcwd() + "/items/" + xml_inline_chem.get("src"), os.getcwd() + "/CONVERT/epub/OEBPS/images/" + xml_inline_chem.get("src")) xml_inline_chem.set("src", "images/" + xml_inline_chem.get("src")) contentopf = addToContentopf(contentopf, xml_inline_chem.get("src"), xml_inline_chem.get("src"), "png") @@ -1701,9 +1669,7 @@ class FootnoteError(Exception): logging.info("Convert Facsimile-Parts") xmlParts = xmlEbookTree.findall("//div0") for xmlPart in xmlParts: - logging.info("-------------") - logging.info("Working on Facsimile-Part") - logging.info("-------------") + logging.info(f"{logseparator}Working on Facsimile-Part") # check if it has a child element EOAfacsimilepart if bool(xmlPart.findall(".//EOAfacsimilepart")): htmlChapter = etree.parse(str(EPUB_FILES / "epubchapter.xml"), xmlChapterParser) From cf0bc326aec766fb566af4328c1bde1ed0165af6 Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 17:10:59 +0200 Subject: [PATCH 088/132] IntermediateXML file is stored in top level of imxml directory --- eoatex2imxml.py | 6 ++---- imxml2django.py | 4 ++-- imxml2epub.py | 4 ++-- imxml2tei.py | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index 06059cd..19ae5ee 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-14 11:58:08 (kthoden)> +# Time-stamp: <2019-05-14 17:09:18 (kthoden)> """ Converts Latex files into a customized DocBook XML file. @@ -152,8 +152,6 @@ LATEX_DIR = Path ( args.latex_dir ) LOG_DIR = Path( args.log_dir ) -CONVERT_DIR = OUTPUT_DIR / "CONVERT" -# CONVERT_DIR = os.getcwd() + os.path.sep + "CONVERT" TEMP_DIR = OUTPUT_DIR / "tmp_files" DEBUG_DIR = OUTPUT_DIR / "debug" @@ -1705,7 +1703,7 @@ def make_indices_child_of_div0(): # both parts were removed and put into separate files. intermediate_file_pre = TEMP_DIR / "IntermediateXMLFile_pre.xml" -intermediate_file = TEMP_DIR / "IntermediateXMLFile.xml" +intermediate_file = OUTPUT_DIR / "IntermediateXMLFile.xml" ergebnisdatei = open(intermediate_file_pre, "w") ergebnis = etree.tostring(xmlTree, pretty_print=True, encoding="unicode") ergebnisdatei.write(ergebnis) diff --git a/imxml2django.py b/imxml2django.py index 7c93b69..0720414 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-10 16:19:24 (kthoden)> +# Time-stamp: <2019-05-14 17:09:54 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -165,7 +165,7 @@ if not os.path.exists(DEBUG_DIR): os.mkdir(DEBUG_DIR) -xmlTree = etree.parse( str(INPUT_DIR / "tmp_files" / "IntermediateXMLFile.xml") ) +xmlTree = etree.parse( str(INPUT_DIR / "IntermediateXMLFile.xml") ) libeoaconvert.debug_xml_here( xmlTree, diff --git a/imxml2epub.py b/imxml2epub.py index 76f6eeb..13c81d2 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-14 17:06:15 (kthoden)> +# Time-stamp: <2019-05-14 17:10:09 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -148,7 +148,7 @@ # Datei = open( TEMP_DIR / 'intermediate.log', 'w') -xmlTree = etree.parse( str(INPUT_DIR / "tmp_files" / "IntermediateXMLFile.xml") ) +xmlTree = etree.parse( str(INPUT_DIR / "IntermediateXMLFile.xml") ) with open(INPUT_DIR / "tmp_files" / 'data.pickle', 'rb') as f: data = pickle.load(f) diff --git a/imxml2tei.py b/imxml2tei.py index 41deedc..c029395 100755 --- a/imxml2tei.py +++ b/imxml2tei.py @@ -406,7 +406,7 @@ def main(): tei_root.append(tei_header) tei_body = etree.SubElement(tei_root, "text") - intermediate_xml_tree = etree.parse("tmp_files/IntermediateXMLFile.xml") + intermediate_xml_tree = etree.parse("IntermediateXMLFile.xml") tei_body_xml = transform_intermediate_xml(intermediate_xml_tree) front_part = etree.SubElement(tei_body, "front") front_contents_list = populate_front_part(PUB_CONFIG) From 7fef53a5d3a20b688084028d949c312542a8d0fe Mon Sep 17 00:00:00 2001 From: kthoden Date: Tue, 14 May 2019 17:50:47 +0200 Subject: [PATCH 089/132] Copied file needs suffix --- eoatex2pdf.py | 2 +- utils/libeoaconvert.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/eoatex2pdf.py b/eoatex2pdf.py index aed1228..8b2c894 100755 --- a/eoatex2pdf.py +++ b/eoatex2pdf.py @@ -34,7 +34,7 @@ def main( raise( Exception( "input file matching '*.tex' expected" ) ) output_dir = Path( output_dir ) - fixed_file_path = output_dir / input_file.name + fixed_file_path = output_dir / input_file.with_suffix( ".tex" ).name libeoaconvert.enable_preamble( input_file = input_path, output_file = fixed_file_path, diff --git a/utils/libeoaconvert.py b/utils/libeoaconvert.py index 19c8468..ca9fff9 100644 --- a/utils/libeoaconvert.py +++ b/utils/libeoaconvert.py @@ -30,6 +30,8 @@ def enable_preamble( output_file, pdf_or_xml ): + logging.debug(f"Enabling preamble {pdf_or_xml}. Input file is {input_file}, outputting to {output_file}") + with open( input_file, "r" ) as i: with open( output_file, "w" ) as o: if( pdf_or_xml == "pdf" ): From 6c738b8358ecccf0a1567c4355981e0a21821d28 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 15 May 2019 16:58:27 +0200 Subject: [PATCH 090/132] Handle bibliography entries without keywords --- eoatex2imxml.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index 19ae5ee..8767b0e 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-14 17:09:18 (kthoden)> +# Time-stamp: <2019-05-15 16:51:31 (kthoden)> """ Converts Latex files into a customized DocBook XML file. @@ -1185,9 +1185,23 @@ def bib_keywords_sanity_check( # just for debugging (?): logging.info("We want to collect the entries matching the keywords from the database.") - citations_with_keyword = [x["id"] for x in citations_json if keyword in x["keyword"]] - logging.debug(f"Found {libeoaconvert.plural(len(citations_with_keyword), 'citation')} with keyword {keyword} in database.") + citations_with_keyword = [] + citations_without_keyword = [] + # citations_with_keyword = [x["id"] for x in citations_json if keyword in x["keyword"]] + for cj in citations_json: + try: + if keyword in cj["keyword"]: + citations_with_keyword.append(cj["id"]) + except KeyError: + logging.warning(f"Index entry {cj['id']} has no keyword. As long as it is not cited, this is no problem.") + citations_without_keyword.append(cj["id"]) + pass + logging.debug(f"Found {libeoaconvert.plural(len(citations_with_keyword), 'citation')} with keyword {keyword} in database.") + cited_works_without_keyword = [x for x in citations_without_keyword if x in citekeys] + if cited_works_without_keyword: + logging.error(f"Found {libeoaconvert.plural(len(cited_works_without_keyword), 'work')} that are cited but have no keyword. Please assign one.") + sys.exit(1) citations_to_format = [x for x in citations_with_keyword if x in citekeys] logging.debug(f"Found {libeoaconvert.plural(len(citations_to_format), 'citation')} with keyword {keyword} that are actually cited.") From 2113e986db6a44c55832ed5fa3aeeb110d32a7fd Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:02:18 +0200 Subject: [PATCH 091/132] New tool added: parsezotero --- parsezotero.py | 383 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 383 insertions(+) create mode 100644 parsezotero.py diff --git a/parsezotero.py b/parsezotero.py new file mode 100644 index 0000000..6fafe96 --- /dev/null +++ b/parsezotero.py @@ -0,0 +1,383 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8; mode: python -*- + +"""Using a Zotero database for publications and their word plugin, +users don't need to put in citekey shorthands into the word +manuscripts. They can use the functionality of the plugin, which also +allows to cite only a year, add page ranges and, if needed, add a +prefix or a suffix. + +The TEI converter renders the Zotero data as a processing instruction +that contains JSON code. This module parses out the relevant data and +replaces the JSON with a TEI element. + +One last step to overcome is the citekey. When exporting the Zotero +database to bibtex, a citekey is created (following the rules in +https://github.com/zotero/translators/blob/master/BibTeX.js, see also +https://tex.stackexchange.com/questions/398521/custom-citation-keys-in-programs-like-zotero-or-mendeley/398749). +While this is present in the exported bibtex data, it is not present +in the JSON file. + +The solution is a Zotero translation server +(https://github.com/zotero/translation-server, also described in +https://forums.zotero.org/discussion/73694/is-there-a-zbib-api-that-returns-bibtex-entry-string). +This is a translation service (can be run locally) that can handle a +Zotero API JSON and is able to export into biblatex. + +Although BetterBibTeX +(https://github.com/retorquere/zotero-better-bibtex) allows for the +creation of unique citekeys across the whole Zotero database, the JSON +export does not contain this citekey. + +""" + +__version__ = "1.0" +__date__ = "20190607" +__author__ = "kthoden@mpiwg-berlin.mpg.de" + +import argparse +import logging +import json +import os +import sys +import requests +import bibtexparser +from lxml import etree +import utils.libeoaconvert as libeoaconvert + +logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s - %(message)s') + +ns_tei = "http://www.tei-c.org/ns/1.0" +NS_MAP = {"t" : ns_tei} +ZOTERO_CSL_STRING = "ADDIN ZOTERO_ITEM CSL_CITATION" +CITATION_SEPARATOR = ";" +TRANSLATOR_URL = "http://127.0.0.1:1969" +BIBTEX_FILE = "bibliography.bib" + + + +def find_citation_pis(xmltree): + """Find processing instructions in XML tree""" + + biblio_pis = xmltree.xpath("//processing-instruction('biblio')") + logging.info(f"Found {libeoaconvert.plural(len(biblio_pis), 'processing instruction')} called 'biblio'.") + + # retain only citations + citation_pis = [x for x in biblio_pis if x.text.startswith(ZOTERO_CSL_STRING)] + logging.info(f"Found {libeoaconvert.plural(len(citation_pis), 'zotero citation')}.") + + return citation_pis +# def find_citation_pis ends here + + +def parse_citation_pi(pi_text): + """Parse the text of a Zotero processing instruction. + + It contains a string and json code. There can be more than one + citation in citationItems: + + (Bulatovic et al. 2016) und + """ + + json_part = pi_text.replace(ZOTERO_CSL_STRING, "") + + return json_part.strip() +# def parse_citation_pi ends here + + +def parse_json(citation_json): + """Parse string into JSON object""" + + json_object = json.loads(citation_json) + + return json_object +# def parse_json ends here + + +def get_info_from_json(parsed_json): + """Extract the relevant parts from JSON object.""" + + citation_dict = {} + + properties = parsed_json.get("properties") + items = parsed_json.get("citationItems")[0] + itemdata = items.get('itemData') + issued = itemdata.get('issued') + try: + year = issued['date-parts'][0][0] + except KeyError: + year = issued['literal'] + + citation_dict["formatted"] = properties.get("plainCitation") + citation_dict["pagerange"] = items.get("locator") + citation_dict["prefix"] = items.get("prefix") + citation_dict["suffix"] = items.get("suffix") + citation_dict["zotero_url"] = items.get("uri")[0] + citation_dict["year"] = year + + return citation_dict +# def get_info_from_json ends here + + +def convert_to_csl_json(items_dict): + """Convert CSL JSON to Zotero API JSON. + + JSON data from a citation item in the processing instruction needs + to modified to the CSL JSON format. Currently, this JSON is + written to a temporary file + + The data consists of the itemData block, with the ID being the + URI: + + [{"id": "http://zotero.org/users/915539/items/4W8TZXCQ", "type": "paper-conference", "title": "Discussion on Radiation", "container-title": "Report of the Eighty-Third Meeting of the British Association for the Advancement of Science. Birmingham: 1913, September 10-17", "publisher": "John Murray", "publisher-place": "London", "page": "376–386", "event-place": "London", "author": [ { "literal": "Anonymous" } ], "issued": { "date-parts": [ [ "1914" ] ] }}] + + """ + + zotero_id = items_dict.get("uri")[0] + itemdata = items_dict.get('itemData') + issued = itemdata.get('issued') + + itemdata["id"] = zotero_id + + file_id = zotero_id.split("/")[-1] + + tmp_filename = f"{file_id}.json" + + # write itemdata to new file + with open(tmp_filename, "w") as data_file: + itemtojson = itemdata + json.dump(itemtojson, data_file, indent=2) + + logging.debug(f"Wrote {tmp_filename}.") + + return f"{file_id}.json" +# def convert_to_csl_json ends here + + +def import_csl_json(csl_json): + """Convert CSL JSON to Zotero API JSON + + The format looks like this: + + [ { "key": "PXKZK2WF", "version": 0, "itemType": "conferencePaper", "creators": [ { "name": "Anonymous", "creatorType": "author" } ], "tags": [], "title": "Discussion on Radiation", "proceedingsTitle": "Report of the Eighty-Third Meeting of the British Association for the Advancement of Science. Birmingham: 1913, September 10-17", "publisher": "John Murray", "place": "London", "pages": "376–386", "date": "1914" }] + """ + + # curl --data-binary @cslstylefile.json -H 'Content-Type: text/plain' 'http://127.0.0.1:1969/import' + + headers = { 'Content-Type': 'text/plain', } + data = open(csl_json, 'rb').read() + logging.debug(f"Trying to communicate with {TRANSLATOR_URL}") + + try: + response = requests.post(f'{TRANSLATOR_URL}/import', headers=headers, data=data) + except: + logging.error(f"No connection possible to {TRANSLATOR_URL}. Maybe the translation service is down? Exiting.") + sys.exit(0) + + return response.content +# def import_csl_json ends here + + +def create_bibtex(zotero_api_json): + """Get bibtex entry from Zotero translation server""" + + # translation made by https://curl.trillworks.com/ + # source: curl -d @items.json -H 'Content-Type: application/json' 'http://127.0.0.1:1969/export?format=bibtex' + + headers = { 'Content-Type': 'application/json', } + params = ( ('format', 'biblatex'), ) + data = zotero_api_json + try: + response = requests.post(f'{TRANSLATOR_URL}/export', headers=headers, params=params, data=data) + except: + logging.error(f"No connection possible to {TRANSLATOR_URL}. Maybe the translation service is down? Exiting.") + sys.exit(0) + + bibtex = response.content.decode('utf-8') + + return bibtex +# def create_bibtex ends here + + +def write_to_bibfile(bibtex_entry): + """Append entry to bibfile""" + + with open(BIBTEX_FILE, "a") as bibfile: + bibfile.write(bibtex_entry) +# def write_to_bibfile ends here + + +def get_citekey(bibtex_entry): + """Parse bibtex entry for citekey""" + + parser = bibtexparser.bparser.BibTexParser() + # be a bit lax about nonstandard entry types + parser.ignore_nonstandard_types = False + + parsed_entry = bibtexparser.loads(bibtex_entry, parser=parser) + + citekey = parsed_entry.entries[0]["ID"] + + return citekey +# def get_citekey ends here + + +def create_citation_element(citation_dict, total_items, index_item): + """Create an XML element with zotero data""" + + bibl = etree.Element("bibl") + + if total_items > 1: + formatted_citation = citation_dict['formatted'].split(CITATION_SEPARATOR)[index_item] + if not index_item + 1 == total_items: + bibl.tail = CITATION_SEPARATOR + else: + formatted_citation = citation_dict['formatted'] + + bibl.text = formatted_citation + ref = etree.Element("ref") + bibl.insert(0, ref) + # add year or authoryear, need a good heuristic here + if citation_dict["formatted"] == f"({citation_dict['year']})": + ref.set("type", "year") + else: + ref.set("type", "authoryear") + + if citation_dict["citekey"]: + ref.set("url", f"#{citation_dict['citekey']}") + else: + ref.set("url", f"#{citation_dict['zotero_url']}") + if citation_dict["pagerange"]: + citedrange = etree.Element("citedRange") + citedrange.text = citation_dict["pagerange"] + ref.insert(0, citedrange) + + # if citation_dict["prefix"]: + # element_string = element_string.replace('', f'{citation_dict["prefix"]} ') + # if citation_dict["suffix"]: + # element_string = element_string.replace('', f' {citation_dict["suffix"]}') + return bibl +# def create_citation_element ends here + + +def citation_item_to_bibl(citation_item, parsed_json, citekey_list, number_of_items, item_position): + """Wrapper function for citation items. + + This function makes use of the Zotero translation server + (https://github.com/zotero/translation-server) for format + conversion. + + The JSON found in the each citationItem of the + processing instruction is + - modified to CSL JSON format + - translated into Zotero API JSON format + - exported to BibTeX + + An tei:bibl element is written that will replace the processing instruction in the XML. + """ + + citation_dict = get_info_from_json(parsed_json) + citation_id = parsed_json.get("citationID") + citation_dict["id"] = citation_id + + # convert csl json to zotero api json + zotero_api_json_filename = convert_to_csl_json(citation_item) + # first call to translation server + zotero_api_json = import_csl_json(zotero_api_json_filename) + os.unlink(zotero_api_json_filename) + # second call to translation server + bibtex_entry = create_bibtex(zotero_api_json) + citekey = get_citekey(bibtex_entry) + citation_dict["citekey"] = citekey + if citekey not in citekey_list: + citekey_list.append(citekey) + write_to_bibfile(bibtex_entry) + + citation_element = create_citation_element(citation_dict, number_of_items, item_position) + + return citation_element, citation_dict['formatted'] +# def citation_item_to_bibl ends here + + +def turn_pi_into_bibl(pi, citekey_list): + """Wrapper function for the conversion steps.""" + + # wrap a temporary element around citations + tmp_element = etree.Element("tmp_bib") + pi_json = parse_citation_pi(pi.text) + parsed_json = parse_json(pi_json) + # there can be more than one citation in one processing instruction + items = parsed_json.get("citationItems") + number_of_items = len(items) + logging.info(f"Found {libeoaconvert.plural(number_of_items, 'item')} in this zotero citation.") + for citation_item in items: + item_position = items.index(citation_item) + citation_element, formatted_citation = citation_item_to_bibl(citation_item, parsed_json, citekey_list, number_of_items, item_position) + tmp_element.append(citation_element) + + # remove formatted citation from tail + pi_tail = pi.tail + tmp_element.tail = pi_tail.replace(formatted_citation, "") + # replace processing instruction with bibl elements + parent_element = pi.getparent() + parent_element.replace(pi, tmp_element) +# def turn_pi_into_bibl ends here + + +def add_bib_to_header(xmltree, BIBTEX_FILE): + """Add a reference to bibfile to header""" + + sourcedesc = xmltree.xpath("/t:TEI/t:teiHeader/t:fileDesc/t:sourceDesc", namespaces=NS_MAP)[0] + ab_element = etree.Element("ab", type="database") + ref = etree.SubElement(ab_element, "ref") + ref.set("target", BIBTEX_FILE) + ref.set("type", "please-specify-anthology-or-monograph") + + sourcedesc.append(ab_element) +# def add_bib_to_header ends here + + +def cleanup_xml(xmltree): + """Perform some cleanups""" + + etree.strip_tags(xmltree, "tmp_bib") + literaturverzeichnis = xmltree.xpath("//*[@rend='Literaturverzeichnis1']") + for element in literaturverzeichnis: + element.attrib.pop("rend") +# def cleanup_xml ends here + + +def write_xml_output(tree, filename): + """Write modified tree to file""" + + tree.write(filename, pretty_print=True, xml_declaration=True, encoding="utf-8") + logging.info(f"Wrote {filename}.") +# def write_xml_output ends here + + +def main(): + """The main bit""" + + parser = argparse.ArgumentParser() + parser.add_argument("xmlfile", help="XML file converted from Word, containing Zotero citations.") + args = parser.parse_args() + + xmltree = etree.parse(args.xmlfile) + citation_pis = find_citation_pis(xmltree) + citekey_list = [] + + for pi in citation_pis: + turn_pi_into_bibl(pi, citekey_list) + + cleanup_xml(xmltree) + add_bib_to_header(xmltree, BIBTEX_FILE) + write_xml_output(xmltree, args.xmlfile.replace(".xml", "-biblrefs.xml")) +# def main ends here + + +if __name__ == '__main__': + main() +# finis + +# Noch machen +# prefix and suffix From 87d04294db5669740fb28764e73519dcb4ec3fd1 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:03:02 +0200 Subject: [PATCH 092/132] Unfinished code for rendering verses in footnotes --- imxml2django.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/imxml2django.py b/imxml2django.py index 0720414..f23f565 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-14 17:09:54 (kthoden)> +# Time-stamp: <2019-05-28 13:46:05 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -1286,6 +1286,7 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe strFootnoteText = xmlFootnote.text or "" tmpTail = xmlFootnote.tail tmpStrUID = xmlFootnote.get("id") + logging.debug(f"Looking at footnote {tmpStrUID}.") xmlFootnote.clear() xmlFootnote.tail = tmpTail xmlFootnote.tag = "sup" @@ -1312,6 +1313,29 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe OUTPUT_DIR / "images/" ) # shutil.copy(os.getcwd() + "/items/" + xmlElement.get("filename"), os.getcwd() + "/CONVERT/django/images/") + # elif xmlElement.tag == "EOAverse": + # # do things + # xml_result_string = "

" + # versecontent_bytes = etree.tostring(xmlElement) + # versecontent_string = versecontent_bytes.decode("utf-8") + # xml_verselines = versecontent_string.split("\n") + # print(xml_verselines) + # logging.debug("Removing surrounding EOAverse tags") + # xml_verselines.pop(-1) + # xml_verselines.pop(0) + # logging.debug(f"Found {libeoaconvert.plural(len(xml_verselines), 'verse line')}.") + # xml_result_string += xml_verselines[0] + # for xml_verseline in xml_verselines[1:]: + # xml_result_string += f"
{xml_verseline}" + # # verseline_element = etree.fromstring(xml_verseline) + # # linebreak = etree.Element("br") + # # xmlResult.append(linebreak) + # # copied_line = deepcopy(verseline_element) + # # xmlResult.append(copied_line) + # xml_result_string += "

" + # verse_paragraph = etree.fromstring(xml_result_string) + # xmlResult.append(verse_paragraph) + # etree.strip_tags(xmlResult, "p") xmlEOAfootnote.append(xmlElement) xmlResult.append(xmlEOAfootnote) intFootnoteNumber += 1 From d7ee69ca7dffabeb9ddaf757eb3e4fc9974a0bcc Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:03:39 +0200 Subject: [PATCH 093/132] Use EPUB ISBN, if available --- imxml2epub.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/imxml2epub.py b/imxml2epub.py index 13c81d2..20da46a 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-14 17:10:09 (kthoden)> +# Time-stamp: <2019-05-16 17:09:48 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -443,6 +443,10 @@ def create_epub_container(filename, OUTPUT_DIR): publication_series = cfgPublication.get("Technical", "Serie") publication_number = cfgPublication.get("Technical", "Number") publication_license = cfgPublication.get("Technical", "License") +try: + publication_isbn = cfgPublication.get("Technical", "ISBN-epub") +except: + publication_isbn = cfgPublication.get("Technical", "ISBN") # Prepare Author String strAuthorString = cfgPublication.get("Authors", "Author1") From f603a6838ef5b2d5542f24c621c0dfe8b18a4cc4 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:03:57 +0200 Subject: [PATCH 094/132] Identifier is the ISBN --- imxml2epub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imxml2epub.py b/imxml2epub.py index 20da46a..bed9f80 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -471,7 +471,7 @@ def create_epub_container(filename, OUTPUT_DIR): xmlSubtitle.text = strSubtitleString xmlMetadata.append(xmlSubtitle) # Prepare Identifier -strIdentifier = "MPIWG:" + publication_series + publication_number +strIdentifier = publication_isbn xmlIdentifier = etree.Element("{http://purl.org/dc/elements/1.1/}identifier") xmlIdentifier.text = strIdentifier xmlIdentifier.set("id", "BookId") From e19a2c73714c863a01818db446cde52672f7c6c3 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:06:59 +0200 Subject: [PATCH 095/132] Add parameter for manual insertion of preambel --- tei2eoatex.xsl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index 91b91a5..3f2072f 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -11,6 +11,7 @@ + @@ -84,7 +85,14 @@ contexts, a double replacement is performed. - \input{preambel/pre_eoa} + + + \input{preambel/pre_eoa} + + + + + \EOAbibliographytype{ } From d11ff80d18bba7f673b0f58e33c0c3d7e057a1d0 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:07:33 +0200 Subject: [PATCH 096/132] Authorbio code corrected --- tei2eoatex.xsl | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index 3f2072f..2add2a6 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -764,11 +764,14 @@ contexts, a double replacement is performed. - + - + + + + @@ -919,8 +922,14 @@ contexts, a double replacement is performed. - - + + + + + + + + From ab03b313e100a6e6e01d4310b7eb681f996ad2ef Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:07:52 +0200 Subject: [PATCH 097/132] Remove dummy entry --- tei2html.xsl | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tei2html.xsl b/tei2html.xsl index cbc28d9..bdcc2a0 100644 --- a/tei2html.xsl +++ b/tei2html.xsl @@ -389,19 +389,6 @@ -
- -

B

-
-
-

Peter Becksbaum

-
    -
  • 1
  • -
  • 2
  • -
- -
-
From 292bee760f23e5afcd2269c0a0f1449f70b07545 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:08:52 +0200 Subject: [PATCH 098/132] Minor fixes --- utils/libeoaconvert.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/libeoaconvert.py b/utils/libeoaconvert.py index ca9fff9..e2ab1d7 100644 --- a/utils/libeoaconvert.py +++ b/utils/libeoaconvert.py @@ -16,6 +16,8 @@ from pathlib import Path +BASE_DIR = Path( os.path.realpath(__file__) ).parent + # the new-style footnotes that use LaTeX bigfoot show up in the following order: # global variables footnote_groups = ["decimal", "lower-latin"] @@ -187,7 +189,7 @@ def plural(num, noun, plural=None): plural = f"{noun}s" if num == 0: - phrase = f"no {noun}" + phrase = f"no {plural}" elif num == 1: phrase = f"1 {noun}" else: @@ -294,7 +296,7 @@ def debug_xml_here( xml_tree = etree.ElementTree(xml_tree) xml_tree.write( str(xml_path), pretty_print=True, xml_declaration=True,encoding="utf-8") - logging.info("Wrote %s." % xml_path) + logging.info(f"Wrote XML file for debugging purposes: {xml_path}.") # def debug_xml_here ends here def wrap_into_element(wrapper, wrappee): From 61221ee7e608a90d9d1cf7f0f05f5d1e9efa3371 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:09:33 +0200 Subject: [PATCH 099/132] Translation helper function --- utils/libeoaconvert.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/utils/libeoaconvert.py b/utils/libeoaconvert.py index e2ab1d7..bfd58b7 100644 --- a/utils/libeoaconvert.py +++ b/utils/libeoaconvert.py @@ -425,3 +425,22 @@ def get_appinfo(ident, version, xmlid, text, date): return fix_tei_info # def get_appinfo ends here + +def translate(term, publang, translation_file): + """Translate a term""" + + translation_xml = etree.parse( str( translation_file ) ) + try: + term_to_translate = translation_xml.find(f"//entry[@name='{term}']").attrib + except Exception: + logging.error(f"Term {term} not found in translation file. Please add it to {translation_file}. Exiting.") + sys.exit(1) + + translated_term = term_to_translate.get(publang) + + if not translated_term: + logging.error(f"Translation for term '{term}' in language with code {publang} is missing. Please add it to {translation_file}. Exiting.") + sys.exit(1) + else: + return translated_term +# def translate ends here From 315c5a5d29edd66a578fe4eb9a2c9acc9539784d Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:13:24 +0200 Subject: [PATCH 100/132] Use logging instead of print --- tei2imxml.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index 88f1476..17cce1b 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -185,21 +185,21 @@ def make_publication_cfg(info_dict): number_of_editors = len(info_dict['eoa_editors']) if number_of_authors > 0 and number_of_editors > 0: - print("Found both editor and authors. This is not permitted. Exiting") - sys.exit() + logging.error("Found both editor and authors. This is not permitted. Exiting") + sys.exit(1) elif number_of_authors == 0 and number_of_editors == 0: - print("Found neither editor nor authors. Please fill in. Exiting") - sys.exit() + logging.error("Found neither editor nor authors. Please fill in. Exiting") + sys.exit(1) elif number_of_authors > 5 or number_of_editors > 5: - print("Only a maximum of 5 authors or editors allowed. Exiting") - sys.exit() + logging.error("Only a maximum of 5 authors or editors allowed. Exiting") + sys.exit(1) elif number_of_authors == 0 and number_of_editors in range(1,6): EDITED_VOLUME = True elif number_of_authors in range(1,6) and number_of_editors == 0: EDITED_VOLUME = False else: - print("Something went wrong with the number of authors end editors. Please check. Exiting") - sys.exit() + logging.error("Something went wrong with the number of authors end editors. Please check. Exiting") + sys.exit(1) for entry in range(0, 5): author_label = "Author" + str(entry + 1) @@ -489,8 +489,8 @@ def handle_refs_hyperimage(ref): if len(cited_range) > 0: if cited_range[0].text is not None and cited_range[0].get("from") is not None: - print("You must not use 'from' attribute and text in citedRange at the same time. Exiting.") - sys.exit() + logging.error("You must not use 'from' attribute and text in citedRange at the same time. Exiting.") + sys.exit(1) elif cited_range[0].text is not None: # might contain markup! pagerange = ", {}".format(cited_range[0].text) @@ -506,14 +506,14 @@ def handle_refs_hyperimage(ref): try: formatted_citation = cited_data[citekey][1] + pagerange except KeyError: - print("Citekey %s was not found in the references. Exiting." % citekey) - sys.exit() + logging.error("Citekey %s was not found in the references. Exiting." % citekey) + sys.exit(1) else: try: formatted_citation = cited_data[citekey][0] + pagerange except KeyError: - print("Citekey %s was not found in the references. Exiting." % citekey) - sys.exit() + logging.error("Citekey %s was not found in the references. Exiting." % citekey) + sys.exit(1) citation.text = formatted_citation citation.set("data-title", formatted_citation) @@ -812,11 +812,11 @@ def update_ids(xml_tree): logging.debug("The corresponding id element is %s", corresponding_eoa_id_element) # if corresponding_eoa_id_element is None: if len(corresponding_eoa_id_element) == 0: - print("There seems to be no corresponding xml:id for %s. Exiting." % label_text) - sys.exit() + logging.error("There seems to be no corresponding xml:id for %s. Exiting." % label_text) + sys.exit(1) elif len(corresponding_eoa_id_element) > 1: - print("The xml:id %s has been assigned more than once. This is not allowed. Exiting." % corresponding_eoa_id_element) - sys.exit() + logging.error("The xml:id %s has been assigned more than once. This is not allowed. Exiting." % corresponding_eoa_id_element) + sys.exit(1) else: eoa_id_element = corresponding_eoa_id_element[0] From 774b9a83ee908e42ed796e46a4e03a6fafc757dd Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:15:25 +0200 Subject: [PATCH 101/132] Use universal translation infrastructure --- tei2imxml.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index 17cce1b..cd10065 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -36,15 +36,12 @@ BASE_DIR = Path( os.path.realpath(__file__) ).parent SCRIPT_NAME = Path( __file__).stem -TMP_DIR = os.path.expanduser("tmp_files") -OUTPUT_DIR = os.path.expanduser("CONVERT") - CSV_FILE = os.path.expanduser("hi_figures.csv") ns_tei = "http://www.tei-c.org/ns/1.0" NS_MAP = {"t" : ns_tei} -def get_publication_info(xml_tree): +def get_publication_info(xml_tree, translation_file): """Query the TEI document for metadata fields. Return a dictionary""" @@ -74,12 +71,12 @@ def get_field(xml_tree, query_path, mandatory=False, findall=False, noformat=Fal else: publang = xml_tree.xpath("//t:teiHeader/t:profileDesc/t:langUsage/t:language/@ident", namespaces=NS_MAP)[0] if len(find_several) == 1: - return_string = [format_authors(find_several, publang, xml_tree)] + return_string = [format_authors(find_several, publang, xml_tree, translation_file)] else: list_of_formatted_people = [] list_of_people = ([x for x in find_several]) for person in list_of_people: - formatted_person = format_authors([person], publang, xml_tree) + formatted_person = format_authors([person], publang, xml_tree, translation_file) list_of_formatted_people.append(formatted_person) return_string = list_of_formatted_people else: @@ -131,7 +128,7 @@ def get_field(xml_tree, query_path, mandatory=False, findall=False, noformat=Fal return info_dict # def get_publication_info ends here -def make_publication_cfg(info_dict): +def make_publication_cfg(info_dict, translation_file): """Main function""" config = configparser.ConfigParser(delimiters=(':')) @@ -207,9 +204,9 @@ def make_publication_cfg(info_dict): if EDITED_VOLUME == True: authors_config[author_label] = info_dict['eoa_editors'][entry] if number_of_editors == 1: - authors_config['Zusatz'] = "({})".format(libeoaconvert.dict_ed[info_dict['eoa_language']].capitalize()) + authors_config['Zusatz'] = "({})".format(libeoaconvert.translate("editor-abbr", info_dict['eoa_language'], translation_file).capitalize()) else: - authors_config['Zusatz'] = "({})".format(libeoaconvert.dict_eds[info_dict['eoa_language']].capitalize()) + authors_config['Zusatz'] = "({})".format(libeoaconvert.translate("editors-abbr", info_dict['eoa_language'], translation_file).capitalize()) else: authors_config[author_label] = info_dict['eoa_authors'][entry] authors_config['Zusatz'] = "" @@ -316,7 +313,7 @@ def format_pagerange(pagerange_start, pagerange_end): return return_string # def format_pagerange ends here -def format_authors(list_author_id, publang, xml_tree): +def format_authors(list_author_id, publang, xml_tree, translation_file): """Retrieve author names from respStmt entries and format them.""" author_string = "" @@ -336,10 +333,10 @@ def format_authors(list_author_id, publang, xml_tree): if len(formatted_list) == 1: author_string = formatted_list[0] elif len(formatted_list) == 2: - author_string = "{} {} {}".format(formatted_list[0], libeoaconvert.dict_and[publang], formatted_list[1]) + author_string = "{} {} {}".format(formatted_list[0], libeoaconvert.translate("and", publang, translation_file), formatted_list[1]) elif len(formatted_list) > 2: author_string = ", ".join(formatted_list[0:-1]) - author_string += " {} {}".format(libeoaconvert.dict_and[publang], formatted_list[-1]) + author_string += " {} {}".format(libeoaconvert.translate("and", publang, translation_file), formatted_list[-1]) return author_string # def format_authors ends here @@ -368,7 +365,7 @@ def hi_lookup(hi_id): return hi_code # def hi_lookup ends here -def transform_body(xml_tree, cited_data, publang, hyperimage=False): +def transform_body(xml_tree, cited_data, translation_file, publang, hyperimage=False): """Transform the body of XML document into IntermediateXML file""" def handle_refs_default(ref): @@ -423,7 +420,7 @@ def handle_refs_hyperimage(ref): list_author_id = author_ids.split(" ") logging.info("Found chapter author shortcuts: {}.".format(list_author_id)) if len(list_author_id) > 0: - author_string = format_authors(list_author_id, publang, xml_tree) + author_string = format_authors(list_author_id, publang, xml_tree, translation_file) eoa_author = etree.Element("EOAauthor") eoa_author.text = author_string chapter_title.insert(0, eoa_author) From 790e8f69b68f0ef7def0d2a09522806dcccf3527 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:16:44 +0200 Subject: [PATCH 102/132] Bibliography checker --- tei2imxml.py | 132 ++++++++++++++++++++++++++++----------------------- 1 file changed, 73 insertions(+), 59 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index cd10065..26e6ad6 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -216,6 +216,22 @@ def make_publication_cfg(info_dict, translation_file): return config # def make_publication_cfg ends here + +def check_bibliography(xml_tree): + """Check TEI header for bibliography data, return relevant data as dictionary.""" + + bib_data = {} + bib_data["source"] = xml_tree.xpath("//t:teiHeader/t:fileDesc/t:sourceDesc/t:ab[@type='bibdatabase']/t:ref/@target", namespaces=NS_MAP)[0] + bib_data["type"] = xml_tree.xpath("//t:teiHeader/t:fileDesc/t:sourceDesc/t:ab[@type='bibdatabase']/t:ref/@type", namespaces=NS_MAP)[0] + logging.info("The bibfile is %s and this publication type is %s." % (bib_data["source"], bib_data["type"])) + if bib_data["type"] not in ["monograph", "anthology", "monograph-numeric", "anthology-numeric"]: + logging.error(f"The bibliography type {bib_data['type']} is not allowed. Exiting") + sys.exit(1) + + return bib_data +# def check_bibliography ends here + + def render_reference(list_of_xml_elements, cited_data): """Provide an attribute for a formatted version of Reference. @@ -992,100 +1008,98 @@ def main(): default = "DEBUG", help="log level: choose between DEBUG, INFO, WARNING, ERROR, CRITICAL" ) - parser.add_argument("-d", "--pickleddata", default=data_pickle, help="Pickled data file to be used.") + parser.add_argument( + "-f", "--filename", + required = True, + help="TEI XML file to convert into DocBook XML." + ) + parser.add_argument( + "-o", "--output-dir", + default = "./output/imxml", + help="where to dump all output files" + ) + + parser.add_argument("-d", "--pickleddata", default="./output/imxml/tmp_files/data.pickle", help="Pickled data file to be used.") parser.add_argument("-him", "--hyperimage", action="store_true") - parser.add_argument("teifile", help="TEI XML file to convert into DocBook XML.") args = parser.parse_args() config_file = args.CONFIG_FILE print("The config file is ", config_file) - # load config: + + INPUT_DIR = Path( args.filename ).resolve().parent + INPUT_PATH = Path( args.filename ) + OUTPUT_DIR = Path( args.output_dir ) + LOG_DIR = Path( args.log_dir ) + + TEMP_DIR = OUTPUT_DIR / "tmp_files" + DEBUG_DIR = OUTPUT_DIR / "debug" + + # where to output the xml file: + XML_FILE = (OUTPUT_DIR / INPUT_PATH.name) .with_suffix( ".xml" ) + CONFIG = load_config( - config_file, - args.log_file, - args.log_level, + args.CONFIG_FILE, + args.log_level, + (Path(args.log_dir) / SCRIPT_NAME) . with_suffix( ".log" ), + # args.log_file, ) - CSL_FILE = BASE_DIR / CONFIG['Auxiliaries']['CSL_FILE'] - if not os.path.exists(TMP_DIR): - os.mkdir(os.path.expanduser(TMP_DIR)) + if not os.path.exists(OUTPUT_DIR): + os.mkdir( OUTPUT_DIR ) + if not os.path.exists(TEMP_DIR): + os.mkdir( TEMP_DIR ) + if not os.path.exists( DEBUG_DIR ): + os.mkdir( DEBUG_DIR ) try: - with open(data_pickle, 'rb') as f: + with open(args.pickleddata, 'rb') as f: data = pickle.load(f) except FileNotFoundError: - print("File 'data.pickle' not found. You should run 'fix_tei.py' first. Exiting.") - sys.exit() - - xml_tree = etree.parse(args.teifile) - - publication_language = xml_tree.xpath("//t:teiHeader/t:profileDesc/t:langUsage/t:language/@ident", namespaces=NS_MAP)[0] - - bib_data = {} - bib_data["source"] = xml_tree.xpath("//t:teiHeader/t:fileDesc/t:sourceDesc/t:ab[@type='bibdatabase']/t:ref/@target", namespaces=NS_MAP)[0] - bib_data["type"] = xml_tree.xpath("//t:teiHeader/t:fileDesc/t:sourceDesc/t:ab[@type='bibdatabase']/t:ref/@type", namespaces=NS_MAP)[0] - logging.info("The bibfile is %s and this publication type is %s." % (bib_data["source"], bib_data["type"])) - if bib_data["type"] not in ["monograph", "anthology", "monograph-numeric", "anthology-numeric"]: - print("The bibliography type %s is not allowed." % bib_data["type"]) - - citations_json = prepare_bibliography(bib_data) + logging.error("File 'data.pickle' not found. You should run 'fix_tei.py' first. Exiting.") + sys.exit(1) - all_citations = xml_tree.xpath("//t:bibl/t:ref", namespaces=NS_MAP) + TRANSLATION_FILE = BASE_DIR / CONFIG['Auxiliaries']['TRANSLATIONS'] + CSL_FILE = BASE_DIR / CONFIG['Auxiliaries']['CSL_FILE'] - all_citekeys = [] + xml_tree = etree.parse(args.filename) - for citation in all_citations: - citekey = citation.get("target")[1:] - if citekey not in all_citekeys: - all_citekeys.append(citekey) + publication_language = xml_tree.xpath("//t:teiHeader/t:profileDesc/t:langUsage/t:language/@ident", namespaces=NS_MAP)[0] - used_citekeys = all_citekeys - # used_citekeys = set(data["citekeys"]) - citations_filename_markdown = "used_citations.md" - citations_filename_html = "formatted_citations.html" - write_citation_markdown(used_citekeys, citations_filename_markdown) - markdown_command = "pandoc -o %s -t html --filter=pandoc-citeproc --bibliography=%s --csl=%s %s" % (TMP_DIR + os.path.sep + citations_filename_html, bib_data["source"], CSL_FILE, TMP_DIR + os.path.sep + citations_filename_markdown) - arguments = shlex.split(markdown_command) - logging.info("Using external command pandoc: %s." % markdown_command) - subprocess.call(arguments) - logging.info("Finished processing the bibtex file.") - logging.info("Formatting citations now.") - cited_dict = format_citations(used_citekeys, citations_json, citations_filename_html) + bib_data = check_bibliography(xml_tree) + citations_json = convert_bibliography_to_json(bib_data, TEMP_DIR) if bib_data["type"] == "monograph": - refs_for_bib_chapter = format_reference_list(used_citekeys, citations_filename_html) + used_citekeys = get_all_citations(xml_tree) + citations_filename_root = Path(TEMP_DIR, "formatted_citations_monograph") + cited_dict = make_bibliography_pandoc(used_citekeys, bib_data, citations_json, citations_filename_root, CSL_FILE, TEMP_DIR) + refs_for_bib_chapter = format_reference_list(used_citekeys, citations_filename_root.with_suffix(".html")) elif bib_data["type"] == "anthology": - citations_per_chapter = get_citations_per_chapter(xml_tree) - formatted_references_dict = {} all_chapter_ids = xml_tree.xpath("//t:div[@type='chapter']/@xml:id", namespaces=NS_MAP) + cited_dict = {} for chapter_id in all_chapter_ids: used_citekeys_per_chapter = citations_per_chapter[chapter_id] - # used_citekeys_per_chapter = data["citekeys_by_chapter"][chapter_id] - citations_filename_markdown = chapter_id + ".md" - citations_filename_html = "formatted_citations_" + chapter_id + ".html" - - write_citation_markdown(used_citekeys_per_chapter, citations_filename_markdown) - markdown_command = "pandoc -o %s -t html --filter=pandoc-citeproc --bibliography=%s --csl=%s %s" % (TMP_DIR + os.path.sep + citations_filename_html, bib_data["source"], CSL_FILE, TMP_DIR + os.path.sep + citations_filename_markdown) - arguments = shlex.split(markdown_command) - logging.info("Using external command pandoc: %s." % markdown_command) - subprocess.call(arguments) - - refs_for_bib_chapter = format_reference_list(used_citekeys_per_chapter, citations_filename_html) + logging.debug(f"{len(used_citekeys_per_chapter)} citations in this chapter") + citations_filename_root = Path(TEMP_DIR, f"formatted_citations_{chapter_id}") + cited_dict_per_chapter = make_bibliography_pandoc(used_citekeys_per_chapter, bib_data, citations_json, citations_filename_root, CSL_FILE, TEMP_DIR) + # Merge dictionaries + cited_dict = {**cited_dict, **cited_dict_per_chapter} + refs_for_bib_chapter = format_reference_list(used_citekeys_per_chapter, citations_filename_root.with_suffix(".html")) tmp_dict_key = "dict_" + chapter_id # create a dictionary entry containing the formatted references formatted_references_dict[tmp_dict_key] = refs_for_bib_chapter + logging.debug(f"cited_dict now has {libeoaconvert.plural(len(cited_dict), 'entry', plural='entries')}.") tei_body = xml_tree.xpath("//t:body", namespaces=NS_MAP)[0] if args.hyperimage: logging.info("Transforming body with Hyperimage support") else: pass - body_transformed_tmp = transform_body(tei_body, cited_dict, publang=publication_language, hyperimage=args.hyperimage) - libeoaconvert.debug_xml_here(body_transformed_tmp, "body_transformed") + body_transformed_tmp = transform_body(tei_body, cited_dict, TRANSLATION_FILE, publang=publication_language, hyperimage=args.hyperimage) + libeoaconvert.debug_xml_here(body_transformed_tmp, "body_transformed", DEBUG_DIR) body_transformed = etree.ElementTree(body_transformed_tmp) if bib_data["type"] == "monograph": From 77cba4157236ad2a3c9d82aca58bd565cd6c87be Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:18:38 +0200 Subject: [PATCH 103/132] Citation formatter --- tei2imxml.py | 83 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 25 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index 26e6ad6..5a8b3a2 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -258,7 +258,7 @@ def write_citation_markdown(used_citekeys, citations_filename): md_file_header = "---\nlang: en\ntitle: Citations\n...\n\n" - with open(TMP_DIR + os.path.sep + citations_filename, "w") as citation_formatter: + with open(citations_filename, "w") as citation_formatter: citation_formatter.write(md_file_header) # citation_formatter.write("# Full parentheses\n") citation_formatter.write("# citeauthoryear\n") @@ -273,16 +273,15 @@ def write_citation_markdown(used_citekeys, citations_filename): citation_formatter.write("@%s\n" % entry) citation_formatter.write("\n# References\n") - logging.info("Wrote citation formatter.") + logging.info(f"Wrote citation formatter: {citations_filename}") # def write_citation_markdown ends here def format_reference_list(used_citekeys, html_file): """Create an HTML formatted list of references""" - html_path = os.path.sep.join([TMP_DIR, html_file]) - logging.info("Opening %s", html_path) + logging.info("Opening %s", html_file) # second part of function - with open(html_path, "r") as ding: + with open(html_file, "r") as ding: reference_list = soupparser.fromstring(ding, features="html.parser") references = reference_list.xpath("//div[@class='references']")[0] @@ -293,7 +292,7 @@ def format_reference_list(used_citekeys, html_file): def format_citations(used_citekeys, bibdata, html_file): """Return a formatted entry of the used citations""" - with open(TMP_DIR + os.path.sep + html_file, "r") as ding: + with open(html_file, "r") as ding: cites = BeautifulSoup(ding, "html.parser") citation_dict = {} @@ -839,40 +838,55 @@ def update_ids(xml_tree): return xml_tree # def update_ids ends here + +def get_all_citations(xml_file): + """Retrieve citations from file """ + + all_citations = xml_file.xpath("//t:bibl/t:ref", namespaces=NS_MAP) + + all_citekeys = [] + + for citation in all_citations: + citekey = citation.get("target")[1:] + if citekey not in all_citekeys: + all_citekeys.append(citekey) + + return all_citekeys +# def get_all_citations ends here + + def get_citations_per_chapter(xml_tree): - """If publication is anthology, store which citations are mentioned in each chapter.""" + """If publication is anthology, store which citations are mentioned in each chapter: + + 'chap18_schwartz': {'Blodget_1857', 'CliffordMarcus_1986', + 'Hunter_2004', 'MarcusFischer_1986', 'Mitchell_1992', 'Nye_1994', + 'Schlereth_1980', 'Schwartz_2003', 'Schwartz_2011'}} - """ - 'chap18_schwartz': {'Blodget_1857', - 'CliffordMarcus_1986', - 'Hunter_2004', - 'MarcusFischer_1986', - 'Mitchell_1992', - 'Nye_1994', - 'Schlereth_1980', - 'Schwartz_2003', - 'Schwartz_2011'}} """ refs_per_chapter = {} all_chapters = xml_tree.xpath("//t:div[@type='chapter']", namespaces=NS_MAP) + logging.info(f"Found {libeoaconvert.plural(len(all_chapters), 'chapter')}.") - logging.info("Found %s chapters.", len(all_chapters)) for chapter in all_chapters: - chapter_id = chapter.xpath("@xml:id", namespaces=NS_MAP)[0] - all_refs_with_hash = chapter.xpath("//t:bibl/t:ref/@target", namespaces=NS_MAP) + try: + chapter_id = chapter.xpath("@xml:id", namespaces=NS_MAP)[0] + except IndexError: + logging.error(f"Found a chapter without identifier. Each chapter must have one. Exiting.") + sys.exit(1) + all_refs_with_hash = chapter.xpath(".//t:bibl/t:ref/@target", namespaces=NS_MAP) all_refs = [x[1:] for x in all_refs_with_hash] + logging.info(f"Found {libeoaconvert.plural(len(all_refs), 'reference')} in this chapter.") refs_per_chapter[chapter_id] = set(all_refs) return refs_per_chapter # def get_citations_per_chapter ends here -def prepare_bibliography(bib_data): +def convert_bibliography_to_json(bib_data, TEMP_DIR): """Create a JSON version of bibliography data, using pandoc-citeproc""" - # json - interim_bib_json_file = TMP_DIR + os.path.sep + "tmp-bib.json" + interim_bib_json_file = Path(TEMP_DIR) / "tmp-bib.json" citeproc_command = "pandoc-citeproc --bib2json %s" % bib_data["source"] citeproc_arguments = shlex.split(citeproc_command) citeproc_process = subprocess.Popen(citeproc_arguments, stdout=subprocess.PIPE) @@ -882,10 +896,29 @@ def prepare_bibliography(bib_data): with open(interim_bib_json_file, 'w') as json_file: json_file.write(citeproc_json.decode('utf-8')) - logging.info("Wrote json file") + logging.info(f"Wrote bibliography as interim json file: {interim_bib_json_file}.") return citations_json -# def prepare_bibliography ends here +# def convert_bibliography_to_json ends here + + +def make_bibliography_pandoc(used_citekeys, bib_data, citations_json, output_file_root, CSL_FILE, TEMP_DIR): + """Create the HTML version of the bibliography using pandoc""" + + citations_filename_html = Path(output_file_root).with_suffix(".html") + citations_filename_markdown = Path(output_file_root).with_suffix(".md") + write_citation_markdown(used_citekeys, citations_filename_markdown) + markdown_command = "pandoc -o %s -t html --filter=pandoc-citeproc --bibliography=%s --csl=%s %s" % (citations_filename_html, bib_data["source"], CSL_FILE, citations_filename_markdown) + arguments = shlex.split(markdown_command) + logging.info("Using external command pandoc: %s." % markdown_command) + subprocess.call(arguments) + logging.info("Finished processing the bibtex file.") + logging.info("Formatting citations now.") + cited_dict = format_citations(used_citekeys, citations_json, citations_filename_html) + + return cited_dict +# def make_bibliography_pandoc ends here + def add_bibliography_monograph(xml_tree, refs_for_bib_chapter): """Add another chapter containing the bibliography.""" From c308144235694381a158b4a803b7b32ce9b64a0c Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:19:39 +0200 Subject: [PATCH 104/132] Check places for footnotes --- tei2imxml.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index 5a8b3a2..6b083c4 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -549,12 +549,19 @@ def handle_refs_hyperimage(ref): footnote.set("id-text", footnote.get("n")) fn_parent = footnote.getparent() - # we assert here that the parent of a footnote is always a paragraph + # we assert here that the parent of a footnote is always a paragraph or a quote footnote_id = footnote.xpath("@xml:id")[0] - if fn_parent.tag != "p": - print("This footnote's parent is not a p element: %s. Exiting." % footnote_id) - sys.exit() + # logging.debug(f"The prefix of fn_parent is {fn_parent.prefix}.") + + if fn_parent.prefix is not None: + fn_parent_tag = fn_parent.tag.replace(fn_parent.prefix, "") + else: + fn_parent_tag = fn_parent.tag.replace(f"{{{ns_tei}}}", "") + + if fn_parent_tag not in ["p", "quote", "item"]: + logging.error(f"The parent of footnote '{footnote_id}' is {fn_parent_tag}. Must be a p, quote or item. Exiting.") + sys.exit(1) fn_paragraphs = footnote.xpath("t:p", namespaces=NS_MAP) for fn_paragraph in fn_paragraphs: From c36fe6d86c61a86290208920e2ff65ccae8801bb Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:19:58 +0200 Subject: [PATCH 105/132] Directory for logging --- tei2imxml.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index 6b083c4..d73d97f 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -1026,11 +1026,14 @@ def fix_bib_entries(div_snippet): def main(): """Main function""" - ### - data_pickle = TMP_DIR + os.path.sep + 'data.pickle' - # parse args: parser = argparse.ArgumentParser() + parser.add_argument( + "--log-dir", + default = Path("output/logs"), + # default = Path("logs", SCRIPT_NAME).with_suffix(".log"), + help="logfile" + ) parser.add_argument( "-c", "--config", dest="CONFIG_FILE", From e73c5f3960c631b4a9ca6880f22e314c48c3dec3 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 13:20:26 +0200 Subject: [PATCH 106/132] Path modifications --- tei2imxml.py | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index d73d97f..0992a83 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -23,6 +23,7 @@ import pickle import shlex import argparse +import configparser from datetime import datetime from bs4 import BeautifulSoup from lxml import etree, objectify @@ -301,11 +302,11 @@ def format_citations(used_citekeys, bibdata, html_file): for entry_2 in bibdata: if entry_2["id"] == entry: current_citation = entry - # logging.info("%s: The title %s" % (html_file, entry_2["title"])) + logging.debug(f"""{html_file}: {entry}.""") try: strTitle = entry_2["title"] except KeyError: - logging.error("No title found for %s", entry) + logging.warning("No title found for %s", entry) title = strTitle authoryear_citation = cites.select("#citeauthoryear ~ p > span[data-cites='%s']" % entry)[0].text[1:-1] @@ -1151,7 +1152,7 @@ def main(): xml_add_bib = add_bibliography_anthology(body_transformed, formatted_references_dict) etree.strip_tags(xml_add_bib, "tagtobestripped") - libeoaconvert.debug_xml_here(xml_add_bib, "xml_add_bib") + libeoaconvert.debug_xml_here(xml_add_bib, "xml_add_bib", DEBUG_DIR) elements_with_ids = xml_add_bib.xpath("//div1 | //div2 | //div3 | //note | //item | //table | //EOAfigure/anchor | //EOAequation | //formula | //theorem") element_counter = 1 @@ -1174,38 +1175,23 @@ def main(): # objectify.deannotate(final_tree, cleanup_namespaces=True) # etree.cleanup_namespaces(xml_root) - with open(TMP_DIR + os.path.sep + 'data.pickle', 'wb') as f: + with open(OUTPUT_DIR / 'data.pickle', 'wb') as f: # Pickle the 'data' dictionary using the highest protocol available. pickle.dump(data_to_pickle, f, pickle.HIGHEST_PROTOCOL) - # if not os.path.exists("CONVERT"): - # os.mkdir(os.path.expanduser("CONVERT")) - # if not os.path.exists("debug"): - # os.mkdir(os.path.expanduser("debug")) + publication_info = get_publication_info(xml_tree, TRANSLATION_FILE) + config_data = make_publication_cfg(publication_info, TRANSLATION_FILE) - if not os.path.exists(OUTPUT_DIR): - os.mkdir(os.path.expanduser(OUTPUT_DIR)) - logging.info(f"Created {os.path.expanduser(OUTPUT_DIR)}") - input("press enter") - else: - logging.info(f"We are using {os.path.expanduser(OUTPUT_DIR)} as output dir") - input("press enter") - - publication_info = get_publication_info(xml_tree) - config_data = make_publication_cfg(publication_info) - - output_filename = OUTPUT_DIR + os.path.sep + "publication.cfg" + output_filename = OUTPUT_DIR / "publication.cfg" with open(output_filename, 'w') as configfile: config_data.write(configfile) - print("Wrote", output_filename) + logging.info(f"Wrote {output_filename}.") - if not os.path.exists(TMP_DIR): - os.mkdir(os.path.expanduser(TMP_DIR)) - output_filename = TMP_DIR + os.path.sep + "IntermediateXMLFile.xml" + output_filename = str(OUTPUT_DIR / "IntermediateXMLFile.xml") final_tree.write(output_filename, pretty_print=True, xml_declaration=True, encoding="utf-8") - logging.info("Wrote %s." % output_filename) + logging.info(f"Wrote {output_filename}.") # Remove namespace info (brute force solution) bad_ns_string = ' xmlns="http://www.tei-c.org/ns/1.0"' From f4eea1b7674ad8193032117b46bbb53a90cb2616 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 15:04:19 +0200 Subject: [PATCH 107/132] Updated script inventory --- doc/COSMOS.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/COSMOS.md b/doc/COSMOS.md index 09f5ab0..da61e8e 100644 --- a/doc/COSMOS.md +++ b/doc/COSMOS.md @@ -7,6 +7,7 @@ Contains the most important programs for the whole document conversion workflow. - `bib_add_keyword.py`: This script adds one or more keywords to all entries of a bibtex file. - `create_tmpbib.py` : A helper script that creates a temporary bibtex file from a formatted list of references. + - `eoatex2pdf.py` : Wrapper script for LaTeX conversion. - `eoatex2imxml.py` : Converts Latex files into a customized DocBook XML file. - `fix_tei.py` : This program is a processing step after the conversion from docx to TEI. - `imxml2django.py` : Create an XML file that can be inserted into the Django database of an EOAv1 installation. @@ -17,8 +18,9 @@ Contains the most important programs for the whole document conversion workflow. - `mkimage.py` : Create an automatically generated dummy cover to be used during testing. - `tei2eoatex.xsl` : An XSL converter from TEI-XML to EOATeX - `tei2imxml.py` : A converter from TEI to customized DocBook XML. - - `find_chapters.py` : Use LaTeX auxiliary files to split a PDF into chapters - - `idassigner.py` : Assign xml:ids to various elements fo TEI file + - `find_chapters.py` : Use LaTeX auxiliary files to split a PDF into chapters. + - `idassigner.py` : Assign xml:ids to various elements fo TEI file. + - `parsezotero.py` : Convert Zotero citations to TEI bibl elements. ## eoa-csl A nearly-abandoned version of a CSL configuration for EOA. Currently From 079970d824c1e3d1132525ffa19737fc8af2d731 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 12 Jun 2019 16:15:56 +0200 Subject: [PATCH 108/132] Suppress extension of bibdatabase --- tei2eoatex.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index 2add2a6..393ec68 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -97,7 +97,7 @@ contexts, a double replacement is performed. } \EOAbibliographydatabase{ - + } \EOAseries{ From fd3e8a9f456d0f123c63bbdb592186057b86190a Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 14 Jun 2019 12:19:47 +0200 Subject: [PATCH 109/132] Bum line --- tei2eoatex.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index 393ec68..b51dd2e 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -898,7 +898,7 @@ contexts, a double replacement is performed. } - right + From feacd114a2d4a0de97fe4f31c39fedad96615e8d Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 14 Jun 2019 12:21:03 +0200 Subject: [PATCH 110/132] Modify to pick up new structure --- fix_tei.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fix_tei.py b/fix_tei.py index f537f37..56dae92 100644 --- a/fix_tei.py +++ b/fix_tei.py @@ -25,6 +25,9 @@ __date__ = "20180109" __author__ = "kthoden@mpiwg-berlin.mpg.de" +from utils.load_config import load_config +import utils.libeoaconvert as libeoaconvert + import sys import os import re @@ -38,7 +41,6 @@ import bibtexparser import argparse import traceback -import libeoaconvert import configparser logging.basicConfig(level=logging.INFO, format=' %(asctime)s - %(levelname)s - %(message)s') From f6e594609d2fbdd6a13f969071788098845321be Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 17 Jun 2019 11:25:52 +0200 Subject: [PATCH 111/132] Splitting function for better modularization --- tei2imxml.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index 0992a83..fefdfae 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -911,7 +911,10 @@ def convert_bibliography_to_json(bib_data, TEMP_DIR): def make_bibliography_pandoc(used_citekeys, bib_data, citations_json, output_file_root, CSL_FILE, TEMP_DIR): - """Create the HTML version of the bibliography using pandoc""" + """Create the HTML version of the bibliography using pandoc + + Return the filename of HTML file. + """ citations_filename_html = Path(output_file_root).with_suffix(".html") citations_filename_markdown = Path(output_file_root).with_suffix(".md") @@ -921,10 +924,9 @@ def make_bibliography_pandoc(used_citekeys, bib_data, citations_json, output_fil logging.info("Using external command pandoc: %s." % markdown_command) subprocess.call(arguments) logging.info("Finished processing the bibtex file.") - logging.info("Formatting citations now.") - cited_dict = format_citations(used_citekeys, citations_json, citations_filename_html) + logging.info(f"Wrote {citations_filename_html}.") - return cited_dict + return citations_filename_html # def make_bibliography_pandoc ends here @@ -1115,8 +1117,10 @@ def main(): if bib_data["type"] == "monograph": used_citekeys = get_all_citations(xml_tree) citations_filename_root = Path(TEMP_DIR, "formatted_citations_monograph") - cited_dict = make_bibliography_pandoc(used_citekeys, bib_data, citations_json, citations_filename_root, CSL_FILE, TEMP_DIR) - refs_for_bib_chapter = format_reference_list(used_citekeys, citations_filename_root.with_suffix(".html")) + citations_filename_html = make_bibliography_pandoc(used_citekeys, bib_data, citations_json, citations_filename_root, CSL_FILE, TEMP_DIR) + logging.info("Formatting citations now.") + cited_dict = format_citations(used_citekeys, citations_json, citations_filename_html) + refs_for_bib_chapter = format_reference_list(used_citekeys, citations_filename_html) elif bib_data["type"] == "anthology": citations_per_chapter = get_citations_per_chapter(xml_tree) formatted_references_dict = {} @@ -1127,11 +1131,13 @@ def main(): used_citekeys_per_chapter = citations_per_chapter[chapter_id] logging.debug(f"{len(used_citekeys_per_chapter)} citations in this chapter") citations_filename_root = Path(TEMP_DIR, f"formatted_citations_{chapter_id}") - cited_dict_per_chapter = make_bibliography_pandoc(used_citekeys_per_chapter, bib_data, citations_json, citations_filename_root, CSL_FILE, TEMP_DIR) + citations_filename_html_per_chapter = make_bibliography_pandoc(used_citekeys_per_chapter, bib_data, citations_json, citations_filename_root, CSL_FILE, TEMP_DIR) + logging.info("Formatting citations now.") + cited_dict_per_chapter = format_citations(used_citekeys_per_chapter, citations_json, citations_filename_html_per_chapter) # Merge dictionaries cited_dict = {**cited_dict, **cited_dict_per_chapter} - refs_for_bib_chapter = format_reference_list(used_citekeys_per_chapter, citations_filename_root.with_suffix(".html")) + refs_for_bib_chapter = format_reference_list(used_citekeys_per_chapter, citations_filename_html_per_chapter) tmp_dict_key = "dict_" + chapter_id # create a dictionary entry containing the formatted references formatted_references_dict[tmp_dict_key] = refs_for_bib_chapter From 8593223550ebc336ab03ab079c819184c2726895 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 17 Jun 2019 11:26:11 +0200 Subject: [PATCH 112/132] Improved docstring --- tei2imxml.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tei2imxml.py b/tei2imxml.py index fefdfae..82347c4 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -291,7 +291,10 @@ def format_reference_list(used_citekeys, html_file): # def format_reference_list ends here def format_citations(used_citekeys, bibdata, html_file): - """Return a formatted entry of the used citations""" + """Return a dictionary of the used citations as formatted entries. + + citation_dict[citekey] = (authoryear_citation, year_citation, title) + """ with open(html_file, "r") as ding: cites = BeautifulSoup(ding, "html.parser") From 7a507324a36e808d6b91072a42b262560b86a69b Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 17 Jun 2019 17:21:59 +0200 Subject: [PATCH 113/132] No unique names --- data/aux/bibliography4ht.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/aux/bibliography4ht.tex b/data/aux/bibliography4ht.tex index d2144af..5ba07b3 100644 --- a/data/aux/bibliography4ht.tex +++ b/data/aux/bibliography4ht.tex @@ -87,7 +87,7 @@ } \newcommand\greekfont{} \usepackage[autostyle]{csquotes} -{\usepackage[mincitenames=1,maxcitenames=3,maxbibnames=100,style=authoryear,backend=biber,autolang=hyphen,dateabbrev=false,datecirca=true,dateuncertain=true,dateera=christian,urldate=long]{biblatex} +{\usepackage[mincitenames=1,maxcitenames=3,maxbibnames=100,style=authoryear,backend=biber,autolang=hyphen,dateabbrev=false,datecirca=true,dateuncertain=true,dateera=christian,urldate=long,uniquename=false]{biblatex} \EOAbibtweaks \bibliography{$bibfile} \begin{document} From a325805d83c89193cac827f882dab13601f7cbcc Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 17 Jun 2019 17:24:45 +0200 Subject: [PATCH 114/132] Enabling creation of bibliography with tex4ht --- tei2imxml.py | 46 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index 82347c4..432788d 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -14,6 +14,7 @@ from utils.load_config import load_config import utils.libeoaconvert as libeoaconvert +import utils.bib2html as bib2html import os import sys @@ -42,6 +43,10 @@ ns_tei = "http://www.tei-c.org/ns/1.0" NS_MAP = {"t" : ns_tei} +logging.info( "checking executables 'utils.bib2html' needs...:" ) +bib2html.check_executables() + + def get_publication_info(xml_tree, translation_file): """Query the TEI document for metadata fields. @@ -933,6 +938,32 @@ def make_bibliography_pandoc(used_citekeys, bib_data, citations_json, output_fil # def make_bibliography_pandoc ends here +def make_bibliography_tex4ht(used_citekeys, bib_data, output_file_root, publication_language, TEMP_DIR, log_dir): + """Create the HTML version of the bibliography using tex4ht + + Return the filename of the HTML file + """ + + translations = {"de" : "german", "en" : "english", "it" : "italian", "fr" : "french"} + + citations_filename_html = Path(output_file_root).with_suffix(".html") + + formatted_bibl_info = bib2html.main( + bib_file = Path(bib_data["source"]), + citekeys = used_citekeys, + tex_template = BASE_DIR / "data" / "aux" / "bibliography4ht.tex", + language = translations[publication_language], + temp_dir = TEMP_DIR, + output_file = citations_filename_html, + log_dir = log_dir, + keywords = [""] + # keywords = keyword_to_print_bibl_el.keys() + ) + + return citations_filename_html +# def make_bibliography_tex4ht ends here + + def add_bibliography_monograph(xml_tree, refs_for_bib_chapter): """Add another chapter containing the bibliography.""" @@ -1115,14 +1146,17 @@ def main(): publication_language = xml_tree.xpath("//t:teiHeader/t:profileDesc/t:langUsage/t:language/@ident", namespaces=NS_MAP)[0] bib_data = check_bibliography(xml_tree) - citations_json = convert_bibliography_to_json(bib_data, TEMP_DIR) + + # citations_json = convert_bibliography_to_json(bib_data, TEMP_DIR) + citations_dict = convert_bibliography_to_dict(bib_data) if bib_data["type"] == "monograph": used_citekeys = get_all_citations(xml_tree) citations_filename_root = Path(TEMP_DIR, "formatted_citations_monograph") - citations_filename_html = make_bibliography_pandoc(used_citekeys, bib_data, citations_json, citations_filename_root, CSL_FILE, TEMP_DIR) + # citations_filename_html = make_bibliography_pandoc(used_citekeys, bib_data, citations_json, citations_filename_root, CSL_FILE) + citations_filename_html = make_bibliography_tex4ht(used_citekeys, bib_data, citations_filename_root, publication_language, TEMP_DIR, LOG_DIR) logging.info("Formatting citations now.") - cited_dict = format_citations(used_citekeys, citations_json, citations_filename_html) + cited_dict = format_citations(used_citekeys, citations_dict, citations_filename_html) refs_for_bib_chapter = format_reference_list(used_citekeys, citations_filename_html) elif bib_data["type"] == "anthology": citations_per_chapter = get_citations_per_chapter(xml_tree) @@ -1134,9 +1168,11 @@ def main(): used_citekeys_per_chapter = citations_per_chapter[chapter_id] logging.debug(f"{len(used_citekeys_per_chapter)} citations in this chapter") citations_filename_root = Path(TEMP_DIR, f"formatted_citations_{chapter_id}") - citations_filename_html_per_chapter = make_bibliography_pandoc(used_citekeys_per_chapter, bib_data, citations_json, citations_filename_root, CSL_FILE, TEMP_DIR) + # citations_filename_html_per_chapter = make_bibliography_pandoc(used_citekeys_per_chapter, bib_data, citations_json, citations_filename_root, CSL_FILE) + citations_filename_html_per_chapter = make_bibliography_tex4ht(used_citekeys_per_chapter, bib_data, citations_filename_root, publication_language, TEMP_DIR, LOG_DIR) + logging.info("Formatting citations now.") - cited_dict_per_chapter = format_citations(used_citekeys_per_chapter, citations_json, citations_filename_html_per_chapter) + cited_dict_per_chapter = format_citations(used_citekeys_per_chapter, citations_dict, citations_filename_html_per_chapter) # Merge dictionaries cited_dict = {**cited_dict, **cited_dict_per_chapter} From e4985525eba16b7c078b91f9c7f0a38e1cd19e38 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 17 Jun 2019 17:25:39 +0200 Subject: [PATCH 115/132] Use bibtexparser for python-parsed version of bibliography --- tei2imxml.py | 59 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index 432788d..13bb997 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -25,16 +25,19 @@ import shlex import argparse import configparser +import bibtexparser from datetime import datetime from bs4 import BeautifulSoup -from lxml import etree, objectify -from lxml.html import soupparser +from lxml import etree#, objectify +#from lxml.html import soupparser from pathlib import Path # things to be done # assign ids top to bottom for the following elements: # div1 div2 div3 note item table EOAfigure EOAequation formula theorem +BIB2HTML_FILENAME = "temp" + BASE_DIR = Path( os.path.realpath(__file__) ).parent SCRIPT_NAME = Path( __file__).stem @@ -317,13 +320,42 @@ def format_citations(used_citekeys, bibdata, html_file): logging.warning("No title found for %s", entry) title = strTitle - authoryear_citation = cites.select("#citeauthoryear ~ p > span[data-cites='%s']" % entry)[0].text[1:-1] - year_citation = cites.select("#citeyear ~ p > span[data-cites='%s']" % entry)[0].text[1:-1] + authoryear_citation = cites.select("#citeauthoryear ~ p > span[data-cites='%s']" % entry)[0].text + year_citation = cites.select("#citeyear ~ p > span[data-cites='%s']" % entry)[0].text citation_dict[entry] = (authoryear_citation, year_citation, title) + return citation_dict +# def format_citations_json ends here + + +def format_citations(used_citekeys, bibdata, html_file): + """Return a dictionary of the used citations as formatted entries. + + citation_dict[citekey] = (authoryear_citation, year_citation, title) + """ + + cites = etree.parse(str(html_file)) + + citation_dict = {} + + for entry in used_citekeys: + if entry in bibdata: + current_citation = entry + logging.debug(f"""{html_file}: {entry}.""") + try: + strTitle = bibdata[entry]["title"] + except KeyError: + logging.warning("No title found for %s", entry) + + title = strTitle + authoryear_citation = cites.xpath(f"//div[@class='authoryear']/p/span[@data-cites='{entry}']")[0].text + year_citation = cites.xpath(f"//div[@class='year']/p/span[@data-cites='{entry}']")[0].text + citation_dict[entry] = (authoryear_citation, year_citation, title) + return citation_dict # def format_citations ends here + def format_pagerange(pagerange_start, pagerange_end): """Parse values of citedRange attributes. Return formatted string""" @@ -918,7 +950,24 @@ def convert_bibliography_to_json(bib_data, TEMP_DIR): # def convert_bibliography_to_json ends here -def make_bibliography_pandoc(used_citekeys, bib_data, citations_json, output_file_root, CSL_FILE, TEMP_DIR): +def convert_bibliography_to_dict(bib_data): + """Create a dictionary from bibliography data.""" + + parser = bibtexparser.bparser.BibTexParser() + # be a bit lax about nonstandard entry types + parser.ignore_nonstandard_types = False + + bibliography_dict = {} + + with open(Path(bib_data["source"])) as btf: + btb = bibtexparser.load(btf, parser=parser) + bibliography_dict = btb.entries_dict + + return bibliography_dict +# deef convert_bibliography_to_dict ends here + + +def make_bibliography_pandoc(used_citekeys, bib_data, citations_json, output_file_root, CSL_FILE): """Create the HTML version of the bibliography using pandoc Return the filename of HTML file. From 5f4574db31efda3ee22b9f83b9f9fde161d8dd04 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 17 Jun 2019 17:27:19 +0200 Subject: [PATCH 116/132] Use tex terms for citation styles --- tei2imxml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index 13bb997..cbb13fd 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -258,7 +258,7 @@ def render_reference(list_of_xml_elements, cited_data): element = etree.SubElement(reference, "abbr", type="authoryear") element.text = cited_data[citekey][1] - element = etree.SubElement(reference, "abbr", type="title") + element = etree.SubElement(reference, "abbr", type="year") element.text = cited_data[citekey][2] # def render_reference ends here @@ -555,7 +555,7 @@ def handle_refs_hyperimage(ref): pagerange = ", " + format_pagerange(pagerange_start, pagerange_end) cited_range[0].tag = "tagtobestripped" - if cite_render == 'inline': + if cite_render == 'year': try: formatted_citation = cited_data[citekey][1] + pagerange except KeyError: From c0521cec60b9408c8f7ffd7d8c2888a9d8a86651 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 17 Jun 2019 17:27:50 +0200 Subject: [PATCH 117/132] Remainder --- tei2imxml.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index cbb13fd..337dc9a 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -290,15 +290,13 @@ def format_reference_list(used_citekeys, html_file): logging.info("Opening %s", html_file) # second part of function - with open(html_file, "r") as ding: - reference_list = soupparser.fromstring(ding, features="html.parser") - + reference_list = etree.parse(str(html_file)) references = reference_list.xpath("//div[@class='references']")[0] return references # def format_reference_list ends here -def format_citations(used_citekeys, bibdata, html_file): +def format_citations_json(used_citekeys, bibdata, html_file): """Return a dictionary of the used citations as formatted entries. citation_dict[citekey] = (authoryear_citation, year_citation, title) @@ -1170,7 +1168,7 @@ def main(): args.CONFIG_FILE, args.log_level, (Path(args.log_dir) / SCRIPT_NAME) . with_suffix( ".log" ), - # args.log_file, + args.log_file, ) if not os.path.exists(OUTPUT_DIR): From 52051da4058236b0531f38bd6a0fc872a6698528 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 19 Jun 2019 09:55:27 +0200 Subject: [PATCH 118/132] Linebreak into if --- tei2eoatex.xsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tei2eoatex.xsl b/tei2eoatex.xsl index b51dd2e..df16a97 100644 --- a/tei2eoatex.xsl +++ b/tei2eoatex.xsl @@ -1095,8 +1095,9 @@ contexts, a double replacement is performed. \noindent e-ISBN [EPUB] + \\ - \\ First published + First published by From bfdbe76a54c9a99604310ff81dceb642f40badfb Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 5 Jul 2019 10:24:04 +0200 Subject: [PATCH 119/132] Custom label in lists --- imxml2django.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imxml2django.py b/imxml2django.py index f23f565..835c7f7 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-28 13:46:05 (kthoden)> +# Time-stamp: <2019-07-04 16:22:15 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -505,7 +505,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid xmlFirstItem = xmlElement.find("..//item") xmlFirstItemElement = xmlFirstItem.getchildren()[0] - xmlResult.append(djangoParseObject(xmlFirstItemElement,indent=True, listtype="ordered", listnumber=xmlFirstItem.get("id-text"), uid=xmlFirstItem.get("id"))) + xmlResult.append(djangoParseObject(xmlFirstItemElement,indent=True, listtype="ordered", listnumber=xmlFirstItem.get("label"), uid=xmlFirstItem.get("id"))) # Process Child Elements which are Part of this item if len(xmlFirstItem.getchildren()) >= 1: for xmlChild in xmlFirstItem.iterchildren(): @@ -515,7 +515,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid tmpIntNumber = 2 for xmlItem in xmlElement.iterchildren(): xmlItemElement = xmlItem.getchildren()[0] - xmlResult.append(djangoParseObject(xmlItemElement,indent=True,listtype="ordered",listnumber=xmlItem.get("id-text"), uid=xmlItem.get("id"))) + xmlResult.append(djangoParseObject(xmlItemElement,indent=True,listtype="ordered",listnumber=xmlItem.get("label"), uid=xmlItem.get("id"))) tmpIntNumber += 1 if len(xmlItem.getchildren()) >= 1: for xmlChild in xmlItem.iterchildren(): From 40b4597916515ded42e67c08d4c325fc34c81678 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 10 Jul 2019 11:19:27 +0200 Subject: [PATCH 120/132] Text change --- data/tei_boilerplate.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/tei_boilerplate.cfg b/data/tei_boilerplate.cfg index f14150d..bd473fc 100644 --- a/data/tei_boilerplate.cfg +++ b/data/tei_boilerplate.cfg @@ -12,7 +12,7 @@ licence_url: https://creativecommons.org/licenses/by-nc-sa/3.0/de/deed.en licence_text: Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Germany eoainfo_p1: The Edition Open Access (EOA) platform was founded to bring together publication initiatives seeking to disseminate the results of scholarly work in a format that combines traditional publications with the digital medium. It currently hosts the open-access publications of the “Max Planck Research Library for the History and Development of Knowledge” (MPRL) and “Edition Open Sources” (EOS). EOA is open to host other open access initiatives similar in conception and spirit, in accordance with the Berlin Declaration on Open Access to Knowledge in the sciences and humanities, which was launched by the Max Planck Society in 2003. -eoainfo_p2: By combining the advantages of traditional publications and the digital medium, the platform offers a new way of publishing research and of studying historical topics or current issues in relation to primary materials that are otherwise not easily available. The volumes are available both as printed books and as online open access publications. They are directed at scholars and students of various disciplines, and at a broader public interested in how science shapes our world. +eoainfo_p2: By combining the advantages of traditional publications and the digital medium, the platform offers a new way of publishing research and of studying historical topics or current issues in relation to primary materials that are otherwise not easily available. The volumes are available both as printed books and as online open access publications. They are directed at scholars and students of various disciplines, as well as at a broader public interested in how science shapes our world. mprlinformation: The Max Planck Research Library for the History and Development of Knowledge comprises the subseries, Studies, Proceedings and Textbooks. They present original scientific work submitted under the scholarly responsibility of members of the Scientific Board and their academic peers. The initiative is currently supported by research departments of three Max Planck Institutes: the MPI for the History of Science, the Fritz Haber Institute of the MPG and the MPI for Gravitational Physics (Albert Einstein Institute). The publications of the Studies series are dedicated to key subjects in the history and development of knowledge, bringing together perspectives from different fields and combining source-based empirical research with theoretically guided approaches. The Proceedings series presents the results of scientific meetings on current issues and supports, at the same time, further cooperation on these issues by offering an electronic platform with further resources and the possibility for comments and interactions. scientificboard: Markus Antonietti, Antonio Becchi, Fabio Bevilacqua, William G. Boltz, Jens Braarvik, Horst Bredekamp, Jed Z. Buchwald, Olivier Darrigol, Thomas Duve, Mike Edmunds, Fynn Ole Engler, Robert K. Englund, Mordechai Feingold, Rivka Feldhay, Gideon Freudenthal, Paolo Galluzzi, Kostas Gavroglu, Mark Geller, Domenico Giulini, Günther Görz, Gerd Graßhoff, James Hough, Manfred Laubichler, Glenn Most, Klaus Müllen, Pier Daniele Napolitani, Alessandro Nova, Hermann Parzinger, Dan Potts, Sabine Schmidtke, Circe Silva da Silva, Ana Simões, Dieter Stein, Richard Stephenson, Mark Stitt, Noel M. Swerdlow, Liba Taub, Martin Vingron, Scott Walter, Norton Wise, Gerhard Wolf, Rüdiger Wolfrum, Gereon Wolters, Zhang Baichun. eoadevteam: Lindy Divarci, Samuel Gfrörer, Klaus Thoden, Malte Vogl, Dirk Wintergrün From 923186de4eb721625be6da3db45c2d9c621222bb Mon Sep 17 00:00:00 2001 From: kthoden Date: Thu, 11 Jul 2019 15:22:42 +0200 Subject: [PATCH 121/132] Multirow image support --- imxml2django.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/imxml2django.py b/imxml2django.py index 835c7f7..20fc265 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -495,6 +495,34 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid del xmlTableCell.attrib["cols"] else: intCurrentColumn += 1 + # deal with multirow + if xmlTableCell.get("rowspan") is not None: + cellchildren = xmlTableCell.getchildren() + for child in cellchildren: + if child.tag == "figure": + child.tag = "img" + imagepath = f"{child.get('file')}.{child.get('extension')}" + logging.debug(f"{imagepath}") + strImageFileDir = os.path.dirname(imagepath) + strImageFileDir = re.sub("/", "", strImageFileDir) + strImageFileName = os.path.basename(imagepath) + logging.debug(f"{strImageFileDir} and {strImageFileName}") + shutil.copy( + PUBLICATION_DIR / imagepath, + OUTPUT_DIR / "images" / (strImageFileDir + strImageFileName) + ) + if child.get('extension') == "pdf": + strImageFilepath = libeoaconvert.sanitizeImage( + OUTPUT_DIR / "images" / (strImageFileDir + strImageFileName), + TEMP_DIR, GM_PATH, PDFCROP_EXEC + ) + child.set("src", f"{strImageFileDir + strImageFileName}".replace(".pdf", ".png")) + else: + child.set("src", strImageFileDir) + child.set("width", f"{str(listColumnWidths[intCurrentColumn])}px") + del child.attrib["rend"] + del child.attrib["file"] + del child.attrib["extension"] xmlTableRow.tag = "tr" xmlTableRow.set("valign", "top") elif xmlElement.tag == "list" and xmlElement.get('type') != 'description': From 68e7408795d4021a1972e990a67891a0f41e4694 Mon Sep 17 00:00:00 2001 From: kthoden Date: Thu, 11 Jul 2019 16:08:48 +0200 Subject: [PATCH 122/132] Lists with custom labels --- imxml2epub.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index bed9f80..47f6a9d 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1042,15 +1042,28 @@ class FootnoteError(Exception): if xmlList.get("type") == "ordered": xmlList.tag = "ol" xmlFirstItem = xmlList.find("..//item") - listnumber = xmlFirstItem.get("id-text") - xmlList.set("start", listnumber) + firstitemnumber = xmlFirstItem.get("id-text") + xmlList.set("start", firstitemnumber) + firstitemlabel = xmlFirstItem.get("label") + xmlFirstItem.tag = "li" + if firstitemlabel != f"({firstitemnumber})": + xmlFirstItem.set("style","list-style:none;") + xmlListItems = xmlList.findall(".//item") + for xmlListItem in xmlListItems: + xmlListItem.tag = "li" + itemnumber = xmlListItem.get("id-text") + itemlabel = xmlListItem.get("label") + if itemlabel != f"({itemnumber})": + xmlListItem.set("style","list-style:none;") + itemparagraph = xmlListItem.find("p") + paratext = itemparagraph.text + itemparagraph.text = f"{itemlabel} {paratext}" if xmlList.get("type") == "simple": xmlList.tag = "ul" - - xmlListItems = xmlList.findall(".//item") - for xmlListItem in xmlListItems: - xmlListItem.tag = "li" + xmlListItems = xmlList.findall(".//item") + for xmlListItem in xmlListItems: + xmlListItem.tag = "li" logging.info(f"{logseparator}Preparing Descriptions") for xmlChapter in xmlChapters: From b855e20942e7be5332b6e192e4296b37bc7a4487 Mon Sep 17 00:00:00 2001 From: kthoden Date: Thu, 11 Jul 2019 16:09:32 +0200 Subject: [PATCH 123/132] Multirow support --- imxml2epub.py | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/imxml2epub.py b/imxml2epub.py index 47f6a9d..d04a1f1 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-05-16 17:09:48 (kthoden)> +# Time-stamp: <2019-07-11 16:09:07 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -1465,6 +1465,37 @@ class FootnoteError(Exception): del xmlTableCell.attrib["cols"] else: intCurrentColumn += 1 + + # deal with multirow + if xmlTableCell.get("rowspan") is not None: + cellchildren = xmlTableCell.getchildren() + for child in cellchildren: + if child.tag == "figure": + child.tag = "img" + imagepath = f"{child.get('file')}.{child.get('extension')}" + logging.debug(f"Source image: {PUBLICATION_DIR} {imagepath}") + strImageFileDir = os.path.dirname(imagepath) + strImageFileDir = re.sub("/", "", strImageFileDir) + strImageFileName = os.path.basename(imagepath) + logging.debug(f"{strImageFileDir} and {strImageFileName}") + logging.debug(f"Meant to be copied to {OUTPUT_DIR} /images/ {strImageFileDir}{strImageFileName}") + shutil.copy( + PUBLICATION_DIR / imagepath, + OUTPUT_DIR / "OEBPS" / "images" / (strImageFileDir + strImageFileName) + ) + if child.get('extension') == "pdf": + strImageFilepath = libeoaconvert.sanitizeImage( + OUTPUT_DIR / "OEBPS" / "images" / (strImageFileDir + strImageFileName), + TEMP_DIR, GM_PATH, PDFCROP_EXEC + ) + child.set("src", f"images/{strImageFileDir + strImageFileName}".replace(".pdf", ".png")) + else: + child.set("src", strImageFileDir) + child.set("width", f"{str(listColumnWidths[intCurrentColumn])}px") + del child.attrib["rend"] + del child.attrib["file"] + del child.attrib["extension"] + xmlTableRow.tag = "tr" xmlTableRow.set("valign", "top") xmlTableParent = xmlTable.getparent() From 4b92c4feab89b064da577e6cbec075a3a0080837 Mon Sep 17 00:00:00 2001 From: kthoden Date: Thu, 11 Jul 2019 18:08:35 +0200 Subject: [PATCH 124/132] Additional fonts can be added to epub --- imxml2epub.py | 142 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 109 insertions(+), 33 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index d04a1f1..fdf452f 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-07-11 16:09:07 (kthoden)> +# Time-stamp: <2019-07-11 18:06:51 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -81,6 +81,18 @@ help="Disable creation of epub file.", action="store_true" ) +parser.add_argument( + "--extra-font-selector", + help="Specify the css class selector for the extra font." +) +parser.add_argument( + "--extra-font-label", + help="Specify the label of the extra font" +) +parser.add_argument( + "--extra-font-files-directory", + help="Specify the directory with files of the font (the font itself, License)", +) args = parser.parse_args() @@ -332,6 +344,92 @@ def create_epub_container(filename, OUTPUT_DIR): os.chdir( cwd ) # def create_epub_container ends here +def add_fonts_to_opf(font_files, contentopf, otf_counter, txt_counter, fontdir=""): + """Add font files to OPF, return new values of id counters""" + + if not fontdir: + fontdir = EPUB_FILES + + for fontfile in font_files: + shutil.copy( + Path(fontdir) / fontfile, + OUTPUT_DIR / "OEBPS/fonts/" + ) + + base_file_name, file_extension = os.path.splitext(fontfile) + + if file_extension == ".otf": + contentopf = addToContentopf( + contentopf, + Path("fonts") / fontfile, + "otf-font" + str(otf_counter), + file_extension[1:] + ) + otf_counter += 1 + elif file_extension == ".ttf": + contentopf = addToContentopf( + contentopf, + Path("fonts") / fontfile, + "otf-font" + str(otf_counter), + "otf" + ) + otf_counter += 1 + elif file_extension == ".txt": + contentopf = addToContentopf( + contentopf, + Path("fonts") / fontfile, + "font-txt" + str(txt_counter), + file_extension[1:] + ) + txt_counter += 1 + elif file_extension == "": + contentopf = addToContentopf( + contentopf, + Path("fonts") / fontfile, + "font-txt" + str(txt_counter), + "txt" + ) + txt_counter += 1 + else: + logging.error(f"Other file found with extension '{file_extension}'. Exiting") + sys.exit() + + return otf_counter, txt_counter +# def add_fonts_to_opf ends here + + +def create_extra_font_css(css_selector, font_label, extrafontfiles): + """Create CSS code for extra font""" + + fontfiles = [x for x in extrafontfiles if x.endswith(".otf") or x.endswith(".ttf")] + + if len(fontfiles) > 1: + logging.error("Found more than one font file in the list. Exiting") + sys.exit() + else: + fontfile = fontfiles[0] + + css_code = f""".{css_selector} {{ + font-family: '{font_label}'; +}} + +@font-face {{ + font-family: "{font_label}"; + src: url("fonts/{fontfile}"); +}} +""" + + return css_code +# def create_extra_font_css ends here + +def add_css_snippet(css_snippet, css_file): + """Add extra font CSS to epub CSS file""" + + with open(css_file, "a") as filehandler: + filehandler.write(f"\n{css_snippet}") + + logging.info("Added extra code to css file") +# def create_extra_font_css ends here ############################################################## # Create .epub basic structure # @@ -390,38 +488,18 @@ def create_epub_container(filename, OUTPUT_DIR): otf_id_counter = 1 txt_id_counter = 1 -for fontfile in font_files: - shutil.copy( - EPUB_FILES / fontfile, - OUTPUT_DIR / "OEBPS/fonts/" - ) - - base_file_name, file_extension = os.path.splitext(fontfile) +otf_id_counter, txt_id_counter = add_fonts_to_opf(font_files, contentopf, otf_id_counter, txt_id_counter) +if args.extra_font_files_directory: + extra_fonts = os.listdir(args.extra_font_files_directory) + otf_id_counter, txt_id_counter = add_fonts_to_opf(extra_fonts, contentopf, otf_id_counter, txt_id_counter, fontdir=args.extra_font_files_directory) - if file_extension == ".otf": - contentopf = addToContentopf( - contentopf, - Path("fonts") / fontfile, - "otf-font" + str(otf_id_counter), - file_extension[1:] - ) - otf_id_counter += 1 - elif file_extension == ".txt": - contentopf = addToContentopf( - contentopf, - Path("fonts") / fontfile, - "font-txt" + str(txt_id_counter), - file_extension[1:] - ) - txt_id_counter += 1 - else: - logging.error("Other file found. Exiting") - sys.exit() +if args.extra_font_selector: + css_selector = args.extra_font_selector +if args.extra_font_label: + font_label = args.extra_font_label -# shutil.copy(EPUB_FILES + "texgyretermes-bold.otf", os.getcwd() + "/CONVERT/epub/OEBPS/fonts/") -# shutil.copy(EPUB_FILES + "texgyretermes-bolditalic.otf", os.getcwd() + "/CONVERT/epub/OEBPS/fonts/") -# shutil.copy(EPUB_FILES + "texgyretermes-italic.otf", os.getcwd() + "/CONVERT/epub/OEBPS/fonts/") -# shutil.copy(EPUB_FILES + "texgyretermes-regular.otf", os.getcwd() + "/CONVERT/epub/OEBPS/fonts/") +css_snippet = create_extra_font_css(css_selector, font_label, extra_fonts) +add_css_snippet(css_snippet, OUTPUT_DIR / "OEBPS/eoa-epub.css") # Shortcut for namespace htmlns = "{http://www.w3.org/1999/xhtml}" @@ -433,8 +511,6 @@ def create_epub_container(filename, OUTPUT_DIR): xmlTocncxParser = etree.XMLParser(no_network=False,load_dtd=False) tocncx = etree.parse(str(EPUB_FILES / "epubtocncx.xml"), xmlTocncxParser) - - logging.info(f"{logseparator}Preparing content.opf") xmlMetadata = contentopf.find(".//{http://www.idpf.org/2007/opf}metadata") # Prepare Metadata based on Publication.cfg From 08fe77b9a79e1c8acf3166b09d086fb4e5cce0eb Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 12 Jul 2019 10:39:27 +0200 Subject: [PATCH 125/132] Add multirow images to content.opf --- imxml2epub.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index fdf452f..48ad1c4 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-07-11 18:06:51 (kthoden)> +# Time-stamp: <2019-07-12 10:36:59 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -1553,7 +1553,6 @@ class FootnoteError(Exception): strImageFileDir = os.path.dirname(imagepath) strImageFileDir = re.sub("/", "", strImageFileDir) strImageFileName = os.path.basename(imagepath) - logging.debug(f"{strImageFileDir} and {strImageFileName}") logging.debug(f"Meant to be copied to {OUTPUT_DIR} /images/ {strImageFileDir}{strImageFileName}") shutil.copy( PUBLICATION_DIR / imagepath, @@ -1564,9 +1563,20 @@ class FootnoteError(Exception): OUTPUT_DIR / "OEBPS" / "images" / (strImageFileDir + strImageFileName), TEMP_DIR, GM_PATH, PDFCROP_EXEC ) - child.set("src", f"images/{strImageFileDir + strImageFileName}".replace(".pdf", ".png")) - else: - child.set("src", strImageFileDir) + strImageFileName = strImageFileName.replace(".pdf", ".png") + strImageFileDir = f"images/{strImageFileDir + strImageFileName}" + child.set("src", strImageFileDir) + + strImageFileNamewoSuffix, strImageFileName_Suffix = os.path.splitext(strImageFileName) + extension_and_mime = get_mimetype(strImageFileName_Suffix) + contentopf = addToContentopf( + contentopf, + strImageFileDir,# + strImageFileNamewoSuffix + "." + extension_and_mime, + # "images/" + strImageFileDir + strImageFileNamewoSuffix + "." + extension_and_mime, + strImageFileDir + strImageFileNamewoSuffix + "-nonumber-" + extension_and_mime, + extension_and_mime + ) + child.set("width", f"{str(listColumnWidths[intCurrentColumn])}px") del child.attrib["rend"] del child.attrib["file"] From 1663cfc98495cd365436ab2dd0c512f4d1361907 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 12 Jul 2019 10:49:50 +0200 Subject: [PATCH 126/132] Mimetypes --- imxml2epub.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index 48ad1c4..adc5d0c 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-07-12 10:36:59 (kthoden)> +# Time-stamp: <2019-07-12 10:48:18 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -270,11 +270,13 @@ def addToContentopf(contentopf, Filename, FileID, Mediatype): FileID = re.sub("^[0-9]", "", FileID) FileID = re.sub("^[0-9]", "", FileID) dictMediatypes = { - "txt" : "text/plain", - "otf" : "application/vnd.ms-opentype", - "xml" : "application/xhtml+xml", - "jpg" : "image/jpeg", - "png" : "image/png" + "txt" : "text/plain", + "ttf" : "application/x-font-truetype", + "otf" : "application/vnd.ms-opentype", + "xml" : "application/xhtml+xml", + "jpg" : "image/jpeg", + "png" : "image/png", + "bitstream" : "application/octet-stream" } contentopfns = "{http://www.idpf.org/2007/opf}" xmlManifest = contentopf.find(".//" + contentopfns + "manifest") @@ -362,7 +364,7 @@ def add_fonts_to_opf(font_files, contentopf, otf_counter, txt_counter, fontdir=" contentopf = addToContentopf( contentopf, Path("fonts") / fontfile, - "otf-font" + str(otf_counter), + "fontfile" + str(otf_counter), file_extension[1:] ) otf_counter += 1 @@ -370,8 +372,8 @@ def add_fonts_to_opf(font_files, contentopf, otf_counter, txt_counter, fontdir=" contentopf = addToContentopf( contentopf, Path("fonts") / fontfile, - "otf-font" + str(otf_counter), - "otf" + "fontfile" + str(otf_counter), + "ttf" ) otf_counter += 1 elif file_extension == ".txt": @@ -387,7 +389,7 @@ def add_fonts_to_opf(font_files, contentopf, otf_counter, txt_counter, fontdir=" contentopf, Path("fonts") / fontfile, "font-txt" + str(txt_counter), - "txt" + "bitstream" ) txt_counter += 1 else: From 1222f00b1fd7c69a99a8a7fbccecf00ddb898e6b Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 12 Jul 2019 11:07:05 +0200 Subject: [PATCH 127/132] Font label is extracted from font file --- imxml2epub.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index adc5d0c..cdba4e1 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-07-12 10:48:18 (kthoden)> +# Time-stamp: <2019-07-12 11:04:47 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -24,6 +24,7 @@ from copy import deepcopy from lxml import etree from pathlib import Path +from PIL import ImageFont import configparser BASE_DIR = Path( __file__ ).resolve().parent @@ -85,10 +86,6 @@ "--extra-font-selector", help="Specify the css class selector for the extra font." ) -parser.add_argument( - "--extra-font-label", - help="Specify the label of the extra font" -) parser.add_argument( "--extra-font-files-directory", help="Specify the directory with files of the font (the font itself, License)", @@ -400,7 +397,7 @@ def add_fonts_to_opf(font_files, contentopf, otf_counter, txt_counter, fontdir=" # def add_fonts_to_opf ends here -def create_extra_font_css(css_selector, font_label, extrafontfiles): +def create_extra_font_css(css_selector, extrafontfiles): """Create CSS code for extra font""" fontfiles = [x for x in extrafontfiles if x.endswith(".otf") or x.endswith(".ttf")] @@ -411,6 +408,10 @@ def create_extra_font_css(css_selector, font_label, extrafontfiles): else: fontfile = fontfiles[0] + font_object = ImageFont.truetype(fontfile) + + font_label = font_object.getname()[0] + css_code = f""".{css_selector} {{ font-family: '{font_label}'; }} @@ -497,10 +498,8 @@ def add_css_snippet(css_snippet, css_file): if args.extra_font_selector: css_selector = args.extra_font_selector -if args.extra_font_label: - font_label = args.extra_font_label -css_snippet = create_extra_font_css(css_selector, font_label, extra_fonts) +css_snippet = create_extra_font_css(css_selector, extra_fonts) add_css_snippet(css_snippet, OUTPUT_DIR / "OEBPS/eoa-epub.css") # Shortcut for namespace From da8803926a267a746d01ef722eb93f6a08adefd0 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 12 Jul 2019 14:36:11 +0200 Subject: [PATCH 128/132] Use ISBN as identifier --- imxml2epub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index cdba4e1..2fe6771 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-07-12 11:04:47 (kthoden)> +# Time-stamp: <2019-07-12 14:29:26 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -649,7 +649,7 @@ def add_css_snippet(css_snippet, css_file): xmlHead = tocncx.find("//{http://www.daisy.org/z3986/2005/ncx/}head") xmlMeta = etree.Element("meta") xmlMeta.set("name", "dtb:uid") -xmlMeta.set("content", "MPIWG:" + publication_series + publication_number) +xmlMeta.set("content", publication_isbn) xmlHead.append(xmlMeta) xmlTitle = tocncx.find("//{http://www.daisy.org/z3986/2005/ncx/}docTitle") xmlText = etree.Element("text") From 729307ae7324365ab4c282a56c2d6f315e7b11ac Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 15 Jul 2019 14:53:29 +0200 Subject: [PATCH 129/132] Include ISBN in EPUB frontmatter --- data/epub_files/epubintro-sources.xhtml | 3 ++- data/epub_files/epubintro.xhtml | 5 +++-- imxml2epub.py | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/data/epub_files/epubintro-sources.xhtml b/data/epub_files/epubintro-sources.xhtml index c96f813..cdcbf58 100644 --- a/data/epub_files/epubintro-sources.xhtml +++ b/data/epub_files/epubintro-sources.xhtml @@ -26,6 +26,7 @@ Robert G. Morrison
Department of Religion, Bowdoin College

+

e-ISBN [EPUB] epubisbn

First published year
Edition Open Access
http://www.edition-open-access.de
@@ -34,7 +35,7 @@ The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalb AdditionalInformation -

Max Planck Research Library for the History and Development of Knowledge
+

Edition Open Sources
series number

diff --git a/data/epub_files/epubintro.xhtml b/data/epub_files/epubintro.xhtml index 025aeb4..03454f0 100644 --- a/data/epub_files/epubintro.xhtml +++ b/data/epub_files/epubintro.xhtml @@ -16,8 +16,8 @@ Ian T. Baldwin, Gerd Graßhoff, Jürgen Renn, Dagmar Schäfer, Robert Schlögl,

Edition Open Access Development Team
Lindy Divarci, Samuel Gfrörer, Klaus Thoden, Malte Vogl

-

Scientific Board
Markus Antonietti, Ian Baldwin, -Antonio Becchi, Fabio Bevilacqua, William G. Boltz, Jens Braarvik, +

Scientific Board
Markus Antonietti, Ian T. Baldwin, +Antonio Becchi, Fabio Bevilacqua, William G. Boltz, Jens Braarvig, Horst Bredekamp, Jed Z. Buchwald, Olivier Darrigol, Thomas Duve, Mike Edmunds, Yehuda Elkana†, Fynn Ole Engler, Robert K. Englund, Mordechai Feingold, Rivka Feldhay, Gideon Freudenthal, Paolo Galluzzi, Kostas @@ -29,6 +29,7 @@ Richard Stephenson, Mark Stitt, Noel M. Swerdlow, Liba Taub, Martin Vingron, Scott Walter, Norton Wise, Gerhard Wolf, Rüdiger Wolfrum, Gereon Wolters, Zhang Baichun.

+

e-ISBN [EPUB] epubisbn

First published year
Edition Open Access
http://www.edition-open-access.de
diff --git a/imxml2epub.py b/imxml2epub.py index 2fe6771..fd4fc8d 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -619,6 +619,7 @@ def add_css_snippet(css_snippet, css_file): strIntroHTML = re.sub("year", cfgPublication.get("Technical", "PublicationYear"), strIntroHTML) strIntroHTML = re.sub("series", publication_series, strIntroHTML) strIntroHTML = re.sub("number", publication_number, strIntroHTML) +strIntroHTML = re.sub("epubisbn", publication_isbn, strIntroHTML) if publication_license == "by-nc-sa": license_string = """Published under Creative Commons by-nc-sa 3.0 Germany Licence
From 24314cecc7e869a4abde29cf8dda67895cdef5f0 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 15 Jul 2019 14:54:45 +0200 Subject: [PATCH 130/132] Whitespace and encoding declaration for epub files --- imxml2epub.py | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index fd4fc8d..4d470cd 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-07-12 14:29:26 (kthoden)> +# Time-stamp: <2019-07-15 14:50:33 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -417,8 +417,8 @@ def create_extra_font_css(css_selector, extrafontfiles): }} @font-face {{ - font-family: "{font_label}"; - src: url("fonts/{fontfile}"); + font-family: "{font_label}"; + src: url("fonts/{fontfile}"); }} """ @@ -1838,29 +1838,21 @@ class FootnoteError(Exception): # Content_OPF hinzufügen intTechnicalChapterNumber += 1 -tmpFileName = OUTPUT_DIR / "OEBPS/toc.ncx" +tocncx_filename = OUTPUT_DIR / "OEBPS/toc.ncx" logging.info("Saving toc.ncx") -tmpFile = open (tmpFileName, "w") -tmpResult = etree.tostring(tocncx, pretty_print=True, encoding="unicode") -tmpFile.write(tmpResult) -tmpFile.close() +tocncx.write( str(tocncx_filename), pretty_print=True, xml_declaration=True, encoding="utf-8") +contentopf_filename = OUTPUT_DIR / "OEBPS/content.opf" logging.info("Saving content.opf") -tmpFileName = OUTPUT_DIR / "OEBPS/content.opf" -tmpFile = open (tmpFileName, "w") -tmpResult = etree.tostring(contentopf, pretty_print=True, encoding="unicode") -tmpFile.write(tmpResult) -tmpFile.close() +tocncx.write( str(contentopf_filename), pretty_print=True, xml_declaration=True, encoding="utf-8") ############################################################################ # Finishing various Stuff # ############################################################################ -logging.info("Write Temporary XML-Tree") -ergebnisdatei = open(TEMP_DIR / "Devel_ebook.xml", "w") -ergebnis = etree.tostring(xmlEbookTree, pretty_print=True, encoding="unicode") -ergebnisdatei.write(ergebnis) -ergebnisdatei.close() +devel_ebook_file = TEMP_DIR / "Devel_ebook.xml" +logging.info(f"Write Temporary XML-Tree to {devel_ebook_file}.") +xmlEbookTree.write( str(devel_ebook_file), pretty_print=True, xml_declaration=True, encoding="utf-8") if args.no_epub: pass From 94729c90c53870ceb0c53ff8a528966906cc59e3 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 15 Jul 2019 14:54:45 +0200 Subject: [PATCH 131/132] Whitespace and encoding declaration for epub files --- imxml2epub.py | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/imxml2epub.py b/imxml2epub.py index fd4fc8d..4de5160 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-07-12 14:29:26 (kthoden)> +# Time-stamp: <2019-07-15 15:10:49 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -417,8 +417,8 @@ def create_extra_font_css(css_selector, extrafontfiles): }} @font-face {{ - font-family: "{font_label}"; - src: url("fonts/{fontfile}"); + font-family: "{font_label}"; + src: url("fonts/{fontfile}"); }} """ @@ -1838,29 +1838,21 @@ class FootnoteError(Exception): # Content_OPF hinzufügen intTechnicalChapterNumber += 1 -tmpFileName = OUTPUT_DIR / "OEBPS/toc.ncx" +tocncx_filename = OUTPUT_DIR / "OEBPS/toc.ncx" logging.info("Saving toc.ncx") -tmpFile = open (tmpFileName, "w") -tmpResult = etree.tostring(tocncx, pretty_print=True, encoding="unicode") -tmpFile.write(tmpResult) -tmpFile.close() +tocncx.write( str(tocncx_filename), pretty_print=True, xml_declaration=True, encoding="utf-8") +contentopf_filename = OUTPUT_DIR / "OEBPS/content.opf" logging.info("Saving content.opf") -tmpFileName = OUTPUT_DIR / "OEBPS/content.opf" -tmpFile = open (tmpFileName, "w") -tmpResult = etree.tostring(contentopf, pretty_print=True, encoding="unicode") -tmpFile.write(tmpResult) -tmpFile.close() +contentopf.write( str(contentopf_filename), pretty_print=True, xml_declaration=True, encoding="utf-8") ############################################################################ # Finishing various Stuff # ############################################################################ -logging.info("Write Temporary XML-Tree") -ergebnisdatei = open(TEMP_DIR / "Devel_ebook.xml", "w") -ergebnis = etree.tostring(xmlEbookTree, pretty_print=True, encoding="unicode") -ergebnisdatei.write(ergebnis) -ergebnisdatei.close() +devel_ebook_file = TEMP_DIR / "Devel_ebook.xml" +logging.info(f"Write Temporary XML-Tree to {devel_ebook_file}.") +xmlEbookTree.write( str(devel_ebook_file), pretty_print=True, xml_declaration=True, encoding="utf-8") if args.no_epub: pass From 37c7bc142e0c5e8a332016cdad90a7b0ede26941 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 15 Jul 2019 15:48:14 +0200 Subject: [PATCH 132/132] Cover image file must have capital c --- imxml2django.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imxml2django.py b/imxml2django.py index 20fc265..83fadb3 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-07-04 16:22:15 (kthoden)> +# Time-stamp: <2019-07-15 15:48:08 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -140,7 +140,7 @@ sys.exit( 1 ) logging.info(f"The file cover.jpg in django directory is missing.") if os.path.exists(PUBLICATION_DIR / "Cover.jpg"): - shutil.copy(PUBLICATION_DIR / "Cover.jpg", OUTPUT_DIR / "cover.jpg") + shutil.copy(PUBLICATION_DIR / "Cover.jpg", OUTPUT_DIR / "Cover.jpg") logging.info("Copied from current directory.") else: logging.error("No coverfile found. You can create a temporary one with the mkimage.py script")