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
|
from path import Path
|
||||||
import pytex
|
import pytex
|
||||||
import mapytex
|
from mapytex import Expression
|
||||||
import bopytex.filters as filters
|
import bopytex.filters as filters
|
||||||
|
|
||||||
formatter = logging.Formatter('%(name)s :: %(levelname)s :: %(message)s')
|
formatter = logging.Formatter('%(name)s :: %(levelname)s :: %(message)s')
|
||||||
@ -25,8 +25,10 @@ logger.addHandler(steam_handler)
|
|||||||
|
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
|
Expression.set_render("tex")
|
||||||
|
logger.debug(f"Render for Expression is {Expression.RENDER}")
|
||||||
mapytex_tools = {
|
mapytex_tools = {
|
||||||
"Expression": mapytex.Expression,
|
"Expression": Expression,
|
||||||
# "Polynom": mapytex.Polynom,
|
# "Polynom": mapytex.Polynom,
|
||||||
# "Fraction": mapytex.Fraction,
|
# "Fraction": mapytex.Fraction,
|
||||||
# "Equation": mapytex.Equation,
|
# "Equation": mapytex.Equation,
|
||||||
@ -104,7 +106,7 @@ def produce_and_compile(options):
|
|||||||
options.corr = True
|
options.corr = True
|
||||||
tex_files = working_dir.files("[0-9]*_*.tex")
|
tex_files = working_dir.files("[0-9]*_*.tex")
|
||||||
else:
|
else:
|
||||||
template = Path(options.template)
|
template = Path(options.template).name
|
||||||
logger.debug(f"Template will be {template}")
|
logger.debug(f"Template will be {template}")
|
||||||
|
|
||||||
list_infos = [
|
list_infos = [
|
||||||
@ -121,7 +123,7 @@ def produce_and_compile(options):
|
|||||||
logger.debug(f"Feeding template toward {dest}")
|
logger.debug(f"Feeding template toward {dest}")
|
||||||
tex_files.append(dest)
|
tex_files.append(dest)
|
||||||
pytex.feed(
|
pytex.feed(
|
||||||
template,
|
working_dir/template,
|
||||||
{"infos": infos},
|
{"infos": infos},
|
||||||
output=dest,
|
output=dest,
|
||||||
force=1
|
force=1
|
||||||
|
Loading…
Reference in New Issue
Block a user