|
From: | Scott Otterson |
Subject: | Re: [O] Bug: Windows-unfriendly filename in org-preview-latex-process-alist customization |
Date: | Sun, 27 Nov 2016 00:15:45 +0100 |
If this also works for *nix, then I hope that the org-mode maintainers will make this string the new default. If it doesn't work on linux, then I hope that it's possible to come up with a string that works in both OS families (and that could be the new default). I'll be back on Linux in a few months, and would love to keep a simple, cross-platform .emacs file.("dvipng -fg %F -bg %B -D %D -T tight -o \"%o%b\.png\" %f")
2016-11-26 16:41 GMT+01:00 Scott Otterson <address@hidden>:In my Windows build of emacs, when I put the cursor in a latex equation and runM-x org-toggle-latex-fragmentthen things chug along for a second but then fail. In the *Org Preview LaTex Output* buffer, I see the message:This is dvipng 1.15 Copyright 2002-2015 Jan-Ake Larsson[1dvipng: Fatal error, cannot open output file c:/Users/scott/AppData/Local/Temp/"orgtex4628hQG.png The reason for the failure is the leftover quote (...Temp/"orgtex...) in the expected png output file. With some hackery, I can see that the command that's being run is:dvipng -fg "rgb 0 0 0" -bg "rgb 1 1 1" -D "102.0" -T tight -o "c:/Users/scott/AppData/Local/Temp/""orgtex4628hQG".png "c:/Users/scott/AppData/Local/ Temp/orgtex4628hQG.dvi" If I paste that into a cygwin xterm, it runs fine on the .dvi file that's still in the Temp directory. But the command fails in a Windows cmd window; if I remove the extra quotes, then the command works in the cmd window too.The extra quote comes from the default customization for the dvipng image-converter field of org-preview-latex-process-alist: dvipng -fg %F -bg %B -D %D -T tight -o %o%b.png %fThis command should read :dvipng -fg %F -bg %B -D %D -T tight -o "%o%b.png" %fand the args shouldn't be quoted before.Unquoting those strings will possibly require to change other command strings.Fabrice
[Prev in Thread] | Current Thread | [Next in Thread] |