在Jupyter笔记本Markdown中突出显示错别字 [英] Highlight typos in the jupyter notebook markdown
问题描述
当我在jupyter笔记本markdown字段中写一些内容时,错别字不会突出显示,并且我通常会得到如下结果:
When I write something in the jupyter notebook markdown field, the typos are not highlighted and often I ended up with something like this:
到目前为止,在几乎所有我使用过的IDE中,错字都用卷曲的下划线突出显示,这对我来说非常方便.像这样:
In almost all IDEs I have used so far, the typos are highlighted with a curly underline which was very convenient for me. Something like this:
到目前为止,我还没有发现任何可以看到这种突出显示的内容.它存在吗?
Up till now I have not found anything that allows me to see this type of highlights. Does it exist?
推荐答案
流行的Jupyter Notebook捆绑包 Jupyter的扩展-contrib 包含拼写检查器.您可以安装并启用此功能(具有管理员权限),如下所示:
The popular Jupyter Notebook bundle extension from Jupyter-contrib contains a spell checker. You can install and enable this (with admin privileges) like so:
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextension enable spellchecker/main
这可能是Jupyter笔记本电脑上最受欢迎的拼写检查器,但请注意,它只是突出显示词典中没有的单词,并且不提供更正.
This may be the most popular spell checker for Jupyter Notebooks, but note that it simply highlights words not in its dictionary, and does not offer corrections.
如果扩展程序安装正确,您将在命令行中看到以下消息:
If the extension installed properly, you will see this message in the command line:
现在,在浏览器中,打开Jupyter后,您会在键盘按钮旁边看到标有"abc"的按钮,您可以切换该按钮以启用/禁用拼写检查:
Now, in the browser, after opening Jupyter, you will see the button labelled "abc" beside the keyboard button, which you can toggle to enable/disable spell check:
jupyter-contrib库还有许多其他有用的模块,例如目录.
The jupyter-contrib library has many other useful modules such as code folding and table of contents.
这篇关于在Jupyter笔记本Markdown中突出显示错别字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!