Skip to content

Writing Bangla in Tex object using latexbangla #1993

Answered by rafisics
rafisics asked this question in Q&A
Discussion options

You must be logged in to vote

The issue is resolved by properly specifying the tex_compiler and output_format in the TexTemplate class:

from manim import *

class bangla(Scene):
    def construct(self):
        myTemplate = TexTemplate(tex_compiler="xelatex", output_format=".pdf", preamble=r"\usepackage[banglamainfont=Kalpurush, banglattfont=Kalpurush]{latexbangla}")
        tex = Tex(r"আইনস্টাইনের সমীকরণ, $E^2=(mc^2)^2+(pc)^2$", tex_template=myTemplate)
        self.play(Write(tex))

The output:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rafisics
Comment options

Answer selected by rafisics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant