Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STEM support #90

Open
eric-schneider opened this issue Jan 31, 2024 · 0 comments
Open

STEM support #90

eric-schneider opened this issue Jan 31, 2024 · 0 comments
Labels
enhancement New feature or request P2

Comments

@eric-schneider
Copy link
Contributor

eric-schneider commented Jan 31, 2024

There are certain pages in the docs where we may need to display equations and other types of math. Currently, we have to manually create SVG files to present this kind of information, which is labor-intensive to create, update, and make compatible with our CSS styles.

To alleviate this problem, the AsciiDoc language provides STEM support for embedding math-mode macros from LaTeX and/or AsciiMath notation as block or inline elements (see docs-ui preview). These elements act as passthroughs to preserve the expressions as entered. The expressions are then passed on to the converter to be processed and rendered for display using a STEM provider (e.g., MathJax).

The STEM provider must be configured in the output converter to render the expressions. As far as implementation goes, we should thoroughly review the discussion in Antora Issue #184 and investigate the options presented. The simplest approach would probably be to load MathJax via CDN on just the pages that use stem. (That's the approach the Apache Cassandra project went with: apache/cassandra-website#215.) However, as pointed out in the Antora discussion, using a CDN is a security risk. But providing an offline alternative might be tricky. The offline approach presented in this comment might be a good place to start since it appears to have the semi-endorsement of the Antora maintainers.

@eric-schneider eric-schneider added the enhancement New feature or request label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2
Projects
None yet
Development

No branches or pull requests

1 participant