using windows 10, latest miktex with all packages, running on python 3.8.6 -not 3.9.0 because scipy doesn't support it yet-, lastest SoX, latest FFmpeg version.
I installed everything important and having no problem running examples with no texts such as (SquareToCircle), but i get warnings and exceptions when running (WriteStuff) or any other text-containing animation:

I tried everything, reinstalled everything.. added all important paths(SoX,MikTeX,FFmpeg), edited some parts of (tex_mobject.py) and didn't work so stepped back,i did everything and nothing worked, what could be the reason of the issue..?
Hey man.
The code works fine for me. What you want to do:
class TexMobject(SingleStringTexMobject):
CONFIG = {
"arg_separator": " ",
"substrings_to_isolate": [],
"tex_to_color_map": {},
}
def __init__(self, *tex_strings, **kwargs):
digest_config(self, kwargs)
tex_strings = self.break_up_tex_strings(tex_strings)
self.tex_strings = tex_strings
SingleStringTexMobject.__init__(
self, self.arg_separator.join(tex_strings), **kwargs
)
self.break_up_by_substrings()
self.set_color_by_tex_to_color_map(self.tex_to_color_map)
if self.organize_left_to_right:
self.organize_submobjects_left_to_right()
def break_up_tex_strings(self, tex_strings):
substrings_to_isolate = op.add(
self.substrings_to_isolate,
list(self.tex_to_color_map.keys())
)
split_list = split_string_list_to_isolate_substrings(
tex_strings, *substrings_to_isolate
)
if self.arg_separator == ' ':
split_list = [str(x).strip() for x in split_list]
#split_list = list(map(str.strip, split_list))
split_list = [s for s in split_list if s != '']
return split_list
def break_up_by_substrings(self):
"""
Reorganize existing submojects one layer
deeper based on the structure of tex_strings (as a list
of tex_strings)
"""
new_submobjects = []
curr_index = 0
config = dict(self.CONFIG)
config["alignment"] = ""
for tex_string in self.tex_strings:
sub_tex_mob = SingleStringTexMobject(tex_string, **config)
num_submobs = len(sub_tex_mob.submobjects)
new_index = curr_index + num_submobs
if num_submobs == 0:
# For cases like empty tex_strings, we want the corresponing
# part of the whole TexMobject to be a VectorizedPoint
# positioned in the right part of the TexMobject
sub_tex_mob.submobjects = [VectorizedPoint()]
last_submob_index = min(curr_index, len(self.submobjects) - 1)
sub_tex_mob.move_to(self.submobjects[last_submob_index], RIGHT)
else:
sub_tex_mob.submobjects = self.submobjects[curr_index:new_index]
new_submobjects.append(sub_tex_mob)
curr_index = new_index
self.submobjects = new_submobjects
return self
def get_parts_by_tex(self, tex, substring=True, case_sensitive=True):
def test(tex1, tex2):
if not case_sensitive:
tex1 = tex1.lower()
tex2 = tex2.lower()
if substring:
return tex1 in tex2
else:
return tex1 == tex2
return VGroup(*[m for m in self.submobjects if test(tex, m.get_tex_string())])
def get_part_by_tex(self, tex, **kwargs):
all_parts = self.get_parts_by_tex(tex, **kwargs)
return all_parts[0] if all_parts else None
def set_color_by_tex(self, tex, color, **kwargs):
parts_to_color = self.get_parts_by_tex(tex, **kwargs)
for part in parts_to_color:
part.set_color(color)
return self
def set_color_by_tex_to_color_map(self, texs_to_color_map, **kwargs):
for texs, color in list(texs_to_color_map.items()):
try:
# If the given key behaves like tex_strings
texs + ''
self.set_color_by_tex(texs, color, **kwargs)
except TypeError:
# If the given key is a tuple
for tex in texs:
self.set_color_by_tex(tex, color, **kwargs)
return self
def index_of_part(self, part):
split_self = self.split()
if part not in split_self:
raise Exception("Trying to get index of part not in TexMobject")
return split_self.index(part)
def index_of_part_by_tex(self, tex, **kwargs):
part = self.get_part_by_tex(tex, **kwargs)
return self.index_of_part(part)
def sort_alphabetically(self):
self.submobjects.sort(
key=lambda m: m.get_tex_string()
)
Send your implementation of TexMobject. Open the last file in that traceback; that's where it is.
i used an online merging website to compare my TexMobject class with yours, and they are absolutely the same, not a single difference..
note: mine is on the left, yours on the right:

so the problem isn't from TexMobject class, do you have any other suggestions?
and thank you for your reply :D
Oh yes I have quite a number of suggestions.
I've dug a bit deeper into how Manim handles the svg files it produces.
It's not obvious at first but the UserWarnings in g0-84 refer to ids in the svg file. To see what I'm talking about, open the svg file in a web browser and open the source with Ctrl + U.
This is way deeper than I thought. I think I have a quick fix hack that may ruin the working of the code but have that particular bit work. When I understand this code deeper I'll get back to you
So you have an online merging website?
Here's my svg class. Find yours at manimlib\mobject\svg\svg_mobject.py
class SVGMobject(VMobject):
CONFIG = {
"should_center": True,
"height": 2,
"width": None,
# Must be filled in in a subclass, or when called
"file_name": None,
"unpack_groups": True, # if False, creates a hierarchy of VGroups
"stroke_width": DEFAULT_STROKE_WIDTH,
"fill_opacity": 1.0,
# "fill_color" : LIGHT_GREY,
}
def __init__(self, file_name=None, **kwargs):
digest_config(self, kwargs)
self.file_name = file_name or self.file_name
self.ensure_valid_file()
VMobject.__init__(self, **kwargs)
self.move_into_position()
def ensure_valid_file(self):
if self.file_name is None:
raise Exception("Must specify file for SVGMobject")
possible_paths = [
os.path.join(os.path.join("assets", "svg_images"), self.file_name),
os.path.join(os.path.join("assets", "svg_images"), self.file_name + ".svg"),
os.path.join(os.path.join("assets", "svg_images"), self.file_name + ".xdv"),
self.file_name,
]
for path in possible_paths:
if os.path.exists(path):
self.file_path = path
return
raise IOError("No file matching %s in image directory" %
self.file_name)
def generate_points(self):
doc = minidom.parse(self.file_path)
self.ref_to_element = {}
for svg in doc.getElementsByTagName("svg"):
mobjects = self.get_mobjects_from(svg)
if self.unpack_groups:
self.add(*mobjects)
else:
self.add(*mobjects[0].submobjects)
doc.unlink()
def get_mobjects_from(self, element):
result = []
if not isinstance(element, minidom.Element):
return result
if element.tagName == 'defs':
self.update_ref_to_element(element)
elif element.tagName == 'style':
pass # TODO, handle style
elif element.tagName in ['g', 'svg', 'symbol']:
result += it.chain(*[
self.get_mobjects_from(child)
for child in element.childNodes
])
elif element.tagName == 'path':
temp = element.getAttribute('d')
if temp != '':
result.append(self.path_string_to_mobject(temp))
elif element.tagName == 'use':
result += self.use_to_mobjects(element)
elif element.tagName == 'rect':
result.append(self.rect_to_mobject(element))
elif element.tagName == 'circle':
result.append(self.circle_to_mobject(element))
elif element.tagName == 'ellipse':
result.append(self.ellipse_to_mobject(element))
elif element.tagName in ['polygon', 'polyline']:
result.append(self.polygon_to_mobject(element))
else:
pass # TODO
# warnings.warn("Unknown element type: " + element.tagName)
result = [m for m in result if m is not None]
self.handle_transforms(element, VGroup(*result))
if len(result) > 1 and not self.unpack_groups:
result = [VGroup(*result)]
return result
def g_to_mobjects(self, g_element):
mob = VGroup(*self.get_mobjects_from(g_element))
self.handle_transforms(g_element, mob)
return mob.submobjects
def path_string_to_mobject(self, path_string):
return VMobjectFromSVGPathstring(path_string)
def use_to_mobjects(self, use_element):
# Remove initial "#" character
ref = use_element.getAttribute("xlink:href")[1:]
print("Did anyone call this method? Guys?")
if ref not in self.ref_to_element:
warnings.warn("%s not recognized" % ref)
return VGroup()
return self.get_mobjects_from(
self.ref_to_element[ref]
)
def attribute_to_float(self, attr):
stripped_attr = "".join([
char for char in attr
if char in string.digits + "." + "-"
])
return float(stripped_attr)
def polygon_to_mobject(self, polygon_element):
# TODO, This seems hacky...
path_string = polygon_element.getAttribute("points")
for digit in string.digits:
path_string = path_string.replace(" " + digit, " L" + digit)
path_string = "M" + path_string
return self.path_string_to_mobject(path_string)
# <circle class="st1" cx="143.8" cy="268" r="22.6"/>
def circle_to_mobject(self, circle_element):
x, y, r = [
self.attribute_to_float(
circle_element.getAttribute(key)
)
if circle_element.hasAttribute(key)
else 0.0
for key in ("cx", "cy", "r")
]
return Circle(radius=r).shift(x * RIGHT + y * DOWN)
def ellipse_to_mobject(self, circle_element):
x, y, rx, ry = [
self.attribute_to_float(
circle_element.getAttribute(key)
)
if circle_element.hasAttribute(key)
else 0.0
for key in ("cx", "cy", "rx", "ry")
]
return Circle().scale(rx * RIGHT + ry * UP).shift(x * RIGHT + y * DOWN)
def rect_to_mobject(self, rect_element):
fill_color = rect_element.getAttribute("fill")
stroke_color = rect_element.getAttribute("stroke")
stroke_width = rect_element.getAttribute("stroke-width")
corner_radius = rect_element.getAttribute("rx")
# input preprocessing
if fill_color in ["", "none", "#FFF", "#FFFFFF"] or Color(fill_color) == Color(WHITE):
opacity = 0
fill_color = BLACK # shdn't be necessary but avoids error msgs
if fill_color in ["#000", "#000000"]:
fill_color = WHITE
if stroke_color in ["", "none", "#FFF", "#FFFFFF"] or Color(stroke_color) == Color(WHITE):
stroke_width = 0
stroke_color = BLACK
if stroke_color in ["#000", "#000000"]:
stroke_color = WHITE
if stroke_width in ["", "none", "0"]:
stroke_width = 0
if corner_radius in ["", "0", "none"]:
corner_radius = 0
corner_radius = float(corner_radius)
if corner_radius == 0:
mob = Rectangle(
width=self.attribute_to_float(
rect_element.getAttribute("width")
),
height=self.attribute_to_float(
rect_element.getAttribute("height")
),
stroke_width=stroke_width,
stroke_color=stroke_color,
fill_color=fill_color,
fill_opacity=opacity
)
else:
mob = RoundedRectangle(
width=self.attribute_to_float(
rect_element.getAttribute("width")
),
height=self.attribute_to_float(
rect_element.getAttribute("height")
),
stroke_width=stroke_width,
stroke_color=stroke_color,
fill_color=fill_color,
fill_opacity=opacity,
corner_radius=corner_radius
)
mob.shift(mob.get_center() - mob.get_corner(UP + LEFT))
return mob
def handle_transforms(self, element, mobject):
x, y = 0, 0
try:
x = self.attribute_to_float(element.getAttribute('x'))
# Flip y
y = -self.attribute_to_float(element.getAttribute('y'))
mobject.shift(x * RIGHT + y * UP)
except:
pass
transform = element.getAttribute('transform')
try: # transform matrix
prefix = "matrix("
suffix = ")"
if not transform.startswith(prefix) or not transform.endswith(suffix):
raise Exception()
transform = transform[len(prefix):-len(suffix)]
transform = string_to_numbers(transform)
transform = np.array(transform).reshape([3, 2])
x = transform[2][0]
y = -transform[2][1]
matrix = np.identity(self.dim)
matrix[:2, :2] = transform[:2, :]
matrix[1] *= -1
matrix[:, 1] *= -1
for mob in mobject.family_members_with_points():
mob.points = np.dot(mob.points, matrix)
mobject.shift(x * RIGHT + y * UP)
except:
pass
try: # transform scale
prefix = "scale("
suffix = ")"
if not transform.startswith(prefix) or not transform.endswith(suffix):
raise Exception()
transform = transform[len(prefix):-len(suffix)]
scale_values = string_to_numbers(transform)
if len(scale_values) == 2:
scale_x, scale_y = scale_values
mobject.scale(np.array([scale_x, scale_y, 1]), about_point=ORIGIN)
elif len(scale_values) == 1:
scale = scale_values[0]
mobject.scale(np.array([scale, scale, 1]), about_point=ORIGIN)
except:
pass
try: # transform translate
prefix = "translate("
suffix = ")"
if not transform.startswith(prefix) or not transform.endswith(suffix):
raise Exception()
transform = transform[len(prefix):-len(suffix)]
x, y = string_to_numbers(transform)
mobject.shift(x * RIGHT + y * DOWN)
except:
pass
# TODO, ...
def flatten(self, input_list):
output_list = []
for i in input_list:
if isinstance(i, list):
output_list.extend(self.flatten(i))
else:
output_list.append(i)
return output_list
def get_all_childNodes_have_id(self, element):
all_childNodes_have_id = []
if not isinstance(element, minidom.Element):
return
if element.hasAttribute('id'):
return [element]
for e in element.childNodes:
all_childNodes_have_id.append(self.get_all_childNodes_have_id(e))
return self.flatten([e for e in all_childNodes_have_id if e])
def update_ref_to_element(self, defs):
new_refs = dict([(e.getAttribute('id'), e) for e in self.get_all_childNodes_have_id(defs)])
self.ref_to_element.update(new_refs)
def move_into_position(self):
if self.should_center:
self.center()
if self.height is not None:
self.set_height(self.height)
if self.width is not None:
self.set_width(self.width)
If these are the same then I'm all out, for now.
hmm, interesting..
actually there is a single print statement in your code that doesn't have any meaning at all haha, this is it, mine is on the right, yours on the left:

but everything else is the same.. :(
but could the problem be from any other class in svg_mobject.py file?
Well it is possible, considering from SVGMobject there's only three levels of inheritance higher. Except it does its own thing with generate_points so I think our issues all line up here.
I have two and a half debugging options for you. In a Python REPL in a working directory that can access manimlib:
>>> from xml.dom import minidom
>>> from manimlib.imports import TextMobject, YELLOW
>>> import os
>>> os.chdir("media\\Tex")
>>> text2 = TextMobject("This is some text",
... tex_to_color_map={"text": YELLOW})
Writing "\centering This is some text" to b29a846aa3cb7f8b.tex
Writing "This is some" to 0f84d11d97ba78b5.tex
>>> os.path.exists("b29a846aa3cb7f8b.svg")
True
>>> os.path.abspath("b29a846aa3cb7f8b.svg")
'C:\\Manim\\media\\Tex\\b29a846aa3cb7f8b.svg' # <--- I copied this path to open in a browser.
>>> text2.show() #<--- This line should show you a non-blank picture
>>>
This should look as it is, except obviously for the paths. If not you can use minidom to view the elements and tag names and the attribute tex.ref_to_element and checking all tag names in there, or something.
code.interact: def use_to_mobjects(self, use_element):
# Remove initial "#" character
ref = use_element.getAttribute("xlink:href")[1:]
if ref not in self.ref_to_element:
warnings.warn("%s not recognized" % ref) # <---- Where the error is
from code import interact
interact(banner="Entering console now\n",
local={"element": element,
"minidom: minidom,
"expectations": self.ref_to_element})
return VGroup()
return self.get_mobjects_from(
self.ref_to_element[ref]
)
If you run either the REPL or the python file it will open that small interactive console where you can see what went wrong. You can see in that case where the reference is not found a VGroup is returned hence the emptiness resulting in the index error.
Set up a debugging session.
I use Visual Studio Code so this is relatively easy for me. As the debugger goes through SVGMobject make a watch for self.ref_to_element and see whether the reference is actually added.
That's just about it. I'm also trying to improve my understanding of this code so the answers are as vague to me too.
Yes! I have the cheat!
from xml.dom import minidom
import os
from manimlib.imports import TextMobject, YELLOW
class CheatedTextMobject(TextMobject):
def generate_points(self):
doc = minidom.parse(self.file_path)
self.ref_to_element = dict((element.getAttribute("id"), element)
for element in doc.getElementsByTagName("path"))
for svg in doc.getElementsByTagName("svg"):
mobjects = self.get_mobjects_from(svg)
if self.unpack_groups:
self.add(*mobjects)
else:
self.add(*mobjects[0].submobjects)
doc.unlink()
def update_ref_to_element(self, defs):
print("Thou hast been overriden and are useless")
os.chdir("media\\Tex")
text2 = CheatedTextMobject("This is some text",
tex_to_color_map={"text": YELLOW})
text2.show()
Hope for both our sakes that this works. If it does, yay.
I added the overriden method for update_ref_to_element as proof of concept from my end. Without it actually updating that dictionary even my okay version wouldn't work. Seriously note that this is very illegal manipulation that may help us distinguish whether this is a program issue or a code issue.
This is your error right?
C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-84 not recognized
warnings.warn("%s not recognized" % ref)
C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-104 not recognized
warnings.warn("%s not recognized" % ref)
C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-105 not recognized
warnings.warn("%s not recognized" % ref)
C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-115 not recognized
C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-111 not recognized
warnings.warn("%s not recognized" % ref)
C:\Users\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-109 not recognized
warnings.warn("%s not recognized" % ref)
C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-101 not recognized
warnings.warn("%s not recognized" % ref)
C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-116 not recognized
warnings.warn("%s not recognized" % ref)
C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-120 not recognized
warnings.warn("%s not recognized" % ref)
ok there is alot of information you have said but sorry i'm lost!, firstly where is this code located? its not in svg_mobject.py nor text_mobject.py:
>>> from xml.dom import minidom >>> from manimlib.imports import TextMobject, YELLOW >>> import os >>> os.chdir("media\\Tex") >>> text2 = TextMobject("This is some text", ... tex_to_color_map={"text": YELLOW}) Writing "\centering This is some text" to b29a846aa3cb7f8b.tex Writing "This is some" to 0f84d11d97ba78b5.tex >>> os.path.exists("b29a846aa3cb7f8b.svg") True >>> os.path.abspath("b29a846aa3cb7f8b.svg") 'C:\\Manim\\media\\Tex\\b29a846aa3cb7f8b.svg' # <--- I copied this path to open in a browser. >>> text2.show() #<--- This line should show you a non-blank picture >>>
secondly i've tried to use (code.interact) but i get a syntax error like this:

and even if i close the quotation i get another syntax error:

and thirdly i can't even start a debugging session in svg_mobject.py, i'm unable to define the reason for that! but this is what i get if i start a debugging session:

and i also the class (CheatedTextMobject), i couldn't find a method named (generate_points) inside the class ( TextMobject) to edit it the way you did, all i could found similar to your implementation of generate_points was in (SVGMobject) class, and if you wanted me to add the whole class -CheatedTextMobject-, can you tell me exactly where to add it and how to run it with svg_mobject.py code? :(
thank you.
This is your error right?
C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-84 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-104 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-105 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-115 not recognized C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-111 not recognized warnings.warn("%s not recognized" % ref) C:\Users\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-109 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-101 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-116 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-120 not recognized warnings.warn("%s not recognized" % ref)
yes exactly.. and yesterday i came across an article said that this is caused by miktex, how could that be possible? and how does manim communicate with miktex?
Let me start with the easy answer.
Interactive console was my bad. The dictionary wasn't typed well.
Yes, I was making a dictionary. The one that would send global attributes to the interactive console.
interact(banner="Entering console now\n",
local={"element": element,
"minidom": minidom,
"expectations": self.ref_to_element})
Let's see, next point.
>>> from xml.dom import minidom
>>> from manimlib.imports import TextMobject, YELLOW
>>> import os
>>> os.chdir("media\\Tex")
>>> text2 = TextMobject("This is some text",
... tex_to_color_map={"text": YELLOW})
Writing "\centering This is some text" to b29a846aa3cb7f8b.tex
Writing "This is some" to 0f84d11d97ba78b5.tex
>>> os.path.exists("b29a846aa3cb7f8b.svg")
True
>>> os.path.abspath("b29a846aa3cb7f8b.svg")
'C:\\Manim\\media\\Tex\\b29a846aa3cb7f8b.svg' # <--- I copied this path to open in a browser.
>>> text2.show() #<--- This line should show you a non-blank picture
>>>
>>> "This is my own madness, not in any file on Manim."
>>> "I find it better to treat Manim like Python instead of the other way around"
>>> "I took elements from svg_mobject to make that"
>>> "Also, that's the result of running python.exe in a terminal. It's just Python really."
And as for Pycharm, I can't pretend to understand how debugging works over there. I see you got the breakpoint, but for the rest join the club and embrace StackOverflow as your new best friend.
Lastly, about generate_points, um...
Python inheritance 101:
>>> from manimlib.imports import TextMobject
>>> from pprint import pprint as pp
>>> pp(TextMobject.mro())
[<class 'manimlib.mobject.svg.tex_mobject.TextMobject'>,
<class 'manimlib.mobject.svg.tex_mobject.TexMobject'>,
<class 'manimlib.mobject.svg.tex_mobject.SingleStringTexMobject'>,
<class 'manimlib.mobject.svg.svg_mobject.SVGMobject'>,
<class 'manimlib.mobject.types.vectorized_mobject.VMobject'>,
<class 'manimlib.mobject.mobject.Mobject'>,
<class 'manimlib.container.container.Container'>,
<class 'object'>]
That's how far implementation of inherited classes goes. Inherited classes share code from their parent classes due to similarity, but can override instance methods for specificity e.g Square feeds Manim cardinal points and VMobject a list of points.
Every class in Manim that has Mobject in its family tree has that generate_points method that actually draws stuff on the screen. Or more specifically, see the text.show() method I called? That image depends on the points contained in the class objects. This is a bit of an overload so if it doesn't make immediate sense; I've been there too.
The reason why I made the separate inheritance class CheatedTextMobject was because I was unsure how it would work from the beginning. For now it does, but my shining talent of not solving problems in the general case will show itself soon. Honestly I don't know yet why the element logic in SVGMobject is as it is yet, so I don't want to touch it now.
As for how you'd use it: Simple answer, take that class and shove it in example_scenes.py. Then create the example_text as an instance of that class instead of the other one i.e.
from manimlib.imports import * #<--- ish ish, you don't necessarily have to import everything sometimes. Just saying
from xml.dom import minidom
class CheatedTextMobject(TextMobject):
def generate_points(self):
doc = minidom.parse(self.file_path)
self.ref_to_element = dict((element.getAttribute("id"), element)
for element in doc.getElementsByTagName("path"))
for svg in doc.getElementsByTagName("svg"):
mobjects = self.get_mobjects_from(svg)
if self.unpack_groups:
self.add(*mobjects)
else:
self.add(*mobjects[0].submobjects)
doc.unlink()
def update_ref_to_element(self, defs):
print("Thou hast been overriden and are useless")
class WriteStuff(Scene):
def construct(self):
example_text = CheatedTextMobject(
"This is some text",
tex_to_color_map={"text": YELLOW}
)
example_tex = TexMobject(
"\\sum_{k=1}^\\infty {1 \\over k^2} = {\\pi^2 \\over 6}",
)
group = VGroup(example_text, example_tex)
group.arrange(DOWN)
group.set_width(FRAME_WIDTH - 2 * LARGE_BUFF)
self.play(Write(example_text))
self.play(Write(example_tex))
self.wait()
ok, sorry for late answer, i've been testing your codes and trying to grasp how this thing work the past 4 hours but nothing worked..
i've tested CheatedTextMobject and it gave me the same errors, and i tested interact and found somethings that i don't know if they are useful or not:
the variable element isn't defined:

the attributes list is empty:

and self is referencing to nothing:

but man i'm pretty sure it is not a code problem because i downloaded manim again just to make sure that everything is as it supposed to be.. it must be from one of the programs manim needs, isn't my conclusion right?
ok.. seriously nothing worked with me.. i'm really disappointed because i've been trying for days before i post this.. bro if you understood the problem i would gladly allow you to enter my pc with through a sharing application called anyDisk, it will allow u to control my desktop and do what ever u want..
ok, sorry for late answer, i've been testing your codes and trying to grasp how this thing work the past 4 hours but nothing worked..
i've tested
CheatedTextMobjectand it gave me the same errors, and i tested interact and found somethings that i don't know if they are useful or not:
the variable element isn't defined:
the attributes list is empty:
and self is referencing to nothing:
but man i'm pretty sure it is not a code problem because i downloaded manim again just to make sure that everything is as it supposed to be.. it must be from one of the programs manim needs, isn't my conclusion right?
Okay that's off-putting. Thought I had it with that one.
In code.interact, it should've been use_element instead of element. Wow I make so many slipups.
If the hack didn't work, then it's the svg we're missing. I have one very last solution for you before I genuinely give up. Let me figure out how to get it to you first.
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.8.2 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='75.144235pt' height='6.861476pt' viewBox='134.238594 -6.861476 75.144235 6.861476'>
<defs>
<path id='g0-84' d='M.547945-6.75467L.358655-4.513076H.607721C.647572-5.031133 .67746-5.738481 .986301-6.07721C1.325031-6.425903 1.892902-6.455791 2.351183-6.455791H2.600249C2.86924-6.455791 3.148194-6.455791 3.148194-6.117061V-.767123C3.148194-.368618 2.749689-.308842 2.391034-.308842C2.261519-.308842 2.132005-.318804 2.032379-.318804H1.703611V-.009963H5.479452V-.318804H4.801993C4.41345-.318804 4.034869-.358655 4.034869-.767123V-6.117061C4.034869-6.405978 4.204234-6.455791 4.582814-6.455791H4.83188C5.290162-6.455791 5.858032-6.425903 6.196762-6.07721C6.505604-5.738481 6.535492-5.031133 6.575342-4.513076H6.824408L6.635118-6.75467H.547945Z'/>
<path id='g0-101' d='M1.115816-2.311333H3.985056C4.094645-2.311333 4.144458-2.381071 4.144458-2.49066C4.144458-3.5467 3.496887-4.463263 2.381071-4.463263C1.155666-4.463263 .278954-3.377335 .278954-2.191781C.278954-1.275218 .787049-.458281 1.663761-.059776C1.892902 .039851 2.161893 .099626 2.410959 .099626H2.440847C3.20797 .099626 3.845579-.328767 4.11457-1.09589C4.124533-1.125778 4.124533-1.165629 4.124533-1.195517C4.124533-1.265255 4.084682-1.315068 4.014944-1.315068C3.865504-1.315068 3.805729-.986301 3.745953-.876712C3.496887-.438356 3.01868-.14944 2.500623-.14944C2.132005-.14944 1.8132-.358655 1.544209-.627646C1.145704-1.085928 1.115816-1.733499 1.115816-2.311333ZM1.125778-2.520548C1.125778-3.287671 1.534247-4.244085 2.351183-4.244085H2.400996C3.377335-4.154421 3.367372-3.118306 3.466999-2.520548H1.125778Z'/>
<path id='g0-104' d='M.318804-6.814446V-6.505604H.468244C.836862-6.505604 1.09589-6.465753 1.09589-5.987547V-.956413C1.09589-.886675 1.105853-.816936 1.105853-.737235C1.105853-.358655 .836862-.318804 .557908-.318804H.318804V-.009963H2.570361V-.318804H2.311333C2.032379-.318804 1.793275-.358655 1.793275-.727273V-2.550436C1.793275-3.267746 2.161893-4.184309 3.148194-4.184309C3.785803-4.184309 3.845579-3.496887 3.845579-3.068493V-.687422C3.845579-.348692 3.556663-.318804 3.247821-.318804H3.068493V-.009963H5.32005V-.318804H5.070984C4.801993-.318804 4.542964-.358655 4.542964-.697385V-2.879203C4.542964-3.20797 4.533001-3.536737 4.383562-3.835616C4.144458-4.273973 3.646326-4.403487 3.188045-4.403487C2.610212-4.403487 1.96264-4.014944 1.77335-3.457036L1.763387-6.924035L.318804-6.814446Z'/>
<path id='g0-105' d='M.368618-4.293898V-3.985056H.557908C.846824-3.985056 1.105853-3.945205 1.105853-3.486924V-.727273C1.105853-.37858 .926526-.318804 .328767-.318804V-.009963H2.470735V-.318804H2.271482C2.012453-.318804 1.77335-.348692 1.77335-.667497V-4.403487L.368618-4.293898ZM1.205479-6.665006C.956413-6.635118 .757161-6.41594 .757161-6.146949C.757161-5.858032 1.006227-5.618929 1.285181-5.618929C1.554172-5.618929 1.8132-5.838107 1.8132-6.146949C1.8132-6.435866 1.564134-6.674969 1.285181-6.674969C1.255293-6.674969 1.235367-6.665006 1.205479-6.665006Z'/>
<path id='g0-109' d='M.318804-4.293898V-3.985056H.468244C.797011-3.985056 1.09589-3.955168 1.09589-3.486924V-.737235C1.09589-.328767 .816936-.318804 .37858-.318804H.318804V-.009963H2.570361V-.318804H2.311333C2.032379-.318804 1.793275-.358655 1.793275-.727273V-2.550436C1.793275-3.277709 2.191781-4.184309 3.148194-4.184309C3.785803-4.184309 3.855542-3.526775 3.855542-3.068493V-.697385C3.855542-.33873 3.556663-.318804 3.227895-.318804H3.078456V-.009963H5.330012V-.318804H5.070984C4.79203-.318804 4.552927-.358655 4.552927-.727273V-2.550436C4.552927-3.277709 4.951432-4.184309 5.907846-4.184309C6.545455-4.184309 6.615193-3.526775 6.615193-3.068493V-.697385C6.615193-.33873 6.316314-.318804 5.987547-.318804H5.838107V-.009963H8.089664V-.318804H7.880448C7.581569-.318804 7.312578-.348692 7.312578-.697385V-2.948941C7.312578-3.317559 7.292653-3.646326 7.053549-3.985056C6.794521-4.313823 6.366127-4.403487 5.967621-4.403487C5.32005-4.403487 4.79203-4.024907 4.523039-3.447073C4.333748-4.154421 3.88543-4.403487 3.198007-4.403487C2.560399-4.403487 1.952677-4.004981 1.743462-3.387298L1.733499-4.403487L.318804-4.293898Z'/>
<path id='g0-111' d='M2.34122-4.463263C1.085928-4.333748 .278954-3.277709 .278954-2.122042C.278954-.996264 1.165629 .099626 2.49066 .099626C3.686177 .099626 4.692403-.876712 4.692403-2.132005C4.692403-3.317559 3.795766-4.473225 2.470735-4.473225C2.430884-4.473225 2.381071-4.463263 2.34122-4.463263ZM1.115816-1.892902V-2.331258C1.115816-3.088418 1.354919-4.244085 2.480697-4.244085C3.287671-4.244085 3.745953-3.566625 3.835616-2.809465C3.855542-2.590286 3.855542-2.381071 3.855542-2.161893C3.855542-1.514321 3.785803-.707347 3.148194-.33873C2.948941-.209215 2.729763-.14944 2.500623-.14944C1.77335-.14944 1.265255-.71731 1.155666-1.494396C1.135741-1.62391 1.135741-1.763387 1.115816-1.892902Z'/>
<path id='g0-115' d='M1.753425-4.463263C1.384807-4.423412 .996264-4.353674 .707347-4.104608C.468244-3.895392 .328767-3.556663 .328767-3.237858C.328767-1.534247 3.098381-2.500623 3.098381-1.006227C3.098381-.398506 2.550436-.119552 2.002491-.119552C1.24533-.119552 .737235-.657534 .597758-1.514321C.577833-1.603985 .56787-1.693649 .448319-1.693649C.368618-1.693649 .328767-1.633873 .328767-1.564134V.009963C.33873 .059776 .368618 .089664 .418431 .099626H.438356C.597758 .099626 .757161-.268991 .876712-.298879H.886675C.966376-.298879 1.235367-.049813 1.444583 .019925C1.613948 .079701 1.793275 .099626 1.972603 .099626C2.799502 .099626 3.58655-.33873 3.58655-1.255293C3.58655-1.912827 3.108344-2.450809 2.450809-2.620174C1.833126-2.789539 .816936-2.789539 .816936-3.516812C.816936-4.124533 1.484433-4.273973 1.92279-4.273973C2.410959-4.273973 3.088418-4.004981 3.088418-3.148194C3.088418-3.058531 3.098381-2.978829 3.20797-2.978829C3.307597-2.978829 3.347447-3.058531 3.347447-3.158157C3.347447-3.20797 3.337484-3.257783 3.337484-3.297634V-4.323786C3.337484-4.383562 3.307597-4.463263 3.227895-4.463263C3.068493-4.463263 2.968867-4.214197 2.859278-4.214197H2.849315C2.769614-4.214197 2.610212-4.343711 2.49066-4.383562C2.311333-4.443337 2.11208-4.473225 1.92279-4.473225C1.863014-4.473225 1.8132-4.463263 1.753425-4.463263Z'/>
<path id='g0-116' d='M1.484433-6.136986C1.484433-5.449564 1.195517-4.204234 .179328-4.204234V-3.985056H1.036115V-1.414695C1.036115-1.085928 1.05604-.757161 1.215442-.468244C1.43462-.069738 1.902864 .099626 2.34122 .099626C3.158157 .099626 3.317559-.816936 3.317559-1.444583V-1.8132H3.068493C3.068493-1.663761 3.078456-1.514321 3.078456-1.354919C3.078456-.916563 2.978829-.14944 2.391034-.14944C1.823163-.14944 1.733499-.836862 1.733499-1.285181V-3.985056H3.148194V-4.293898H1.733499V-6.136986H1.484433Z'/>
<path id='g0-120' d='M.169365-4.293898V-3.985056H.368618C.886675-3.985056 1.026152-3.775841 1.255293-3.486924L2.191781-2.261519C2.231631-2.221669 2.311333-2.141968 2.311333-2.082192C2.30137-2.032379 2.221669-1.952677 2.191781-1.912827C1.594022-1.225405 1.155666-.318804 .119552-.318804V-.009963H1.902864V-.318804C1.713574-.318804 1.613948-.498132 1.613948-.637609C1.613948-.836862 1.763387-.976339 1.882939-1.125778S2.122042-1.43462 2.251557-1.58406C2.331258-1.683686 2.420922-1.77335 2.480697-1.882939C2.729763-1.613948 2.938979-1.295143 3.158157-1.006227L3.347447-.757161C3.387298-.707347 3.457036-.637609 3.457036-.56787C3.457036-.408468 3.237858-.318804 3.098381-.318804V-.009963H5.140722V-.318804H4.961395C4.79203-.318804 4.60274-.328767 4.4533-.408468C4.273973-.498132 4.154421-.687422 4.034869-.836862C3.706102-1.275218 3.35741-1.713574 3.028643-2.15193L2.938979-2.271482C2.919054-2.291407 2.899128-2.321295 2.889166-2.351183C2.889166-2.410959 2.958904-2.470735 2.988792-2.510585L3.297634-2.889166C3.476961-3.108344 3.636364-3.347447 3.845579-3.5467C4.154421-3.825654 4.542964-3.985056 4.961395-3.985056V-4.293898H3.188045V-3.985056C3.387298-3.935243 3.466999-3.835616 3.466999-3.676214C3.466999-3.387298 3.148194-3.128269 2.978829-2.899128C2.909091-2.809465 2.759651-2.600249 2.709838-2.600249C2.650062-2.600249 2.510585-2.82939 2.420922-2.938979C2.201743-3.217933 1.853051-3.576588 1.853051-3.745953C1.853051-3.895392 2.072229-3.975093 2.201743-3.985056V-4.293898H.169365Z'/>
</defs>
<g id='page1'>
<use x='134.238594' y='0' xlink:href='#g0-84'/>
<use x='141.432078' y='0' xlink:href='#g0-104'/>
<use x='146.965527' y='0' xlink:href='#g0-105'/>
<use x='149.732251' y='0' xlink:href='#g0-115'/>
<use x='156.981069' y='0' xlink:href='#g0-105'/>
<use x='159.747793' y='0' xlink:href='#g0-115'/>
<use x='166.996611' y='0' xlink:href='#g0-115'/>
<use x='170.92536' y='0' xlink:href='#g0-111'/>
<use x='175.905464' y='0' xlink:href='#g0-109'/>
<use x='184.205637' y='0' xlink:href='#g0-101'/>
<use x='191.952465' y='0' xlink:href='#g0-116'/>
<use x='195.825879' y='0' xlink:href='#g0-101'/>
<use x='200.252638' y='0' xlink:href='#g0-120'/>
<use x='205.509415' y='0' xlink:href='#g0-116'/>
</g>
</svg>
Take this file info and throw it in an svg file e.g. tex_test.svg, perhaps in the Manim folder. Then in a REPL or anywhere run this:
>>> from manimlib.imports import SVGMobject
>>> svg = SVGMobject(file_name="tex_test.svg")
>>> svg.scale(0.5)
<manimlib.mobject.svg.svg_mobject.SVGMobject object at 0x...>
>>> svg.show()
If this don't work we move on to the programs, which I really don't want to do due to underinformation. This very last test will confirm whether any svg files in the future you'll use will be rendered in Manim.
This is your error right?
C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-84 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-104 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-105 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-115 not recognized C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-111 not recognized warnings.warn("%s not recognized" % ref) C:\Users\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-109 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-101 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-116 not recognized warnings.warn("%s not recognized" % ref) C:\Manim\manimlib\mobject\svg\svg_mobject.py:119: UserWarning: g0-120 not recognized warnings.warn("%s not recognized" % ref)yes exactly.. and yesterday i came across an article said that this is caused by miktex, how could that be possible? and how does manim communicate with miktex?
Manim uses MikTex programs to do file conversions internally, from .tex to .dvi to .svg. That's why you needed the MikTex bin in your path variable.
<?xml version='1.0' encoding='UTF-8'?> <!-- This file was generated by dvisvgm 2.8.2 --> <svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='75.144235pt' height='6.861476pt' viewBox='134.238594 -6.861476 75.144235 6.861476'> <defs> <path id='g0-84' d='M.547945-6.75467L.358655-4.513076H.607721C.647572-5.031133 .67746-5.738481 .986301-6.07721C1.325031-6.425903 1.892902-6.455791 2.351183-6.455791H2.600249C2.86924-6.455791 3.148194-6.455791 3.148194-6.117061V-.767123C3.148194-.368618 2.749689-.308842 2.391034-.308842C2.261519-.308842 2.132005-.318804 2.032379-.318804H1.703611V-.009963H5.479452V-.318804H4.801993C4.41345-.318804 4.034869-.358655 4.034869-.767123V-6.117061C4.034869-6.405978 4.204234-6.455791 4.582814-6.455791H4.83188C5.290162-6.455791 5.858032-6.425903 6.196762-6.07721C6.505604-5.738481 6.535492-5.031133 6.575342-4.513076H6.824408L6.635118-6.75467H.547945Z'/> <path id='g0-101' d='M1.115816-2.311333H3.985056C4.094645-2.311333 4.144458-2.381071 4.144458-2.49066C4.144458-3.5467 3.496887-4.463263 2.381071-4.463263C1.155666-4.463263 .278954-3.377335 .278954-2.191781C.278954-1.275218 .787049-.458281 1.663761-.059776C1.892902 .039851 2.161893 .099626 2.410959 .099626H2.440847C3.20797 .099626 3.845579-.328767 4.11457-1.09589C4.124533-1.125778 4.124533-1.165629 4.124533-1.195517C4.124533-1.265255 4.084682-1.315068 4.014944-1.315068C3.865504-1.315068 3.805729-.986301 3.745953-.876712C3.496887-.438356 3.01868-.14944 2.500623-.14944C2.132005-.14944 1.8132-.358655 1.544209-.627646C1.145704-1.085928 1.115816-1.733499 1.115816-2.311333ZM1.125778-2.520548C1.125778-3.287671 1.534247-4.244085 2.351183-4.244085H2.400996C3.377335-4.154421 3.367372-3.118306 3.466999-2.520548H1.125778Z'/> <path id='g0-104' d='M.318804-6.814446V-6.505604H.468244C.836862-6.505604 1.09589-6.465753 1.09589-5.987547V-.956413C1.09589-.886675 1.105853-.816936 1.105853-.737235C1.105853-.358655 .836862-.318804 .557908-.318804H.318804V-.009963H2.570361V-.318804H2.311333C2.032379-.318804 1.793275-.358655 1.793275-.727273V-2.550436C1.793275-3.267746 2.161893-4.184309 3.148194-4.184309C3.785803-4.184309 3.845579-3.496887 3.845579-3.068493V-.687422C3.845579-.348692 3.556663-.318804 3.247821-.318804H3.068493V-.009963H5.32005V-.318804H5.070984C4.801993-.318804 4.542964-.358655 4.542964-.697385V-2.879203C4.542964-3.20797 4.533001-3.536737 4.383562-3.835616C4.144458-4.273973 3.646326-4.403487 3.188045-4.403487C2.610212-4.403487 1.96264-4.014944 1.77335-3.457036L1.763387-6.924035L.318804-6.814446Z'/> <path id='g0-105' d='M.368618-4.293898V-3.985056H.557908C.846824-3.985056 1.105853-3.945205 1.105853-3.486924V-.727273C1.105853-.37858 .926526-.318804 .328767-.318804V-.009963H2.470735V-.318804H2.271482C2.012453-.318804 1.77335-.348692 1.77335-.667497V-4.403487L.368618-4.293898ZM1.205479-6.665006C.956413-6.635118 .757161-6.41594 .757161-6.146949C.757161-5.858032 1.006227-5.618929 1.285181-5.618929C1.554172-5.618929 1.8132-5.838107 1.8132-6.146949C1.8132-6.435866 1.564134-6.674969 1.285181-6.674969C1.255293-6.674969 1.235367-6.665006 1.205479-6.665006Z'/> <path id='g0-109' d='M.318804-4.293898V-3.985056H.468244C.797011-3.985056 1.09589-3.955168 1.09589-3.486924V-.737235C1.09589-.328767 .816936-.318804 .37858-.318804H.318804V-.009963H2.570361V-.318804H2.311333C2.032379-.318804 1.793275-.358655 1.793275-.727273V-2.550436C1.793275-3.277709 2.191781-4.184309 3.148194-4.184309C3.785803-4.184309 3.855542-3.526775 3.855542-3.068493V-.697385C3.855542-.33873 3.556663-.318804 3.227895-.318804H3.078456V-.009963H5.330012V-.318804H5.070984C4.79203-.318804 4.552927-.358655 4.552927-.727273V-2.550436C4.552927-3.277709 4.951432-4.184309 5.907846-4.184309C6.545455-4.184309 6.615193-3.526775 6.615193-3.068493V-.697385C6.615193-.33873 6.316314-.318804 5.987547-.318804H5.838107V-.009963H8.089664V-.318804H7.880448C7.581569-.318804 7.312578-.348692 7.312578-.697385V-2.948941C7.312578-3.317559 7.292653-3.646326 7.053549-3.985056C6.794521-4.313823 6.366127-4.403487 5.967621-4.403487C5.32005-4.403487 4.79203-4.024907 4.523039-3.447073C4.333748-4.154421 3.88543-4.403487 3.198007-4.403487C2.560399-4.403487 1.952677-4.004981 1.743462-3.387298L1.733499-4.403487L.318804-4.293898Z'/> <path id='g0-111' d='M2.34122-4.463263C1.085928-4.333748 .278954-3.277709 .278954-2.122042C.278954-.996264 1.165629 .099626 2.49066 .099626C3.686177 .099626 4.692403-.876712 4.692403-2.132005C4.692403-3.317559 3.795766-4.473225 2.470735-4.473225C2.430884-4.473225 2.381071-4.463263 2.34122-4.463263ZM1.115816-1.892902V-2.331258C1.115816-3.088418 1.354919-4.244085 2.480697-4.244085C3.287671-4.244085 3.745953-3.566625 3.835616-2.809465C3.855542-2.590286 3.855542-2.381071 3.855542-2.161893C3.855542-1.514321 3.785803-.707347 3.148194-.33873C2.948941-.209215 2.729763-.14944 2.500623-.14944C1.77335-.14944 1.265255-.71731 1.155666-1.494396C1.135741-1.62391 1.135741-1.763387 1.115816-1.892902Z'/> <path id='g0-115' d='M1.753425-4.463263C1.384807-4.423412 .996264-4.353674 .707347-4.104608C.468244-3.895392 .328767-3.556663 .328767-3.237858C.328767-1.534247 3.098381-2.500623 3.098381-1.006227C3.098381-.398506 2.550436-.119552 2.002491-.119552C1.24533-.119552 .737235-.657534 .597758-1.514321C.577833-1.603985 .56787-1.693649 .448319-1.693649C.368618-1.693649 .328767-1.633873 .328767-1.564134V.009963C.33873 .059776 .368618 .089664 .418431 .099626H.438356C.597758 .099626 .757161-.268991 .876712-.298879H.886675C.966376-.298879 1.235367-.049813 1.444583 .019925C1.613948 .079701 1.793275 .099626 1.972603 .099626C2.799502 .099626 3.58655-.33873 3.58655-1.255293C3.58655-1.912827 3.108344-2.450809 2.450809-2.620174C1.833126-2.789539 .816936-2.789539 .816936-3.516812C.816936-4.124533 1.484433-4.273973 1.92279-4.273973C2.410959-4.273973 3.088418-4.004981 3.088418-3.148194C3.088418-3.058531 3.098381-2.978829 3.20797-2.978829C3.307597-2.978829 3.347447-3.058531 3.347447-3.158157C3.347447-3.20797 3.337484-3.257783 3.337484-3.297634V-4.323786C3.337484-4.383562 3.307597-4.463263 3.227895-4.463263C3.068493-4.463263 2.968867-4.214197 2.859278-4.214197H2.849315C2.769614-4.214197 2.610212-4.343711 2.49066-4.383562C2.311333-4.443337 2.11208-4.473225 1.92279-4.473225C1.863014-4.473225 1.8132-4.463263 1.753425-4.463263Z'/> <path id='g0-116' d='M1.484433-6.136986C1.484433-5.449564 1.195517-4.204234 .179328-4.204234V-3.985056H1.036115V-1.414695C1.036115-1.085928 1.05604-.757161 1.215442-.468244C1.43462-.069738 1.902864 .099626 2.34122 .099626C3.158157 .099626 3.317559-.816936 3.317559-1.444583V-1.8132H3.068493C3.068493-1.663761 3.078456-1.514321 3.078456-1.354919C3.078456-.916563 2.978829-.14944 2.391034-.14944C1.823163-.14944 1.733499-.836862 1.733499-1.285181V-3.985056H3.148194V-4.293898H1.733499V-6.136986H1.484433Z'/> <path id='g0-120' d='M.169365-4.293898V-3.985056H.368618C.886675-3.985056 1.026152-3.775841 1.255293-3.486924L2.191781-2.261519C2.231631-2.221669 2.311333-2.141968 2.311333-2.082192C2.30137-2.032379 2.221669-1.952677 2.191781-1.912827C1.594022-1.225405 1.155666-.318804 .119552-.318804V-.009963H1.902864V-.318804C1.713574-.318804 1.613948-.498132 1.613948-.637609C1.613948-.836862 1.763387-.976339 1.882939-1.125778S2.122042-1.43462 2.251557-1.58406C2.331258-1.683686 2.420922-1.77335 2.480697-1.882939C2.729763-1.613948 2.938979-1.295143 3.158157-1.006227L3.347447-.757161C3.387298-.707347 3.457036-.637609 3.457036-.56787C3.457036-.408468 3.237858-.318804 3.098381-.318804V-.009963H5.140722V-.318804H4.961395C4.79203-.318804 4.60274-.328767 4.4533-.408468C4.273973-.498132 4.154421-.687422 4.034869-.836862C3.706102-1.275218 3.35741-1.713574 3.028643-2.15193L2.938979-2.271482C2.919054-2.291407 2.899128-2.321295 2.889166-2.351183C2.889166-2.410959 2.958904-2.470735 2.988792-2.510585L3.297634-2.889166C3.476961-3.108344 3.636364-3.347447 3.845579-3.5467C4.154421-3.825654 4.542964-3.985056 4.961395-3.985056V-4.293898H3.188045V-3.985056C3.387298-3.935243 3.466999-3.835616 3.466999-3.676214C3.466999-3.387298 3.148194-3.128269 2.978829-2.899128C2.909091-2.809465 2.759651-2.600249 2.709838-2.600249C2.650062-2.600249 2.510585-2.82939 2.420922-2.938979C2.201743-3.217933 1.853051-3.576588 1.853051-3.745953C1.853051-3.895392 2.072229-3.975093 2.201743-3.985056V-4.293898H.169365Z'/> </defs> <g id='page1'> <use x='134.238594' y='0' xlink:href='#g0-84'/> <use x='141.432078' y='0' xlink:href='#g0-104'/> <use x='146.965527' y='0' xlink:href='#g0-105'/> <use x='149.732251' y='0' xlink:href='#g0-115'/> <use x='156.981069' y='0' xlink:href='#g0-105'/> <use x='159.747793' y='0' xlink:href='#g0-115'/> <use x='166.996611' y='0' xlink:href='#g0-115'/> <use x='170.92536' y='0' xlink:href='#g0-111'/> <use x='175.905464' y='0' xlink:href='#g0-109'/> <use x='184.205637' y='0' xlink:href='#g0-101'/> <use x='191.952465' y='0' xlink:href='#g0-116'/> <use x='195.825879' y='0' xlink:href='#g0-101'/> <use x='200.252638' y='0' xlink:href='#g0-120'/> <use x='205.509415' y='0' xlink:href='#g0-116'/> </g> </svg>Take this file info and throw it in an svg file e.g.
tex_test.svg, perhaps in the Manim folder. Then in a REPL or anywhere run this:>>> from manimlib.imports import SVGMobject >>> svg = SVGMobject(file_name="tex_test.svg") >>> svg.scale(0.5) <manimlib.mobject.svg.svg_mobject.SVGMobject object at 0x...> >>> svg.show()If this don't work we move on to the programs, which I really don't want to do due to underinformation. This very last test will confirm whether any svg files in the future you'll use will be rendered in Manim.
ok listen to what i did to see if it is correct or not, i made a text file inside manim folder and pasted the dvisvgm text, the long text, then i saved it as (tex_test.svg), then i made a python file with your code inside it, the 5 lines code, in manim folder too, but the problem is there is an invalid syntax error and its preventing me from running it:

but firstly, are my steps correct?
Yes, your steps are correct. But I believe to treat this confusion once and for all I must show you what my output usually looks like.
I didn't think you'd take it literally.

I run python in a terminal for majority of my testing. Anything that isn't preceded by these ">>>" is the output of the execution of the line before it. Eg:
>>> 1 + 1
2
>>> print("Tom\nHardy")
Tom
Hardy
But for the most part, you got the syntax right. If I must be fully candid, here's the full unambiguous detail.
from manimlib.imports import SVGMobject
svg = SVGMobject(file_name="tex_test.svg")
svg.scale(0.5)
svg.show()
Which should pop up an image if done correctly.
Yes, your steps are correct. But I believe to treat this confusion once and for all I must show you what my output usually looks like.
I didn't think you'd take it literally.
I run python in a terminal for majority of my testing. Anything that isn't preceded by these ">>>" is the output of the execution of the line before it. Eg:
>>> 1 + 1 2 >>> print("Tom\nHardy") Tom HardyBut for the most part, you got the syntax right. If I must be fully candid, here's the full unambiguous detail.
from manimlib.imports import SVGMobject svg = SVGMobject(file_name="tex_test.svg") svg.scale(0.5) svg.show()Which should pop up an image if done correctly.
yes actually this is my first time dealing with terminal commands and libraries files so i'm quite lost, i mean alot... thats why i took your codes as literals haha,
but YES!, it actually popped up an image! what does this indicate to?

It means your programs are generating suspect svg files. Yep, it's a programming issue.
Also, sorry if I assumed you were an intermediate like me. Just that learning Manim minus Python is a recipe for disaster.
Let me see the system commands Manim uses and get back to you soon.
It means your programs are generating suspect svg files. Yep, it's a programming issue.
Also, sorry if I assumed you were an intermediate like me. Just that learning Manim minus Python is a recipe for disaster.
Let me see the system commands Manim uses and get back to you soon.
it very weird to be a programming issue since my manim files are the most recent uploads! they are about 10 days old maybe, does this mean that 3b1b uploaded a corrupted version of manim mistakely?
I highly doubt that. Then again, I use the June version and simply add new features from newer Manim versions and ManimCommunity to my .py files so I wouldn't know.
Okay I think I got it. And you'll actually get to use the terminal, yay!
Open command prompt by searching 'cmd' in the Start Menu.
Go to the Manim directory by using this command:
cd "D:\Programs\ManimProgs\manim-master". I read the file path from those images.
Take this small Latex code:
\documentclass[preview]{standalone}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amssymb}
\linespread{1}
\begin{document}
\centering This is some text
\end{document}
And throw it in a .tex file the way you did the .svg file. Let's say tex_test.tex
Now you're going to run two commands in the command prompt you just opened. One after the other. Paste the command and press Enter.
latex -interaction=batchmode -halt-on-error -output-directory="" tex_test.texdvisvgm tex_test.dvi -n -v 0 -o tex_test.svgThese commands will generate a number of files in the current folder. Don't worry, you can delete them later.
Now use the produced tex_test.svg the way you did just now. If that gives a blank image or raises an error, we can safely blame the programs.
Okay I think I got it. And you'll actually get to use the terminal, yay!
Open command prompt by searching 'cmd' in the Start Menu.
Go to the Manim directory by using this command:
cd "D:\Programs\ManimProgs\manim-master". I read the file path from those images.Take this small Latex code:
\documentclass[preview]{standalone} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amssymb} \linespread{1} \begin{document} \centering This is some text \end{document}And throw it in a
.texfile the way you did the.svgfile. Let's say tex_test.texNow you're going to run two commands in the command prompt you just opened. One after the other. Paste the command and press Enter.
latex -interaction=batchmode -halt-on-error -output-directory="" tex_test.texdvisvgm tex_test.dvi -n -v 0 -o tex_test.svgThese commands will generate a number of files in the current folder. Don't worry, you can delete them later.
Now use the produced
tex_test.svgthe way you did just now. If that gives a blank image or raises an error, we can safely blame the programs.
yaaay used the terminal with no errors nor cursing lol.. ok i did it and it worked and produced the same image as before but with different name:

