如何在jupyter markdown单元格中换行 [英] how to make a new line in a jupyter markdown cell

查看:9942
本文介绍了如何在jupyter markdown单元格中换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

md $S$: a set of shops $I$: a set of items M wants to get

md $S$: a set of shops $I$: a set of items M wants to get

我想在这两个句子之间换行. 我们通常在换行之前的第一句之后加上空格",但是在Jupyter中不起作用.

I'd like to make a new line between this two sentences. We usually put " (space)" after the first sentence before a new line, but it doesn't work in Jupyter.

我该怎么做?我应该在第一句话后两次输入"enter"吗?

How can I do this? Should I put "enter" twice after the first sentence?

推荐答案

只需在要创建新行的位置添加<br>.

Just add <br> where you would like to make the new line.

$S$: a set of shops
<br>
$I$: a set of items M wants to get

因为jupyter笔记本markdown单元是HTML的超集.
http://jupyter-notebook.readthedocs .io/zh-CN/latest/examples/Notebook/Working%20With%20Markdown%20Cells.html

Because jupyter notebook markdown cell is a superset of HTML.
http://jupyter-notebook.readthedocs.io/en/latest/examples/Notebook/Working%20With%20Markdown%20Cells.html

请注意,在将笔记本导出或保存为pdf时(使用通过LaTeX下载为> PDF"),使用<br>的换行符不会保留.可能会将每个<br>视为一个空格.

Note that newlines using <br> does not persist when exporting or saving the notebook to a pdf (using "Download as > PDF via LaTeX"). It is probably treating each <br> as a space.

这篇关于如何在jupyter markdown单元格中换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