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

think more carefully about text wrapping in nbconvert #3959

Closed
minrk opened this issue Aug 8, 2013 · 3 comments
Closed

think more carefully about text wrapping in nbconvert #3959

minrk opened this issue Aug 8, 2013 · 3 comments
Assignees
Milestone

Comments

@minrk
Copy link
Member

minrk commented Aug 8, 2013

  1. we should never perform any transforms of any kind on raw cells, not even wrapping
  2. colored output is wrapped based on the length including ANSI escapes, so they can end up as super short lines.
@jdfreder
Copy link
Member

  1. Doesn't wrapping have to be enforced some way or another? Otherwise output will overflow page boundaries.
  2. I looked earlier and wasn't able to find a latex package to wrap content so it doesn't overflow the mdframed boxes without breaking the multi-page support. I think the best solution would involve measuring each line and breaking once the contents of the line reached the border of the mdframed box.

Thoughts?

@minrk
Copy link
Member Author

minrk commented Aug 13, 2013

Doesn't wrapping have to be enforced some way or another? Otherwise output will overflow page boundaries.

This doesn't apply to raw cells - remember, raw cells are raw latex input, the entire point of which is that we don't touch them, no matter what.

For colored output, we are clearly doing the wrapping wrong, because we are measuring color escapes as part of the column width, so we are effectively wrapping at about 20 characters.

I didn't say we shouldn't wrap, just that we should never wrap raw cells (obvious) and we should be more careful about what we measure for text output, since we are currently measuring incorrectly.

@minrk
Copy link
Member Author

minrk commented Jan 29, 2014

I think we only wrap input code now, which I think is close enough.

@minrk minrk closed this as completed Jan 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants