mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Show a notice if both tabularcolumns and :widths: are given (refs: #4196)
This commit is contained in:
parent
f3f829664d
commit
c399357f38
@ -323,6 +323,11 @@ following directive exists:
|
|||||||
Sphinx's merged cells interact well with ``p{width}``, ``\X{a}{b}``, ``Y{f}``
|
Sphinx's merged cells interact well with ``p{width}``, ``\X{a}{b}``, ``Y{f}``
|
||||||
and tabulary's columns.
|
and tabulary's columns.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
:rst:dir:`tabularcolumns` conflicts with ``:widths:`` option of table
|
||||||
|
directives. If both are specified, ``:widths:`` option will be ignored.
|
||||||
|
|
||||||
Math
|
Math
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -1376,6 +1376,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
|||||||
self.table = Table(node)
|
self.table = Table(node)
|
||||||
if self.next_table_colspec:
|
if self.next_table_colspec:
|
||||||
self.table.colspec = '{%s}\n' % self.next_table_colspec
|
self.table.colspec = '{%s}\n' % self.next_table_colspec
|
||||||
|
if 'colwidths-given' in node.get('classes', []):
|
||||||
|
logger.info('both tabularcolumns and :widths: option are given. '
|
||||||
|
':widths: is ignored.', location=node)
|
||||||
self.next_table_colspec = None
|
self.next_table_colspec = None
|
||||||
|
|
||||||
def depart_table(self, node):
|
def depart_table(self, node):
|
||||||
|
Loading…
Reference in New Issue
Block a user