more docstrings

This commit is contained in:
Aron Fischer 2020-10-12 16:26:12 +02:00
commit 34df8900f3
2 changed files with 22 additions and 12 deletions

View file

@ -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)"

View file

@ -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