Thank you for the prompt answer.
- To the Table of Contents issues #1. I’ve found this In a table of contents, how to set the page number off to the right of justified entry text?, witty)), so I shouldn’t have bothered you. Sorry. You are right, section headings should be short, but I have to make a converter that produces typographic print ready result in any case. And this corner case is not so corner especially if we are autogenerating documentation. Anyway in my case odt is created programmatically, so I’ll try to find workaround solution with manually generated TOC (I mean layout). And here comes another question #3.
I could use table layouting, but I have not found “keep with next” attribute for a row. Am I right, it doesn’t exist? MS Word have a solution – to mark last paragraph of the last cell in a row with “keep with next” setting. Rather an ugly solution (as well as letting tabstop fall behind paragraph margin), in my opinion, but still works.
If no then putting page number in a frame looks like the only option.
- To the paragraph issue #2. I am really testing corner case and in the given example assume that the whole table should fall to the next page. If cell contents didn’t know about page breaks then we could have line broken across pages, but this doesn’t happen. So looks like it knows but to a limited extent. Really, if you allow to break row across pages then paragraph text flow setting should be respected. It would be strange for a paragraph with two lines to break between pages. Especially ugly in the last row of a table.
And here workaround is literally imposible. Probably to create a special table role in Asciidoc (last-row-keep-together). Just to mitigate the problem.