branch: externals/auctex
commit 5ce08ab0cc013b934e2dd65bf8ae4f73be35a572
Author: Ikumi Keita <[email protected]>
Commit: Ikumi Keita <[email protected]>
Raise robustness of call of dvipng command
* preview.el.in (preview-dvipng-command): Remove spurious quotes which
cause error for file names with space. (bug#31684)
(preview-dvipng-color-string): Replace single quotes with double
quotes for w32 users.
* doc/preview-latex.texi: (The preview images): Add warning that
(u)pLaTeX is not compatible with dvipng.
---
doc/preview-latex.texi | 6 ++++++
preview.el.in | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/doc/preview-latex.texi b/doc/preview-latex.texi
index 39eed39..d89c5a9 100644
--- a/doc/preview-latex.texi
+++ b/doc/preview-latex.texi
@@ -710,6 +710,12 @@ if the @acronym{DVI} file contains PostScript specials in
which case the
affected images will get run through Dvips and Ghostscript once
@samp{dvipng} finishes.
+Note for p@LaTeX{} and up@LaTeX{} users: It is known that @code{dvipng}
+is not compatible with p@LaTeX{} and up@LaTeX{}. If
+@code{preview-image-type} is set to @samp{dvipng} and (u)p@LaTeX{} is
+used, @samp{dvipng} just fails and @previewlatex{} falls back on Dvips
+and Ghostscript.
+
@item preview-gs-options
Most interesting to the user perhaps is the setting of this variable.
It contains the default antialiasing settings @option{-dTextAlphaBits=4}
diff --git a/preview.el.in b/preview.el.in
index 2d81cce..7c7cecc 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -522,7 +522,7 @@ an explicit list of elements in the CDR, or a symbol to
be consulted recursively.")
(defcustom preview-dvipng-command
- "dvipng -picky -noghostscript %d -o \"%m/prev%%03d.png\""
+ "dvipng -picky -noghostscript %d -o %m/prev%%03d.png"
"*Command used for converting to separate PNG images.
You might specify options for converting to other image types,
@@ -796,13 +796,13 @@ Pure borderless black-on-white will return an empty
string."
(border (aref colors 3)))
(concat
(and bg
- (format "--bg 'rgb %s' "
+ (format "--bg \"rgb %s\" "
(mapconcat #'preview-gs-color-value bg " ")))
(and fg
- (format "--fg 'rgb %s' "
+ (format "--fg \"rgb %s\" "
(mapconcat #'preview-gs-color-value fg " ")))
(and mask border
- (format "--bd 'rgb %s' "
+ (format "--bd \"rgb %s\" "
(mapconcat #'preview-gs-color-value mask " ")))
(and border
(format "--bd %d" (max 1 (round (/ (* res border) 72.0))))))))