asciidoctorJ: Table of figures/listings(code blocks)/tables/...

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

asciidoctorJ: Table of figures/listings(code blocks)/tables/...

schoenera
Hi,

we want to make it possible to generate necessary tables for different contents (figures/listings(code blocks)/tables/...).
It looks like writing a plugin for asciidoctorJ to match that goal is very difficult.

Perhaps someone can give us some useful hints.

We think about the following approach:
- First we want to scan the document to find the content which should be indexed.
- Then a description should be extracted and copied to a new File ( for example: tmpIndex.adoc) with the number of the page.
- The generated file should be included to the end of the document.

The problem would be, to find the specific content type in the source file and also get the corresponding page number of the final document.
Could this be done by one plugin or will be more plugins necessary?
Which kind of macroprocessor(tree-/ block-/...) should we use?


Cheers,
 Axel


--
M. Sc. Axel Schöner
Hochschule Kaiserslautern in Zweibrücken
FB Informatik / MST
Amerikastraße 1
D-66482 Zweibrücken
phone: 0631-3724 5544
email: axel.schoener@hs-kl.de
http://hs-kl.de/~axel.schoener/
-------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctorJ: Table of figures/listings(code blocks)/tables/...

schoenera
Am Mittwoch, 26. August 2015, 06:01:37 schrieben Sie:

>
> Hi,
>
> we want to make it possible to generate necessary tables for different
> contents (figures/listings(code blocks)/tables/...).
> It looks like writing a plugin for asciidoctorJ to match that goal is very
> difficult.
>
> Perhaps someone can give us some useful hints.
>
> We think about the following approach:
> - First we want to scan the document to find the content which should be
> indexed.
> - Then a description should be extracted and copied to a new File ( for
> example: tmpIndex.adoc) with the number of the page.

Because of generating html-files and not pdf-files page numbers are obsolete.
Instead we could use anchors to make them linkable.

> - The generated file should be included to the end of the document.
>
> The problem would be, to find the specific content type in the source file
> and also get the corresponding page number of the final document.
> Could this be done by one plugin or will be more plugins necessary?
> Which kind of macroprocessor(tree-/ block-/...) should we use?
>
>
> Cheers,
>  Axel
>
>
>


--
M. Sc. Axel Schöner
Hochschule Kaiserslautern in Zweibrücken
FB Informatik / MST
Amerikastraße 1
D-66482 Zweibrücken
phone: 0631-3724 5544
email: [hidden email]
http://hs-kl.de/~axel.schoener/
-------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctorJ: Table of figures/listings(code blocks)/tables/...

rockyallen
In reply to this post by schoenera
Is there any reason why you want to do this directly in asciidoctor? The docbook stylesheets can already do it, and are easy to customise if they are not exactly what you want.
Run asciidoctor with the docbook backend, then convert docbook to HTML or PDF as you want. (http://docbook.org/tdg5/index.html).
Installing the docbook toolchain can be  a pain, but there are several pre-packaged installers.