diff --git a/bopytex/bopytex.py b/bopytex/bopytex.py index a599665..069fe78 100755 --- a/bopytex/bopytex.py +++ b/bopytex/bopytex.py @@ -12,7 +12,7 @@ import sys from path import Path import pytex -import mapytex +from mapytex import Expression import bopytex.filters as filters formatter = logging.Formatter('%(name)s :: %(levelname)s :: %(message)s') @@ -25,8 +25,10 @@ logger.addHandler(steam_handler) def setup(): + Expression.set_render("tex") + logger.debug(f"Render for Expression is {Expression.RENDER}") mapytex_tools = { - "Expression": mapytex.Expression, + "Expression": Expression, # "Polynom": mapytex.Polynom, # "Fraction": mapytex.Fraction, # "Equation": mapytex.Equation, @@ -104,7 +106,7 @@ def produce_and_compile(options): options.corr = True tex_files = working_dir.files("[0-9]*_*.tex") else: - template = Path(options.template) + template = Path(options.template).name logger.debug(f"Template will be {template}") list_infos = [ @@ -121,7 +123,7 @@ def produce_and_compile(options): logger.debug(f"Feeding template toward {dest}") tex_files.append(dest) pytex.feed( - template, + working_dir/template, {"infos": infos}, output=dest, force=1