deathbeds / ipydrawio

A standalone embedding of the FOSS drawio / mxgraph package into jupyterlab
https://ipydrawio.rtfd.io
Apache License 2.0
51 stars 4 forks source link

Mathematical Typesetting does not work with ipydrawio-mathjax installed #118

Closed xeliba closed 1 year ago

xeliba commented 1 year ago

Description

Turning on "Mathematical Typesetting" has no effect on formulas written in text boxes, e.g. like $$\alpha$$ or ``\alpha`` or \(\alpha\)

Reproduce

In the "Try Now" - Demo of this page https://ipydrawio.readthedocs.io/en/stable/index.html#try-it-now it does not work either.

Mathematical typesetting works well for me, when testing it here: https://www.diagrams.net/doc/faq/math-typesetting

Context

Required: installed server extensions
  Paste the output from running `jupyter server extension list` (JupyterLab >= 3)
  or `jupyter serverextension list` (JupyterLab < 3) from the command line here.
  You may want to sanitize the paths in the output.

Config dir: /home/jovyan/.jupyter

Config dir: /opt/conda/etc/jupyter
    ipydrawio_export enabled
    - Validating ipydrawio_export...
Package ipydrawio_export took 0.4316s to import
A `_jupyter_server_extension_points` function was not found in ipydrawio_export. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
      ipydrawio_export 1.2.2 OK
    jupyter_archive enabled
    - Validating jupyter_archive...
Package jupyter_archive took 0.0017s to import
      jupyter_archive 3.3.4 OK
    jupyter_lsp enabled
    - Validating jupyter_lsp...
Package jupyter_lsp took 0.0099s to import
A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
      jupyter_lsp 2.0.1 OK
    jupyter_server_proxy enabled
    - Validating jupyter_server_proxy...
Package jupyter_server_proxy took 0.1401s to import
      jupyter_server_proxy  OK
    jupyter_resource_usage enabled
    - Validating jupyter_resource_usage...
Package jupyter_resource_usage took 0.0102s to import
      jupyter_resource_usage 0.7.2 OK
    jupyter_server_fileid enabled
    - Validating jupyter_server_fileid...
Package jupyter_server_fileid took 0.0025s to import
      jupyter_server_fileid 0.9.0 OK
    jupyter_server_mathjax enabled
    - Validating jupyter_server_mathjax...
Package jupyter_server_mathjax took 0.0011s to import
      jupyter_server_mathjax  OK
    jupyter_server_terminals enabled
    - Validating jupyter_server_terminals...
Package jupyter_server_terminals took 0.0034s to import
      jupyter_server_terminals 0.4.4 OK
    jupyter_server_ydoc enabled
    - Validating jupyter_server_ydoc...
Package jupyter_server_ydoc took 0.0236s to import
      jupyter_server_ydoc 0.8.0 OK
    jupyterlab enabled
    - Validating jupyterlab...
Package jupyterlab took 0.0000s to import
      jupyterlab 3.6.3 OK
    jupyterlab_git enabled
    - Validating jupyterlab_git...
Package jupyterlab_git took 0.0171s to import
      jupyterlab_git 0.41.0 OK
    jupyterlab_link_share enabled
    - Validating jupyterlab_link_share...
Package jupyterlab_link_share took 0.0579s to import
      jupyterlab_link_share 0.3.0 OK
    jupyterlab_search_replace enabled
    - Validating jupyterlab_search_replace...
Package jupyterlab_search_replace took 0.0017s to import
      jupyterlab_search_replace 1.0.1 OK
    nbclassic disabled
    - Validating nbclassic...
      nbclassic  OK
    nbdime enabled
    - Validating nbdime...
Package nbdime took 0.0000s to import
      nbdime 3.1.1 OK
    notebook_shim enabled
    - Validating notebook_shim...
Package notebook_shim took 0.0000s to import
A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
      notebook_shim  OK
    sensirion_nbconflux enabled
    - Validating sensirion_nbconflux...
Package sensirion_nbconflux took 0.1862s to import
      sensirion_nbconflux 0.5.4 OK
    voila.server_extension enabled
    - Validating voila.server_extension...
Package voila.server_extension took 0.0058s to import
      voila.server_extension  OK

Config dir: /usr/local/etc/jupyter
Required: installed lab extensions
  Paste the output from running `jupyter labextension list` from the command line here.
  You may want to sanitize the paths in the output.

JupyterLab v3.6.3
/opt/conda/share/jupyter/labextensions
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        jupyter-matplotlib v0.11.3 enabled OK
        nbdime-jupyterlab v2.1.1 enabled OK
        jupyterlab-plotly v5.14.1 enabled OK
        jupyterlab-topbar-extension v0.6.1 enabled OK (python, jupyterlab-topbar)
        jupyterlab-link-share v0.3.0 enabled OK (python, jupyterlab-link-share)
        jupyterlab-code-snippets v2.1.0 enabled OK (python, code_snippet)
        jupyterlab-search-replace v1.0.1 enabled OK (python, jupyterlab-search-replace)
        jupyterlab-logout v0.5.99 enabled OK (python, jupyterlab-logout)
        spreadsheet-editor v0.6.99 enabled OK (python, jupyterlab-spreadsheet-editor)
        @jupyter-widgets/jupyterlab-manager v5.0.7 enabled OK (python, jupyterlab_widgets)
        @jupyterlab/git v0.41.0 enabled OK (python, jupyterlab-git)
        @jupyterlab/server-proxy v3.2.2 enabled OK
        @deathbeds/ipydrawio-mathjax v1.2.2 enabled OK (python, ipydrawio-mathjax)
        @deathbeds/ipydrawio-webpack v20.5.300 enabled OK (python, ipydrawio)
        @deathbeds/ipydrawio-notebook v1.2.2 enabled OK (python, ipydrawio)
        @deathbeds/ipydrawio v1.2.2 enabled OK (python, ipydrawio)
        @deathbeds/ipydrawio-pdf v1.2.2 enabled OK (python, ipydrawio-export)
        @deathbeds/ipydrawio-jupyter-templates v1.2.2 enabled OK (python, ipydrawio)
        @axlair/jupyterlab_vim v0.14.99 enabled OK (python, jupyterlab_vim)
        @sensirion/nbconflux v0.5.4 enabled OK (python, sensirion-nbconflux)
        @hadim/jupyter-archive v3.3.4 enabled OK (python, jupyter-archive)
        @jupyter-server/resource-usage v0.7.2 enabled OK (python, jupyter-resource-usage)
        @jlab-enhanced/recents v3.2.0 enabled OK (python, jupyterlab_recents)
        @ideonate/jupyter-containds v0.2.2 enabled OK
        @voila-dashboards/jupyterlab-preview v2.3.0-alpha.3 enabled OK (python, voila)
        @jupyter-lsp/jupyterlab-lsp v4.0.1 enabled OK (python, jupyterlab-lsp)

Other labextensions (built into JupyterLab)
   app dir: /opt/conda/share/jupyter/lab
        jupyterlab-dash v0.4.2 enabled OK
        jupyterlab-spreadsheet v0.4.1 enabled OK

Troubleshoot Output
  Paste the output from running `jupyter troubleshoot` from the command line here.
  You may want to sanitize the paths in the output.
Command Line Output
  Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output (recommended for all interface issues)
  Paste the output from your browser JavaScript console replacing the text in here.

To learn how to open the developer tools in your browser:
https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools#How_to_open_the_devtools_in_your_browser
If too many messages accumulated after many hours of working in JupyterLab, consider
refreshing the window and then reproducing the bug to reduce the noise in the logs.

There is no suspicious output on the Developer Tools Console

xeliba commented 1 year ago

Okay, I found the problem - it has nothing to do with my installation. And it's not a bug either.

If you want mathematical typesetting to take effect, you need to check the box for Formatted Text in the Text panel of the Format window.

example

Issue can be closed - but maybe it's helpful for other users.