Open jxxcarlson opened 9 years ago
There isn't really a way to do this yet in core. Unless you are tying into the stem inline macro or block, you have to do these replacements manually.
One possibility is to monkeypatch (or, more correctly, use the prepend feature in Ruby) the content method so that it calls your customized version. That way, you can intercept all calls to content and perform custom logic.
LaTeX output support in asciidoctor/asciimath
has just shipped!
The only LaTeX commands outputted by asciidoctor/asciimath
which are not currently supported by asciidoctor-latex
are \mathscr
and \twoheadrightarrowtail
. All other commands and environments used are covered by amssymb
and amsmath
(and vanilla LaTeX).
@jxxcarlson I'm interested in writing a PR to fix this issue. Could you help me figure out which is the relevant section of code?
@mojavelinux or @jirutka, I have a question. In order to convert stem, asciimath input to LaTeX, I need to call something in the core to do the conversion for the LaTeX backend. For example, I need to map
sqrt(2)
to\sqrt(2)
. There must be something in the core that does this, so all I would need to do is call the right method onnode.content
go get the converted text. Could you tell me how to do this.