Improve README

This commit is contained in:
Benjamin Bertrand 2017-08-15 09:56:29 +03:00
parent da8c9479c2
commit da1150735c
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,25 @@
Pytex
=====
Pytex is a simple package which make aa bridge between Latex and Python.
texenv: Bring Python inside latex
---------------------------------
*texenv* is a jinja2 environment which allow to use python commands inside latex.
- **\Block{#}** is the equivalent of **{% block #%}** in Jinja2. Every python's commands will be run like in a script. **%-** is also available for line statement.
- **\Var{#}** is the equivalent of **{{#}}** which print the statment.
feed: converting template into tex files
----------------------------------------
pdflatex: Compile files with pdflatex
-------------------------------------
update_export_dict: import extract tools inside template
--------------------------------------------------------

View File

@ -23,6 +23,8 @@ EXPORT_DICT.update(__builtins__)
def update_export_dict(new_dict): def update_export_dict(new_dict):
"""Update global variable with new_dict """Update global variable with new_dict
It allows to import new functions (or modules) inside templates.
:param new_dict: needed tools across all template renders :param new_dict: needed tools across all template renders
""" """
EXPORT_DICT.update(new_dict) EXPORT_DICT.update(new_dict)