emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] org-set-link-parameters get html attributes


From: Tarjei Bærland
Subject: [O] org-set-link-parameters get html attributes
Date: Wed, 22 Aug 2018 19:57:33 +0200

Hello!

I have created a custom link format in org mode, [[fig:path][desc]], defined as

(org-link-set-parameters
   "fig"
   :follow (lambda (path)
(org-open-file-with-emacs
 (format "../figurer/%s" path)))
   :export (lambda (path desc backend)
(cond
 ((eq backend 'html)
  (format (concat "<img src="">   " alt=\"%s\"/>")
  path (or desc path))))))

I need this to be able to have one copy of the images, while having .org and exported .html files in different directory levels.

However, if I now want to export an image with html attributes and caption, e.g.

#+CAPTION:A caption
#+HTML_ATTR: :width 150px
[[fig:figname.png][Alt text]]

This ends up as

<p width="150px">
<img src="" alt="Alt text"/>
</p>

How can I get my new link format to include html attributes? All help much appreciated!

Regards,

Tarjei

reply via email to

[Prev in Thread] Current Thread [Next in Thread]