Skip to content

Option --autosize doesn't work on windows when tempfile path is complicated #103

@wittiger

Description

@wittiger

Hi,

the --autosize option doesnt work on windows when the path is complicated enough:

Debug file:
2023-08-03 16:20:17,692 dot2tex DEBUG Running command: latex -interaction=nonstopmode C:\Users\USERN~1\AppData\Local\Temp\dot2texyvzdrxix\dot2tex.tex 2023-08-03 16:20:18,165 dot2tex DEBUG stdout from latex b"This is pdfTeX, Version 3.141592653-2.6-1.40.25 (MiKTeX 23.5) (preloaded format=latex.fmt)\r\n restricted \\write18 enabled.\r\nentering extended mode\r\n! I can't find file "C:/Users/USERN".\r\n<to be read again>

Errors:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\USERN~1\\AppData\\Local\\Temp\\dot2texyvzdrxix\\dot2tex.log'

The ~ character seems to through something off.

Workaround: Set os environment variable TMPFILE to C:\temp (And create that directory if it does not exist)

Kind regards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions