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

Add maths rendering options #100

Open
fcooper8472 opened this issue Nov 1, 2023 · 0 comments
Open

Add maths rendering options #100

fcooper8472 opened this issue Nov 1, 2023 · 0 comments

Comments

@fcooper8472
Copy link
Member

We currently use rehype-katex for maths rendering.

It would be great if we could control options either at the section or course level (or both) using the markdown frontmatter.

The katex options are here:
https://katex.org/docs/options.html

So I would imagine something in the markdown for a section like:

katexDisplayMode: true

that would propagate through to toggle the katex displayMode option.

The other important option would be to allow custom macros, e.g. a katex macro specification like this:

macros: {
  "\\dd": "\\frac{{\\mathrm{d}#1}}{{\\mathrm{d}#2}}"
}

Again, ideally, by specifying these macros either in the section or course level.

I'm a little out of my depth, and can't look at this in the next week, but @martinjrobins has pointed me to:

gutenberg/lib/material.ts

for section and course types

and to

gutenberg/components/content/Content.tsx

for where the rehype plugin is used.

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

No branches or pull requests

1 participant