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

Fitting 79-character-long code lines without scrollbars #154

Open
anntzer opened this issue Mar 6, 2019 · 0 comments
Open

Fitting 79-character-long code lines without scrollbars #154

anntzer opened this issue Mar 6, 2019 · 0 comments

Comments

@anntzer
Copy link

anntzer commented Mar 6, 2019

Currently, using default settings, the page width and font size of code samples are such that lines of code longer than 65 lines require a horizontal scrollbar (when the font used for rendering is DejaVu Sans Mono, which is likely quite common on Linux).

screenshot

This seems a bit short; it would be nice if lines no longer than the PEP8 79-character limit could be displayed without a scrollbar. This is particularly relevant for sphinx plugins that directly generate pages from a bunch of actual .py files (for showcasing runnable examples), e.g. https://sphinx-gallery.readthedocs.io/.

This can be fixed either by slightly bumping up the page width, or by decreasing the code sample font size. I have a mild preference for the second option, because as of now, the code sample glyphs are clearly bigger than the running text glyphs (see example above -- the running text font is Liberation Serif), whereas I would think that the code glyphs should have the same size or if anything be slightly smaller than the running text glyphs. (I know there is an option to do this; this issue is a suggestion to change its default value.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant