Le 10/01/2018 à 20:59, 'Erin Kelly' via sphinx-users a écrit : > Apparently in 1.6.1 the default table alignment changed from left to center. > I want all my tables to align left. > > The change documentation says I can use Docutils :align: option but that only > works if I'm using a .. table:: tag > I'm using this style of tables: > +------------+------------+-----------+ > | Header 1 | Header 2 | Header 3 | > +============+============+===========+ > | body row 1 | column 2 | column 3 | > +------------+------------+-----------+ > > I tried throwing the table tag above this kind of table but it didn't > understand that. > > Is there something I can put in the latex preamble to reset the default to > align left? >
Hi, You can override the templates found at https://github.com/sphinx-doc/sphinx/tree/stable/sphinx/templates/latex by your own, according to instructions at bottom of http://www.sphinx-doc.org/en/stable/latex.html In that case just replace the <%- if table.align == 'center' -%> [c] <%- elif table.align == 'left' -%> [l] <%- elif table.align == 'right' -%> [r] <%- endif -%> block by a [l] for the longtable template and <% if table.align -%> <%- if table.align == 'center' -%> \centering <%- elif table.align == 'left' -%> \raggedright <%- else -%> \raggedleft <%- endif %> <%- else -%> \centering <%- endif %> by \raggedright for tabular and tabulary Jean-François -- 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.
