Git Product home page Git Product logo

Comments (3)

kilacoda avatar kilacoda commented on August 19, 2024

Works for me though:
tikz
Could you show the .tex file, please?

from chanim.

alexander-schoch-github avatar alexander-schoch-github commented on August 19, 2024

Of course I forgot the minus sign...

corresponding .tex-file:

\documentclass[preview]{standalone}

\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{dsfont}
\usepackage{setspace}
\usepackage{tipa}
\usepackage{relsize}
\usepackage{textcomp}
\usepackage{mathrsfs}
\usepackage{calligra}
\usepackage{wasysym}
\usepackage{ragged2e}
\usepackage{physics}
\usepackage{xcolor}
\usepackage{microtype}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes.geometric}
\usepackage{chemfig}
\usepackage{mhchem}
\DisableLigatures{encoding = *, family = * }
%\usepackage[UTF8]{ctex}
\linespread{1}

\begin{document}

\begin{align*}
\setchemfig{atom sep = 2em}
\chemfig{-[:30](=[2]O)-[:-30]OH}
\end{align*}

\end{document}

I don't see anything wrong with it at a short glance.

from chanim.

alexander-schoch-github avatar alexander-schoch-github commented on August 19, 2024

Update: After some messing around, I found out that the compilation from .dvi to .svg failed. This issue could be resolved by using \documentclass[preview,dvisvgm]{standalone} in the preamble. Now, the .svg file is generated correctly.

However, afterwards, this .svg file is not inserted into the video/image correctly, as seen here (code below):

ExampleTikz

This appears to be a general manim problem, though, which is why I opened an issue on 3b1b/manim.

As this problem does not occur in your case, I am assuming that it only happens on linux-based operating systems.

Code for image above:

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{tikzpicture}
                \draw (0,0) -- (1,0);
                \node at (1,0) {sometext};
            \end{tikzpicture}
            """
            )
        self.play(Write(circuit))
        self.wait()

from chanim.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.