fix tex.#26
Conversation
|
Cool, I wondered what the best to do this was. I had a similar thought but never knew if there were any caveats. To finish this, I think we'd need to add KaTeX to this (I've been eyeing that one), either as an explicit script import, or lazy loaded if $$ or $ is present in any of the markdown cells. So that it works out of the box. We'll then get a few math notebooks to test it out. Also, you don't have to sign your code, there's git blame for that :-) |
|
|
||
| dm = d.createElement('pre'); | ||
| dm.style.margin = 0; | ||
| dm.className = 'illustration-title'; // fixed: some outputs may be customized hidden, by nagexiucai |
There was a problem hiding this comment.
Sorry, maybe i should comment it?
users can make 'display_data' hidden by using the 'illustration-title' like "display: none;", we konw.
There was a problem hiding this comment.
I'd drop it, let the illustration title be seen.
There was a problem hiding this comment.
Okay, that is good, i can understand, the "illustration-title" is a temporary thing of mine, styles should be managed elsewhere.
| // for exsample: render tex by '[kates](https://github.com/Khan/KaTeX) | ||
| // var maths = document.getElementsByClassName("math"); | ||
| // for(var i=0; i<maths.length; i++) { | ||
| // katex.render(maths[i].getAttribute("tex"), maths[i], { |
There was a problem hiding this comment.
If you'll be using this code to implement KaTeX, please use single quotes instead of double quotes, just for consistency sake.
|
Yes, "explicit script import, or lazy loaded if $$ or $ is present in any of the markdown cells" is good. |
|
I'd just <script> a Cloudflare-hosted version of KaTeX (a current stable version, minified) into viewer.html and scaffold.html. Then you can uncomment that piece of code that does the rendering and then we can both test it live! |
something of math, such as formula, in tex are not renderd properly.
and something like description of matplotlib.pyplot's output <matplotlib.figure.Figure at 0xd4f9860> may be customized hidden.