Skip to content

Add math latex support#703

Open
hypengw wants to merge 1 commit into
kovetskiy:masterfrom
hypengw:latex
Open

Add math latex support#703
hypengw wants to merge 1 commit into
kovetskiy:masterfrom
hypengw:latex

Conversation

@hypengw
Copy link
Copy Markdown
Contributor

@hypengw hypengw commented Jan 5, 2026

No description provided.

Comment thread markdown/markdown.go
// Must be registered with a higher priority than goldmark's linkParser to make sure goldmark doesn't parse
// the <ac:*/> tags.
util.Prioritized(cparser.NewConfluenceTagParser(), 199),
util.Prioritized(cparser.NewMathLatexParser(), 200),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this a feature similar to the mkdocsadmonitions above?

Comment thread renderer/mathlatex.go
func (r *ConfluenceMathLatexRenderer) renderBlock(w util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error) {
if entering {
node := n.(*cparser.MathLatexBlock)
quoteType := "ppl mathjax block macro"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a default in confluence or does it need to be installed separately?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can make the plugin name a command-line option.
I don’t think generating PNGs for math latex is a good approach.
Another option is to generate HTML with JavaScript resource, but the Confluence environment might be on a private network and unable to access external resources.

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 this pull request may close these issues.

2 participants