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

Feature Request: support for math rendering #170

Open
TheThirdOne opened this issue Apr 30, 2017 · 2 comments · May be fixed by #180
Open

Feature Request: support for math rendering #170

TheThirdOne opened this issue Apr 30, 2017 · 2 comments · May be fixed by #180

Comments

@TheThirdOne
Copy link

It would be nice to be able to include math mode latex in presentations.

I was thinking of overloading code blocks to hook into a latex renderer, but when looking through the code, I didn't see an easy way to put a custom renderer for marked.

More generally having a quick way to put in a custom renderer would allow a variety of small extensions to be made.

@sudodoki
Copy link
Collaborator

sudodoki commented Jun 7, 2017

@cben
Copy link

cben commented May 22, 2018

One option that might be easy is switching to kramed, a fork of marked with some changes, including proper math support. It uses kramdown math syntax — $$ delimeters for both inline and display math (https://github.com/GitbookIO/kramed/blob/master/test/tests/math.text).

If not, simplest implementation-wise are literal-based math syntaxes, like what you wanted.
Their beauty is you don't really need to modify/hook the renderer; I believe you could run marked (or any markdown rendered) as-is, then you look for code tags with class="texmath" and post-process those.
Inline math is trickier as there is no agreed syntax to specify "language" of inline literals. For instance Gitlab went with $`a^2+b^2`$ syntax.
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4638 for how they did this.

I'm collecting math-in-markdown syntaxes at https://github.com/cben/mathdown/wiki/math-in-markdown.

@blu3r4y blu3r4y linked a pull request Oct 19, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants