How do you wrap lines in a Jupyter laptop?

I have a Jupyter notebook that I want to convert to pdf for publication, however, when I save the laptop as a PDF, many of the cells go over the edge.

Is there a way to wrap strings (up to 80 standard characters) so that when entering cells, it is never wider than a standard A4 page?

Alternatively, is there something I can do when I convert to pdf instead? Thank.

+7
source share
2 answers

Here is a solution that always wraps long strings (not only when exporting to psd):

fooobar.com/questions/358412 / ...

, Jupyter , .

:

{
  "MarkdownCell": {
    "cm_config": {
      "lineWrapping": true
    }
  },
  "CodeCell": {
    "cm_config": {
      "lineWrapping": true
    }
  }
}

Jupyter, .

( ) : ~/.ipython/profile_nbserver/ipython_notebook_config.py,

-

: , PDF !! @Louie . , ( ).

, , (" ?"), , PDF. , , .

+2

nbconvert 5.5

jupyter nbconvert --to pdf your-notebook.ipynb 
0

Source: https://habr.com/ru/post/1673882/


All Articles