zaz/doc/source/main/examples_writer.rst

25 lines
435 B
ReStructuredText
Raw Normal View History

2021-06-03 17:47:12 -05:00
2021-06-03 22:09:34 -05:00
For Writer
----------
2021-06-03 17:47:12 -05:00
2021-06-03 22:09:34 -05:00
Set autostyle in table
~~~~~~~~~~~~~~~~~~~~~~
2021-06-03 17:47:12 -05:00
.. code-block:: python
2021-06-03 22:09:34 -05:00
def writer_table_set_style():
doc = app.active
table = doc.tables[0]
table.style = 'Academic'
2021-06-03 17:47:12 -05:00
return
Insert math formula
~~~~~~~~~~~~~~~~~~~
.. code-block:: python
formula = '%LAMBDA_{deg","t}=1 + %alpha_deg SQRT {M_t over M_{(t=0)}-1}~"."'
text = app.selection
text.insert_math(formula)