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 basic examples to body of Starter Template #3662

Open
edemaine opened this issue Jun 15, 2022 Discussed in #3660 · 2 comments
Open

Add basic examples to body of Starter Template #3662

edemaine opened this issue Jun 15, 2022 Discussed in #3660 · 2 comments

Comments

@edemaine
Copy link
Member

Discussed in #3660

Originally posted by mbourne June 15, 2022
It's been a long while since I used KaTeX "from scratch" so I made use of the Starter Template on this page: https://katex.org/docs/browser.html

I placed some equations in the body and loaded the page, but it just showed the equations as text. It turned out it was the issue I reported on the default delimiters - the environments I was using happened to not be in that default list. There was no error message since KaTeX just thought the page was devoid of math and I was stumped until I tried a few $$ ... $$ equations, which did work OK.

It would have helped if the Starter Template was a bit more extensive and included a body with some examples that will actually work out of the box, and a note that if other environments were required, to add an options object, as per https://katex.org/docs/autorender.html (or, if all supported environments were included in the defaults, as I mentioned.)

This will help people who are brand new to the library, I believe.

I'm sorry if this is documented somewhere and I missed it.

@mbourne feel free to submit a PR that replaces the ... in https://katex.org/docs/browser.html#starter-template with a <body> that has some actual math in it!

@mbourne
Copy link

mbourne commented Jun 16, 2022

"Nobody really understands git." I tried to create a PR but "Create pull request" was greyed out and life is short.

So here are 2 suggested templates for possible inclusion. The first is basic, intended for super-nubies. The second is a bit more extensive. If you end up including all supported environments in the default delimiters in the auto-render script, then I'll re-do the second one.

katex-starter-template-1.txt

katex-starter-template-2.txt

@mbourne
Copy link

mbourne commented Jul 19, 2022

Any update on this? As mentioned, I wasn't able to Create a PR.

I note the starter template has not changed.

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

No branches or pull requests

2 participants