Makes minor adjustments to the LaTeX layout.

  • Increases the whitespace above function signatures by 5px, to prevent the function visually merging with the previous one.

  • Remove unnecessary indentation and allow “raggedright” for the fields in the body of functions, which prevents ugly whitespace and line breaks.

  • Disables justification for function signatures. This is a backport of changes from Sphinx 4 added in sphinx-doc/sphinx#8997.

    New in version 2.12.0.

  • With Sphinx 3.5, doesn’t add \sphinxAtStartPar before every paragraph. The change in sphinx-doc/sphinx#8781 was to solve an issue with tables, but it isn’t clear why it then gets added for every paragraph so this extension removes it.

    New in version 2.13.0.

  • Configures hyperref to apply correct page numbering to the frontmatter.

    New in version 2.14.0.

New in version 2.10.0.

Enable sphinx_toolbox.tweaks.latex_layout by adding the following to the extensions variable in your

extensions = [

For more information see .


Setup sphinx_toolbox.tweaks.latex_layout.


app (Sphinx) – The Sphinx application.

Return type