Login  Register

Re: Ongoing effort for LibreOffice/Packt backend

Posted by mojavelinux on Jun 18, 2014; 6:25am
URL: https://discuss.asciidoctor.org/Ongoing-effort-for-LibreOffice-Packt-backend-tp1823p1826.html

The problem you are having with the image attributes is due to not using the correct inline syntax.

I recommend looking at the slim docbook backend when you get stuck.

https://github.com/asciidoctor/asciidoctor-backends/blob/master/slim/docbook45/block_image.xml.slim

If you just want the path in the attribute, then you'd type:

 xlink:href=image_uri(attr :target)

If you need to surround the path with round brackets (if I understand what you are doing correctly, you need to use interpolation).

 xlink:href="(#{image_uri(attr :target)})"

That should get images to work. The image_uri function handles all aspects of resolving the path to the image, taking into account the imagesdir and data-uri embedding.

NOTE: The target for block images is (oddly) stored in the target attribute, not the node's target property. Inline images store the target in the target property. In the future, I may align these.

-Dan



On Wed, Jun 18, 2014 at 12:43 AM, gregturn [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I took Dan's pull request, merged it, and have since made considerable headway.

To see how to use it, visit and read https://github.com/gregturn/asciidoc-packt#asciidoctor-support.

For a listing of outstanding issues, checkout https://github.com/gregturn/asciidoc-packt#asciidoctor-issues.

This had definitely been easier than what it took me to get ramped up on AsciiDoc! Thanks Dan!


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Ongoing-effort-for-LibreOffice-Packt-backend-tp1823.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | http://google.com/profiles/dan.j.allen