Asciimath to PDF

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Asciimath to PDF

WritesMessily
So I've been writing notes and assignments for my math course in Asciidoc -- specifically, using Asciimath stem,
because that's a lot quicker to type than latex.

I haven't been able to find a single toolchain that can turn my adoc file (with asciimath) into a pdf.
asciidoc-mathematical doesn't seem to support it, I wasn't able to get mathoid working, Publican
spat out the MathML and complained about it, I couldn't get fopub working, asciidoc-latex doesn't
support asciimath, pandoc didn't render the math right...

I ended up having to use wkhtmltopdf on my html file, which is pretty hacky.

What's the adoc w/ asciimath ==> pdf toolchain now? Does it exist?
Reply | Threaded
Open this post in threaded view
|

Re: Asciimath to PDF

mojavelinux
Administrator
The path to converting AsciiMath in AsciiDoc is as follows:

1. Install the asciimath gem (gem install asciimath)
2. Convert the file to DocBook (asciidoctor document.adoc)
3. Convert the DocBook file to PDF using a DocBook toolchain
  - One option is fopub, but you could also use any other DocBook toolchain

If you're using Apache FO, you do have to make sure it's configured to load JEuclid (jeuclid-fop), which is what provides the mathml rendering support. This appears as a jar on the classpath.


Unfortunately, AsciiMath isn't all that widely supported, so we're at the mercy of a toolchain that understands how to process mathml. The asciimath gem gets you to mathml. You have to take it the rest of the way, though fopub does attempt to help pave that path.

Cheers,

-Dan

On Wed, May 15, 2019 at 9:57 PM WritesMessily [via Asciidoctor :: Discussion] <[hidden email]> wrote:
So I've been writing notes and assignments for my math course in Asciidoc -- specifically, using Asciimath stem,
because that's a lot quicker to type than latex.

I haven't been able to find a single toolchain that can turn my adoc file (with asciimath) into a pdf.
asciidoc-mathematical doesn't seem to support it, I wasn't able to get mathoid working, Publican
spat out the MathML and complained about it, I couldn't get fopub working, asciidoc-latex doesn't
support asciimath, pandoc didn't render the math right...

I ended up having to use wkhtmltopdf on my html file, which
is pretty hacky.

What's the adoc w/ asciimath ==> pdf toolchain now? Does it exist?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciimath-to-PDF-tp6921.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux