Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

more docstrings

Aron Fischer34df8900f38b
diff --git a/example_scenes/advanced_tex_fonts.py b/example_scenes/advanced_tex_fonts.py
index 67098aa9f..04d8ce74c 100644
--- a/example_scenes/advanced_tex_fonts.py
+++ b/example_scenes/advanced_tex_fonts.py
@@ -47,7 +47,19 @@ class TexFontTemplateManual(Scene):
class TexFontTemplateLibrary(Scene):
"""An example scene that uses TexTemplate objects from the TexFontTemplates collection
- to create sample LaTeX output in every font that will compile on the local system"""
+ to create sample LaTeX output in every font that will compile on the local system.
+
+ Please Note:
+ Many of the in the TexFontTemplates collection require that specific fonts
+ are installed on your local machine.
+ For example, choosing the template TexFontTemplates.comic_sans will
+ not compile if the Comic Sans Micrososft font is not installed.
+
+ This scene will only render those Templates that do not cause a TeX
+ compilation error on your system. Furthermore, some of the ones that do render,
+ may still render incorrectly. This is beyond the scope of manim.
+ Feel free to experiment.
+ """
def construct(self):
def write_one_line(template):
@@ -56,17 +68,6 @@ class TexFontTemplateLibrary(Scene):
self.wait(1)
self.play(FadeOut(x))
- # Please Note:
- # Many of these templates require that specific fonts
- # are installed on your local machine.
- # For example, choosing the template TexFontTemplates.chalkduster will
- # not compile if the chalkduster font is not installed.
- #
- # This scene will only render those Templates that do not cause a TeX
- # compilation error on your system. Some of the ones that do render,
- # may render incorrectly. This is beyond the scope of manim.
- # Feel free to experiment.
-
examples = [
TexFontTemplates.american_typewriter, # "American Typewriter"
TexFontTemplates.antykwa, # "Antykwa Półtawskiego (TX Fonts for Greek and math symbols)"
diff --git a/manim/utils/tex_templates.py b/manim/utils/tex_templates.py
index 7e047ef06..beb0144a5 100644
--- a/manim/utils/tex_templates.py
+++ b/manim/utils/tex_templates.py
@@ -905,6 +905,15 @@ class TexFontTemplates(object):
As a value for the keyword argument tex_template of Tex() and MathTex() mobjects
``Tex("My TeX code", tex_template=TexFontTemplates.comic_sans)``
+ Notes
+ ------
+ Many of these templates require that specific fonts
+ are installed on your local machine.
+ For example, choosing the template TexFontTemplates.comic_sans will
+ not compile if the Comic Sans Microsoft font is not installed.
+
+ To experiment, try to render the TexFontTemplateLibrary example scene:
+ ``manim path/to/manim/example_scenes/advanced_tex_fonts.py TexFontTemplateLibrary -p -ql``
"""
american_typewriter = americantypewriter