Step 5 - Sort indexes ----------------------- Genereate ``all_csv`` file ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Once all the formulas are done (all the csv), we execute the following line: .. code-block:: python FORMULAS/append_csv.py For our example it is this: .. code-block:: python FORMULAS/append_csv.py quadratic Understandig ``all_csv`` file ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This will generate a new file in the CSV folder from step 4 called ``all_csv.csv``. Once created, I recommend opening it with the **LibreOffice Calc** program, but you can do it with English. If you try to open it with LibreOffice the following window will appear: .. image:: /_static/ODS1.png Click on one of the columns of the data and press ``Ctrl + a`` and this will select all the columns: .. image:: /_static/ODS2.png Then, in the **Column Type** property, select ``Text``, and then press Ok. .. image:: /_static/ODS3.png This all_csv file will contain the following format, is separated by steps, and each step distinguishes the following parts: .. image:: /_static/ODS4.png * **PRE_FORMULAS CONFIG** * `Before transformation` * ``pre_fade``: The symbols indicated by these indexes disappear before the animation. * ``pre_copy``: Explanation below. * `While transformation occurs` * ``run_fade``: The symbols indicated by these indexes disappear during the animation. * **POS_FORMULAS CONFIG** * `While transformation occurs` * ``run_write``: The symbols indicated by these indexes appear (with the ``Write`` animation) during the animation. * `After transformation` * ``pos_write``: The symbols indicated by these indexes appear (with the ``Write`` animation) after the animation. * ``pos_copy``: Explanation below. It is recommended to use colors to detect the symbols that are repeated in a pattern: .. image:: /_static/ODS5.png Sort indexes ^^^^^^^^^^^^^^ Then, the indexes must be related one by one. that is to say: .. list-table:: * - 0 ``a`` - 1 ``x`` - 2 ``2`` - 3 ``+`` - 4 ``b`` - 5 ``x`` - 6 ``+`` - 7 ``c`` - 8 ``=`` - 9 ``0`` * - 0 ``a`` - 1 ``x`` - 2 ``2`` - 3 ``+`` - 4 ``b`` - 5 ``x`` - 7 ``-`` - 8 ``c`` - 6 ``=`` - 9 We see that the first 6 symbols (from 0 to 5) are identical, but the rest are not, and the last symbol of the ``pre_formula`` has no relation, so it must disappear, either using ``run_fade`` or ``pre_fade``. So the sheet looks like this: .. image:: /_static/ODS6.png .. warning:: Remember to save the file in **.ods** format, because the CSV format only saves the row and column format. Special case ^^^^^^^^^^^^^^^^ In the event that **a symbol of one pre_form is transformed into two of pos_formula** then the following has to be done: (we will use `Step 2` as an example) .. image:: /_static/ODS7.png In this example we see that index ``0`` of the ``pre_formula`` is going to be transformed into index ``5`` and ``11`` of the ``pos_formula``. In these cases a copy of the index of the ``pre_formula`` must be made, then we decided that index ``0`` will become symbol ``5`` and that copy ``0`` will become ``11``. That is: .. list-table:: * - 0 ``a`` - 0 copy ``a`` - :math:`\cdots` * - 5 ``a`` - 11 ``a`` - :math:`\cdots` In the event that many formulas are transformed to one, then they simply repeat the index of the ``pos_formula`` as many times as necessary. `Here `_ is the fully ordered ODS file for reference.