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: enable linebreaks at spaces and punctuation for tokens with a background color attributed by a Pygments style #8864

Open
jfbu opened this issue Feb 9, 2021 · 0 comments
Labels
builder:latex type:enhancement enhance or introduce a new feature

Comments

@jfbu
Copy link
Contributor

jfbu commented Feb 9, 2021

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

This is motivated by #5974, in the light of #8854 new verbatimforcewraps, which is an optional feature for Sphinx 3.5.0.

Wrapping of long code lines in latexpdf output is done since Sphinx 1.4.2 (#2343). It happens at spaces and also at ascii punctuation. Sometimes a string has no breakpoints (typically an hexstring #8849, or any string composed only of digits and letters) and if it is too long it then moves to next line and may even then overflow into margin if long enough. With #8854 this is fixed optionally by allowing breakpoints at every character.

The #8854 (which will be part of Sphinx 3.5.0) works even if the characters are part of a token which is rendered by the Pygments style with a colored background. See #5974 (comment) for an example.

This feature request is for an intermediate solution for colored backgrounds which is to let linebreaks happen as if there was no background color.

@jfbu jfbu added type:enhancement enhance or introduce a new feature builder:latex labels Feb 9, 2021
@AA-Turner AA-Turner added this to the some future version milestone Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder:latex type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants