# -- CONSTANTS -- # # --------------- # THIS_DIR = PPath(__file__).parent PROJECT_NAME = "tnsseq" DOC_INTRO_TEX = THIS_DIR / "00-intro" / "01-intro[fr].tex" DOC_DEP_TEX = THIS_DIR / "00-intro" / "99-packages-used[fr].tex" JSON_DEP_PATH = THIS_DIR / "x-dep-x.json" PATTERN_CMD_NAME = re.compile("^\\\([a-zA-Z]+)") PATTERN_OPTIONS = re.compile("^\\[(.+?)\\]") PATTERN_IN_CURLY = re.compile("^\\{(.+?)\\}(.*)$") ABOUT_LATEX = about() PACKAGE_ID, TIKZLIB_ID, TCOLBOXLIB_ID, KIND_ID, NAMES_ID, OPTIONS_ID = range(6) KINDS_IDS = { 'RequirePackage': PACKAGE_ID, 'usepackage': PACKAGE_ID, 'usetikzlibrary': TIKZLIB_ID, 'tcbuselibrary': TCOLBOXLIB_ID, } PACKAGE_ALREADY_ANALYZED = [ "algorithm2e", # <--- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 1340: invalid start byte ] DECO = " " * 4
# ------------------- # from mistool import latex_use # ----------------------- # # -- GENERAL CONSTANTS -- # # ----------------------- # LOG_FILE = Path(__file__).parent / "latex_about.txt" # ---------------------------------------- # # -- INFOS ABOUT THE LATEX DISTRIBUTION -- # # ---------------------------------------- # infos_found = [] for kind, info in latex_use.about().items(): infos_found.append( "{0}\n\t--> {1}\n".format(kind, info) ) infos_found = '\n'.join(infos_found) with LOG_FILE.open( mode = "w", encoding = "utf-8" ) as f: f.write(infos_found)