[Top][All Lists]

[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


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

   :follow (lambda (path)
 (format "../figurer/%s" path)))
   :export (lambda (path desc backend)
 ((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"/>

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



reply via email to

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