I have the following scene:
from manimlib.imports import *
class Surds(Scene):
def construct(self):
text_1 = TexMobject("\\sqrt{", "a", "\\times", "b", "} ")
text_1.set_color_by_tex("a", BLUE)
text_1.set_color_by_tex("b", YELLOW)
self.play(Write(text_1))
Which is meant to write the latex expression
\sqrt{a \times b}
With a coloured blue, and b coloured yellow.
Instead, something strange happens. The times symbol is coloured yellow, the 'top' of the surd is coloured blue, and the b doesn't render at all:
I'm certain that the surd is messing things up as the same colouring technique worked as intended in a different scene:
So how can I get colouring to work with the surd?
Side note: I also noticed that adding an additional 'b' on the end of the LaTeX expression makes the penultimate one render, but this isn't really a fix as the \sqrt spacing and colouring are still off:



