Coder Social home page Coder Social logo

Comments (10)

jmshea avatar jmshea commented on May 25, 2024

Can you please try the following? Make a Markdown cell above your cell that calls JupyterQuiz and put any LaTeX in it. For instance, the following should just be a blank space:

$~$

Please let me know if that resolves that error, and then I will consider how to best mitigate this in general.

from jupyterquiz.

nvaytet avatar nvaytet commented on May 25, 2024

Hi there, I tried what you suggested but it did not make the error go away :-(

from jupyterquiz.

scott-yj-yang avatar scott-yj-yang commented on May 25, 2024

I have also encountered this error message, and the resulting quiz does not correctly typeset the math.
image
After looking into the console for error message, I found out that the error message is in this line:
image
my MathJax version is 3.2.2. Could you help me with this issue?

from jupyterquiz.

jmshea avatar jmshea commented on May 25, 2024

This is a strange error because MathJax.typeset() is definitely defined in MathJax 3.2.2.

Can you please provide more information to help me try to figure this out:

What is the environment you are running this in? Is this in JupyterLab or something else? What version?

Can you open the Javascript Console in your browser and capture the output after executing the code that causes the error you sent?

from jupyterquiz.

scott-yj-yang avatar scott-yj-yang commented on May 25, 2024

Thank you for your quick reply. I execute the notebook inside the conda environment. I tried both Jupyter notebook and JupyterLab, but yielded the same error message.

Name: notebook Version: 7.0.6
Name: jupyterlab Version: 4.0.10

The following is the console output of the Javascript.
image

from jupyterquiz.

jmshea avatar jmshea commented on May 25, 2024

This is actually affecting me, too. The issue is that in JupyterLab 4, the MathJax variable never gets updated to have the appropriate methods. I have not been able to figure out how to access the MathJax.typeset() method, so I have reached out on the JupyterLab Discourse. I will update when I known something more.

from jupyterquiz.

jmshea avatar jmshea commented on May 25, 2024

OK, I have coded up a solution that works for me, but it is a little "hacky". Basically, I check whether MathJax.typeset() is available if it looks like MathJax 3 is loaded. If it is not available, then I configure and load MathJax 3 myself. Can you try it out? You will need to install version 2.7.0a1:

pip install jupyterquiz==2.7.0a1

The make sure you restart your kernel and rerun your Jupyter notebook using JupyterQuiz. Let me know if that solves the issue for you and if it causes any undesirable side effects to the rest of your NB.

from jupyterquiz.

scott-yj-yang avatar scott-yj-yang commented on May 25, 2024

Thanks for the promptly reply! Yes, the version 2.7.0a1 resolve the rendering issue. Now the LaTeX math can be rendered normally.

from jupyterquiz.

jmshea avatar jmshea commented on May 25, 2024

Great! Please bump to 2.7.0a2 to get better support for dark mode themes.

from jupyterquiz.

jmshea avatar jmshea commented on May 25, 2024

I am going to leave this open until we get a proper fix from upstream

from jupyterquiz.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.