[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Publishing images to various sizes
From: |
Arun Isaac |
Subject: |
Re: [O] Publishing images to various sizes |
Date: |
Sun, 27 Dec 2015 09:30:35 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
John Kitchin <address@hidden> writes:
> (defun my-link-format (link contents info)
> (let ((type (org-element-property :type link))
> (path (org-element-property :path link)))
> (cond
> ((and
> (string= type "file")
> (string-match "\.pdf" path))
> (shell-command
> (format
> "convert %s %s"
> path
> (replace-regexp-in-string "\.pdf" ".png" path)))
> (format "<img src=\"%s\">" (replace-regexp-in-string "\.pdf" ".png"
> path)))
> ;; anything else, we just do the regular thing
> (t
> (org-html-link link contents info)))))
>
> (org-export-define-derived-backend 'my-html 'html
> :translate-alist '((link . my-link-format)))
>
> (browse-url (org-export-to-file 'my-html "custom-link.html"))
Thank you. I'll adapt this to my needs.
Regards,
Arun Isaac