Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoveBackgroundStrokeWidth----it doesn't work #10

Closed
barakasamsara opened this issue Aug 20, 2019 · 21 comments
Closed

RemoveBackgroundStrokeWidth----it doesn't work #10

barakasamsara opened this issue Aug 20, 2019 · 21 comments

Comments

@barakasamsara
Copy link

barakasamsara commented Aug 20, 2019

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

@Elteoremadebeethoven
Copy link
Owner

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

@barakasamsara
Copy link
Author

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

@barakasamsara
Copy link
Author

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

@Elteoremadebeethoven
Copy link
Owner

Elteoremadebeethoven commented Aug 20, 2019

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

@barakasamsara
Copy link
Author

barakasamsara commented Aug 22, 2019

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

@Elteoremadebeethoven
Copy link
Owner

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

@barakasamsara
Copy link
Author

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

@Elteoremadebeethoven
Copy link
Owner

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.

@barakasamsara
Copy link
Author

thanks , i'll try

@Elteoremadebeethoven
Copy link
Owner

Or you can install full MacTeX, see this.

@barakasamsara
Copy link
Author

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

@barakasamsara
Copy link
Author

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

@barakasamsara
Copy link
Author

barakasamsara commented Aug 25, 2019

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

@Elteoremadebeethoven
Copy link
Owner

You are correct, manim is not configured to use decimals on labels, in video 6 I explain how to add decimals.

@barakasamsara
Copy link
Author

Thanks a lot...and what's about the packages of latex........

@Elteoremadebeethoven
Copy link
Owner

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.

@Elteoremadebeethoven
Copy link
Owner

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.

@barakasamsara
Copy link
Author

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

@Elteoremadebeethoven
Copy link
Owner

See a video tutorial about how to compile in TexMaker.

@barakasamsara
Copy link
Author

Thanks a lot

@barakasamsara
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants