MiKTeX / miktex

the MiKTeX source code

Home Page:https://miktex.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with paths when using dvisvgm included with MikTeX installation on Windows.

Argasz opened this issue · comments

Discussed in #1491

I added the items requested in the bug report instructions and moved this to issues, hope that's ok!

Originally posted by Argasz May 3, 2024
I am having an issue where the dvisvgm command line utility is failing when run from certain folders but not from others.
The original problem I had was when generating LaTeX preview images for emacs org-mode and using dvisvgm for this was not working. I investigated a bit and running the same command that is generated by emacs seems to work in some folders and not in others despite using absolute paths as arguments. For example if I run my command in C:\Users\ it works, but if I run it in C:\ it does not work.
The command in question is:
dvisvgm "c:/Users/argas/AppData/Local/Temp/orgtexzhrdiH.dvi" --no-fonts --exact-bbox --scale="1.1292857142857142" --output="c:/Users/argas/AppData/Local/Temp/orgtexzhrdiH.svg"

In the logs I am getting:
2024-05-03 11:29:05,644+0200 ERROR dvisvgm.core - Function: GetFileAttributesW
2024-05-03 11:29:05,644+0200 ERROR dvisvgm.core - Result: 87
2024-05-03 11:29:05,644+0200 ERROR dvisvgm.core - Data: path="."
2024-05-03 11:29:05,644+0200 ERROR dvisvgm.core - Source: Libraries\MiKTeX\Core\Directory\win\winDirectory.cpp:94
2024-05-03 11:29:05,646+0200 INFO dvisvgm - this process (16068) finishes with exit code -4

The dvisvgm version I am using is 3.2.2 included in the MikTeX installation.
Logs, input, and installation report:
Input.zip
log.zip
miktex-report.txt

I realize this might be an issue with dvisvgm and not with MikTeX, but I decided to post it here since the logs do mention code in this repository.