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
using tag::foo[] around table rows #2632
Comments
When you use tags in an AsciiDoc document, you must hide them using a line comment.
Otherwise, they will be treated as content. The tag directives can appear anywhere on a line as long as it's the last thing on that line. |
(btw, we use this technical in a lot of places in the Asciidoctor user manual). |
I saw that comments were required in the docs - it didn't register originally for some reason and the other places I use the tags are never included anywhere except via the tag mechanism so it doesn't matter for them. I thought I tried that without success before I posted. However, I tried it again just and it's working. Thanks, and sorry to bother you with something that wound up being user error. |
I'm glad to hear it! |
I am designing a docset that uses a lot of tables. Each header, property, parameter, etc has its own row. Properties, parameters, etc that appear in many different calls/functions/methods are placed inside files in common directories and tagged using a set pattern for individual inclusion in the various tables. Rows that are specific to a single API call are placed in a data file for that call and defined there.
However I just encountered a specific case where I need to reuse some parameters in exactly two tables within the same call space. This case will occur in the majority of entries of a specific type of reference entry that does not have a common data file model because everything else is either a one off or reused across entries. Rather than littering the common files with these "two-off" rows, I tried doing it this way:
Table 1:
Table 2:
The tag works and table 2 includes the repeated row, but Table 1 thinks the tag start macro is part of the last heading and displays it there.
I realize why this is happening and that tables break on the | (on reflection, I am somewhat surprised the include worked), but am wondering if there's a way to override this and make the tag work without being visible - it would be a lot cleaner than the other solutions I can think of for single sourcing "two-off" rows where the reuse is within a small scope of the document (essentially the same reference page).
The text was updated successfully, but these errors were encountered: