Skip to content

code-block directive should have a width option #11262

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

Open
miglincit opened this issue Mar 23, 2023 · 1 comment
Open

code-block directive should have a width option #11262

miglincit opened this issue Mar 23, 2023 · 1 comment

Comments

@miglincit
Copy link

Is your feature request related to a problem? Please describe.
Code inside a code-block might be longer as the space available by the output format. On HTML this results in a horizontal scroll-bar, but on other formats, like PDF this is then truncated. The same is if from e.g. HTMLHELP a pdf is derived.

Describe the solution you'd like
There should be an option (e.g. :width: 60) which defines the maximum length of the generated output.
Along with it a character (e.g. :eolmark: ^) shall be definable which is then used to mark the virtual end of a line. The rest of the line shall be output beneath this line and intended by (e.g. 2 or tab-width?) spaces.
The reader is then enabled to understand that this line is longer and spans more than one line

Describe alternatives you've considered
none

@jfbu
Copy link
Contributor

jfbu commented Mar 24, 2023

Hi, a remark only indirectly related to your query as you seem to refer to PDF obtained from HTML by some unspecified tool: what you are asking for in HTML is (for PDF) about exactly the implemented behavior of Sphinx for PDF via LaTeX since 1.4.2 (released May 29, 2016, #2343).

I am not telling people to produce their HTML via PDF though 😄

@AA-Turner AA-Turner added this to the some future version milestone Apr 29, 2023
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

3 participants