[英]Add Notebook Author and Title in Jupyter Notebook Cells
I want to make a Jupyter Notebook file that also can be converted to PDF for the report.我想制作一个 Jupyter Notebook 文件,该文件也可以转换为 PDF用于报告。 I would like to add Title and Author field, so when it's converted to PDF, the author and title field will show like the usual LaTeX PDF metadata format (Author & Title centered).我想添加标题和作者字段,所以当它转换为 PDF 时,作者和标题字段将像通常的 LaTeX PDF 元数据格式一样显示(以标题和标题为中心)。 How can I write it on the cell (because I use online Jupyter Notebook instead of installed it in local machine)?如何将它写在单元格上(因为我使用在线 Jupyter Notebook 而不是将其安装在本地机器上)?
I checked you can add Author & Title in Notebook.我检查了你可以在笔记本中添加作者和标题。
Visit https://ipypublish.readthedocs.io/en/latest/metadata_tags.html访问https://ipypublish.readthedocs.io/en/latest/metadata_tags.html
Visit GIF version https://ipypublish.readthedocs.io/en/latest/_images/metadata_edit.gif访问 GIF 版本https://ipypublish.readthedocs.io/en/latest/_images/metadata_edit.gif
You can add the notebook metadata with clicking on "Edit" => "Edit Notebook Metadata" and insert:您可以通过单击“编辑”=>“编辑笔记本元数据”添加笔记本元数据并插入:
"title": "It's a woodpecker from space",
"authors": [
{ "name": "Jorge Gustavo Rocha" },
{ "name": "Matilde Rocha" }
]
Have a look at https://github.com/jupyter/nbconvert/issues/249 for the whole discussion.查看https://github.com/jupyter/nbconvert/issues/249以了解整个讨论。
insert the text:插入文本:
"title": "My Title!",
"authors": [
{ "name": "Author1" },
{ "name": "Author2" }
]
at the end of the notebook metadata ("Edit" -> "Edit Notebook Metadata").在笔记本元数据的末尾(“编辑”->“编辑笔记本元数据”)。
add a comma above where the text is added.在添加文本的位置上方添加逗号。
the configurations as in the figure below worked for me:下图中的配置对我有用:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.