\not =, \neq, \ne, etc. not aligned correctly inside iframe [pen included]
See original GitHub issueBefore reporting a bug
- Check common issues.
- Check the bug is reproducible in the demo. If not, check KaTeX is up-to-date and installed correctly.
- Search for existing issues.
Describe the bug:
As the title says, \not =, \neq, \ne, etc. are not aligned correctly inside the iframe even though it loads fine outside an iframe; other things don’t seem to have issues, including fractions, which seems to have been reported before
(La)TeX code: The code of (La)TeX you tried to render:
a \ne b
a \neq b
a \not = b
(in math mode, both display and inline)
Expected behavior: i’d expect it to look the same inside and outside an iframe because everything else seems to do that
Pen: https://codepen.io/anon/pen/XLvvvL
Environment (please complete the following information):
- KaTeX Version: 0.10.2
- Device: MacBook Air 2018
- OS: OSX Mojave (10.14.5), also tested on Windows 10
- Browser: FireFox 68.0, Safari 12.1.1, Chrome 75.0.3770.142
- Version: see above?
Additional context: n/a; thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
The ultimate guide to iframes - LogRocket Blog
Not a fan of iframes? This post provides an overview of the tag's best features, shows you how to use them, and how...
Read more >how would i center this <iframe> on a webpage [duplicate]
The final solution, where adjusting the position is not an option, is to ensure that there is a width set on the parent...
Read more >Intent to Remove: Cross origin subframe JS Dialogs
I recall running into some issues when we deprecated modal dialogs inside `<iframe sandbox>` around pages that were building print-appropriate views in ......
Read more >Testing Guide - OWASP Foundation
ment organizations do not include security testing as part of their ... OWASP AppSec 2004 Conference in New York [5]: “If cars were...
Read more >BEM 101 - CSS-Tricks
The Block, Element, Modifier methodology (commonly referred to as BEM) is a popular naming convention for classes in HTML and CSS. Developed by ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Indeed, although I think they’re most often (?) used with
src, and in that context, it makes sense to inherit the DOCTYPE of the linked document.The problem is that the iframe doesn’t have a
<!DOCTYPE html>, so it’s running in quirks mode. Addingiframe.write('<!DOCTYPE html>')fixes the problem.I forget what our current state is with respect to quirks mode (level of support), but I think rendering issues like this are not unexpected.