Totally agree with Dan. Asciidoc is a semantic markup, not just a presentational layout tool. The semantics of a section inside a table doesn't make sense. So it should not be in the standard language.
You can add roles to titles anywhere, and customise the presentation layer to add them to the toc by Asciidoctor extension, Asciidoc Python JS or docbook toolchain XSLT (IIUC). Cheers Lex On Mon, 29 Oct 2018 at 07:39, Dan Allen <[email protected]> wrote: > > It may not be a well-established semantic from your perspective, but alas, my > point still stands that I've never in my life seen a book that defines a TOC > that includes sections defined inside of a table cell. That's just not what a > TOC is. So if we started doing that, it would surprise a lot of people. And > that's why I make that point. We can't change the behavior for just one use > case. > > And that's why extensions exist. I want to be clear that it is entirely > possible to accomplish what you want to accomplish using either the extension > mechanism in Asciidoctor (or JavaScript, if you are stuck with AsciiDoc Py). > It's just not *default* behavior. > > The way I would go about this in Asciidoctor is to create a custom block > macro. Then you can insert any kind of content listing anywhere in the > document. See https://asciidoctor.org/docs/user-manual/#extensions for a list > of extension points and > https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/master/lib/tree-block-macro/extension.rb > for an example of a block macro. > > Cheers, > > -Dan > > On Sun, Oct 28, 2018 at 9:59 AM rdp via asciidoc <[email protected]> > wrote: >> >> Hello Lex and Dan >> >> Thank you very much for your answers and explanations! >> >> Yes, I can imagine very well that it is very tricky to handle this use case, >> but it is still a pity that AsciiDoc is not able to handle text which is >> explicitly marked as a :toc: Element anywhere in the hierarchy. >> >> For us, it's not at all a "well-established semantic" :-) >> We use it in technical documents when a table is the best solution to >> describe contexts and if we would like to have table lines listed in the >> :toc:, so that the reader is able to see that they exist and easily can find >> them. >> This offers us to have two advantages: the benefits of the toc and the >> advantages of the table. >> >> Of course, any table can be transformed into a sequential text, but then we >> lose the overview and readability. >> At least, this is a somewhat ugly workaround (the readers will ask us why we >> didn't have created a table). >> >> Thanks a lot for your support, >> kind regards, >> Thomas >> >> -- >> You received this message because you are subscribed to the Google Groups >> "asciidoc" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/asciidoc. >> For more options, visit https://groups.google.com/d/optout. > > > > -- > Dan Allen | @mojavelinux | https://twitter.com/mojavelinux > > -- > You received this message because you are subscribed to the Google Groups > "asciidoc" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/asciidoc. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/asciidoc. For more options, visit https://groups.google.com/d/optout.