but just to notify, i can't edit the photo with functions like (Crop) unless i save it in my device, and i noticed another thing too.. just for a second when i was resizing the window of the photo, it turned into blank like there was no photo, when i resized it back, it came back to a normal photo.. i tried to compile your code once again to see if this happens once again but it never did.. so i think it is a bug from the photos app it self..
soo what are the conclusions now?
Yeah that photo app can get bothersome sometimes. I use Snip and Sketch to open .png files by default.
As for the rest, I'm very confused right now. The commands in Manim are still similar to the ones in my files, but yours acts differently for some reason. What if you try using that svg in a scene, does that affect anything?
Yeah that photo app can get bothersome sometimes. I use Snip and Sketch to open .png files by default.
As for the rest, I'm very confused right now. The commands in Manim are still similar to the ones in my files, but yours acts differently for some reason. What if you try using that svg in a scene, does that affect anything?
if you mean make your svg a video, yes it affect everything since my main problem is for a video shows a mathematical formula (WriteStuff example), but i'm curious to see if your code will run as a video, can you provide me with instructions to make it a video?
At least you can reproduce the svg yourself when the error comes by again. Just copy the .tex file produced and run those two commands on it.
As for using the svg to make a video, it would be more optimistic to have the attributes rendered from TextMobject and TexMobject since they produce better results. The svg version is kind of raw and you have to use indexing to achieve the same result as in TextMobject e.g coloring the last word yellow like this:
>>> svg[-4:].set_color(YELLOW)
<manimlib.mobject.types.vectorized_mobject.VGroup object at 0x...> # Ellipsis stands for some hexadecimal number you'd expect
And as for the svg, I meant this:
class WriteStuff(Scene):
def construct(self):
example_text = SVGMobject(file_name="tex_test.svg")
example_text[-4:].set_color(YELLOW)
example_tex = TexMobject("\\sum_{k=1}^\\infty {1 \\over k^2} = {\\pi^2 \\over 6}")
group = VGroup(example_text, example_tex)
group.arrange(DOWN)
group.set_width(FRAME_WIDTH - 2 * LARGE_BUFF)
self.play(Write(example_text))
self.play(Write(example_tex))
self.wait()
Try running that in actual Manim.
At least you can reproduce the svg yourself when the error comes by again. Just copy the .tex file produced and run those two commands on it.
As for using the svg to make a video, it would be more optimistic to have the attributes rendered from
TextMobjectandTexMobjectsince they produce better results. The svg version is kind of raw and you have to use indexing to achieve the same result as in TextMobject e.g coloring the last word yellow like this:>>> svg[-4:].set_color(YELLOW) <manimlib.mobject.types.vectorized_mobject.VGroup object at 0x...> # Ellipsis stands for some hexadecimal number you'd expectAnd as for the svg, I meant this:
class WriteStuff(Scene): def construct(self): example_text = SVGMobject(file_name="tex_test.svg") example_text[-4:].set_color(YELLOW) example_tex = TexMobject("\\sum_{k=1}^\\infty {1 \\over k^2} = {\\pi^2 \\over 6}") group = VGroup(example_text, example_tex) group.arrange(DOWN) group.set_width(FRAME_WIDTH - 2 * LARGE_BUFF) self.play(Write(example_text)) self.play(Write(example_tex)) self.wait()Try running that in actual Manim.
it actually worked and produced a video like this:

