Fix: destination when template is in subfolder
This commit is contained in:
parent
affb52f4e7
commit
bc55fbbd1c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user