'Asciidoc: How can I format text in a user defined attribute?
When writing H~2~O in the text of an asciidoc document, it is rendered "H subscript(2) O",
However trying to define an attribute: :water: H~2~O and refer to the attribute in the text as {water} it is replaced by the verbatim definition of :water: or H~2~O. (the subscript formatting is not processed). And the question is: Can I define attributes with text formatting? (a workaround would be to use 'sed' for example, but it would be more elegant to do within asciidoc, if possible).
Solution 1:[1]
From this page of the documentation:
inline formatting in an attribute value isn’t interpreted
However, this can be changed by using the inline pass macro.
For example:
:water: pass:quotes[H~2~O]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Richard Smith |