why did your svg work but the ones in (Example_Scenes) didn't?
I really don't know for sure. What you can do: run the one in example_scenes then, error or not, paste the contents of the svg produced here so I can compare with mine.
I really don't know for sure. What you can do: run the one in example_scenes then, error or not, paste the contents of the svg produced here so I can compare with mine.
it worked in a sudden :)))))))))))

i'm not sure how the F%$# this worked out but listen to what i did: i ran the WriteStuff from example and an error appeared as u see in (1), i went to medie->Tex to see the svg produced but there was many files from other examples, so i deleted all and tried to run WriteStuff again to see the svg for that example, and it worked!!!!!
can you please explain to me how could sub-products like the files in Tex folder prevent the example from working?!!!
idk what happened but something from the things you asked me to do fixed it.. dude you have been more patient and useful than most of the people i know in my life lol.. thank you :D..
but one last thing, did you dive deep deep into manim by your self or used some kind of reference? if you have any references i would be thankful if you provide me with em :D..
I am just as confused as you, my friend. Your laptop just wanted you to feel pain.
idk what happened but something from the things you asked me to do fixed it.. dude you have been more patient and useful than most of the people i know in my life lol.. thank you :D..
but one last thing, did you dive deep deep into manim by your self or used some kind of reference? if you have any references i would be thankful if you provide me with em :D..
Hey, I'm just passing on a favor someone did for me in the past. Ok in that case we never really fixed the problem but I just started using another laptop that didn't have it and that was that. Speaking of which, test some audio and make sure it works. That road can get real messy if it doesn't.
As for learning reference, I did follow the content of Theorem of Beethoven from YouTube and that got me started. But with so many questions and so few answers available online I snapped and decided to learn how to work around everything on my own. I picked up some master courses in Python from a friend and I used that to become a Manim elitist, sort of. The guys who make pull requests all the time have studied the code more than me, but I can do 95% of anything I can think of doing and/or fixing so that's a big win.
My advice for you, learn how Python works. That's the best way to understand what happens in the videos you make. We're all lucky this is Python and not something like C++ or else the noob status would've ended us.
Oh yeah and study the OG's code. He who made it knows it best.
I have a good deal of experience in other languages such as C# and c++, java, but i never needed to touch a single terminal haha, when i came across manim and found it uses python, i learned it's syntax but needed practice, so i decided to practice on manim while i learn it! 馃槀.. but seems like this is a mistake and i must learn the terminal commands for python :)..
And for OG u mean open graphs right?
Hold on, how did you run executables in C++ then? Didn't that require some terminal to operate?
And Python is usually best described as a scripting language. Logic is closer to English and way easier to learn. Terminal logic is another story, especially if we start on Powershell.
By OG I meant 3blue1brown. The code in that folder? Open graphs what馃槀
Now use the produced
tex_test.svgthe way you did just now. If that gives a blank image or raises an error, we can safely blame the programs.
Hello. I'm having the same problem and got everything right until this part, but with the code I get this error:

I would really appreciate any help you could provide me.
Just to clarify, this is my first encounter with python (and a very frustrating one).
Hold on, how did you run executables in C++ then? Didn't that require some terminal to operate?
And Python is usually best described as a scripting language. Logic is closer to English and way easier to learn. Terminal logic is another story, especially if we start on Powershell.
By OG I meant 3blue1brown. The code in that folder? Open graphs what馃槀
I used an IDE, So all i had to do is to press ctrl+f5 馃寶
Oh welcome.
Now use the produced
tex_test.svgthe way you did just now. If that gives a blank image or raises an error, we can safely blame the programs.Hello. I'm having the same problem and got everything right until this part, but with the code I get this error:
I would really appreciate any help you could provide me.
Just to clarify, this is my first encounter with python (and a very frustrating one).
You say this is your first encounter with Python. And you're using Manim? You ain't seen frustration yet!
The deal is simple. Me and the other brother figured out something so we'll just go with that.
.tex file, probably in the main folder. Let's say text.tex\documentclass[preview]{standalone}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amssymb}
\linespread{1}
\begin{document}
\centering This is some text
\end{document}
a) cd "C:\path\to\saved\tex\file". Slashes the other way for UNIX.
b) latex -interaction=batchmode -halt-on-error -output-directory="" text.tex
c) dvisvgm text.dvi -n -v 0 -o text.svg
>>> from manimlib.imports import SVGMobject
>>> svg = SVGMobject(file_name="tex_test.svg")
>>> svg.scale(0.5)
<manimlib.mobject.svg.svg_mobject.SVGMobject object at 0x...>
>>> svg.show()
That's how Manim produces the svg files it uses for TextMobject. Producing the svg manually should tell you if your programs are running as they should.
Hold on, how did you run executables in C++ then? Didn't that require some terminal to operate?
And Python is usually best described as a scripting language. Logic is closer to English and way easier to learn. Terminal logic is another story, especially if we start on Powershell.
By OG I meant 3blue1brown. The code in that folder? Open graphs what馃槀I used an IDE, So all i had to do is to press ctrl+f5 馃寶
Fair enough. I use Pluralsight courses so command line arguments were inevitable from my perspective.
Use the svg something like this:
>>> from manimlib.imports import SVGMobject >>> svg = SVGMobject(file_name="tex_test.svg") >>> svg.scale(0.5) <manimlib.mobject.svg.svg_mobject.SVGMobject object at 0x...> >>> svg.show()Yep, I tried that and got this error:
That's how Manim produces the svg files it uses for
TextMobject. Producing the svg manually should tell you if your programs are running as they should.
So... why it didn't work? I'd already reinstalled manim and MikTek.
Use the svg something like this:
>>> from manimlib.imports import SVGMobject >>> svg = SVGMobject(file_name="tex_test.svg") >>> svg.scale(0.5) <manimlib.mobject.svg.svg_mobject.SVGMobject object at 0x...> >>> svg.show()Yep, I tried that and got this error:
That's how Manim produces the svg files it uses for
TextMobject. Producing the svg manually should tell you if your programs are running as they should.So... why it didn't work? I'd already reinstalled manim and MikTek.
I really have no idea at this point. Mainly cause we never really fixed whatever existing problem that was there, or just because I was pulling educated guesses this whole time.
Just to be sure it's the programs, and just to give you the satisfaction of a working svg file, do this:
<?xml version='1.0' encoding='UTF-8'?> <!-- This file was generated by dvisvgm 2.8.2 --> <svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='75.144235pt' height='6.861476pt' viewBox='134.238594 -6.861476 75.144235 6.861476'> <defs> <path id='g0-84' d='M.547945-6.75467L.358655-4.513076H.607721C.647572-5.031133 .67746-5.738481 .986301-6.07721C1.325031-6.425903 1.892902-6.455791 2.351183-6.455791H2.600249C2.86924-6.455791 3.148194-6.455791 3.148194-6.117061V-.767123C3.148194-.368618 2.749689-.308842 2.391034-.308842C2.261519-.308842 2.132005-.318804 2.032379-.318804H1.703611V-.009963H5.479452V-.318804H4.801993C4.41345-.318804 4.034869-.358655 4.034869-.767123V-6.117061C4.034869-6.405978 4.204234-6.455791 4.582814-6.455791H4.83188C5.290162-6.455791 5.858032-6.425903 6.196762-6.07721C6.505604-5.738481 6.535492-5.031133 6.575342-4.513076H6.824408L6.635118-6.75467H.547945Z'/> <path id='g0-101' d='M1.115816-2.311333H3.985056C4.094645-2.311333 4.144458-2.381071 4.144458-2.49066C4.144458-3.5467 3.496887-4.463263 2.381071-4.463263C1.155666-4.463263 .278954-3.377335 .278954-2.191781C.278954-1.275218 .787049-.458281 1.663761-.059776C1.892902 .039851 2.161893 .099626 2.410959 .099626H2.440847C3.20797 .099626 3.845579-.328767 4.11457-1.09589C4.124533-1.125778 4.124533-1.165629 4.124533-1.195517C4.124533-1.265255 4.084682-1.315068 4.014944-1.315068C3.865504-1.315068 3.805729-.986301 3.745953-.876712C3.496887-.438356 3.01868-.14944 2.500623-.14944C2.132005-.14944 1.8132-.358655 1.544209-.627646C1.145704-1.085928 1.115816-1.733499 1.115816-2.311333ZM1.125778-2.520548C1.125778-3.287671 1.534247-4.244085 2.351183-4.244085H2.400996C3.377335-4.154421 3.367372-3.118306 3.466999-2.520548H1.125778Z'/> <path id='g0-104' d='M.318804-6.814446V-6.505604H.468244C.836862-6.505604 1.09589-6.465753 1.09589-5.987547V-.956413C1.09589-.886675 1.105853-.816936 1.105853-.737235C1.105853-.358655 .836862-.318804 .557908-.318804H.318804V-.009963H2.570361V-.318804H2.311333C2.032379-.318804 1.793275-.358655 1.793275-.727273V-2.550436C1.793275-3.267746 2.161893-4.184309 3.148194-4.184309C3.785803-4.184309 3.845579-3.496887 3.845579-3.068493V-.687422C3.845579-.348692 3.556663-.318804 3.247821-.318804H3.068493V-.009963H5.32005V-.318804H5.070984C4.801993-.318804 4.542964-.358655 4.542964-.697385V-2.879203C4.542964-3.20797 4.533001-3.536737 4.383562-3.835616C4.144458-4.273973 3.646326-4.403487 3.188045-4.403487C2.610212-4.403487 1.96264-4.014944 1.77335-3.457036L1.763387-6.924035L.318804-6.814446Z'/> <path id='g0-105' d='M.368618-4.293898V-3.985056H.557908C.846824-3.985056 1.105853-3.945205 1.105853-3.486924V-.727273C1.105853-.37858 .926526-.318804 .328767-.318804V-.009963H2.470735V-.318804H2.271482C2.012453-.318804 1.77335-.348692 1.77335-.667497V-4.403487L.368618-4.293898ZM1.205479-6.665006C.956413-6.635118 .757161-6.41594 .757161-6.146949C.757161-5.858032 1.006227-5.618929 1.285181-5.618929C1.554172-5.618929 1.8132-5.838107 1.8132-6.146949C1.8132-6.435866 1.564134-6.674969 1.285181-6.674969C1.255293-6.674969 1.235367-6.665006 1.205479-6.665006Z'/> <path id='g0-109' d='M.318804-4.293898V-3.985056H.468244C.797011-3.985056 1.09589-3.955168 1.09589-3.486924V-.737235C1.09589-.328767 .816936-.318804 .37858-.318804H.318804V-.009963H2.570361V-.318804H2.311333C2.032379-.318804 1.793275-.358655 1.793275-.727273V-2.550436C1.793275-3.277709 2.191781-4.184309 3.148194-4.184309C3.785803-4.184309 3.855542-3.526775 3.855542-3.068493V-.697385C3.855542-.33873 3.556663-.318804 3.227895-.318804H3.078456V-.009963H5.330012V-.318804H5.070984C4.79203-.318804 4.552927-.358655 4.552927-.727273V-2.550436C4.552927-3.277709 4.951432-4.184309 5.907846-4.184309C6.545455-4.184309 6.615193-3.526775 6.615193-3.068493V-.697385C6.615193-.33873 6.316314-.318804 5.987547-.318804H5.838107V-.009963H8.089664V-.318804H7.880448C7.581569-.318804 7.312578-.348692 7.312578-.697385V-2.948941C7.312578-3.317559 7.292653-3.646326 7.053549-3.985056C6.794521-4.313823 6.366127-4.403487 5.967621-4.403487C5.32005-4.403487 4.79203-4.024907 4.523039-3.447073C4.333748-4.154421 3.88543-4.403487 3.198007-4.403487C2.560399-4.403487 1.952677-4.004981 1.743462-3.387298L1.733499-4.403487L.318804-4.293898Z'/> <path id='g0-111' d='M2.34122-4.463263C1.085928-4.333748 .278954-3.277709 .278954-2.122042C.278954-.996264 1.165629 .099626 2.49066 .099626C3.686177 .099626 4.692403-.876712 4.692403-2.132005C4.692403-3.317559 3.795766-4.473225 2.470735-4.473225C2.430884-4.473225 2.381071-4.463263 2.34122-4.463263ZM1.115816-1.892902V-2.331258C1.115816-3.088418 1.354919-4.244085 2.480697-4.244085C3.287671-4.244085 3.745953-3.566625 3.835616-2.809465C3.855542-2.590286 3.855542-2.381071 3.855542-2.161893C3.855542-1.514321 3.785803-.707347 3.148194-.33873C2.948941-.209215 2.729763-.14944 2.500623-.14944C1.77335-.14944 1.265255-.71731 1.155666-1.494396C1.135741-1.62391 1.135741-1.763387 1.115816-1.892902Z'/> <path id='g0-115' d='M1.753425-4.463263C1.384807-4.423412 .996264-4.353674 .707347-4.104608C.468244-3.895392 .328767-3.556663 .328767-3.237858C.328767-1.534247 3.098381-2.500623 3.098381-1.006227C3.098381-.398506 2.550436-.119552 2.002491-.119552C1.24533-.119552 .737235-.657534 .597758-1.514321C.577833-1.603985 .56787-1.693649 .448319-1.693649C.368618-1.693649 .328767-1.633873 .328767-1.564134V.009963C.33873 .059776 .368618 .089664 .418431 .099626H.438356C.597758 .099626 .757161-.268991 .876712-.298879H.886675C.966376-.298879 1.235367-.049813 1.444583 .019925C1.613948 .079701 1.793275 .099626 1.972603 .099626C2.799502 .099626 3.58655-.33873 3.58655-1.255293C3.58655-1.912827 3.108344-2.450809 2.450809-2.620174C1.833126-2.789539 .816936-2.789539 .816936-3.516812C.816936-4.124533 1.484433-4.273973 1.92279-4.273973C2.410959-4.273973 3.088418-4.004981 3.088418-3.148194C3.088418-3.058531 3.098381-2.978829 3.20797-2.978829C3.307597-2.978829 3.347447-3.058531 3.347447-3.158157C3.347447-3.20797 3.337484-3.257783 3.337484-3.297634V-4.323786C3.337484-4.383562 3.307597-4.463263 3.227895-4.463263C3.068493-4.463263 2.968867-4.214197 2.859278-4.214197H2.849315C2.769614-4.214197 2.610212-4.343711 2.49066-4.383562C2.311333-4.443337 2.11208-4.473225 1.92279-4.473225C1.863014-4.473225 1.8132-4.463263 1.753425-4.463263Z'/> <path id='g0-116' d='M1.484433-6.136986C1.484433-5.449564 1.195517-4.204234 .179328-4.204234V-3.985056H1.036115V-1.414695C1.036115-1.085928 1.05604-.757161 1.215442-.468244C1.43462-.069738 1.902864 .099626 2.34122 .099626C3.158157 .099626 3.317559-.816936 3.317559-1.444583V-1.8132H3.068493C3.068493-1.663761 3.078456-1.514321 3.078456-1.354919C3.078456-.916563 2.978829-.14944 2.391034-.14944C1.823163-.14944 1.733499-.836862 1.733499-1.285181V-3.985056H3.148194V-4.293898H1.733499V-6.136986H1.484433Z'/> <path id='g0-120' d='M.169365-4.293898V-3.985056H.368618C.886675-3.985056 1.026152-3.775841 1.255293-3.486924L2.191781-2.261519C2.231631-2.221669 2.311333-2.141968 2.311333-2.082192C2.30137-2.032379 2.221669-1.952677 2.191781-1.912827C1.594022-1.225405 1.155666-.318804 .119552-.318804V-.009963H1.902864V-.318804C1.713574-.318804 1.613948-.498132 1.613948-.637609C1.613948-.836862 1.763387-.976339 1.882939-1.125778S2.122042-1.43462 2.251557-1.58406C2.331258-1.683686 2.420922-1.77335 2.480697-1.882939C2.729763-1.613948 2.938979-1.295143 3.158157-1.006227L3.347447-.757161C3.387298-.707347 3.457036-.637609 3.457036-.56787C3.457036-.408468 3.237858-.318804 3.098381-.318804V-.009963H5.140722V-.318804H4.961395C4.79203-.318804 4.60274-.328767 4.4533-.408468C4.273973-.498132 4.154421-.687422 4.034869-.836862C3.706102-1.275218 3.35741-1.713574 3.028643-2.15193L2.938979-2.271482C2.919054-2.291407 2.899128-2.321295 2.889166-2.351183C2.889166-2.410959 2.958904-2.470735 2.988792-2.510585L3.297634-2.889166C3.476961-3.108344 3.636364-3.347447 3.845579-3.5467C4.154421-3.825654 4.542964-3.985056 4.961395-3.985056V-4.293898H3.188045V-3.985056C3.387298-3.935243 3.466999-3.835616 3.466999-3.676214C3.466999-3.387298 3.148194-3.128269 2.978829-2.899128C2.909091-2.809465 2.759651-2.600249 2.709838-2.600249C2.650062-2.600249 2.510585-2.82939 2.420922-2.938979C2.201743-3.217933 1.853051-3.576588 1.853051-3.745953C1.853051-3.895392 2.072229-3.975093 2.201743-3.985056V-4.293898H.169365Z'/> </defs> <g id='page1'> <use x='134.238594' y='0' xlink:href='#g0-84'/> <use x='141.432078' y='0' xlink:href='#g0-104'/> <use x='146.965527' y='0' xlink:href='#g0-105'/> <use x='149.732251' y='0' xlink:href='#g0-115'/> <use x='156.981069' y='0' xlink:href='#g0-105'/> <use x='159.747793' y='0' xlink:href='#g0-115'/> <use x='166.996611' y='0' xlink:href='#g0-115'/> <use x='170.92536' y='0' xlink:href='#g0-111'/> <use x='175.905464' y='0' xlink:href='#g0-109'/> <use x='184.205637' y='0' xlink:href='#g0-101'/> <use x='191.952465' y='0' xlink:href='#g0-116'/> <use x='195.825879' y='0' xlink:href='#g0-101'/> <use x='200.252638' y='0' xlink:href='#g0-120'/> <use x='205.509415' y='0' xlink:href='#g0-116'/> </g> </svg>Take this file info and throw it in an svg file e.g.
tex_test.svg, perhaps in the Manim folder. Then in a REPL or anywhere run this:>>> from manimlib.imports import SVGMobject >>> svg = SVGMobject(file_name="tex_test.svg") >>> svg.scale(0.5) <manimlib.mobject.svg.svg_mobject.SVGMobject object at 0x...> >>> svg.show()If this don't work we move on to the programs, which I really don't want to do due to underinformation. This very last test will confirm whether any svg files in the future you'll use will be rendered in Manim.
Just to be sure it's the programs, and just to give you the satisfaction of a working svg file, do this:
That worked.

