more_autosummary.column_widths¶
Sphinx extension to allow customisation of column widths in autosummary tables with the LaTeX builder.
New in version 3.0.0.
Usage¶
This extension provides the autosummary-widths directive.
This sets the autosummary table’s column widths with the LaTeX builder
until the end of the current reStructuredText document,
or until the next autosummary-widths directive.
-
.. autosummary-widths::¶ Set the width of the autosummary table’s columns with the LaTeX builder.
The directive takes up to two arguments – the column widths as vulgar fractions (e.g.
5/10). If only one argument is provided, this sets the width of the first column, and the width of the second column is calculated from it. If both arguments are provided, they set the width of the first and second columns respectively.Examples:
.. autosummary-widths:: 5/10 .. autosummary-widths:: 3/10, 7/10 .. autosummary-widths:: 35/100
Attention
This directive ignores the
autosummary_col_typeconfiguration option.
API Reference¶
Classes:
|
Customised |
|
Sphinx directive which configures the column widths of an |
Functions:
|
|
|
-
class
AutosummaryWidths(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
PatchedAutosummaryCustomised
autosummarydirective with customisable width with the LaTeX builder.Attention
This directive ignores the
autosummary_col_typeconfiguration option.Methods:
get_table(items)Generate a proper list of table nodes for autosummary:: directive.
-
class
WidthsDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
SphinxDirectiveSphinx directive which configures the column widths of an
autosummarytable for the remainder of the document, or until the next autosummary-widths directive.Methods:
parse_widths(raw_widths)Parse a width string (as a vulgar fraction) into a list of 2-element
(numerator, denominator)tuples.run()Process the directive's arguments.
-
configure(app, config)[source]¶ Configure
sphinx_toolbox.more_autosummary.column_widths.- Parameters:
app (
Sphinx) – The Sphinx application.config (
Config)
-
setup(app)[source]¶ Setup
sphinx_toolbox.more_autosummary.column_widths.- Parameters:
app (
Sphinx) – The Sphinx application.- Return type: