Last active
March 21, 2023 23:13
-
-
Save uwezi/fcbcbce4495245108b0b9674a711ba94 to your computer and use it in GitHub Desktop.
[Hindi language using LaTeX in Manim] How to create text in the Hindi language in Manim #manim #latex #fontspec #xetex #font
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://discord.com/channels/581738731934056449/1074019689073741935/1074019689073741935 | |
from manim import * | |
myTexTemplate = TexTemplate( | |
tex_compiler="xelatex", | |
output_format='.xdv', | |
) | |
myTexTemplate.add_to_preamble(r"\usepackage{fontspec}\setmainfont{Akshar Unicode.ttf}") | |
MathTex.set_default(tex_template=myTexTemplate) | |
Tex.set_default(tex_template=myTexTemplate) | |
class a_scene1(Scene): | |
def construct(self): | |
text=Tex(r"आप कैसे हैं?") | |
self.add(text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment