Paste number 11380: changing latex extension for images

Index of paste annotations: 1

Paste number 11380: changing latex extension for images
Pasted by: mwolson
When:3 years, 9 months ago
Share:Tweet this! | http://paste.lisp.org/+8S4
Channel:#emacs
Paste contents:
Raw Source | XML | Display As
(defun muse-latex-strip-image-extensions (link &rest ignored)
  (save-match-data
    (and (string-match muse-image-regexp link)
         (replace-match "" nil t link))))

(defun my-muse-latex-prepare-buffer ()
  (set (make-local-variable 'muse-publish-url-transforms)
       (cons 'muse-latex-strip-image-extensions muse-publish-url-transforms)))

(unless (assoc "my-pdf" muse-publishing-styles)
  (muse-derive-style "my-pdf" "pdf"
                     :before 'my-muse-latex-prepare-buffer))

Annotations for this paste:

Annotation number 1: correction for muse-latex
Pasted by: mwolson
When:3 years, 9 months ago
Share:Tweet this! | http://paste.lisp.org/+8S4#1
Paste contents:
Raw Source | Display As
;; This function should be as follows.

(defun muse-latex-strip-image-extensions (link &rest ignored)
  (save-match-data
    (and (string-match muse-image-regexp link)
         (setq link (replace-match "" nil t link))))
  link)

Colorize as:
Show Line Numbers
Index of paste annotations: 1

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.