【问题标题】:Jupyter notebook dark mode when downloaded as html does not render correctly下载为 html 时的 Jupyter 笔记本暗模式无法正确呈现
【发布时间】:2021-05-29 12:31:45
【问题描述】:

我在 jupyter notebook 中使用深色主题,它在浏览器中运行良好。但是当我将它作为 HTML 文件下载时,它并不像预期的那样,背景颜色是浅色的,但块的颜色是深色的。

这是jupyter notebook when running in browser的图片

这是输出of the notebook downloaded as html

我希望下载的 HTML 以与笔记本在浏览器中相同的方式呈现

【问题讨论】:

  • 请在您的问题中嵌入任何图片,而不是指向 Imgur 的链接。
  • 很抱歉,我无法在问题中嵌入图片。如果您单击链接,它将打开图像。

标签: python jupyter-notebook darkmode


【解决方案1】:

从终端您可以执行以下操作

jupyter nbconvert <notebook_name> --to html --HTMLExporter.theme=dark

【讨论】:

    猜你喜欢
    • 2021-02-01
    • 1970-01-01
    • 2020-07-31
    • 2019-05-09
    • 1970-01-01
    • 2020-08-14
    • 1970-01-01
    • 2016-12-22
    • 2016-11-18
    相关资源
    最近更新 更多