我有一个jupyter笔记本,我想转换成html没有python代码。
在notebook中,我使用这段代码对齐了图和表
from IPython.core.display import HTML
CSS = """
.output {
align-items: center;
}
"""
HTML('<style>{}</style>'.format(CSS))事实上,这个图是正确对齐的

当我启动时:
jupyter nbconvert --to html --no-input myreport.ipynb生成的html文件显示的项目左对齐。为什么??
发布于 2021-04-10 06:31:02
这可能是由于输入中缺少命令造成的,也可能是库中的错误。
这个线程似乎有一个可接受的解决方案-- Figures are left-aligned when converting --to html -no-input #915
您可能还希望将库更新到较新的版本。
https://stackoverflow.com/questions/67023434
复制相似问题