【问题标题】:How to increase jupyter notebook/lab cell widths when outputting to html输出到 html 时如何增加 jupyter notebook/lab 单元格的宽度
【发布时间】:2020-09-07 11:58:53
【问题描述】:

以下命令将创建一个没有代码的 html 文件:

jupyter nbconvert inspect.ipynb --no-input --no-prompt

其中文件名为inspect.ipynb,上面的输出为inspect.html

我想知道如何使 输出(不在 jupyter 实验室内)中的单元格宽度变宽。

【问题讨论】:

    标签: python jupyter-notebook jupyter jupyter-lab


    【解决方案1】:

    将此单元格放入您的笔记本中:

    # https://stackoverflow.com/questions/21971449/how-do-i-increase-the-cell-width-of-the-jupyter-ipython-notebook-in-my-browser
    from IPython.core.display import display, HTML
    display(HTML("<style>.container { width:100% !important; }</style>"))
    

    然后运行你的命令:

    jupyter nbconvert inspect.ipynb --no-input --no-prompt
    

    或者也许您可以使用 custom.css 来实现,但我不确定。在这里查看第二个答案How do I increase the cell width of the Jupyter/ipython notebook in my browser?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-04-10
      • 1970-01-01
      • 1970-01-01
      • 2023-02-03
      • 2016-09-06
      • 2019-10-05
      • 2014-04-14
      相关资源
      最近更新 更多