Collecting all figures and code listings in an appendix

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Collecting all figures and code listings in an appendix

aalmiray
Hello everyone,

Is it possible to collect all figures and code listings (those with title and anchor at least) under a single section/appendix? I'm currently writing lots of code listings for the Griffon Guide and would like to offer such collection of links for people to have a quick glance. I've not found any description of this matter in the Asciidoctor User Guide so far :-/

Cheers,
Andres
Reply | Threaded
Open this post in threaded view
|

Re: Collecting all figures and code listings in an appendix

LightGuardjp
Administrator
I know you can do a glossary... but gathering up everything... probably not. You'd need to create an extension and walk the AST looking for the things you want.


On Fri, Jan 17, 2014 at 1:14 PM, aalmiray [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello everyone,

Is it possible to collect all figures and code listings (those with title and anchor at least) under a single section/appendix? I'm currently writing lots of code listings for the Griffon Guide and would like to offer such collection of links for people to have a quick glance. I've not found any description of this matter in the Asciidoctor User Guide so far :-/

Cheers,
Andres


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Collecting-all-figures-and-code-listings-in-an-appendix-tp1284.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: Collecting all figures and code listings in an appendix

aalmiray
Right, apparently you must also write down all entries in the glossary itself.
I was afraid you'd suggest writing an extension but pondering a bit more about it is the only way to go.

Thanks!
Andres
Reply | Threaded
Open this post in threaded view
|

Re: Collecting all figures and code listings in an appendix

glaforge
Automatic glossary, figures and code listings computation, are important features that are missing and would really be nice to have in Asciidoctor.


On Tue, Jan 21, 2014 at 8:24 PM, aalmiray [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Right, apparently you must also write down all entries in the glossary itself.
I was afraid you'd suggest writing an extension but pondering a bit more about it is the only way to go.

Thanks!
Andres


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Collecting-all-figures-and-code-listings-in-an-appendix-tp1284p1298.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Guillaume Laforge
Groovy Project Manager
Pivotal, Inc.

Reply | Threaded
Open this post in threaded view
|

Re: Collecting all figures and code listings in an appendix

mojavelinux
Administrator

On Tue, Jan 21, 2014 at 12:34 PM, glaforge [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Automatic glossary, figures and code listings computation, are important features that are missing and would really be nice to have in Asciidoctor.

Asciidoctor is gradually building up APIs to represent the internal model of the document. You can grab a list of figures from the references property on the document object (not yet mapped in AsciidoctorJ). The references object currently contains:

* ids
* footnotes
* links
* images (though not the qualified path)
* indexterms
* includes (used to check if cross references need to be expanded)

You can also use the new find_by method to extract blocks by id, context (i.e, type of block) and role. See http://rubydoc.info/gems/asciidoctor/Asciidoctor/AbstractBlock#find_by-instance_method. There is a similar method mapped in AsciidoctorJ under the StructuredDocument API.

We'll keep expanding these APIs. Glossary terms are definitely a key place to start.

Cheers,