Issue
I am trying to write a Jupyter Notebook-based document that can work both on Binder and Google Colaboratory.
I like the footnote idiom, which is a Markdown/HTML hack and correctly works on Jupyter, described in
https://github.com/jupyter/notebook/issues/1287#issuecomment-451080550
But it does not work on Google Colaboratory because they do not allow HTML tags in Markdown:
https://colab.research.google.com/notebooks/markdown_guide.ipynb#scrollTo=w86a4I4fmkvD
Is there any footnote hack working both on Jupyter Notebook and Google Colaboratory?
Edit: the idiom also does not work within VS Code Jupyter extension.
Solution
It seems that Google Colab accepts anchor HTML tags <a name="..."></a>
. The following Markdown snippet works both with Jupyter Notebook (Binder) and Google Colab.
Example of footnote.<a name="cite_ref-1"></a>[<sup>[1]</sup>](#cite_note-1)
Example of footnote.<a name="cite_ref-2"></a>[<sup>[2]</sup>](#cite_note-2)
<a name="cite_note-1"></a>1. [^](#cite_ref-1) footnote 1
<a name="cite_note-2"></a>2. [^](#cite_ref-2) footnote 2
An example notebook is here.
Unfortunately, this doesn't work with VSCode or Jupyter Notebook Preview on GitHub.
Software | Does it work? | Version |
---|---|---|
Jupyter Notebook | Yes | 6.3.0 |
Google Colaboratory | Yes | Feb 25, 2022 |
Visual Studio Code | No | 1.65.1 |
Jupyter Notebook Preview on GitHub | No | as of 9 March 2022 |
Answered By - tueda
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.