I think I'll have to reinstall everything. Thanks!
- Throw this detail in a
.texfile, probably in the main folder. Let's saytext.tex\documentclass[preview]{standalone} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amssymb} \linespread{1} \begin{document} \centering This is some text \end{document}
- Run three very simple commands in Powershell or Command Prompt, whichever you open.
a)
cd "C:\path\to\saved\tex\file". Slashes the other way for UNIX.
b)latex -interaction=batchmode -halt-on-error -output-directory="" text.tex
c)dvisvgm text.dvi -n -v 0 -o text.svg
Hello, I have the same problem. I tried that and I compared the contents of the .svg file. mine is on the right, yours on the left:

There is no <defs> in my tex_test.svg file, I think that's the problem, but I don't have the ability to solve it
Yes, that is the exact problem. Paths are indicated to but not defined.
How many LaTeX packages have you installed by now
There is no
<defs>in mytex_test.svgfile, I think that's the problem, but I don't have the ability to solve it
Yep, the same is happening with mine.
Yes, that is the exact problem. Paths are indicated to but not defined.
How many LaTeX packages have you installed by now
Wdym? Are we missing some LaTeX packages?
Assuming you installed Miktex, there's this big list of packages that you must click on to actually install.
This is just a guesstimate from me but what if the packages can't be identified by the LaTeX compiler so the svg doesn't come out right
Sorry for late answer.
How many LaTeX packages have you installed by now
In the figure below, these are the LaTex packages all I have .

