Open dylanmccall opened 4 years ago
In the example, part of the full KaTeX expression looks to be in the LaTeX Computer Modern Font, so it might be the expresson was mis-parsed. @ivanistheone Do you think this could have been a error when scraping this content?
Here is the offending content on ck12.org, by the way:
Can't find the Definition of Derivative Practice, but the Kolibri version of this one works fine:
It looks like there was some translation of the 'align' environment to matrices, but the parser used to do the translation didn't recognize align* and didn't start/end each of the expressions wrapped in it's own environment. Maybe it was intentional to try to put these three expressions each as a line in a matrix? But that didn't work successfully if that was the intent.
I paused the javascript execution on ck-12 to get the source latex in the original form:
Finished rendering of the problem, no matrix is used:
\begin{align*}f(x)=x^2\end{align*}
\begin{align*}g(x)=12x+9\end{align*}
\begin{align*}h(x)=\frac{12}{4-x}\end{align*}
And the full html in the ck-12 page
<p>
If
<span class="x-ck12-mathjax">
<span class="MathJax_Preview">\begin{align*}f(x)=x^2\end{align*}</span><script type="math/tex">\begin{align*}f(x)=x^2\end{align*}</script>
</span>
<!--<img src="//www.ck12.org/flx/math/inline/f(x)%3Dx%5E2" class="x-ck12-math" alt="f(x)=x^2"> -->,
<span class="x-ck12-mathjax">
<span class="MathJax_Preview">\begin{align*}g(x)=12x+9\end{align*}</span><script type="math/tex">\begin{align*}g(x)=12x+9\end{align*}</script>
</span>
<!--<img src="//www.ck12.org/flx/math/inline/g(x)%3D12x%2B9" class="x-ck12-math" alt="g(x)=12x+9"> --> and
<span class="x-ck12-mathjax">
<span class="MathJax_Preview">\begin{align*}h(x)=\frac{12}{4-x}\end{align*}</span><script type="math/tex">\begin{align*}h(x)=\frac{12}{4-x}\end{align*}</script>
</span>
<!--<img src="//www.ck12.org/flx/math/inline/h(x)%3D%5Cfrac%7B12%7D%7B4-x%7D" class="x-ck12-math" alt="h(x)=\frac{12}{4-x}"> -->, then which of the following is true?
</p>
I'd be happy to try to pick up fixing this, is the code that was used to do the scraping open source? Would you like effort to be put in to trying to just manually update these type of problems so they render correctly in the short term?
Observed behavior
In the CK-12 Math content (channel ID
1d8f6d84618153c18c695d85074952a7
), mathematical notation is usually rendered nicely. However, in some exercises, it appears as the original latex source. For example, in Definition of Derivative Practice (node ID563c6392629e5cdd86b2027a8a5181c0
), the mathematical notation looks right:… while in Differentiability Implies Continuity Practice (node ID
5ddca1c75a1a5643baa8797c4cfea0fb
), it does not:Expected behavior
Instead, the mathematical notation should look nice in either case :)
User-facing consequences
The current situation makes it extremely difficult for an average learner to do certain exercises.
Errors and logs
Browser console (from Differentiability Implies Continuity Practice):
kolibri.txt (from loading Differentiability Implies Continuity Practice):
Context
The specific content I am referring to here is available from Kolibri Studio, in the CK-12 channel under Math / Calculus / Derivatives and Applications of Derivatives.
I have reproduced this behaviour in Kolibri 0.13.3 with Firefox 78.0, and the Kolibri GNOME app (WebKitGTK+).