0

I am using CoLab to prepare some teaching materials. This is great because students do not have to have python (etc.) installed on their machines. (Thanks to google!)

I want to embed some math code in a nested list. However, is is not rendered into math - the original code is remains visible.
Here is a code fragment:

  1. Simple
  2. Definition
    1. What
      1. Space $\dot{M}_{in}$

The problem seems to be related to the indenting. This code fragment renders correctly in CoLab:

  1. Simple
  2. Definition
    1. What
      1. Space

$\dot{M}_{in}$ <==== this is rendered in maths mode correctly on CoLab!


Using the workaround of having some math which is unindented in the unrendered code seems to fix the issue for the whole cell.

Notes:

  1. I am a noobie, so I apologise if this is just user error. These two cases display the problem very simply in google CoLab on up-to-date versions of both Firefox and Opera on up-to-date Windows. (Although the point of using CoLab is to avoid these dependencies as much as possible!)

  2. The rendering works as I expected (correctly?) in an Anaconda Jupyter Notebook.

  3. I am not sure how the rendering on stackoverflow will affect the examples - the difference between the two fragments is that in the second (correctly rendered one) the math has been typed on a new line with the indenting removed in the source).

Thanks in advance.

The workaround is fine. The maths is correctly rendered and embedded in the text as expected. The problem is fixed for the whole cell. But it is a cumbersome fix.

3
  • 1
    "The rendering works as I expected (correctly?) in an Anaconda Jupyter Notebook." Then use that. Google Colab is a less flexible offering to get you to use Google products. The open source Jupyter Community has plenty to offer. If you start with Jupyter now, you will still be able to use it when Google relegated Colab to the Google Graveyard, as many,many things end up there. Commented Aug 20, 2024 at 12:31
  • Thanks Wayne, however students with university supplied computers have had problems installing software. Using CoLab gets round that. Commented Aug 21, 2024 at 13:16
  • There are other ways around that aside from the most empowering, but often difficult to get implemented solution of the University providing resources, such as a JupyterHub, that the students should have for education. Anaconda Cloud and JupyterLite and MyBinder.org are all ways that are more flexible and offer better insight into the current ecosystem than Google Colab. See here for more about that latter two. Commented Aug 21, 2024 at 14:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.