From 4d81ef8eaa15e6af6c77a30c363e94de62194124 Mon Sep 17 00:00:00 2001 From: elapouya Date: Fri, 31 Jul 2020 18:43:14 +0200 Subject: [PATCH 1/2] Update doc --- docs/index.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 4d23eab..078a564 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -383,6 +383,16 @@ Docx test templates are in `tests/templates/`. To generate final docx files:: Generated files are located in `tests/output` directory. +If you are not sure about your python environment, python-docx-template provides Pipfiles +for that:: + + pip install pipenv (if not already done) + cd python-docx-template (where Pipfiles are) + pipenv install --python 3.6 -d + pipenv shell + cd tests/ + python runtests.py + Share ----- From 6c21fab272678c0e2f851aaa3b87bba4cf8d776d Mon Sep 17 00:00:00 2001 From: Dusty Phillips <86920+dusty-phillips@users.noreply.github.com> Date: Sat, 15 Aug 2020 16:53:13 -0300 Subject: [PATCH 2/2] Fix spelling mistake --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 078a564..99a82fd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -188,7 +188,7 @@ RichText When you use ``{{ }}`` tag in your template, it will be replaced by the string contained within `var` variable. BUT it will keep the current style. If you want to add dynamically changeable style, you have to use both : the ``{{r }}`` tag AND a ``RichText`` object within `var` variable. -You can change color, bold, italic, size and so on, but the best way is to use Microsoft Word to define your own *caracter* style +You can change color, bold, italic, size and so on, but the best way is to use Microsoft Word to define your own *character* style ( Home tab -> modify style -> manage style button -> New style, select ‘Character style’ in the form ), see example in `tests/richtext.py` Instead of using ``RichText()``, one can use its shortcut : ``R()``