From 29a81c3ce9ff8bec9f0723e4d62cb3232cd07d51 Mon Sep 17 00:00:00 2001 From: Steven Clontz Date: Fri, 2 Jul 2021 21:37:54 +0000 Subject: [PATCH] copy image directories for latex build --- pretext/project.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pretext/project.py b/pretext/project.py index 8216dd94..21e4464e 100644 --- a/pretext/project.py +++ b/pretext/project.py @@ -214,9 +214,11 @@ def build(self,target_name,webwork=False,diagrams=False,diagrams_format="svg",on "but these will not be (re)built. Run `pretext build` with the `-d` flag if updates are needed.") if target.format()=='html' and not only_assets: builder.html(target.source(),target.publication(),target.output_dir(),target.stringparams()) - # core.html(source, None, stringparams, output) if target.format()=='latex' and not only_assets: builder.latex(target.source(),target.publication(),target.output_dir(),target.stringparams()) + # core script doesn't put a copy of images in output for latex builds, so we do it instead here + shutil.copytree(target.external_dir(),os.path.join(target.output_dir(),"external")) + shutil.copytree(target.generated_dir(),os.path.join(target.output_dir(),"generated")) if target.format()=='pdf' and not only_assets: builder.pdf(target.source(),target.publication(),target.output_dir(),target.stringparams())