asciidoctor / asciidoctor-mathematical

An extension for Asciidoctor that converts the content of STEM blocks and inline macros using Mathematical.
MIT License
50 stars 45 forks source link

Setting the stem attribute doesn't take effect #89

Closed mcp292 closed 3 years ago

mcp292 commented 3 years ago

If I set the :stem: attribute :stem: latexmath and try to use inline stem

stem:[\forall x \in X, \quad \exists y \leq \epsilon]

it doesn't render properly. I have to explicitly name the macro for it to work

latexmath:[\forall x \in X, \quad \exists y \leq \epsilon]
ProgramFan commented 3 years ago

I will check it.

marioortizmanero commented 3 years ago

Sorry to bump, but has there been any progress in this? It's a bit weird because non-inline math with [stem] does show up without problems. A workaround would be enough for now but I don't know enough Asciidoc for that :/

But this library seems a bit abandoned altogether. Is there a newer alternative or something that has appeared?

mcp292 commented 3 years ago

@marioortizmanero This is the non-asciidoctor workaround I'm using: https://superuser.com/a/1586450/1183493.

mojavelinux commented 3 years ago

The same problem occurs for AsciiMath if the stem attribute is set to asciimath or blank (which has an implicit value of asciimath).

The problem is that the inline stem macro is not being treated as an alias for asciimath or latexmath. Instead, it's being processed as something entirely different, which is incorrect.

I'll submit a PR.

mojavelinux commented 3 years ago

@ProgramFan Can you please make a new release?

ProgramFan commented 3 years ago

I can do this. But I am not the owner of the gem on rubygems.org. We'd better refer to @tstumm for a release or a transfer-the-maintainership permission.

ProgramFan commented 3 years ago

I am also considering refactor this gem to support multiple backends since the library behind mathematical is not well maintained. But I will find time only after the busy end of the year.

mojavelinux commented 3 years ago

@ProgramFan Oh, thanks for letting me know. I did not know (or did not remember) who owned the gem on rubygems.org.

@tstumm Are you able to continue to release this gem? If so, can you make a new release? The release is now handled by GitHub Actions since Travis CI is no longer open source friendly. You'll first need to define the RUBYGEMS_API_KEY secret under Settings > Secrets so the GitHub Actions release workflow will complete when you push the tag.

Either way, can you also add me (mojavelinux) as an owner of the gem on rubygems.org (at https://rubygems.org/gems/asciidoctor-mathematical/owners)? I should have asked that when we transferred the repo to the asciidoctor organization. Thanks!

mojavelinux commented 3 years ago

I am also considering refactor this gem to support multiple backends since the library behind mathematical is not well maintained.

That is fantastic news. Please reach out to the other Asciidoctor developers in https://gitter.im/asciidoctor/asciidoctor if you need help.

tstumm commented 3 years ago

@mojavelinux Thanks for your efforts! I added you as an owner of this package in rubygems but also added the API key to the secrets.

We still need to bump the version though, but then we can tag a new release.

mojavelinux commented 3 years ago

Thanks @tstumm!

GitHub Actions is configured to publish the gem to rubygems.org when a tag is pushed. See https://github.com/asciidoctor/asciidoctor-mathematical/blob/master/.github/workflows/release.yml. If for some reason it fails to run, I'll be around to help fix it.

mojavelinux commented 3 years ago

It succeeded!! :tada: https://rubygems.org/gems/asciidoctor-mathematical/versions/0.3.5