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

Math/LaTeX support in markup #234

Open
legendre6891 opened this issue Jun 10, 2024 · 2 comments
Open

Math/LaTeX support in markup #234

legendre6891 opened this issue Jun 10, 2024 · 2 comments

Comments

@legendre6891
Copy link

Hi, this looks like a great piece of software. I’m wondering if math is supported in the markup language?

e.g. either by relying on JS lib like MathJaX, or inline SVGs (in which case the user is responsible for generating the SVGs to include)

thanks!

@bouncepaw
Copy link
Owner

bouncepaw commented Jun 10, 2024

There's no direct support for math. At most, you can embed images, but not inline, only block. Do you think we should have math support? What kind of syntax would you expect?

@legendre6891
Copy link
Author

I think it would be great to have math support -- my personal notes have a lot of mathematical content it'd be a core feature for me (I'm surveying the personal wiki landscape and came across this project today).

As for syntax, I think it would make sense to use LaTeX's $ signs since that's the standard in the field. As for markup, I think pandoc has nice system. From here,

Anything between two $ characters will be treated as [inline] TeX math. The opening $ must have a non-space character immediately to its right, while the closing $ must have a non-space character immediately to its left, and must not be followed immediately by a digit. Thus, $20,000 and $30,000 won’t parse as math. If for some reason you need to enclose text in literal $ characters, backslash-escape them and they won’t be treated as math delimiters.

For display math, use $$ delimiters. (In this case, the delimiters may be separated from the formula by whitespace. However, there can be no blank lines between the opening and closing $$ delimiters.)

(Here, "display math" means: a centered math block, as opposed to inline.)

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

2 participants