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

Word wrapping for print view in HTML output #2078

Open
PetteriAimonen opened this issue Dec 7, 2023 · 0 comments
Open

Word wrapping for print view in HTML output #2078

PetteriAimonen opened this issue Dec 7, 2023 · 0 comments

Comments

@PetteriAimonen
Copy link

PetteriAimonen commented Dec 7, 2023

Currently nbconvert HTML output never word-wraps cells.
This causes clipped output when printing the resulting file to PDF or paper, if there are long code lines or comments.

I would suggest something like this in default CSS:

pre {
  white-space: pre-wrap;
  word-wrap: break-word;
}

Optionally it could be made conditional on @media print.

(Originally reported in jupyterlab/jupyterlab#15500)

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