On Sun, 28 Oct 2018 at 05:59, rdp via asciidoc <[email protected]> wrote: > > Good evening > > Sometimes, it would be useful to add headings (Titles) in table cells, a > simplified example: >
In general Asciidoc table contents are limited to block level elements, not section level headings. Section headings must be at top level, not within any blocks. Some implementations may not generate an error when input does not meet these requirements. > > Is it possible to write an AsciiDoc document which handles all Headings / > Titles as globals (independent of the surrounding element), so that: > > The Titles are displayed in :toc: > The Titles get the right :sectnums: numbers > > Here is the simplified example: > > :toc: > :sectnums: > > = Example > > == Test with Titles in a Table > > [options="header",cols="10a,30"] > |=== > | Subject | Notes > > .2+| === Subject 1 > | (Note 1, Subject 1) > | (Note 2, Subject 1) > > | === Subject 2 > | (Note 1, Subject 2) > > |=== > That example would not be possible as written, section markups are defined to be at the start of the line and should not be recognised elsewhere. To be properly compliant the section markup would need to be on the next line. It may be recognised by the Asciidoc Python implementation because it invokes a new Asciidoc processor to process the cell content and that sees the section markup at the start of the content. But of course this means no context about containing sections is available. Allowing sections inside blocks also changes the definition of when a section ends. As there is no section end markup in Asciidoc it is defined to end at the next section at the same or higher level. A section embedded inside a block like a table cell would have to end at the end of the block, not at the next section. And of course it would have to be a nested level. In theory its possible to define the above changes and at least HTML5 output allows headers inside table data, but a decision would have to be made to change the definition of Asciidoc to allow it, but I'm not sure it should be, and further discussion is needed, and then somebody would have to implement it including in the backends that supported it, and change TOC processors to look below top level for "TOCable" elements. Cheers Lex > > > Thanks a lot for any clarification, > kind regards, > Tom > > -- > 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.
