Commit a03aea29 authored by Florian Rhiem's avatar Florian Rhiem
Browse files

Improve file handling in Tikz directive

parent ca21e472
......@@ -194,8 +194,9 @@ class Tikz(Directive):
rendered_tikz_filename = render_tikz("\n".join(content), self.options, output_svg=is_output_mode_html)
if is_output_mode_html:
reference = directives.uri(convert_image_to_html_base64(rendered_tikz_filename))
shutil.copy(rendered_tikz_filename, os.path.join(BUILD_DIRECTORY, os.path.basename(rendered_tikz_filename)))
shutil.move(rendered_tikz_filename, os.path.join(BUILD_DIRECTORY, os.path.basename(rendered_tikz_filename)))
reference = directives.uri(rendered_tikz_filename)
self.options["uri"] = reference
if is_output_mode_html and not any(attr in self.options for attr in ("height", "width", "scale")):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment