-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating an AsciiDoc table with multiple AsciiDoc snippets #125
Comments
hi @ronaldtse thank you for initiating this discussion. i think i am following the logic here on your idea, but these are just my comments, so please provide feedback and correct my comments if they are wrong. in the content ( for example, do we want to allow a "table" within the cell? that would seem overly complex and not something regularly needed. i would say a table should not be allowed. the same goes with "headings" in a cell, we dont want those because it just does not make sense structurally, but i think we do want to support a cross-reference link to those "clauses/sub-clauses" in the same document. if we dont allow headers, then should we allow simple "bolding" of text to give the impression of a header? i am not sure, that would probably default back to how/if simple "bolding" is handled in metanorma. i think the following "supported subset" of asciidoc constructs that must be available for embedding within a cell:
the following constructs should also be considered but may not be possible (meaning i am not certain of my understanding of their support currently in metanorma) to support
i look forward to continuing this discussion. thank you. |
Thank you @ReesePlews , this is indeed the correct approach, which is to limit the features available as a subset through a defined "profile", which is a definition created through the task: In a profile, we need to define the following:
Would like to have the opinion of @opoudjis @hmdne @webdev778 @xyz65535 |
I have had a long history in Metanorma of ruling out possibilities as absurd, only for some SDO or other to shove them in there, and for me to be told that I have to support it. In fact, that is issue metanorma/mn-samples-itu#159 : I declined to model blocks as containing other blocks, on the grounds that it is absurd to do so, and impossible to reference them coherently, only for it to turn out that SDOs routinely did so. So:
metanorma/metanorma-standoc#790, from PDFA-ISO-32000 PDFA disagree with you, and tables within tables are on our to-do list. I think any attempt to constrain content in tables is pointless. So long as the customer is always right, the customer will always find an exception they want represented in tables. For coradoc to prevent that is simply going to mean that coradoc will be called upon to unprevent it in a year later. The only content you can assume won't go into table cells is entire clauses, and I wouldn't even be too sure of that. (Bilingual documents, realising parallel columns as tables: that is in fact a sticking point in the current implementation.) Recall that Asciidoctor initially assumed you would never put a footnote inside a table cell either, when they processed each cell as separate documents. Which is why we can't deduplicate table footnotes. You certainly can't assume includes won't be invoked within table cells; if anything, implementing a master document model is one of the reasons you're reimplementing Asciidoctor from scratch, since that is one of its more obvious shortcomings. If you want to implement these not as absolute blocks, but as SDO-specific profiles, you're pretty much outsourcing what Metanorma currently does in flavour-specific validation as XPath queries, into the document object model. You can do that, I suppose, but again, experience has shown that document authors and editors are indifferent to the style rules SDOs proclaim, and find our validation of them a nuisance. Cross-references, if I understand the question, should resolve outermost. The chopping up of a document into tiny little included bits is an editorial artifice; readers read the whole thing as a single document, and they would I assume expect the references to act that way too. (That is of course the thinking behind Asciidoctor's document model, and its lack of master document processing.) |
Remember the |
Not that me pointing this out is going to matter, but there is a difference in how people deal with a table cell and an entire standard, which is the subject of embed. The fact that you aren't seeing such a difference confirms that there is no point at all in constraining the contents of table cells, except as a validation exercise. |
thanks @ronaldtse and @opoudjis for the comments. there is a lot of deep asciidoc tech i am not familiar with. but i would think that without a set of guidelines, it would be too difficult to implement... but maybe it is implemented already and its just "putting that content" into the cell. i wont say much because i dont want to muddle up the discussion. i will make an edit to my initial list above, that adding "background color" of the cell (related to "style") would be a helpful feature. |
Suppose we have this table:
Each
file{n}
is a content like this:Clearly, we cannot naively include the inner content in the cell because the result will become invalid AsciiDoc.
There are two options we can process this table:
The questions:
The text was updated successfully, but these errors were encountered: