Manim无法在MacO中正确绘制电路

时间:2020-05-27 08:26:28

标签: latex manim

我试图在MacOs Mojave 10.14.6上用manim绘制以下电路:

from manimlib.imports import *                 

class TikzMobject(TextMobject):
    CONFIG = {
        "stroke_width": 3,
        "fill_opacity": 0,
        "stroke_opacity": 1,
    }

class ExampleTikz(Scene):
    def construct(self):
        circuit = TikzMobject(r"""
            \begin{circuitikz}[american voltages]
            \draw
              (0,0) to [short, *-] (6,0)
              to [V, l_=$\mathrm{j}{\omega}_m \underline{\psi}^s_R$] (6,2) 
              to [R, l_=$R_R$] (6,4) 
              to [short, i_=$\underline{i}^s_R$] (5,4) 
              (0,0) to [open,v^>=$\underline{u}^s_s$] (0,4) 
              to [short, *- ,i=$\underline{i}^s_s$] (1,4) 
              to [R, l=$R_s$] (3,4)
              to [L, l=$L_{\sigma}$] (5,4) 
              to [short, i_=$\underline{i}^s_M$] (5,3) 
              to [L, l_=$L_M$] (5,0); 
              \end{circuitikz}
            """
            )
        self.play(Write(circuit))
        self.wait()

应该可以正常工作并绘制漂亮的电路。但是然后我得到的结果是这个: enter image description here

有人知道这仅仅是MacOs问题还是如何解决?

编辑:我在Linux(Fedora)上尝试过,它运行完美。由于MacO,一定是一个问题

0 个答案:

没有答案