If you do "from atelier.rstgen import table" and then add 'table' to
your jinja context, then you should be able to do it as follows::
.. jinja:: messages
{% table(['Message Code', 'Message name'], stc.items()) %}
http://atelier.lino-framework.org/api/atelier.rstgen.html
(I am the author)
Luc
On 11/08/16 09:54, Markus wrote:
> Thanks to all who replied. I'm now using the sphinx-jinja extension
> and it works pretty well. I have no trouble using JSON files as input.
>
> At first I had a little trouble getting the whitespace generated
> correctly, but this was fixed by correctly using -%} and {%- when
> generating tables, and manually inserting whitespace like so:
>
> .. jinja:: messages
>
> ============ ============
> Message Code Message Name
> ============ ============
> {% for k, v in stc -%}
> {{"%-13s %s\n" % (k, v)}}
> {%- endfor %}
> ============ ============
>
> Markus
> --
> You received this message because you are subscribed to the Google
> Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.