Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

itikz has problems with MS-DOS paths #23

Open
buergi opened this issue Oct 6, 2020 · 0 comments
Open

itikz has problems with MS-DOS paths #23

buergi opened this issue Oct 6, 2020 · 0 comments

Comments

@buergi
Copy link

buergi commented Oct 6, 2020

  • itikz version: 0.1.4
  • Python version: 3.8.5
  • Operating System: Windows 10 19041.508

Description

Render a simple tikz image im Jupyter Notebook

What I Did

Jupyter Notebook with
Cell1:
%load_ext itikz
Cell2:

%%itikz --as-jinja --temp-dir
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\end{tikzpicture}
\end{document}

Output:

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.7)
entering extended mode
! I can't find file `C:/Users/PBUERG'.
<to be read again> 
                   \protect 
<*> C:/Users/PBUERG~
                    1/AppData/Local/Temp/itikz/ae465bf47af55f5b8c746fef68307...
Please type another input file name: 
! Emergency stop.
<to be read again> 
                   \protect 
<*> C:/Users/PBUERG~
                    1/AppData/Local/Temp/itikz/ae465bf47af55f5b8c746fef68307...

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on texput.log.

As a quick fix I changed the following line in fetch_or_compile_svg
check_output([tex_program, tex_path], cwd=working_dir)
to
check_output([tex_program, os.path.realpath(tex_path)], cwd=working_dir)

This is enough to fix the problem for me, I'm not sure if other paths should also be transformed accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant