From a7697095d61012ccd2b6a1fb2281556d24e70d58 Mon Sep 17 00:00:00 2001 From: Tony031218 <975062472@qq.com> Date: Mon, 25 Jan 2021 10:20:41 +0800 Subject: [PATCH] finish development category and improve style --- .github/workflows/docs.yml | 9 +-- docs/requirements.txt | 4 ++ docs/source/_static/custom.css | 8 +++ docs/source/development/about.rst | 30 +++++++++- docs/source/development/changelog.rst | 3 +- docs/source/development/contributing.rst | 59 ++++++++++++++++++++ docs/source/development/contribution.rst | 3 - docs/source/getting_started/installation.rst | 29 ++++++---- docs/source/index.rst | 10 +--- 9 files changed, 123 insertions(+), 32 deletions(-) create mode 100644 docs/requirements.txt create mode 100644 docs/source/development/contributing.rst delete mode 100644 docs/source/development/contribution.rst diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 03f2d334..fdb07d7a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,16 +11,11 @@ jobs: - name: Checkout uses: actions/checkout@master - - name: Install sphinx + - name: Install sphinx and manim env run: | pip3 install --upgrade pip sudo apt install python3-setuptools - pip3 install furo==2020.10.5b9 - pip3 install jinja2 - pip3 install sphinx-copybutton - - - name: Install manim env - run: | + pip3 install -r docs/requirements.txt pip3 install -r requirements.txt - name: Build document with Sphinx diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..eacd2d16 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,4 @@ +sphinx>=1.8 +sphinx-copybutton +furo==2020.10.5b9 +jinja2 \ No newline at end of file diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css index 5cc727b5..b7398e3c 100644 --- a/docs/source/_static/custom.css +++ b/docs/source/_static/custom.css @@ -1,3 +1,11 @@ +span.caption-text { + font-size: larger; +} + +span.pre { + font-size: initial; +} + .highlight-python.notranslate { margin-top: 0em; } diff --git a/docs/source/development/about.rst b/docs/source/development/about.rst index 91a5f60c..798d5a86 100644 --- a/docs/source/development/about.rst +++ b/docs/source/development/about.rst @@ -1,3 +1,31 @@ About ===== -WIP \ No newline at end of file + +About Manim +----------- + +Manim is an animation engine for explanatory math videos. +You can use it to make math videos (or other fields) like 3Blue1Brown. + +There are mainly two versions here: + +- `3b1b/manim `_ : Maintained by Grant Sanderson of 3Blue1Brown. + +Using OpenGL and its GLSL language to use GPU for rendering. It has higher efficiency, +faster rendering speed, and supports real-time rendering and interaction. + +- `ManimCommunity/manim `_ : Maintained by Manim Community Dev Team. + +Using cairo to use CPU for rendering. There is better documentation and +a more open contribution community. + +About this documentation +------------------------ + +This documentation is based on the version in `3b1b/manim `_. +Created by `TonyCrane `_ and in production. + +Among them, the ``manim_example_ext`` extension for Sphinx refers to +`the documentation of ManimCommunity `_. + +If you want to contribute to manim or this document, please see: :doc:`contributing` \ No newline at end of file diff --git a/docs/source/development/changelog.rst b/docs/source/development/changelog.rst index eb109477..1460d9b6 100644 --- a/docs/source/development/changelog.rst +++ b/docs/source/development/changelog.rst @@ -1,3 +1,4 @@ Changelog ========= -WIP \ No newline at end of file + +No changes now. \ No newline at end of file diff --git a/docs/source/development/contributing.rst b/docs/source/development/contributing.rst new file mode 100644 index 00000000..ce19472c --- /dev/null +++ b/docs/source/development/contributing.rst @@ -0,0 +1,59 @@ +Contributing +============ + +Accept any contribution you make :) + +- **Contribute to the manim source code**: + +Please fork to your own repository and make changes, submit a pull request, and fill in +the motivation for the change following the instructions in the template. We will check +your pull request in detail (this usually takes a while, please be patient) + +- **Contribute to the documentation**: + +Also submit a pull request and write down the main changes. + +- **If you find a bug in the code**: + +Please open an issue and fill in the found problem and your environment according +to the template. (But please note that if you think this problem is just a problem +of yourself, rather than a problem of source code, it is recommended that you ask a +question in the `Q&A category `_ +of the discussion page) + +- **You are welcome to share the content you made with manim**: + +Post it in the `show and tell category `_ +of the discussion page. + +- **You are also welcome to share some of your suggestions and ideas**: + +Post them in the `ideas category `_ +of the discussion page. + +How to build this documentation +------------------------------- + +- Clone the 3b1b/manim repository + +.. code-block:: sh + + git clone https://github.com/3b1b/manim.git + # or your own repo + # git clone https://github.com//manim.git + cd manim + +- Install python package dependencies + +.. code-block:: sh + + pip install -r docs/requirements.txt + +- Go to the ``docs/`` folder and build + +.. code-block:: sh + + cd docs/ + make html + +- The output document is located in ``docs/build/html/`` \ No newline at end of file diff --git a/docs/source/development/contribution.rst b/docs/source/development/contribution.rst deleted file mode 100644 index 9ba0ff5e..00000000 --- a/docs/source/development/contribution.rst +++ /dev/null @@ -1,3 +0,0 @@ -Contribution -============ -WIP \ No newline at end of file diff --git a/docs/source/getting_started/installation.rst b/docs/source/getting_started/installation.rst index 010866eb..f9649e86 100644 --- a/docs/source/getting_started/installation.rst +++ b/docs/source/getting_started/installation.rst @@ -3,10 +3,12 @@ Installation Manim runs on Python 3.8. -System requirements are `FFmpeg `__, -`OpenGL `__ and -`latex `__ (optional, if you want to use -LaTeX). +System requirements are: + +- `FFmpeg `__ +- `OpenGL `__ (included in python package ``PyOpenGL``) +- `LaTeX `__ (optional, if you want to use LaTeX) +- `cairo `_ (included in python package ``pycairo``. optional, if you want to use ``Text`` in manim) Directly -------- @@ -26,9 +28,9 @@ Directly (Windows) ------------------ 1. `Install - FFmpeg `__. + FFmpeg `__, and make sure that its path is in the PATH environment variable. 2. Install a LaTeX distribution. - `MiKTeX `__ is recommended. + `TeXLive-full `__ is recommended. 3. Install the remaining Python packages. .. code:: sh @@ -39,16 +41,21 @@ Directly (Windows) python manim.py example_scenes.py OpeningManimExample For Anaconda ----------------- +------------ -- Install latex as above. +- Install FFmpeg and LaTeX as above. - Create a conda environment using - ``conda env create -f environment.yml`` + +.. code-block:: sh + + git clone https://github.com/3b1b/manim.git + cd manim + conda env create -f environment.yml Using virtualenv and virtualenvwrapper ----------------------------------------------- +-------------------------------------- -After installing virtualenv and virtualenvwrapper +After installing ``virtualenv`` and ``virtualenvwrapper`` .. code:: sh diff --git a/docs/source/index.rst b/docs/source/index.rst index 107afc60..c320657e 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -31,13 +31,5 @@ at `3Blue1Brown `_. :caption: Development development/changelog - development/contribution + development/contributing development/about - - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`search`