This is just a guesstimate from me but what if the packages can't be identified by the LaTeX compiler so the svg doesn't come out right
BTW, I run the code python -m manim example_scenes.py UpdatersExample -pl. It generated a lot of .svg files in .\media\Tex and I opened one of them at random. It looks like it has <defs>.
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.8.2 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='11.623024pt' height='1.051612pt' viewBox='166.044022 -1.051612 11.623024 1.051612'>
<defs>
<path id='g0-58' d='M1.912827-.52802C1.912827-.816936 1.673724-1.05604 1.384807-1.05604S.856787-.816936 .856787-.52802S1.09589 0 1.384807 0S1.912827-.239103 1.912827-.52802Z'/>
</defs>
<g id='page1'>
<use x='166.044022' y='0' xlink:href='#g0-58'/>
<use x='170.47183' y='0' xlink:href='#g0-58'/>
<use x='174.899638' y='0' xlink:href='#g0-58'/>
</g>
</svg>
Hey I have a theory. Just to be sure.
Do the same three instructions from before, but using this shorter one. I think I have something.
\documentclass[preview]{standalone}
\usepackage[english]{babel}
\usepackage{amsmath}
\begin{document}
\centering This is some text
\end{document}
Hey I have a theory. Just to be sure.
Do the same three instructions from before, but using this shorter one. I think I have something.
\documentclass[preview]{standalone} \usepackage[english]{babel} \usepackage{amsmath} \begin{document} \centering This is some text \end{document}
This worked for me. What did you have in mind?
Hey I have a theory. Just to be sure.
Do the same three instructions from before, but using this shorter one. I think I have something.
\documentclass[preview]{standalone} \usepackage[english]{babel} \usepackage{amsmath} \begin{document} \centering This is some text \end{document}
This worked for me, too! This is the generated .svg file.
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.8.2 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='75.162775pt' height='6.918502pt' viewBox='134.274197 -6.918502 75.162775 6.918502'>
<defs>
<path id='g0-84' d='M6.635118-6.744707H.547945L.358655-4.503113H.607721C.747198-6.107098 .896638-6.435866 2.400996-6.435866C2.580324-6.435866 2.839352-6.435866 2.938979-6.41594C3.148194-6.37609 3.148194-6.266501 3.148194-6.03736V-.787049C3.148194-.448319 3.148194-.308842 2.102117-.308842H1.703611V0C2.11208-.029888 3.128269-.029888 3.58655-.029888S5.070984-.029888 5.479452 0V-.308842H5.080946C4.034869-.308842 4.034869-.448319 4.034869-.787049V-6.03736C4.034869-6.236613 4.034869-6.37609 4.214197-6.41594C4.323786-6.435866 4.592777-6.435866 4.782067-6.435866C6.286426-6.435866 6.435866-6.107098 6.575342-4.503113H6.824408L6.635118-6.744707Z'/>
<path id='g0-101' d='M1.115816-2.510585C1.175592-3.995019 2.012453-4.244085 2.351183-4.244085C3.377335-4.244085 3.476961-2.899128 3.476961-2.510585H1.115816ZM1.105853-2.30137H3.88543C4.104608-2.30137 4.134496-2.30137 4.134496-2.510585C4.134496-3.496887 3.596513-4.463263 2.351183-4.463263C1.195517-4.463263 .278954-3.437111 .278954-2.191781C.278954-.856787 1.325031 .109589 2.470735 .109589C3.686177 .109589 4.134496-.996264 4.134496-1.185554C4.134496-1.285181 4.054795-1.305106 4.004981-1.305106C3.915318-1.305106 3.895392-1.24533 3.875467-1.165629C3.526775-.139477 2.630137-.139477 2.530511-.139477C2.032379-.139477 1.633873-.438356 1.404732-.806974C1.105853-1.285181 1.105853-1.942715 1.105853-2.30137Z'/>
<path id='g0-104' d='M1.09589-.757161C1.09589-.308842 .986301-.308842 .318804-.308842V0C.667497-.009963 1.175592-.029888 1.444583-.029888C1.703611-.029888 2.221669-.009963 2.560399 0V-.308842C1.892902-.308842 1.783313-.308842 1.783313-.757161V-2.590286C1.783313-3.626401 2.49066-4.184309 3.128269-4.184309C3.755915-4.184309 3.865504-3.646326 3.865504-3.078456V-.757161C3.865504-.308842 3.755915-.308842 3.088418-.308842V0C3.437111-.009963 3.945205-.029888 4.214197-.029888C4.473225-.029888 4.991283-.009963 5.330012 0V-.308842C4.811955-.308842 4.562889-.308842 4.552927-.607721V-2.510585C4.552927-3.367372 4.552927-3.676214 4.244085-4.034869C4.104608-4.204234 3.775841-4.403487 3.198007-4.403487C2.361146-4.403487 1.92279-3.805729 1.753425-3.427148V-6.914072L.318804-6.804483V-6.495641C1.016189-6.495641 1.09589-6.425903 1.09589-5.937733V-.757161Z'/>
<path id='g0-105' d='M1.763387-4.403487L.368618-4.293898V-3.985056C1.016189-3.985056 1.105853-3.92528 1.105853-3.437111V-.757161C1.105853-.308842 .996264-.308842 .328767-.308842V0C.647572-.009963 1.185554-.029888 1.424658-.029888C1.77335-.029888 2.122042-.009963 2.460772 0V-.308842C1.803238-.308842 1.763387-.358655 1.763387-.747198V-4.403487ZM1.803238-6.136986C1.803238-6.455791 1.554172-6.665006 1.275218-6.665006C.966376-6.665006 .747198-6.396015 .747198-6.136986C.747198-5.867995 .966376-5.608966 1.275218-5.608966C1.554172-5.608966 1.803238-5.818182 1.803238-6.136986Z'/>
<path id='g0-109' d='M1.09589-3.427148V-.757161C1.09589-.308842 .986301-.308842 .318804-.308842V0C.667497-.009963 1.175592-.029888 1.444583-.029888C1.703611-.029888 2.221669-.009963 2.560399 0V-.308842C1.892902-.308842 1.783313-.308842 1.783313-.757161V-2.590286C1.783313-3.626401 2.49066-4.184309 3.128269-4.184309C3.755915-4.184309 3.865504-3.646326 3.865504-3.078456V-.757161C3.865504-.308842 3.755915-.308842 3.088418-.308842V0C3.437111-.009963 3.945205-.029888 4.214197-.029888C4.473225-.029888 4.991283-.009963 5.330012 0V-.308842C4.662516-.308842 4.552927-.308842 4.552927-.757161V-2.590286C4.552927-3.626401 5.260274-4.184309 5.897883-4.184309C6.525529-4.184309 6.635118-3.646326 6.635118-3.078456V-.757161C6.635118-.308842 6.525529-.308842 5.858032-.308842V0C6.206725-.009963 6.714819-.029888 6.983811-.029888C7.242839-.029888 7.760897-.009963 8.099626 0V-.308842C7.581569-.308842 7.332503-.308842 7.32254-.607721V-2.510585C7.32254-3.367372 7.32254-3.676214 7.013699-4.034869C6.874222-4.204234 6.545455-4.403487 5.967621-4.403487C5.13076-4.403487 4.692403-3.805729 4.523039-3.427148C4.383562-4.293898 3.646326-4.403487 3.198007-4.403487C2.470735-4.403487 2.002491-3.975093 1.723537-3.35741V-4.403487L.318804-4.293898V-3.985056C1.016189-3.985056 1.09589-3.915318 1.09589-3.427148Z'/>
<path id='g0-111' d='M4.692403-2.132005C4.692403-3.407223 3.696139-4.463263 2.49066-4.463263C1.24533-4.463263 .278954-3.377335 .278954-2.132005C.278954-.846824 1.315068 .109589 2.480697 .109589C3.686177 .109589 4.692403-.86675 4.692403-2.132005ZM2.49066-.139477C2.062267-.139477 1.62391-.348692 1.354919-.806974C1.105853-1.24533 1.105853-1.853051 1.105853-2.211706C1.105853-2.600249 1.105853-3.138232 1.344956-3.576588C1.613948-4.034869 2.082192-4.244085 2.480697-4.244085C2.919054-4.244085 3.347447-4.024907 3.606476-3.596513S3.865504-2.590286 3.865504-2.211706C3.865504-1.853051 3.865504-1.315068 3.646326-.876712C3.427148-.428394 2.988792-.139477 2.49066-.139477Z'/>
<path id='g0-115' d='M2.072229-1.932752C2.291407-1.892902 3.108344-1.733499 3.108344-1.016189C3.108344-.508095 2.759651-.109589 1.982565-.109589C1.145704-.109589 .787049-.67746 .597758-1.524284C.56787-1.653798 .557908-1.693649 .458281-1.693649C.328767-1.693649 .328767-1.62391 .328767-1.444583V-.129514C.328767 .039851 .328767 .109589 .438356 .109589C.488169 .109589 .498132 .099626 .687422-.089664C.707347-.109589 .707347-.129514 .886675-.318804C1.325031 .099626 1.77335 .109589 1.982565 .109589C3.128269 .109589 3.58655-.557908 3.58655-1.275218C3.58655-1.803238 3.287671-2.102117 3.16812-2.221669C2.839352-2.540473 2.450809-2.620174 2.032379-2.699875C1.474471-2.809465 .806974-2.938979 .806974-3.516812C.806974-3.865504 1.066002-4.273973 1.92279-4.273973C3.01868-4.273973 3.068493-3.377335 3.088418-3.068493C3.098381-2.978829 3.188045-2.978829 3.20797-2.978829C3.337484-2.978829 3.337484-3.028643 3.337484-3.217933V-4.224159C3.337484-4.393524 3.337484-4.463263 3.227895-4.463263C3.178082-4.463263 3.158157-4.463263 3.028643-4.343711C2.998755-4.303861 2.899128-4.214197 2.859278-4.184309C2.480697-4.463263 2.072229-4.463263 1.92279-4.463263C.707347-4.463263 .328767-3.795766 .328767-3.237858C.328767-2.889166 .488169-2.610212 .757161-2.391034C1.075965-2.132005 1.354919-2.072229 2.072229-1.932752Z'/>
<path id='g0-116' d='M1.723537-3.985056H3.148194V-4.293898H1.723537V-6.127024H1.474471C1.464508-5.310087 1.165629-4.244085 .18929-4.204234V-3.985056H1.036115V-1.235367C1.036115-.009963 1.96264 .109589 2.321295 .109589C3.028643 .109589 3.307597-.597758 3.307597-1.235367V-1.803238H3.058531V-1.255293C3.058531-.518057 2.759651-.139477 2.391034-.139477C1.723537-.139477 1.723537-1.046077 1.723537-1.215442V-3.985056Z'/>
<path id='g0-120' d='M2.859278-2.34122C3.158157-2.719801 3.536737-3.20797 3.775841-3.466999C4.084682-3.825654 4.493151-3.975093 4.961395-3.985056V-4.293898C4.702366-4.273973 4.403487-4.26401 4.144458-4.26401C3.845579-4.26401 3.317559-4.283935 3.188045-4.293898V-3.985056C3.39726-3.965131 3.476961-3.835616 3.476961-3.676214S3.377335-3.387298 3.327522-3.327522L2.709838-2.550436L1.932752-3.556663C1.843088-3.656289 1.843088-3.676214 1.843088-3.73599C1.843088-3.88543 1.992528-3.975093 2.191781-3.985056V-4.293898C1.932752-4.283935 1.275218-4.26401 1.115816-4.26401C.9066-4.26401 .438356-4.273973 .169365-4.293898V-3.985056C.86675-3.985056 .876712-3.975093 1.344956-3.377335L2.331258-2.092154L1.39477-.9066C.916563-.328767 .328767-.308842 .119552-.308842V0C.37858-.019925 .687422-.029888 .946451-.029888C1.235367-.029888 1.653798-.009963 1.892902 0V-.308842C1.673724-.33873 1.603985-.468244 1.603985-.617684C1.603985-.836862 1.892902-1.165629 2.500623-1.882939L3.257783-.886675C3.337484-.777086 3.466999-.617684 3.466999-.557908C3.466999-.468244 3.377335-.318804 3.108344-.308842V0C3.407223-.009963 3.965131-.029888 4.184309-.029888C4.4533-.029888 4.841843-.019925 5.140722 0V-.308842C4.60274-.308842 4.423412-.328767 4.194271-.617684L2.859278-2.34122Z'/>
</defs>
<g id='page1'>
<use x='134.274197' y='0' xlink:href='#g0-84'/>
<use x='141.469457' y='0' xlink:href='#g0-104'/>
<use x='147.004274' y='0' xlink:href='#g0-105'/>
<use x='149.771683' y='0' xlink:href='#g0-115'/>
<use x='157.022275' y='0' xlink:href='#g0-105'/>
<use x='159.789684' y='0' xlink:href='#g0-115'/>
<use x='167.040276' y='0' xlink:href='#g0-115'/>
<use x='170.969994' y='0' xlink:href='#g0-111'/>
<use x='175.951333' y='0' xlink:href='#g0-109'/>
<use x='184.253559' y='0' xlink:href='#g0-101'/>
<use x='192.002285' y='0' xlink:href='#g0-116'/>
<use x='195.876659' y='0' xlink:href='#g0-101'/>
<use x='200.304511' y='0' xlink:href='#g0-120'/>
<use x='205.562598' y='0' xlink:href='#g0-116'/>
</g>
</svg>
Yes! I was right!
Go open MikTex and install the rest of the packages. Like check for updates then install what's not there. Everything should be about 4000 packages so that's going to take time, but in order to make Manim at least work you need the ones in the ctex template in the root folder, or somewhere. Just search for it, you can't miss it.
Wow I am so smart
Wow I am so smart
Indeed you are! Haha.
Now I'm gonna have some fun.
Wow I am so smart
Thank you very much ! After installing 3600 packages, it works! :))))
You're welcome guys. What do you think, edit that UserWarning to make it more user friendly?
Also there are like four other issues mentioning this very thing so I have to tell them they can stop repeatedly reinstalling MikTex
Hey man, sorry for being a bit late but I've got the same error. Manim worked perfectly well on my previous laptop, but not on this one apparently. Could you just give me the final solution. Thanks! Also all the packages are installed in miktex.
Hey man, sorry for being a bit late but I've got the same error. Manim worked perfectly well on my previous laptop, but not on this one apparently. Could you just give me the final solution. Thanks! Also all the packages are installed in miktex.
I was getting the error even after installing all the packages. Then, I just deleted the media folder and everything worked.
I am not sure if it wil continue working, but I am not getting any errors for the moment.
What if you try the three commands from earlier. Does the svg produced have path elements in it
For some reasons all the animations excluding text and tex animations are working, also I tried to execute your steps but got lost :"), it would be great if you could help me again. Should I try re installing MikTex?
Hey man, sorry for being a bit late but I've got the same error. Manim worked perfectly well on my previous laptop, but not on this one apparently. Could you just give me the final solution. Thanks! Also all the packages are installed in miktex.
I was getting the error even after installing all the packages. Then, I just deleted the media folder and everything worked.
I am not sure if it wil continue working, but I am not getting any errors for the moment.
Unfortunately, not working
For some reasons all the animations excluding text and tex animations are working, also I tried to execute your steps but got lost :"), it would be great if you could help me again. Should I try re installing MikTex?
I can't pretend to have good authority on whether that's a good idea. Keep in mind I've been guessing my way through the guidelines the entire time. But if it's the cross check you need, let me get it for you.

