Closed GarkGarcia closed 4 years ago
A PR is welcome.
Could you help me figuring out which is the relevant section for this fix? Where are AsciiMath blocks processed?
The regex to parse inline stem is at https://github.com/asciidoctor/asciidoctor-mathematical/blob/f81c3a0d3e4ea9fe10fa223010267b1239a030e5/lib/asciidoctor-mathematical/extension.rb#L9. You need to add one more for asciimath.
You need to handle asciimath stem blocks here at https://github.com/asciidoctor/asciidoctor-mathematical/blob/f81c3a0d3e4ea9fe10fa223010267b1239a030e5/lib/asciidoctor-mathematical/extension.rb#L72.
You need to handle asciimath inline macros here at https://github.com/asciidoctor/asciidoctor-mathematical/blob/f81c3a0d3e4ea9fe10fa223010267b1239a030e5/lib/asciidoctor-mathematical/extension.rb#L127.
The above three places shall be enough for asciimath support.
Alright. As soon as the new version of asciimath
get's released I'll work on this changes (I've just realized the changes were merged to the master
branch but they haven't being released to RubyGems yet).
Thanks for your contribution.
AsciiMath support is now viable via the recently integrated LaTeX backend of
asciidoctor/asciimath
! Rendering AsciiMath blocks should now be as simple as transpiling the block to LaTeX and rendering it with Mathematical.The only LaTeX command outputted by
asciidoctor/asciimath
which is not currently supported by Mathematical is\twoheadrightarrowtail
. Solutions to this issue are discussed in https://github.com/asciidoctor/asciimath/pull/17#issuecomment-621939890 and https://github.com/asciidoctor/asciimath/pull/17#issuecomment-622411392.