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

KaTex rendering problem on mobile page.[overlapping problem] #543

Closed
prasanthown opened this Issue Oct 8, 2016 · 7 comments

Comments

Projects
None yet
4 participants
@prasanthown

prasanthown commented Oct 8, 2016

image
Why they are show like this and how to solve it.I was rendering the Katex into li tag
Here is My code:
$('.step_box').append("<li>"+katex.renderToString('x_2\=\\frac{-(10x^2)-5x}{10x^3}')+"</li>");

@prasanthown prasanthown changed the title from KaTex rendering problem on mobile page. to KaTex rendering problem on mobile page.[overlapping problem] Oct 8, 2016

@kevinbarabash

This comment has been minimized.

Member

kevinbarabash commented Oct 8, 2016

I'm surprised this is even rendering. I tried rendering x_2\=\\frac{-(10x^2)-5x}{10x^3} on khan.github.io/KaTeX and got a ParseError. After removing unnecessary backslashes it rendered x_2=\frac{-(10x^2)-5x}{10x^3} correctly.

screen shot 2016-10-08 at 10 18 47 am

@prasanthown can you try it again without the extra backslashes? Also, what version are you using?

@gagern

This comment has been minimized.

Collaborator

gagern commented Oct 8, 2016

Is this a page we can visit? If not, can you create a static version which reproduces the problem? From what browser (name and version) was the screenshot taken? Can this be reproduced with other browsers?

@xymostech

This comment has been minimized.

Contributor

xymostech commented Oct 8, 2016

@prasanthown Do you have a doctype on your page? KaTeX doesn't work in quirks mode, so you need to have a doctype on your page. Check if you have something like <!DOCTYPE html> at the top of your page.

@kevinbarabash it's in a javascript string, so the backslashes are escaping, so it makes sense that it rendered.

@kevinbarabash

This comment has been minimized.

Member

kevinbarabash commented Oct 8, 2016

@xymostech I think I need more sleep. I typed "x_2\=\\frac{-(10x^2)-5x}{10x^3}" into the console and got back "x_2=\frac{-(10x^2)-5x}{10x^3}" so it looks like browser is ignores the \ in front of the =.

@kevinbarabash

This comment has been minimized.

Member

kevinbarabash commented Oct 8, 2016

I'm really curious to find out where 67.08203932499369 is coming from.

@kevinbarabash

This comment has been minimized.

Member

kevinbarabash commented Jul 31, 2017

I'm going to close this as it was probably a doctoring issue and support for quirks mode has just landed on master.

@kevinbarabash

This comment has been minimized.

Member

kevinbarabash commented Jul 31, 2017

I ended up reverting #608 b/c quirks mode looks bad. I'm going to keep this issue closed though due to lack of additional information.

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