*EDIT:
\documentclass[preview]{standalone}



Hey I don't know if this will be helpful, but I was able to narrow it down to this package causing my problem, \usepackage[T1]{fontenc}.
manimlib/tex_template.tex\usepackage[T1]{fontenc}I'm on Windows 10 and using Miktex.
I was unable to find fontenc in Miktex package manager, but I do see it in my C:\Program Files\MiKTeX\tex\latex\base\fontenc.
Thank you, this solved it for me.
I had to erase fontenc from the tex_template.tex file
Hey I don't know if this will be helpful, but I was able to narrow it down to this package causing my problem.
Once I removed\usepackage[T1]{fontenc}, everything worked fine. I'm on Windows 10 and using Miktex. I was unable to findfontencin Miktex package manager, but I do see it in myC:\Program Files\MiKTeX\tex\latex\base\fontenc.
Hey I don't know if this will be helpful, but I was able to narrow it down to this package causing my problem.
Once I removed\usepackage[T1]{fontenc}, everything worked fine. I'm on Windows 10 and using Miktex. I was unable to findfontencin Miktex package manager, but I do see it in myC:\Program Files\MiKTeX\tex\latex\base\fontenc.
Thank you so much for finding this. I'm just starting out with manim, and this fixed the issue for me.
Thank you so much, everyone! Just to reiterate...
I had the same problem on Linux Ubuntu 20.04. The solution that worked for me was to comment out the line \usepackage[T1]{fontenc} from manimlib/tex_template.tex
You can do it by adding a % before it:
%\usepackage[T1]{fontenc}
Apparently, installing the missing packages wasn't an issue, since MiKTeX does it automatically on Linux. However, I was also getting a broken SVG file right on using the commands latex -interaction=batchmode -halt-on-error -output-directory="" tex_test.tex and dvisvgm tex_test.dvi -n -v 0 -o tex_test.svg.
when this line was included.
Thank you everyone! Great job!
OMG THIS JUST WORKED. I am new to manim but I was also having the same problem , found this thread, removed the \usepackage[T1]{fontenc} thing and it finally worked (I am on windows 10). GOD. I have no idea how you guys figured it out, like I can't imagine figuring this weirdly specific thing hack out. Thanks guys. Idk how much more time I could have wasted on this . OOOOF . I Am SHwo Hawpppyy
OMG THIS JUST WORKED. I am new to manim but I was also having the same problem , found this thread, removed the \usepackage[T1]{fontenc} thing and it finally worked (I am on windows 10). GOD. I have no idea how you guys figured it out, like I can't imagine figuring this weirdly specific thing hack out. Thanks guys. Idk how much more time I could have wasted on this . OOOOF . I Am SHwo Hawpppyy
Haha, package dependency issues are very common in libraries. I started by tracing the error down to the root cause line and spent some time understanding what it was trying to do and had a hutch to check the latex packages. Then it was just matter of trial and error disabling packages to figure out, which one was causing the failure.
Rhetorical question: is it really a good idea to comment out packages just to brute force a solution? At least without knowing why it was put there to begin with
@NeoPlato
Not really a good idea, just a temporary workaround.
If removing the package allows the library to be functional, then I assume the package was only there for some specific purpose, for who knows what.
I'm not an expert in LaTex package management, but I suspect that the Latex dependencies in manim library weren't meant to be compatible on all operating systems, given the different Latex package managers out there.
The correct solution would be to figure out why this particular package isn't working for some machines and what requirements are missing. Perhaps, some folks already have some transient Latex setup that solves this issue vs someone who is setting up Latex for the first time just for this project.
For example, a docker-ish container with compatible Latex packages or avirtualenv/requirements.txt equivalent for Latex packages.
After spending 3-4 days on this issue I gave up and got busy with some new technology, today I came here back after a while, thank you so much for the solution, it works now.
Ok. I just spent an evening debugging and may have some input on this, at least for the Windows 10 install using MiKTeX.
Short solution: If you do not wish to remove or comment out \usepackage[T1]{fontenc}, try installing the package cm-super using the MiKTeX console (which I assume you can also do by installing the 3600 packages :). If you have an ongoing manim project, you may also have to delete the svg-files in the media/Tex folder to force manim to recreate these.
Long story: The \usepackage[T1]{fontenc} changes the font (encoding) used by LaTeX to a font that contains, among others, accented characters which are needed in many languages other than English. It does not do much for English text, but if you for example have accented characters it makes the typesetting slightly nicer as LaTeX does not have to build those extra characters itself but are instead is told by the font how these glyphs should look. The LaTeX companion recommends to always use \usepackage[T1]{fontenc} unless there are legacy reasons not to do so. However, MiKTeX does not in the basic default installation include the vectorized Type 1 fonts for this. These are included in the cm-super package. What happens without the right type of fonts is that dvisvgm fails to include the vectorized descriptions of the characters (glyphs) when converting the dvi file to the svg file, and this is what causes the "UserWarning: g0-65 not recognized" from manim when it cannot find the path attribute (essentially a set of B茅zier curves that describe the character like all manim mobjects) for that particular character in the svg file. Installing cm-super (and the Type 1 fonts therein) solves the issue and lets dvisvgm generate the path attribute.
Some additions to this issue. It seems like I was not 100% correct above. It is still true that installing cm-super resolves the issue by installing proper Type 1 vectorized fronts for T1, but in case this package is not installed, there is a program included in MiKTeX called METAFONT that is supposed to recreate vectorized frons by tracing bitmapped fonts, and this program fails to do so for some reason (at least on my installation with MiKTeX 20.12 and METAFONT, Version 2.7182818. Thus, in a sense, installing cm-super only solves the issue by avoiding the call to METAFONT, although I would still argue that it is better to use vectorized fronts, to begin with, and not have to trace bitmapped fonts. I think I reached the limits of my LaTeX, DVI and SVG knowledge, so I post the full output of the (verbose) dvisvgm output and the METAFONT log file in case someone else can take this further. Anyhow, these are the errors (when cm-super is not installed) that cascades to the manim warning in the end.
dvisvgm output
>dvisvgm f805ccf86c658da6.dvi -n -v 7 -o "f805ccf86c658da6.svg"
pre-processing DVI file (format version 2)
processing page 1
computing extents based on data set by preview package (version 12.3)
width=4.998779pt, height=4.304504pt, depth=0pt
graphic size: 4.998779pt x 4.304504pt (1.75687mm x 1.51286mm)
running Metafont for ecrm1000
WARNING: failed to create ecrm1000.gf
output written to f805ccf86c658da6.svg
1 of 1 page converted in 0.365 seconds
METAFONT mfput.log
This is METAFONT, Version 2.7182818 (MiKTeX 20.12) (preloaded base=mf 2021.1.4) 5 JAN 2021 08:46
**mode_setup; mag:=4.000000; show pixels_per_inch*mag; batchmode; input ecrm100
0
! Emergency stop.
<*> mode_setup
; mag:=4.000000; show pixels_per_inch*mag; batchmode; input ec...
*** (job aborted, file error in nonstop mode)
Finally, here is an example that shows the benefits of the T1 encoding and a font built for this for someone who, like me, sometimes will have to use Swedish characters...

set constant TEX_USE_CTEX True and install ctex
Most helpful comment
Hey I don't know if this will be helpful, but I was able to narrow it down to this package causing my problem,
\usepackage[T1]{fontenc}.manimlib/tex_template.tex\usepackage[T1]{fontenc}I'm on Windows 10 and using Miktex.
I was unable to find
fontencin Miktex package manager, but I do see it in myC:\Program Files\MiKTeX\tex\latex\base\fontenc.