Skip to content

Commit 34df890

Browse files
author
Aron Fischer
committed
more docstrings
1 parent 143f674 commit 34df890

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

example_scenes/advanced_tex_fonts.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,19 @@ def construct(self):
4747

4848
class TexFontTemplateLibrary(Scene):
4949
"""An example scene that uses TexTemplate objects from the TexFontTemplates collection
50-
to create sample LaTeX output in every font that will compile on the local system"""
50+
to create sample LaTeX output in every font that will compile on the local system.
51+
52+
Please Note:
53+
Many of the in the TexFontTemplates collection require that specific fonts
54+
are installed on your local machine.
55+
For example, choosing the template TexFontTemplates.comic_sans will
56+
not compile if the Comic Sans Micrososft font is not installed.
57+
58+
This scene will only render those Templates that do not cause a TeX
59+
compilation error on your system. Furthermore, some of the ones that do render,
60+
may still render incorrectly. This is beyond the scope of manim.
61+
Feel free to experiment.
62+
"""
5163

5264
def construct(self):
5365
def write_one_line(template):
@@ -56,17 +68,6 @@ def write_one_line(template):
5668
self.wait(1)
5769
self.play(FadeOut(x))
5870

59-
# Please Note:
60-
# Many of these templates require that specific fonts
61-
# are installed on your local machine.
62-
# For example, choosing the template TexFontTemplates.chalkduster will
63-
# not compile if the chalkduster font is not installed.
64-
#
65-
# This scene will only render those Templates that do not cause a TeX
66-
# compilation error on your system. Some of the ones that do render,
67-
# may render incorrectly. This is beyond the scope of manim.
68-
# Feel free to experiment.
69-
7071
examples = [
7172
TexFontTemplates.american_typewriter, # "American Typewriter"
7273
TexFontTemplates.antykwa, # "Antykwa Półtawskiego (TX Fonts for Greek and math symbols)"

manim/utils/tex_templates.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,15 @@ class TexFontTemplates(object):
905905
As a value for the keyword argument tex_template of Tex() and MathTex() mobjects
906906
``Tex("My TeX code", tex_template=TexFontTemplates.comic_sans)``
907907
908+
Notes
909+
------
910+
Many of these templates require that specific fonts
911+
are installed on your local machine.
912+
For example, choosing the template TexFontTemplates.comic_sans will
913+
not compile if the Comic Sans Microsoft font is not installed.
914+
915+
To experiment, try to render the TexFontTemplateLibrary example scene:
916+
``manim path/to/manim/example_scenes/advanced_tex_fonts.py TexFontTemplateLibrary -p -ql``
908917
"""
909918

910919
american_typewriter = americantypewriter

0 commit comments

Comments
 (0)