Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Sphinx LaTeX builder support #195

Merged
merged 3 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/195-latex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- "Adjust default RST output to work better with Spinx's LaTeX builder (https://github.com/ansible-community/antsibull-docs/pull/195)."
3 changes: 3 additions & 0 deletions changelogs/fragments/195-problems.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
known_issues:
- "When using Sphinx builders other than HTML, the indentation for nested options and return values is missing,
and the collection links section is empty (https://github.com/ansible-community/antsibull-docs/pull/195)."
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
{% from 'macros/version_added.rst.j2' import version_added_rst %}

{% macro in_rst(attributes, role_entrypoint=None) %}
.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Attribute
- Support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
{% from 'macros/version_added.rst.j2' import version_added_rst, version_added_html %}

{% macro in_rst(elements, suboption_key='suboptions', parameter_html_prefix='', parameter_rst_prefix='', role_entrypoint=None) %}
.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
{% from 'macros/version_added.rst.j2' import version_added_rst, version_added_html %}

{% macro in_rst(elements, role_entrypoint=None) %}
.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Key
- Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,13 @@ The below requirements are needed on the host that executes this module.
Parameters
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down Expand Up @@ -288,12 +289,13 @@ Parameters
Attributes
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Attribute
- Support
Expand Down Expand Up @@ -479,12 +481,13 @@ Return Values
-------------
Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this module:

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Key
- Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,13 @@ The below requirements are needed on the host that executes this module.
Parameters
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down Expand Up @@ -245,12 +246,13 @@ Parameters
Attributes
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Attribute
- Support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ Synopsis
Parameters
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ Input

This describes the input of the filter, the value before ``| ns2.col.bar``.

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down Expand Up @@ -140,12 +141,13 @@ Positional parameters
This describes positional parameters of the filter. These are the values ``positional1``, ``positional2`` and so on in the following
example: ``input | ns2.col.bar(positional1, positional2, ...)``

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down Expand Up @@ -242,12 +244,13 @@ Keyword parameters
This describes keyword parameters of the filter. These are the values ``key1=value1``, ``key2=value2`` and so on in the following
example: ``input | ns2.col.bar(key1=value1, key2=value2, ...)``

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down Expand Up @@ -346,12 +349,13 @@ Examples
Return Value
------------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Key
- Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ Input

This describes the input of the test, the value before ``is ns2.col.bar`` or ``is not ns2.col.bar``.

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down Expand Up @@ -162,12 +163,13 @@ Examples
Return Value
------------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Key
- Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ Synopsis
Parameters
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down Expand Up @@ -133,12 +134,13 @@ Parameters
Attributes
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Attribute
- Support
Expand Down Expand Up @@ -343,12 +345,13 @@ Return Values
-------------
Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this module:

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Key
- Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,13 @@ Synopsis
Parameters
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,13 @@ Synopsis
Parameters
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,13 @@ Synopsis
Parameters
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,13 @@ Synopsis
Parameters
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ Input

This describes the input of the filter, the value before ``| ns2.col.foo``.

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down Expand Up @@ -140,12 +141,13 @@ Keyword parameters
This describes keyword parameters of the filter. These are the values ``key1=value1``, ``key2=value2`` and so on in the following
example: ``input | ns2.col.foo(key1=value1, key2=value2, ...)``

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down Expand Up @@ -255,12 +257,13 @@ Examples
Return Value
------------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Key
- Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,13 @@ Synopsis
Parameters
----------

.. rst-class:: ansible-option-table
.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table

* - Parameter
- Comments
Expand Down
Loading