diff options
| author | Al Haji-Ali <[email protected]> | 2025-10-27 18:01:09 +0100 |
|---|---|---|
| committer | Arash Esbati <[email protected]> | 2025-10-28 10:14:25 +0100 |
| commit | 5bdb36d5e7d073a452791325026a679ea37be8a3 (patch) | |
| tree | 8e35dd2c70ff3d55488b2202d8f49ebbbeec66c9 | |
| parent | 782efc9947136087d846941838dc70a16f7e6264 (diff) | |
| download | auctex-main.tar.gz | |
* 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.
| -rw-r--r-- | NEWS.org | 12 | ||||
| -rw-r--r-- | doc/preview-faq.texi | 5 | ||||
| -rw-r--r-- | doc/preview-latex.texi | 82 | ||||
| -rw-r--r-- | doc/preview-readme.texi | 6 | ||||
| -rw-r--r-- | doc/tex-ref.tex | 2 | ||||
| -rw-r--r-- | preview.el | 32 |
6 files changed, 80 insertions, 59 deletions
@@ -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,15 @@ 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 e9e03fd5..19210a35 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 @@ -496,10 +496,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 @@ -535,9 +535,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 @@ -718,32 +719,35 @@ cater for the images that are displayed. There are various options 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}). -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 -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. +Another noteworthy setting of @code{preview-image-type} is @samp{dvi*}: in +this case, a @acronym{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-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 do 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 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. +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. @@ -854,7 +858,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..2f4f3cc4 100644 --- a/doc/preview-readme.texi +++ b/doc/preview-readme.texi @@ -49,9 +49,9 @@ 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 -special @LaTeX{} style file for extracting the material of interest in -the background and providing fast interactive response. +@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. @node Activating preview-latex, Getting started, What use is it?, Introduction @section Activating @previewlatex{} 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 @@ -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.0")) (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.0")) (defcustom preview-image-type 'png "Image type to be used in images." @@ -514,7 +516,7 @@ an explicit list of elements in the CDR, or a symbol to be consulted recursively.") (define-obsolete-variable-alias - 'preview-dvipng-command 'preview-dvi*-command "14.2") + 'preview-dvipng-command 'preview-dvi*-command "14.2.0") (defcustom preview-dvi*-command "dvipng -picky -noghostscript %d -o %m/prev%%03d.png" "Command used for converting to separate PNG images. @@ -525,10 +527,11 @@ 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.0")) (define-obsolete-variable-alias - 'preview-dvipng-image-type 'preview-dvi*-image-type "14.2") + 'preview-dvipng-image-type 'preview-dvi*-image-type "14.2.0") (defcustom preview-dvi*-image-type 'png "Image type that dvi conversion produces. @@ -538,7 +541,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.0")) (defun preview-dvipng-command (&optional cmd) "Return a shell command for running dvipng. @@ -967,7 +971,7 @@ START is the function that actually starts the process with #'preview-start-dvi* #'preview-dvi*-sentinel)) (define-obsolete-function-alias - 'preview-dvipng-process-setup #'preview-dvi*-process-setup "14.2") + 'preview-dvipng-process-setup #'preview-dvi*-process-setup "14.2.0") (defun preview-pdf2dsc-process-setup () (setq TeX-sentinel-function #'preview-pdf2dsc-sentinel) @@ -1000,7 +1004,7 @@ START is the function that actually starts the process with (defalias 'preview-dvi*-abort #'preview-dvips-abort) ; "Abort a dvi conversion run.") (define-obsolete-function-alias - 'preview-dvipng-abort #'preview-dvi*-abort "14.2") + 'preview-dvipng-abort #'preview-dvi*-abort "14.2.0") (defun preview-gs-dvips-sentinel (process _command &optional gsstart) "Sentinel function for indirect rendering DviPS process. @@ -1110,7 +1114,7 @@ The usual PROCESS and COMMAND arguments for (error (preview-log-error err "Dvi conversion sentinel" process))) (preview-reraise-error process)) (define-obsolete-function-alias - 'preview-dvipng-sentinel #'preview-dvi*-sentinel "14.2") + 'preview-dvipng-sentinel #'preview-dvi*-sentinel "14.2.0") (defun preview-dvi*-close (process closedata) "Clean up after PROCESS and set up queue accumulated in CLOSEDATA." @@ -1136,7 +1140,7 @@ The usual PROCESS and COMMAND arguments for (unless (eq (process-status process) 'signal) (preview-dvi*-abort)))))) (define-obsolete-function-alias - 'preview-dvipng-close #'preview-dvi*-close "14.2") + 'preview-dvipng-close #'preview-dvi*-close "14.2.0") (defun preview-dsc-parse (file) "Parse DSC comments of FILE. @@ -2659,7 +2663,7 @@ Deletes the dvi file when finished." (preview-delete-file filename) (file-error nil))))) (define-obsolete-function-alias - 'preview-dvipng-place-all #'preview-dvi*-place-all "14.2") + 'preview-dvipng-place-all #'preview-dvi*-place-all "14.2.0") (defun preview-active-string (ov) "Generate before-string for active image overlay OV." @@ -3932,7 +3936,7 @@ The fourth value is the transparent border thickness." (preview-dvipng-command preview-dvi*-command) (funcall preview-dvi*-command)))) (define-obsolete-function-alias - 'preview-start-dvipng #'preview-start-dvi* "14.2") + 'preview-start-dvipng #'preview-start-dvi* "14.2.0") (defun preview-start-dvips (&optional fast) "Start a DviPS process. |
