Paste number 11380: changing latex extension for images

Index of paste annotations: 1

Paste number 11380: changing latex extension for images
Pasted by: mwolson
3 years, 4 months ago
#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
3 years, 4 months ago
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.