Skip to content

Manim Devanagari

avnlearn edited this page Sep 16, 2024 · 1 revision

Manim Devanagari

Overview

The manim_devanagari package provides custom classes and functions for rendering text and mathematical expressions in the Devanagari script using the Manim animation engine. This package extends the functionality of Manim, allowing users to create animations that include Hindi text and mathematical notation seamlessly.

Features

  • Custom Tex and MathTex Classes: Render LaTeX and mathematical expressions in Devanagari.
  • Text Styles Support: Includes plain text, markup text, and answers.
  • Grouping Classes: Organize related text and solution elements effectively.
  • Cancel Effect: Visually striking annotations for emphasis.

Installation

To use this package, ensure you have Manim installed and set up for rendering Devanagari text using XeLaTeX.

Usage

To utilize the features of this package, import the necessary classes and create instances as needed. Below is an example of how to use the package:

from manim_devanagari import Deva_Tex, Deva_MathTex, Solution

# Create a Devanagari text object
devanagari_text = Deva_Tex("नमस्ते")

# Create a mathematical expression in Devanagari
math_expression = Deva_MathTex(r"\frac{a}{b} = c")

# Create a solution object
solution = Solution("यह एक समाधान है।")

Classes

Tex

Custom class for rendering LaTeX text with specified color and font size.

Deva_Tex

Custom class for rendering Devanagari text.

MathTex

Custom class for rendering mathematical expressions with specified color and font size.

Deva_MathTex

Custom class for rendering Devanagari mathematical expressions.

Text

Custom class for rendering plain text with specified color and font size.

Deva_Text

Custom class for rendering Devanagari text.

Deva_MarkupText

Custom class for rendering Devanagari text with markup support.

Question_Header

Custom class for rendering question headers.

Solution

Custom class for rendering solutions.

Solution_Group

Custom class for grouping solution elements.

Answer

Custom class for rendering answers.

Answer_Group

Custom class for grouping answer elements.

Cancel

Custom class for creating a cancel effect on a given mobject.

Functions

Str_Join

Join strings with a specified separator (space or newline).

Parameters:

  • *args: Strings to be joined.
  • space (bool): If True, join with a space; otherwise, join with a newline. Default is False.

Returns: The joined string.

Bookmark

Create a bookmark in the format required for rendering.

Parameters:

  • mark (str): The mark to be used for the bookmark.

Returns: The formatted bookmark string.

Author

Guddu Kumar

Version

0.0.2

License

This package is open-source and available for use under the terms specified in the repository.


For more information, examples, and updates, please visit the GitHub repository.