Elteoremadebeethoven/AnimationsWithManim

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 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

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 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

image

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 *.

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 *.

I'm so sorry to trouble you again ...with stupid question....
image

image

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

image
image

i have changed the list before, it means now i need to install all the packages listed on the two documents, right?

and how to install packages listed here?

for example, if i want to install the package "\usepackage[english]{babel}"
can i use the order:

brew install [english]{babel}
......

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.

thanks a lot! but i think maybe i have installed full mactex?
it was the same as you said in your video...
i don't what has happened...

image
image

image
this is the version i installed last time...

this is the source code of manim:
image
this is the video
image

but when i programmed the same code using python:

image

and i'm a little confused about the x_labeled_nums....because the paradox of it...

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:

#10 (comment)

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

image
too much awkward...
I'm so sorry to bother you again about this question,,,
I really don't know what the meaning of "compile" here... and i search it in youtube...but it seems that..