Comments (9)
Ah yeah, guess I missed that when I was moving to the TexTemplate
s. Will push a fix soon.
from chanim.
@emonhossainraihan fixed in 4c079c6
from chanim.
Edit: So I realized what the issue may be. Whenever I try to use the Write function within self.play, apparently the arrow (and everything after it) cannot be written. Hope this makes sense. If you need clarification do let me know.
Curious to know why it's having that issue.
from chanim.
I was having such problems with Reaction
as well earlier but it somehow automatically worked after a few days. I have no idea whatsoever why.
from chanim.
My guess is that it could be a rendering issue of some sort. I was digging deeper into other issues that could appear with using chemfig through manim and found this: malhotra5/Manim-Tutorial#10
I'm assuming that you hadn't modified the code in any way and that's why you're unsure as to why it suddenly works now haha.
from chanim.
Haha. Though that should be fixed because everything in chanim is with stroke_width=2
. That's why this thing works in the first place.
from chanim.
Gotcha.
Well I'll still keep this issue open. I'll give you the code that I made and a video showing the issues:
from manimlib.imports import *
from chanimlib.imports import *
class ReactionScheme(Scene):
def construct(self):
molecule1 = ['O*3(---)']
molecule2 = ['O*4(----)']
reaction1 = Reaction(molecule1, molecule2, 'forward', 1, 0, 'white', 'heat', 'neat')
reaction1.set_stroke(WHITE, 1)
self.play(reaction1.shift, LEFT*1)
self.play(Write(reaction1))
Link to video: https://vimeo.com/413870747
Let me know if you spot anything that's off. I'm also reusing the default chem_objects.py and constants.py (your version).
Also I'm curious to know if this issue happens if you were to reinstall manim/chanim.
Thanks!
from chanim.
I guess I can rule out the possibility of this being an issue specific to my system then. And for some reason, this problem's occurring again for me.
from chanim.
@kilacoda I was facing an issue with ChemArrow
, like
CArrow(text_up="Upper text",length=2)
give me,
AttributeError: ChemArrow object has no attribute 'template_tex_file_body'
I was guessing the problem was there wasn't defined what template_tex_file_body
is inside the ChemArrow class,
class ChemArrow(MathTex):
...
self.template_tex_file_body = self.template_tex_file_body.replace(
"\\setchemfig{atom sep=2em}", f"{set_chemfig}"
)
arrow = "\\arrow{%s[%s][%s]}" % (self.arrows[_type], text_up, text_down)
MathTex.__init__(self, arrow, stroke_width=stroke_width, **kwargs)
from chanim.
Related Issues (17)
- Too much chemfig code exported to TeX-files HOT 1
- temporary files are saved in the wrong location
- Bonds not displayed HOT 3
- NameError: name 'self' is not defined HOT 1
- Hatched bonds HOT 1
- Examples usage? HOT 4
- OSError: no library called "cairo" was found HOT 3
- ImportError: cannot import name 'SmallDot' from 'manim.mobject.geometry' HOT 1
- How to implement reaction scheme in chanim HOT 7
- LaTeX compiler error
- New Manim Version not compatible HOT 2
- ImportError: cannot import name 'OpenGLMathTex' from 'manim.opengl' HOT 3
- Incompatible with ManimCE v0.17
- 2022-12 updates necessary! HOT 3
- compatibility with manim 0.17???
- TexSymbol is not defined HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chanim.