diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..d0c3cbf1 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 00000000..9534b018 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 00000000..e5e5751e --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,56 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# http://www.sphinx-doc.org/en/master/config + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +project = 'manim' +copyright = '2021, TonyCrane' +author = 'TonyCrane' + +release = '0.1' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.todo', + 'sphinx.ext.githubpages', + 'sphinx.ext.mathjax', + 'sphinx.ext.intersphinx', + 'sphinx.ext.autodoc', + 'sphinx.ext.coverage', + 'sphinx.ext.napoleon', + 'sphinx_rtd_theme' +] + +autoclass_content = 'both' +mathjax_path = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" + +templates_path = ['_templates'] +source_suffix = '.rst' +master_doc = 'index' +pygments_style = 'default' + +# html_static_path = ['assets'] +html_theme = 'sphinx_rtd_theme' +# html_favicon = '../../logo/graph.png' +html_logo = '../../logo/transparent_graph.png' +html_theme_options = { + 'logo_only': True, + 'style_nav_header_background': '#343131', +} diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 00000000..d6bcc52c --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,22 @@ +Manim's documentation +===================== + +.. image:: ../../logo/white_with_name.png + +Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as seen in the videos +at `3Blue1Brown `_. + +.. toctree:: + :maxdepth: 2 + + install/index + quickstart/index + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/source/install/index.rst b/docs/source/install/index.rst new file mode 100644 index 00000000..010866eb --- /dev/null +++ b/docs/source/install/index.rst @@ -0,0 +1,57 @@ +Installation +============ + +Manim runs on Python 3.8. + +System requirements are `FFmpeg `__, +`OpenGL `__ and +`latex `__ (optional, if you want to use +LaTeX). + +Directly +-------- + +If you want to hack on manimlib itself, clone this repository and in +that directory execute: + +.. code:: sh + + # Install python requirements + pip install -r requirements.txt + + # Try it out + python -m manim example_scenes.py OpeningManimExample + +Directly (Windows) +------------------ + +1. `Install + FFmpeg `__. +2. Install a LaTeX distribution. + `MiKTeX `__ is recommended. +3. Install the remaining Python packages. + +.. code:: sh + + git clone https://github.com/3b1b/manim.git + cd manim + pip install -r requirements.txt + python manim.py example_scenes.py OpeningManimExample + +For Anaconda +---------------- + +- Install latex as above. +- Create a conda environment using + ``conda env create -f environment.yml`` + +Using virtualenv and virtualenvwrapper +---------------------------------------------- + +After installing virtualenv and virtualenvwrapper + +.. code:: sh + + git clone https://github.com/3b1b/manim.git + mkvirtualenv -a manim -r requirements.txt manim + python -m manim example_scenes.py OpeningManimExample \ No newline at end of file diff --git a/docs/source/quickstart/index.rst b/docs/source/quickstart/index.rst new file mode 100644 index 00000000..96162f1d --- /dev/null +++ b/docs/source/quickstart/index.rst @@ -0,0 +1,2 @@ +Quick Start +=========== diff --git a/logo/transparent_graph.png b/logo/transparent_graph.png new file mode 100644 index 00000000..2c3b7473 Binary files /dev/null and b/logo/transparent_graph.png differ diff --git a/logo/white_with_name.png b/logo/white_with_name.png new file mode 100644 index 00000000..63ee0a82 Binary files /dev/null and b/logo/white_with_name.png differ