RemoveBackgroundStrokeWidth----it doesn't work
barakasamsara opened this issue · 21 comments
source code:
class RemoveBackgroundStrokeWidth(ChangeBackgroundColor):
CONFIG={
"text":TexMobject(
r"\frac{d}{dx}\Bigr|_{y=2}",
background_stroke_width=0, #<- Add this line
).scale(5)
}
$ python3 -m manim .py RemoveBackgroundStrokeWidth -pl
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users//Desktop/manim-master/manim.py", line 5, in
manimlib.main()
File "/Users//Desktop/manim-master/manimlib/init.py", line 11, in main
config = manimlib.config.get_configuration(args)
File "/Users//Desktop/manim-master/manimlib/config.py", line 185, in get_configuration
module = get_module(args.file)
File "/Users//Desktop/manim-master/manimlib/config.py", line 180, in get_module
spec.loader.exec_module(module)
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "**.py", line 19, in
class RemoveBackgroundStrokeWidth(ChangeBackgroundColor):
NameError: name 'ChangeBackgroundColor' is not defined
and btw....
if i don't wanna put the order"background_stroke_width=0," in the config...
what should i do?
like this?
square.set_stroke(WHITE, 10)
square.set_background_stroke_width = 0 ...?
or
label1=TexMobject("a")
label1.set_stroke_width=0
....i try all of these orders ... but it seems that it doesn't work...
Please use the markdown format to make it easier to read the code. Here I show you a quick tutorial.
This is because you only have the RemoveBackgroundStrokeWidth
scene, but you also need to have ChangeBackgroundColor
. RemoveBackgroundStrokeWidth
is a subclass of ChangeBackgroundColor
, so you must import it in some way, in the video it is explained that you must use the COMPLETE code, this one here. I named it faqs.py
, so you download and render it normally:
python3 -m manim faqs.py RemoveBackgroundStrokeWidth -pl
Please use the markdown format to make it easier to read the code. Here I show you a quick tutorial.
This is because you only have the
RemoveBackgroundStrokeWidth
scene, but you also need to haveChangeBackgroundColor
.RemoveBackgroundStrokeWidth
is a subclass ofChangeBackgroundColor
, so you must import it in some way, in the video it is explained that you must use the COMPLETE code, this one here. I named itfaqs.py
, so you download and render it normally:python3 -m manim faqs.py RemoveBackgroundStrokeWidth -pl
thanks a lot, i'll try to make it
Please use the markdown format to make it easier to read the code. Here I show you a quick tutorial.
This is because you only have the
RemoveBackgroundStrokeWidth
scene, but you also need to haveChangeBackgroundColor
.RemoveBackgroundStrokeWidth
is a subclass ofChangeBackgroundColor
, so you must import it in some way, in the video it is explained that you must use the COMPLETE code, this one here. I named itfaqs.py
, so you download and render it normally:python3 -m manim faqs.py RemoveBackgroundStrokeWidth -pl
I copied the file "faqs.py" and replaced the name to Luciantest20190820faqs
I really don't know what happens... it didn't work...
python3 -m manim Luciantest20190820faqs.py RemoveBackgroundStrokeWidth -pl
Please read what the terminal is telling you, it is not so difficult.
You are using the most recent version, change the first line: from big_ol_pile_of_manim_imports import *
with from manimlib.imports import *
.
That is because you do not have the necessary packages installed on XeLaTeX, you must install them. The packages you need to install are in manimlib/tex_template.tex
No, this is not the way, you have to investigate how to install LaTeX packages on Mac, there are many forums where that is explained. BTW, you are using XeLaTeX, so, your tex file is manimlib/ctex_template.tex
not manimlib/tex_template.tex
, I forgot tell you that.
thanks , i'll try
Or you can install full MacTeX, see this.
You are correct, manim is not configured to use decimals on labels, in video 6 I explain how to add decimals.
Thanks a lot...and what's about the packages of latex........
Do you want to use LaTeX or XeLaTeX? Because in your image here:
You can clearly read that you are using XeLaTeX, if you do not have it installed that is why it does not work. So better configure in manimlib/constants.py TEX_USE_CTEX = False
instead True
.
If that doesn't work, install TexMaker (it's free software) open the file tex_template.tex in manimlib/ and compile it. After that (with TEX_USE_CTEX = False in constants.py) run the scene again.
thank a lot ...i have changed False to True before i asked the question to you... so i just now i downloaded the Texmaker ,but i don't know what's the meaning of compile...
See a video tutorial about how to compile in TexMaker.
Thanks a lot