Specialized Indexes in Asciidoc to Docbook backend

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Specialized Indexes in Asciidoc to Docbook backend

Blackstone67
Hello,
I'm relatively new to Asciidoctor but I'm quickly growing accustomed to the syntax and ease of use.  

I have been trying to find out if there is any way to generate an index 'type' attribute to the Docbook back end so that I can generate specialized indexes in my Docbook/PDF output.

Does anyone know if this is possible?

Cheers,

Brian
Reply | Threaded
Open this post in threaded view
|

Re: Specialized Indexes in Asciidoc to Docbook backend

mojavelinux
Administrator
Brian,

The index term macro is not currently extensible, meaning it does not support arbitrary attributes (like an image, for example).

The best way to approach this would be to create a custom inline macro using the Asciidoctor extension mechanism. You can return any string you want from the process method of an inline macro, so you can create any DocBook output you want.

You can find examples of inline macros in the extensions lab.


Cheers,

-Dan

On Tue, May 12, 2015 at 6:25 PM, Blackstone67 [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,
I'm relatively new to Asciidoctor but I'm quickly growing accustomed to the syntax and ease of use.  

I have been trying to find out if there is any way to generate an index 'type' attribute to the Docbook back end so that I can generate specialized indexes in my Docbook/PDF output.

Does anyone know if this is possible?

Cheers,

Brian


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Specialized-Indexes-in-Asciidoc-to-Docbook-backend-tp3203.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Specialized Indexes in Asciidoc to Docbook backend

Blackstone67
Dan,
Thanks, I'll give that a shot.

Cheers,

Brian

mojavelinux wrote
Brian,

The index term macro is not currently extensible, meaning it does not
support arbitrary attributes (like an image, for example).

The best way to approach this would be to create a custom inline macro
using the Asciidoctor extension mechanism. You can return any string you
want from the process method of an inline macro, so you can create any
DocBook output you want.

You can find examples of inline macros in the extensions lab.

https://github.com/asciidoctor/asciidoctor-extensions-lab/tree/master/lib

Cheers,

-Dan

On Tue, May 12, 2015 at 6:25 PM, Blackstone67 [via Asciidoctor ::
Discussion] <[hidden email]> wrote:

> Hello,
> I'm relatively new to Asciidoctor but I'm quickly growing accustomed to
> the syntax and ease of use.
>
> I have been trying to find out if there is any way to generate an index
> 'type' attribute to the Docbook back end so that I can generate specialized
> indexes in my Docbook/PDF output.
>
> Does anyone know if this is possible?
>
> Cheers,
>
> Brian
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://discuss.asciidoctor.org/Specialized-Indexes-in-Asciidoc-to-Docbook-backend-tp3203.html
>  To start a new topic under Asciidoctor :: Discussion, email
> [hidden email]
> To unsubscribe from Asciidoctor :: Discussion, click here
> <http://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=ZGFuLmouYWxsZW5AZ21haWwuY29tfDF8MTY5MzI5MDU4>
> .
> NAML
> <http://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



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