A community-maintained Python framework for creating mathematical animations.
Add admonitions tutorial to docs (#1389)
kolibril13cf8ae0811edc
diff --git a/docs/source/contributing/documentation.rst b/docs/source/contributing/documentation.rstindex 3f28060fd..e66623000 100644--- a/docs/source/contributing/documentation.rst+++ b/docs/source/contributing/documentation.rst@@ -322,6 +322,9 @@ length with only integers.Adding type hints to functions and parameters---------------------------------------------+.. warning::+ This section is still a work in progress.+If you've never used type hints before, this is a good place to get started:https://realpython.com/python-type-checking/#hello-types.@@ -382,8 +385,99 @@ When adding type hints to manim, there are some guidelines that should be follow* numpy arrays can get type hints with ``np.ndarray``-Missing Sections-----------------+* assuming that typical path objects are either Paths or strs, one can use the typehint ``typing.Union[str, pathlib.Path]``++++Adding Blocks for Tip, Note, Important etc. (Admonitions)+---------------------------------------------------------++The following directives are called Admonitions. You+can use them to point out additional or important+information. Here are some examples:++See also+~~~~~~~~++.. code-block:: rest++ .. seealso::+ Some ideas at :mod:`~.tex_mobject`, :class:`~.Mobject`, :meth:`~.Mobject.add_updater`, :attr:`~.Mobject.depth`, :func:`~.make_config_parser`++.. seealso::+ Some ideas at :mod:`~.tex_mobject`, :class:`~.Mobject`, :meth:`~.Mobject.add_updater`, :attr:`~.Mobject.depth`, :func:`~.make_config_parser`++.. index:: reST directives; note++++Note+~~~~++.. code-block:: rest++ .. note::+ A note++.. note::+ A note++Tip+~~~++.. code-block:: rest++ .. tip::+ A tip++.. tip::+ A tip++You may also use the admonition **hint**, but this is very similar+and **tip** is more commonly used in the documentation.++Important+~~~~~~~~~++.. code-block:: rest++ .. important::+ Some important information which should be considered.++.. important::+ Some important information which should be considered.++Warning+~~~~~~~++.. code-block:: rest++ .. warning::+ Some text pointing out something that people should be warned about.++.. warning::+ Some text pointing out something that people should be warned about.++You may also use the admonitions **caution** or even **danger** if the+severity of the warning must be stressed.++Attention+~~~~~~~~~++.. code-block:: rest++ .. attention::+ A attention++.. attention::+ A attention++You can find further information about Admonitions here: https://pradyunsg.me/furo/reference/admonitions/++++Missing Sections for typehints are:+-----------------------------------* Tools for typehinting* Link to MyPy* Mypy and numpy import errors: https://realpython.com/python-type-checking/#running-mypy