Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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).

like image 468
PolarBear2015 Avatar asked Nov 15 '25 15:11

PolarBear2015


1 Answers

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]
like image 197
Richard Smith Avatar answered Nov 18 '25 18:11

Richard Smith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!