A markdown kernel for Jupyter
Markdown kernel for Jupyter
With a working Jupyter installation, run
$ pip install markdown-kernel $ python -m markdown_kernel.install
Verify if you have
markdown kernel installed with command
$ jupyter kernelspec list
jupyter notebook and create a notebook with
markdown kernel? Not so fast.
Why a markdown kernel for Jupyter?
This markdown kernel is a simple Jupyter kernel that parses and displays cell content as markdown. Cells with markdown texts such as
* This is *important* * This is not.
would produce output
- This is important
- This is not.
But wait, this is stupid because you can do the same thing in Jupyter, only easier. What is the point of a markdown kernel by itself?
Use a Markdown kernel in SoS Notebook
If you are familiar with
R Markdown, you might know and like its inline code that allows results to be inserted directly into the text of a .Rmd file by enclosing the code with
r . This is really convenient for
writing Rmarkdown report but cannot be done in Jupyter because Jupyter's markdown cells are rendered at the frontend and do not interact with Jupyter kernels (See ipython/ipython#2592, jupyter/help#41,and jupyter/notebook#3463 for related discussions).
SoS Notebook is a Jupyter kernel that supports the use of multiple kernels in one Jupyter notebook.
Although a markdown kernel by itself cannot interpolate and evaluate expressions either, you can the
%expand magic of SoS to enable
inline expressions in Jupyter, for Python, R, and potentially many other languages. Here is how it works:
%expand content of a cell using SoS (Python) variables
%expand in subkernels such as R
--in option of magic
%expand allows you to expand the cell content in specified subkernel.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size markdown_kernel-0.2.0-py3-none-any.whl (7.2 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size markdown-kernel-0.2.0.tar.gz (6.1 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for markdown_kernel-0.2.0-py3-none-any.whl