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

LaTeX: legacy \pysiglinewithargsret does not compute correctly available horizontal space and should use a ragged right style #8995

Closed
jfbu opened this issue Mar 13, 2021 · 1 comment

Comments

@jfbu
Copy link
Contributor

jfbu commented Mar 13, 2021

Describe the bug
A clear and concise description of what the bug is.

Here is a screenshot from PDF rendering of Sphinx docs:

Capture d’écran 2021-03-13 à 15 12 22

This is taken from the section documenting the APIs to the autodoc extension.

We observe:

  • some stretch of whitespace in signature arguments,
  • hyphenation of Tuple but there seems to be space available

This is explained from the latex code which has a wrong computation of avaiable horizontal space; and the parbox should use \raggedright. This is will reduce hyphenation of keywords also.

Environment info

  • OS: [e.g. Unix/Linux/Mac/Win/other with version]
  • Python version: [e.g. 3.7.1]
  • Sphinx version: applies to all versions at least since 1.5 say
  • Sphinx extensions: [e.g. sphinx.ext.autodoc, recommonmark]
  • Extra tools: TeXLive 2021

Additional context
Add any other context about the problem here.

With some fixes the above screenshot would look like this
Capture d’écran 2021-03-13 à 15 24 06

It does not go all the way to right end (which would match docu-) as it is know that \raggedright makes hyphenation very unlikely, but this is a good thing, not to hyphenate too easily in signature, I think.

@jfbu
Copy link
Contributor Author

jfbu commented Mar 14, 2021

Fixed at 2934aac

@jfbu jfbu closed this as completed Mar 14, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant