Skip to content

Commit

Permalink
Improve PDF documentation layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Jan 13, 2022
1 parent ee43f51 commit 192aeca
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 3 deletions.
8 changes: 8 additions & 0 deletions astatine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ def kwargs_from_node(
:param node:
:param posarg_names: Either a list of positional argument names for the function, or the function object.
:rtype:
.. latex:clearpage::
"""

args: List[ast.expr] = node.args
Expand Down Expand Up @@ -248,6 +252,10 @@ def get_constants(module: ast.Module) -> Dict[str, Any]:
.. versionadded:: 0.3.1
:param module:
:rtype:
.. latex:clearpage::
"""

constants = {}
Expand Down
1 change: 1 addition & 0 deletions doc-source/api/astatine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
astatine
=========

.. autosummary-widths:: 4/10
.. automodule:: astatine
3 changes: 3 additions & 0 deletions doc-source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ def setup(app):
from sphinx_toolbox.latex import better_header_layout

app.connect("config-inited", lambda app, config: better_header_layout(config))


autosummary_widths_builders = ["latex"]
12 changes: 9 additions & 3 deletions doc-source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ astatine

.. end short_desc
:wikipedia:`Astatine` is a chemical element with the symbol At and atomic number 85.
Its name comes from the Greek astatos (ἄστατος), meaning "unstable".
It's a fitting name for Python's :mod:`ast` module, which has been unstable between releases.
.. only:: html

:wikipedia:`Astatine` is a chemical element with the symbol At and atomic number 85.
Its name comes from the Greek astatos (ἄστατος), meaning "unstable".
It's a fitting name for Python's :mod:`ast` module, which has been unstable between releases.

.. start shields
Expand Down Expand Up @@ -141,9 +143,13 @@ Installation

.. end installation
Contents
-----------

.. html-section::


.. toctree::
:hidden:

Expand Down
2 changes: 2 additions & 0 deletions doc-source/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
git+https://github.com/sphinx-toolbox/html-section.git
git+https://github.com/sphinx-toolbox/sphinx-toolbox-experimental.git
default-values>=0.5.0
extras-require>=0.2.0
furo>=2020.11.19b18
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ extensions = [
"sphinx_debuginfo",
"sphinx_licenseinfo",
"seed_intersphinx_mapping",
"html_section",
"sphinx_toolbox_experimental.needspace",
"sphinx_toolbox_experimental.autosummary_widths",
]
sphinxemoji_style = "twemoji"
gitstamp_fmt = "%d %b %Y"
Expand Down
8 changes: 8 additions & 0 deletions repo_helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,11 @@ classifiers:

keywords:
- ast

extra_sphinx_extensions:
- html_section
- sphinx_toolbox_experimental.needspace
- sphinx_toolbox_experimental.autosummary_widths

sphinx_conf_epilogue:
- autosummary_widths_builders = ["latex"]

0 comments on commit 192aeca

Please sign in to comment.