如何在Markdown单元格中插入指向本地文件的链接? [英] how to insert a link to a local file into a markdown cell?
问题描述
亲爱的ipython笔记本用户,
Dear ipython notebook users,
我想插入一个指向笔记本目录中本地文件的链接,不,它不是图像(我找到的唯一示例).我想将此链接插入降价单元格中.
I want to insert a link to a local file located in the notebook directory, and no, it is not an image (the only example I've found). I want to insert this link within a markdown cell.
单击链接后,将使用本地应用程序(在这种情况下为分子查看器)打开文件
When clicked on the link, the file is to be opened with a local application (in this case, a molecule viewer)
我试图提出正确的语法,但是没有运气.请提供任何帮助.
I've tried to come up with the correct syntax, but no luck. Please, any help is greatly appreciated.
推荐答案
我要插入一个指向笔记本目录中本地文件的链接
I want to insert a link to a local file located in the notebook directory
我想将此链接插入降价单元格中.
I want to insert this link within a markdown cell.
该路径必须相对于服务器的启动位置,并以files/
为前缀.
例如:[my molecule](files/molecules/ethanol.mol)
The path need to be relative to where the server has been started, and prefixed with files/
.
e.g: [my molecule](files/molecules/ethanol.mol)
该文件将通过本地应用程序(在这种情况下为分子查看器)打开
the file is to be opened with a local application (in this case, a molecule viewer)
不可能,除非您的应用程序支持自定义链接协议,例如itunes://
或apt-get://
.最好的补充是,单击链接后,系统会提示您下载文件. (请记住,服务器可以与浏览器位于不同的计算机上)
Not possible unless your application support custom links protocol like the itunes://
or apt-get://
one. the best that can append is that on link click you will be prompted to download the file. (keep in mind that the server can be on a different machine thant your browser)
这篇关于如何在Markdown单元格中插入指向本地文件的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!