diff options
| author | Vedang Manerikar <ved.manerikar@gmail.com> | 2022-01-02 10:13:21 +0530 |
|---|---|---|
| committer | Vedang Manerikar <ved.manerikar@gmail.com> | 2022-01-02 10:16:29 +0530 |
| commit | 3a318a679d1a8003698ced8df3e019641aeb7a7d (patch) | |
| tree | 8c18385c323b2fe37e0029e2cd1516c02e458f32 | |
| parent | 9794e4090db88206f1ca011235882cc73b012fbf (diff) | |
Ensure usage of 'dvipng in `pdf-annot-print-annotation-latex`
Users might have changed `org-preview-latex-default-process` from it's
default of value 'dvipng. However, `pdf-tools` can only work with png
files, so bind it locally to ensure that `pdf-tools` can do the right
thing.
Author: Visuwesh <visuwesh@tutanota.com>
Squashed Commit. Closes: #58
| -rw-r--r-- | lisp/pdf-annot.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/pdf-annot.el b/lisp/pdf-annot.el index 570e589..0b9a1ec 100644 --- a/lisp/pdf-annot.el +++ b/lisp/pdf-annot.el @@ -1367,6 +1367,13 @@ by a header." "pdf-annot-print-annotation-latex%s%s%s" page header contents))) (data (pdf-cache-lookup-image page 0 nil hash)) + ;; pdf-tools can only work with png files, so this + ;; binding ensures that pdf-tools can print the + ;; latex-preview regardless of the user + ;; configuration. + (org-preview-latex-default-process 'dvipng) + ;; For backward compatibility with emacs-version < 26.1 + (org-latex-create-formula-image-program 'dvipng) (org-format-latex-header pdf-annot-latex-header) (temporary-file-directory |
