commonmark / commonmark/cmark

[Feature] Support math environment via $ and $$ like LaTeX

Open
#439 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2k
Forks
691
Avg merge
1d 16h
Merged PRs (30d)
1

Description

Can we start a branch or anything to have another version that supports math inline and display style rendering just like LaTeX syntax?

So this line $f(x) = 1$ or $$ g(x)=2 $$

shall render directly as if typing LaTeX.

I was originally working on letting my self-hosted GitLab server accept LaTeX dollar expressions starting with $ or $$.
This is done by taking dollar as a special char as well as other special chars.

My solution: https://github.com/j7168908jx/commonmarker

Suggested from https://github.com/gjtorikian/commonmarker/issues/80

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing cmark's existing parsing and rendering entry points, then compare the linked commonmarker solution for handling dollar delimiters. Done means agreeing on the supported inline and display syntax, its output behavior, and coverage for both examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, latex
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.