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
auto-render default delimiters missing some environments #3661
Comments
How about all the matrix, bmatrix and cases and so on? Seems to me that all supported environments (as in https://katex.org/docs/support_table.html) should be included in the default list. It must be rather troublesome for users to have to dig around in their code to add new delimiters each time they have a new environment they want to add to their document. So maybe each time there's a new build with a new environment that's newly supported, it should be automatically added to the default delimiter list. I'm assuming there's no performance hit from such an arrangement - is that so? As for |
The environments I listed are all special because they enter math mode from text mode in LaTeX. I agree adding Out of curiosity, do you use |
I see - I wasn't aware of that (being an ASCIIMath input person). Is it documented? (I know your job isn't to teach people LaTeX, but for those of us who don't use it regularly, it's quite confusing why some things work without How about something like the following:
Then users won't have long lists to juggle. They'd either get the current defaults, or the lot. If it was me, I'd set the lot.
Actually, that thought occurred to me as well. It would be nice to have some kind of parameter on the render call, something like:
Or, given the above, allow another parameter, like:
Given the Other Library requires the user to specify I certainly do use $ with $ and would never use Final idea. If the above ideas don't wash, how about a simpler way of entering delimiters, rather than the current way which is error-prone. Rather than
How about
The longer version would be available for those wanting wacko left and right delimiters, or who want non-standard The two that don't fit into the |
auto-render's current default delimiters:
$$...$$
\(...\)
\begin{equation}...\end{equation}
\begin{align}...\end{align}
\begin{alignat}...\end{alignat}
\begin{gather}...\end{gather}
\begin{CD}...\end{CD}
\[...\]
Missing:
\begin{equation*}...\end{equation*}
\begin{align*}...\end{align*}
\begin{alignat*}...\end{alignat*}
\begin{gather*}...\end{gather*}
$...$
— shall we discuss adding this in, maybe together with [auto-render] add an option to ignore \$ outside of latex expressions #437? The code says:KaTeX/contrib/auto-render/auto-render.js
Lines 97 to 99 in 9164a15
@mbourne Let me know if there are others you know that are missing.
Discussed in #3659
Originally posted by mbourne June 15, 2022
I set up an auto render page from scratch recently and couldn't figure out why some of the environments worked, and others didn't.
Then I found this page https://katex.org/docs/autorender.html which lists the default delimiters for the API. To get all the math on the page to render, I needed to include the default delimiters as listed plus the ones I was using on the page.
I thought this created some confusion that could have been avoided if all the supported environments were included in the the default list. I'm assuming KaTeX goes looking for math within each delimiter pair one by one, but I expect there would be a negligible performance hit if it wasn't to find some (even most) of the delimiters.
Or am I missing something?
The text was updated successfully, but these errors were encountered: