英文:
How to obtain a shrink-wrapped Jupyter document?
问题
I am very new to Jupyter Notebook so I might have missed the obvious, please point me in the right direction (it may also be JN is not the right tool for the task).
我对Jupyter Notebook非常不熟悉,可能已经错过了一些明显的东西,请指引我正确的方向(也可能JN不是适合这个任务的工具)。
I am preparing a piece of documentation which is composed by Some narrative text (in Markdown format) interspersed with images produced using various tools.
我正在准备一份由一些叙述性文本(以Markdown格式)和使用各种工具生成的图片交替组成的文档。
I have a tentative Notebook showing what I need.
我有一个临时的笔记本展示了我需要的内容。
I can also export in PDF format either from command line or from menu.
我还可以从命令行或菜单中导出为PDF格式。
Problem is the exported pages include both "cell content" and actual output, together with all In [xx]
and Out [yy]
flags and everything Jupyter finds fit to add (e.g.: warnings), while I would like to have "shrink wrapped" documentation containing only the "Out" parts, without any "decoration".
问题是导出的页面包括"cell content"和实际输出,以及所有In [xx]
和Out [yy]
标志以及Jupyter认为适合添加的所有内容(例如:警告),而我希望有一个只包含"Out"部分的"shrink wrapped"文档,没有任何"装饰"。
I assume it should be possible, but I couldn't find out how.
我认为这应该是可能的,但我找不到方法。
英文:
I am very new to Jupyter Notebook so I might have missed the obvious, please point me in the right direction (it may also be JN is not the right tool for the task).
I am preparing a piece of documentation which is composed by Some narrative text (in Markdown format) interspersed with images produced using various tools.
I have a tentative Notebook showing what I need.
I can also export in PDF format either from command line or from menu.
Problem is the exported pages include both "cell content" and actual output, together with all In [xx]
and Out [yy]
flags and everything Jupyter finds fit to add (e.g.: warnings), while I would like to have "shrink wrapped" documentation containing only the "Out" parts, without any "decoration".
I assume it should be possible, but I couldn't find out how.
答案1
得分: 0
我对你的声明有一些评论,如果你只是想使用你已经拥有的笔记本,并且不想让输入代码单元格显示出来,仍然可以按传统方式获得PDF文档。
不过,关于你的说法,"也许JN不是完成任务的合适工具":
这可能是这样,也可能不是。但我建议你可能希望在工具箱中添加其他工具,以与笔记本一起处理这些步骤。你可以考虑将 MyST-tools / JupyterBooks 或 Quarto 纳入你的工作流程中,以实现 "shrink-wrapping"。
有关MyST (MyST-tools) 的一些最新信息,请参见:
-
"内联变量、滑块、@matplotlib sparklines 和任务列表,适用于 #jupyter,使用 @myst_tools
。" 的演示(链接: https://twitter.com/rowancockett/status/1656157176807964675) -
"如果你使用笔记本并发布内容,那么一定要观看 @franklinwkoch 的出色且有趣的演讲,绝对是 @JupyterCon 视频回顾中值得关注的一个。" 的推文(链接: https://twitter.com/stevejpurves/status/1656230651677364224)
-
"来了解 @myst_tools 中的所有新功能,以及关于 Thebe 的演讲。将 Jupyter 添加到任何网页,点击按钮,使你的图形变得实时!现在也支持 JupyterLite,在你的 Web 浏览器中直接进行计算。" 的推文(链接: https://twitter.com/myst_tools/status/1656153512081002497)
-
来自 JupyterCon 2023 的 "写科学文章的革命性新 #MySTMarkdown 的3分钟演示"(链接: https://twitter.com/myst_tools/status/1659233262659596289)
有关Quarto的一些最新信息:
- JupyterCon 2023 上 "使用 Quarto 发布 Jupyter 笔记本" 的幻灯片可以在这里找到(链接: https://jjallaire.quarto.pub/jupytercon-2023/#/title-slide)。
英文:
I made some comments if you did want to use the notebooks you have and just not have the input code cells show up and still get a pdf the traditional way.
I think though in regards to your statement, "it may also be JN is not the right tool for the task":
That may or may not be the case.
However, I'd suggest you may want to add additional tools to your toolbox that handle the steps in conjunction with the notebooks.
You may want to incorporate MyST-tools / JupyterBooks or Quarto into your flow for 'shrink-wrapping'.
For some current stuff on MyST (MyST-tools), see:
Some current stuff on Quarto:
- slides for 'Publishing Jupyter Notebooks with Quarto' at JupyterCon 2023 are here
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论