On Sat, Dec 3, 2011 at 2:20 AM, j. van den hoff <[email protected]> wrote: > I have a text with should contain the item > > HR^+^ > > i.e. a superscripted `+', sometimes repeatedly on a single line. without > the superscripting everything is fine. but with superscripting I get > xmllint errors and/or wrong html formatting. > > e.g. this input > > abc HR^\+^ def HR^\+^ > > generates this output (text approx.): > > abc HR^+ def HR^\+ > > so the second `\' appears verbatim in the output in the superscript. > > without quoting both `+' the output is (text approx) > > HR^ def HR > > with `def HR' set as superscript in monospace.
This is correct. Constructs like this are ambiguous, so to disambiguate the quotes are processed in the order defined in the asciidoc.conf file. In the standard asciidoc.conf + is before ^, so +^def HR^+ is seen as a monospaced that has a superscript nested inside it. And then the outer pair of ^ are seen as superscripting it all again. Not what you wanted but a valid interpretation none the less :) > > I presume it has to do with wrong interpretation as monospace markup or > similar but thought that single backslash quoting is the thing to do. > question: how can I consistently prevent character substitution/markup > interpretation of the `+' in the superscripts? The approach is as described in the manual, if character PAIRS you want as text are being interpreted as markup, escape the first character of the PAIR, and only if that still has problems escape further. Asciidoc is not a programming language, it mixes human language and markups and tries to accept as much of the wierd input us humans can generate without special handling. So sometimes it is going to take even the backslash as text if it isn't needed as an escape such as here. Cheers Lex > > thanks > joerg > > -- > Using Opera's revolutionary email client: http://www.opera.com/mail/ > > -- > You received this message because you are subscribed to the Google Groups > "asciidoc" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/asciidoc?hl=en. > -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/asciidoc?hl=en.
