On Wed, 12 Nov 2014, Andreas Leha wrote:
Hi Rainer,
Rainer M Krug <rai...@krugs.de> writes:
Andreas Leha <andreas.l...@med.uni-goettingen.de> writes:
Hi Marco,
Marco Wahl <marcowahls...@gmail.com> writes:
Andreas Leha <andreas.l...@med.uni-goettingen.de> writes:
how would I export an org file containing
[[file:./myimage.pdf]]
to html so that a say png version myimage.pdf is inlined in the html
which links to the pdf?
[deleted]
Andreas replying:
Thanks for this. I am aware of how to *produce* graphics in different
formats for different export backends. I use your first approach,
which I think is the better solution.
Here, I am after a solution, that works on images that are not produced
but merely included via [[file:./some.pdf]].
I think there should be the possibility to include these into html (and
odt) export without any user interaction. So, I
- do not want to write a source block just to produce the by-backend image
- do not want to change the link manually
- do not want to run the converter manually
I am pretty sure this should be achievable with standard orgmode tools
(like filters, export hooks, or anything).
Since 'this is coming again and again' it seems a non-esoteric task.
And as there is 'no solution out of the box', I assume(d) that somebody has
written these filters already.
What you want is a custom `hyperlink type'.
I don't know if anyone has written this, but the machinery is in
`org-add-link-type'. You user would enter (say)
[[pdf:./some.pdf]]
and clicking on it would open the file (assuming a proper FOLLOW argument)
and exporting would handle all the behind the scenes tinkering to
create png's or whatever is needed for the backend in question (assuming
a suitable EXPORT argument).
The docstring for `org-add-link-type' has details. Also there is a worked
example and more instructions at
(info "(org) Adding hyperlink types")
HTH,
Chuck