8000 itikz has problems with MS-DOS paths · Issue #23 · jbn/itikz · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
itikz has problems with MS-DOS paths #23
Open
@buergi

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0