From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arun Isaac Subject: Re: Publishing images to various sizes Date: Sun, 27 Dec 2015 09:30:35 +0530 Message-ID: <87y4cg4k2k.fsf@gmail.com> References: <87fuyr1tkl.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aD2WS-0004Jj-Ii for emacs-orgmode@gnu.org; Sat, 26 Dec 2015 23:01:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aD2WO-0000L5-IQ for emacs-orgmode@gnu.org; Sat, 26 Dec 2015 23:01:32 -0500 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]:34152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aD2WO-0000Kz-CA for emacs-orgmode@gnu.org; Sat, 26 Dec 2015 23:01:28 -0500 Received: by mail-pa0-x241.google.com with SMTP id yy13so4684392pab.1 for ; Sat, 26 Dec 2015 20:01:28 -0800 (PST) Received: from steel ([117.241.215.39]) by smtp.gmail.com with ESMTPSA id z3sm54610664pfi.69.2015.12.26.20.01.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Dec 2015 20:01:26 -0800 (PST) In-Reply-To: (John Kitchin's message of "Sat, 26 Dec 2015 20:31:51 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Emacs orgmode John Kitchin 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 "" (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