itikz icon indicating copy to clipboard operation
itikz copied to clipboard

itikz has problems with MS-DOS paths

Open buergi opened this issue 5 years ago • 0 comments

  • 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.

buergi avatar Oct 06 '20 12:10 buergi