Hello both, On 27/10/2025, Arash Esbati wrote: > But since we're adding more functionality, I think you're right and we > should go for 14.2 when we land your next patch.
Attached is the patch announcing the changes and updating the documentation where `dvipng` was previously mentioned. Best regards, -- Al
>From b2400392b0ea11c3edecb361757a11d10c178217 Mon Sep 17 00:00:00 2001 From: Al Haji-Ali <[email protected]> Date: Mon, 27 Oct 2025 18:01:09 +0100 Subject: [PATCH] Update documentation to reflect dvi* rename * NEWS.org: Announce change of custom variable. * doc/preview-faq.texi: Update FAQ on recommended setting. * doc/preview-latex.texi: Update documentation mentioning dvipng. * doc/preview-readme.texi: Add dvisvgm when mentioning dvipng. * doc/tex-ref.tex: Update documentation. * preview.el: (preview-image-creators, preview-gs-image-type-alist, preview-dvi*-image-type): Add appropriate package-version property. --- NEWS.org | 13 +++++++ doc/preview-faq.texi | 5 +-- doc/preview-latex.texi | 75 +++++++++++++++++++++++------------------ doc/preview-readme.texi | 2 +- doc/tex-ref.tex | 2 +- preview.el | 16 +++++---- 6 files changed, 70 insertions(+), 43 deletions(-) diff --git a/NEWS.org b/NEWS.org index 4463c474..09635277 100644 --- a/NEWS.org +++ b/NEWS.org @@ -18,6 +18,9 @@ - Add new support files =style/floatflt.el=, =style/fontawesome7.el= and =style/ltx-talk.el=. +- Add new function ~preview-dvisvgm-command~ to generate SVG images in + preview. + ** Changed - Change the format of the value stored in ~preview-dumped-alist~. Add @@ -27,6 +30,16 @@ macros as =slide-title=. This affects macros provided by =style/beamer.el= and =style/ltx-talk.el=. +- Change the name of ~preview-dvipng-command~ to + ~preview-dvi*-command~. Also make it accept a function symbol + returning the full command. + +- Change the name of ~preview-dvipng-image-type~ to + ~preview-dvi*-image-type~. + +- Change the setting of ~preview-image-creators~ and + ~preview-gs-image-type-alist~ to use ~dvi*~ instead of ~dvipng~. + * [14.1.0] - 2025-07-11 ** Added diff --git a/doc/preview-faq.texi b/doc/preview-faq.texi index 9c20e65e..93aa6227 100644 --- a/doc/preview-faq.texi +++ b/doc/preview-faq.texi @@ -42,8 +42,9 @@ got it from. @subsection I have trouble with the display format... We recommend keeping the variable @code{preview-image-type} set to -@code{dvipng} (if you have it installed) or @code{png}. This is the -default and can be set via the @samp{Preview/Customize} menu. +@code{dvi*} (if you have @command{dvipng} or @command{dvisvgm} installed) +or @code{png}. This is the default and can be set via the +@samp{Preview/Customize} menu. All other formats are known to have inconveniences, either in file size or quality. There are some Emacs versions around not supporting diff --git a/doc/preview-latex.texi b/doc/preview-latex.texi index 299a161c..18637a94 100644 --- a/doc/preview-latex.texi +++ b/doc/preview-latex.texi @@ -74,7 +74,7 @@ This manual may be copied under the conditions spelled out in @iftex @unnumbered @previewlatex{} @end iftex - + @previewlatex{} is a package embedding preview fragments into Emacs source buffers under the @AUCTeX{} editing environment for @LaTeX{}. It uses @file{preview.sty} for the extraction of certain environments (most @@ -96,7 +96,7 @@ sans-serif font to visually offset it. * ToDo:: Future development. * Frequently Asked Questions:: All about @previewlatex{} * Copying this Manual:: GNU Free Documentation License -* Index:: A menu of many topics. +* Index:: A menu of many topics. @end menu @node Copying, Introduction, top, top @@ -131,7 +131,7 @@ Installation is now being covered in @ref{Installation,,,auctex,the @AUCTeX{} manual}. @node Keys and lisp, Simple customization, Installation, top -@chapter Key bindings and user-level lisp functions +@chapter Key bindings and user-level lisp functions @cindex Menu entries @previewlatex{} adds key bindings starting with @kbd{C-c C-p} to the @@ -213,7 +213,7 @@ levels. @findex preview-environment @item @kbd{C-c C-p C-s} -@itemx @code{preview-section} +@itemx @code{preview-section} @itemx Preview/Generate previews for section Run preview on this @LaTeX{} section. @kindex @kbd{C-c C-p C-s} @@ -227,14 +227,14 @@ Run preview on current region. @findex preview-region @item @kbd{C-c C-p C-b} -@itemx @code{preview-buffer} +@itemx @code{preview-buffer} @itemx Preview/Generate previews for buffer Run preview on the current buffer. @kindex @kbd{C-c C-p C-b} @findex preview-buffer @item @kbd{C-c C-p C-d} -@itemx @code{preview-document} +@itemx @code{preview-document} @itemx Preview/Generate previews for document Run preview on the current document. @kindex @kbd{C-c C-p C-d} @@ -321,7 +321,7 @@ current document. If the caching gives you problems, use this. Read @ifinfo this -@end ifinfo +@end ifinfo @ifnotinfo the @end ifnotinfo @@ -516,10 +516,10 @@ an Emacs-lisp part integrating the thing into Emacs (aided by @AUCTeX{}). @menu -* The LaTeX style file:: -* The Emacs interface:: -* The preview images:: -* Misplaced previews:: +* The LaTeX style file:: +* The Emacs interface:: +* The preview images:: +* Misplaced previews:: @end menu @node The LaTeX style file, The Emacs interface, For advanced users, For advanced users @@ -555,9 +555,10 @@ configured command. One possibility is to have @samp{\pdfoutput=0 } appended to every command starting with @samp{pdf}. This particular setting is available as the shortcut @code{preview-LaTeX-disable-pdfoutput}. Since @previewlatex{} can work -with @acronym{PDF} files by now, there is little incentive for using -this option, anymore (for projects not requiring @acronym{PDF} output, -the added speed of @command{dvipng} might make this somewhat attractive). +with @acronym{PDF} files by now, there is little incentive for using this +option, anymore (for projects not requiring @acronym{PDF} output, the +added speed of @command{dvipng} or @command{dvisvgm} might make this +somewhat attractive). @item preview-required-option-list @code{preview-LaTeX-command} uses @code{preview-required-option-list} in @@ -739,31 +740,39 @@ customizable concerning aspects of that operation, see the customization group @samp{Preview Gs} for this. Another noteworthy setting of @code{preview-image-type} is -@samp{dvipng}: in this case, the @command{dvipng} -@pindex dvipng -program will get run on @acronym{DVI} output (see below for @acronym{PDF}). +@samp{dvi*}: in this case, A DVI conversion process will be run (for example +@command{dvipng} +@pindex dvipng +or +@command{dvisvgm} +) +on the @acronym{DVI} output (see below for @acronym{PDF}). This is in general much faster than Dvips and Ghostscript. In that case, the option -@item preview-dvipng-command -will get run for doing the conversion, and it is expected that - -@item preview-dvipng-image-type -images get produced (@samp{dvipng} might be configured for other image -types as well). You will notice that @code{preview-gs-image-type-alist} -contains an entry for @code{dvipng}: this actually has nothing to with -@samp{dvipng} itself but specifies the image type and Ghostscript device -option to use when @samp{dvipng} can't be used. This will obviously be +@item preview-dvi*-command +will determine the command to run for the conversion, and it is expected that + +@item preview-dvi*-image-type +images get produced (@samp{dvipng} might be configured for PNG or other image +and @samp{dvisvgm} +produces SVG images that you can use if your Emacs supports them +). +You will notice that @code{preview-gs-image-type-alist} +contains an entry for @code{dvi*}: this actually has nothing to with +the @acronym{DVI} conversion itself but specifies the image type and Ghostscript device +option to use when such conversion can't be done. This will obviously be the case for @acronym{PDF} output by PDF@LaTeX{}, but it will also happen 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. +the @acronym{DVI} conversion process finishes. -Note for p@LaTeX{} and up@LaTeX{} users: It is known that @command{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. +Note for p@LaTeX{} and up@LaTeX{} users: It is known that @command{dvipng} and +@command{dvisvgm} +are not compatible with p@LaTeX{} and up@LaTeX{}. If +@code{preview-image-type} is set to @samp{dvi*} and (u)p@LaTeX{} is +used, the @acronym{DVI} conversion process 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. @@ -874,7 +883,7 @@ The full license text can be read here: @include fdl.texi @c @node Credits, Index, Internals, top -@c @appendix Credits +@c @appendix Credits @node Index, , Copying this Manual, top @unnumbered Index diff --git a/doc/preview-readme.texi b/doc/preview-readme.texi index afda64db..0da604ce 100644 --- a/doc/preview-readme.texi +++ b/doc/preview-readme.texi @@ -49,7 +49,7 @@ constructs, does this only when told, and then right in the source code. Switching back and forth between the source and preview is easy and natural and can be done for each image independently. Behind the scenes of @previewlatex{}, a sophisticated framework of other programs like -@samp{dvipng}, Dvips and Ghostscript are employed together with a +@samp{dvipng}, @samp{dvisvgm}, Dvips and Ghostscript are employed together with a special @LaTeX{} style file for extracting the material of interest in the background and providing fast interactive response. diff --git a/doc/tex-ref.tex b/doc/tex-ref.tex index befd1a95..b7026f0b 100644 --- a/doc/tex-ref.tex +++ b/doc/tex-ref.tex @@ -490,7 +490,7 @@ Customize'' menu for customization. Worthwhile settings: \halign to \hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\var{#}\tabskip0pt\cr \noalign{\medskip If you have dvipng available:} -Set to \kbd{dvipng}&preview-image-type\cr +Set to \kbd{dvi*}&preview-image-type\cr \noalign{\medskip \vbox{Keep counter values when regenerating single previews:}} Set to \kbd{t}&preview-preserve-counters\cr diff --git a/preview.el b/preview.el index 205d6d93..e930d9cf 100644 --- a/preview.el +++ b/preview.el @@ -178,8 +178,8 @@ Suitable spec is chosen from `preview-icon-specs'.") (place preview-gs-place) (close preview-gs-close)) (pnm (open preview-gs-open) - (place preview-gs-place) - (close preview-gs-close)) + (place preview-gs-place) + (close preview-gs-close)) (tiff (open preview-gs-open) (place preview-gs-place) (close preview-gs-close))) @@ -205,7 +205,8 @@ of Ghostscript, or by your copy of Emacs." (function :tag "Handler function") (repeat :tag "Additional \ function args" :inline t sexp)) - :options (open place close)))) + :options (open place close))) + :package-version '(auctex . "14.2")) (defcustom preview-gs-image-type-alist '((png png "-sDEVICE=png16m") @@ -220,7 +221,8 @@ method, like when PDFTeX was used." :group 'preview-gs :type '(repeat (list :tag nil (symbol :tag "preview image-type") (symbol :tag "Emacs image-type") - (repeat :inline t :tag "Ghostscript options" string)))) + (repeat :inline t :tag "Ghostscript options" string))) + :package-version '(auctex . "14.2")) (defcustom preview-image-type 'png "Image type to be used in images." @@ -576,7 +578,8 @@ expected to be a function that returns the command as a string. You might specify options for converting to other image types, but then you'll need to adapt `preview-dvi*-image-type'." :group 'preview-latex - :type '(choice string function)) + :type '(choice string function) + :package-version '(auctex . "14.2")) (define-obsolete-variable-alias 'preview-dvipng-image-type 'preview-dvi*-image-type "14.2") @@ -589,7 +592,8 @@ customize this." :group 'preview-latex :type '(choice (const png) (const gif) - (symbol :tag "Other" :value png))) + (symbol :tag "Other" :value png)) + :package-version '(auctex . "14.2")) (defun preview-dvipng-command (&optional cmd) "Return a shell command for running dvipng. -- 2.50.1 (Apple Git-155)
_______________________________________________ bug-auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-auctex
