@@ -8,7 +8,7 @@ can be configured programmatically via `the ManimConfig class`_, at the time
8
8
of command invocation via `command-line arguments `_, or at the time the library
9
9
is first imported via `the config files `_.
10
10
11
- The most common, simplest and recommended way to set the configure Manim is
11
+ The most common, simplest, and recommended way to configure Manim is
12
12
via the command-line interface (CLI), which is described directly below.
13
13
14
14
Command-line arguments
@@ -21,7 +21,7 @@ It is used with the following arguments:
21
21
.. program-output :: manim render --help
22
22
:ellipsis: 9
23
23
24
- However, since manim defaults to the :code: `render ` command whenever no command
24
+ However, since Manim defaults to the :code: `render ` command whenever no command
25
25
is specified, the following form is far more common and can be used instead:
26
26
27
27
.. code-block :: bash
@@ -34,7 +34,7 @@ An example of using the above form is:
34
34
35
35
manim -qm file.py SceneOne
36
36
37
- This asks manim to search for a Scene class called :code: `SceneOne ` inside the
37
+ This asks Manim to search for a Scene class called :code: `SceneOne ` inside the
38
38
file ``file.py `` and render it with medium quality (specified by the ``-qm `` flag).
39
39
40
40
Another frequently used flag is ``-p `` ("preview"), which makes manim
@@ -74,7 +74,7 @@ A list of all CLI flags
74
74
The ManimConfig class
75
75
*********************
76
76
77
- The most direct way of configuring manim is through the global ``config `` object,
77
+ The most direct way of configuring Manim is through the global ``config `` object,
78
78
which is an instance of :class: `.ManimConfig `. Each property of this class is
79
79
a config option that can be accessed either with standard attribute syntax or
80
80
with dict-like syntax:
@@ -139,22 +139,22 @@ rendered in our documentation with a reference frame.
139
139
The config files
140
140
****************
141
141
142
- As the last example shows, executing manim from the command- line may involve
143
- using many flags at the same time . This may become a nuisance if you must
144
- execute the same script many times in a short time period, for example when
145
- making small incremental tweaks to your scene script. For this reason, manim
142
+ As the last example shows, executing Manim from the command line may involve
143
+ using many flags simultaneously . This may become a nuisance if you must
144
+ execute the same script many times in a short time period, for example, when
145
+ making small incremental tweaks to your scene script. For this reason, Manim
146
146
can also be configured using a configuration file. A configuration file is a
147
147
file ending with the suffix ``.cfg ``.
148
148
149
149
To use a local configuration file when rendering your scene, you must create a
150
- file with name ``manim.cfg `` in the same directory as your scene code.
150
+ file with the name ``manim.cfg `` in the same directory as your scene code.
151
151
152
- .. warning :: The config file **must** be named ``manim.cfg``. Currently, manim
152
+ .. warning :: The config file **must** be named ``manim.cfg``. Currently, Manim
153
153
does not support config files with any other name.
154
154
155
155
The config file must start with the section header ``[CLI] ``. The
156
- configuration options under this header have the same name as the CLI flags,
157
- and serve the same purpose. Take for example the following config file.
156
+ configuration options under this header have the same name as the CLI flags
157
+ and serve the same purpose. Take, for example, the following config file.
158
158
159
159
.. code-block :: ini
160
160
@@ -188,8 +188,8 @@ is in the same directory as <file.py>,
188
188
189
189
Since config files are meant to replace CLI flags, all CLI flags can be set via
190
190
a config file. Moreover, any config option can be set via a config file,
191
- whether or not it has an associated CLI flag. For a list of all CLI flags and
192
- all config options, see the bottom of this document .
191
+ whether or not it has an associated CLI flag. See the bottom of this document
192
+ for a list of all CLI flags and config options .
193
193
194
194
Manim will look for a ``manim.cfg `` config file in the same directory as the
195
195
file being rendered, and **not ** in the directory of execution. For example,
@@ -215,7 +215,7 @@ As explained in the previous section, a :code:`manim.cfg` config file only
215
215
affects the scene scripts in its same folder. However, the user may also
216
216
create a special config file that will apply to all scenes rendered by that
217
217
user. This is referred to as the **user-wide ** config file, and it will apply
218
- regardless of where manim is executed from, and regardless of where the scene
218
+ regardless of where Manim is executed from, and regardless of where the scene
219
219
script is stored.
220
220
221
221
The user-wide config file lives in a special folder, depending on the operating
@@ -235,14 +235,14 @@ Here, :code:`UserDirectory` is the user's home folder.
235
235
.. warning :: Do not store scene scripts in the same folder as the user-wide
236
236
config file. In this case, the behavior is undefined.
237
237
238
- Whenever you use manim from anywhere in the system, manim will look for a
238
+ Whenever you use Manim from anywhere in the system, Manim will look for a
239
239
user-wide config file and read its configuration.
240
240
241
241
242
242
Cascading config files
243
243
======================
244
244
245
- What happens if you execute manim and it finds both a folder-wide config file
245
+ What happens if you execute Manim and it finds both a folder-wide config file
246
246
and a user-wide config file? Manim will read both files, but if they are
247
247
incompatible, **the folder-wide file takes precedence **.
248
248
@@ -280,7 +280,7 @@ executing
280
280
281
281
manim -o myscene -c RED < file.py> SceneName
282
282
283
- There is also a **library-wide ** config file that determines manim 's default
283
+ There is also a **library-wide ** config file that determines Manim 's default
284
284
behavior and applies to every user of the library. It has the least
285
285
precedence, so any config options in the user-wide and any folder-wide files
286
286
will override the library-wide file. This is referred to as the *cascading *
@@ -301,27 +301,27 @@ Order of operations
301
301
302
302
303
303
304
- With so many different ways of configuring manim , it can be difficult to know
305
- when each config option is being set. In fact, this will depend on how manim
304
+ With so many different ways of configuring Manim , it can be difficult to know
305
+ when each config option is being set. In fact, this will depend on how Manim
306
306
is being used.
307
307
308
- If manim is imported from a module, then the configuration system will follow
308
+ If Manim is imported from a module, then the configuration system will follow
309
309
these steps:
310
310
311
311
1. The library-wide config file is loaded.
312
- 2. The user-wide and folder-wide files are loaded, if they exist.
312
+ 2. The user-wide and folder-wide files are loaded if they exist.
313
313
3. All files found in the previous two steps are parsed in a single
314
314
:class: `ConfigParser ` object, called ``parser ``. This is where *cascading *
315
315
happens.
316
- 4. :class: `logging.Logger ` is instantiated to create manim 's global ``logger ``
316
+ 4. :class: `logging.Logger ` is instantiated to create Manim 's global ``logger ``
317
317
object. It is configured using the "logger" section of the parser,
318
318
i.e. ``parser['logger'] ``.
319
319
5. :class: `ManimConfig ` is instantiated to create the global ``config `` object.
320
320
6. The ``parser `` from step 3 is fed into the ``config `` from step 5 via
321
321
:meth: `ManimConfig.digest_parser `.
322
322
7. Both ``logger `` and ``config `` are exposed to the user.
323
323
324
- If manim is being invoked from the command- line, all of the previous steps
324
+ If Manim is being invoked from the command line, all of the previous steps
325
325
happen, and are complemented by:
326
326
327
327
8. The CLI flags are parsed and fed into ``config `` via
0 commit comments