Reorganize documentation

This commit is contained in:
Eric Lapouyade 2022-08-05 11:10:11 +02:00
parent 1a4a5f5723
commit 4047845c3a

View File

@ -117,7 +117,7 @@ But use this instead in your docx template::
Here is my paragraph
{%p endif %}
This syntax is possible because MS Word considers each line as a new paragraph (if you do not use CTRL-RETURN).
This syntax is possible because MS Word considers each line as a new paragraph (if you do not use SHIFT-RETURN).
Display variables
.................
@ -148,10 +148,6 @@ Use instead::
{{ myvariable }}
{{r myrichtext }}
**IMPORTANT** : Do not use 2 times ``{{r`` in the same run. Use RichText.add()
method to concatenate several strings and styles at python side and only one
``{{r`` at template side.
Comments
........
@ -248,6 +244,10 @@ To specify a region, you have to prefix your font name this that region and a co
you do not specify a style in ``RichText()``, the style will go back to a microsoft word default style.
This will affect only character styles, not the paragraph styles (MSWord manages this 2 kind of styles).
**IMPORTANT** : Do not use 2 times ``{{r`` in the same run. Use RichText.add()
method to concatenate several strings and styles at python side and only one
``{{r`` at template side.
**Important** : ``RichText`` objects are rendered into xml *before* any filter is applied
thus ``RichText`` are not compatible with Jinja2 filters. You cannot write in your template something like ``{{r <var>|lower }}``.
Only solution is instead to do any filtering into your python code when creating the ``RichText`` object.