On 11/12/10 03:13, Michael Wild wrote:
Hi all I can't seem to get the latexmath macro inside the footnote macro working properly. The example for the nested image macro works fine (http://www.methods.co.nz/asciidoc/faq.html#_why_am_i_having_trouble_getting_nested_macros_to_work), but for the latexmath macro, the</simpara></footnote> closing tags are placed inside the CDATA element. I suspect that the closing bracket of the latexmath macro is misinterpreted as the closing bracket of the footnote. E.g. the following sentence Pythagoras footnote:[The guy with latexmath:[$a^2+b^2=c^2$]] was born on the island 'Samos'. Results in Pythagoras<footnote><simpara>The guy with<inlineequation> <alt><![CDATA[$a^2+b^2=c^2$</simpara></footnote>]]></alt> <inlinemediaobject><textobject><phrase></phrase></textobject> </inlinemediaobject> </inlineequation> was born on the island<emphasis>Samos</emphasis>. Is there any easy fix for this? Replacing the math by an attribute reference doesn't work either...
The problem lies with macro nesting, the footnote macro terminates at the first ] character instead of the second. The only way round it that I can think of is to define another syntax for the latexmath inline macro so that it is parsed unambiguously e.g. redefine the double-dollar. Put this in a conf file:
[macros] (?su)[\\]?\$\$(?P<passtext>.*?)(?<!\\)\$\$=latexmath[] Now edit your source: Pythagoras footnote:[The guy with $$$a2+b2=c2$$$] was born on the island 'Samos'. Cheers, Stuart
Michael
-- 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.
