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

Optional, but on by default syntax #399

Closed
hukkin opened this issue Jun 23, 2021 · 2 comments · Fixed by #505
Closed

Optional, but on by default syntax #399

hukkin opened this issue Jun 23, 2021 · 2 comments · Fixed by #505
Labels
documentation Improvements or additions to documentation

Comments

@hukkin
Copy link
Member

hukkin commented Jun 23, 2021

Why does MyST have optional syntax that is on by default. At least dollarmath is like this, and it feels counter intuitive to me. I'd expect anything that is on by default to be part of "core" MyST syntax.

If nothing else, I think this sentence should be fixed in the docs:

The following syntaxes are optional (disabled by default)

@chrisjsewell
Copy link
Member

See executablebooks/mdformat-myst#9 (comment);
It’s only dollarmath and that’s mainly for legacy reasons and a deprecation pathway is a bit of a pain

@choldgraf
Copy link
Member

choldgraf commented Jun 23, 2021

Yeah - to @chrisjsewell's point this is one reason that we moved dollarmath to the "optional" page in the latest docs refactor (#385 I believe). IMO it is less confusing to have an "optional syntax" that is "on by default" rather than to document an "optional syntax" in the "core syntax" page.

Maybe we should just add a quick note about this here: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#math-shortcuts

Something like

:::{note}
Dollar math is **on by default** even though it is an optional syntax.
This is because of its common use across many markdown editors, and for legacy purposes.
We may revisit whether to consider this as part of "core" syntax in the future.
:::

?

And I guess a related question is: since that syntax is optional, there is no "core syntax" way to define math other than using a {math} directive, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants