PolarBear2015
PolarBear2015

Reputation: 844

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

Upvotes: 4

Views: 781

Answers (1)

Richard Smith
Richard Smith

Reputation: 49722

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]

Upvotes: 7

Related Questions