Zim

Problem with Equation Editor plugin on Windows

Bug #1596317 reported by Johan Andberger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Confirmed
Low
Unassigned

Bug Description

Hi

I have a problem with the Equation Editor plugin for Zim 0.65 on Windows 10. The equation.dvi file in AppData/Local/Temp/zim-... gets generated fine, but dvipng fails with

dvipng "-q" "-bg" "Transparent" "-T" "tight" "-o" "c:\users\firstn~1\appdata\local\temp\zim-FirstName%20LastName\equation.png" "c:\users\firstn~1\appdata\local\temp\zim-FirstName%20LastName\equation.dvi" fehlgeschlagen. Fehlercode: 2

Opening a terminal and executing the command manually gives

C:\Users\FirstName LastName>dvipng "-q" "-bg" "Transparent" "-T" "tight" "-o" "c:\users\firstn~1\appdata\local\temp\zim-FirstName%20LastName\equation.png" "c:\users\firstn~1\appdata\local\temp\zim-FirstName%20LastName\equation.dvi"
This is dvipng 1.15 Copyright 2002-2015 Jan-Ake Larsson

dvipng: Fatal error, unacceptible format spec in output file name

Changing the command to e.g.

C:\Users\FirstName LastName>dvipng "-q" "-bg" "Transparent" "-T" "tight" "-o" "c:\users\firstn~1\appdata\local\temp\equation.png" "c:\users\firstn~1\appdata\local\temp\zim-FirstName%20LastName\equation.dvi"
This is dvipng 1.15 Copyright 2002-2015 Jan-Ake Larsson

i.e. just removing zim-FirstName%20LastName from the output path, executes fine. It seems to me that dvipng can't parse output paths with % in them very well, which stems from the fact that I have a username with a space in it.

This is an issue with dvipng, so I'm not sure if I should post this here. It could however be solved by removing %20 from the folder name, is this possible?

Kind regards
Johan

Tags: 2min
Revision history for this message
Johan Andberger (johanandberger) wrote :

Asked on the mailing list for dvipng, http://lists.nongnu.org/archive/html/dvipng/2016-07/msg00001.html

I made the following change to zim/fs.py to fix the problem: "dir = Dir((root, 'zim-%s' % user))" to "dir = Dir((root, 'zim'))".

Haven't had any bad things happen so far.

Changed in zim:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

probably best if we keep same tmp dir but change pwd and call dvipng with relative pathname

tags: added: 2min
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.