You can write content in regular Markdown files (e.g., files ending in .md
).Jupyter Book supports any Markdown syntax that is supported by Jupyter notebooks.Jupyter Notebook Markdown is an extension of a flavour of Markdown calledCommonMark Markdown.It has many elements for standard text processing, though it lacks a lot of features used forpublishing and documentation.
Note
If you’d like a more in-depth overview and guide to CommonMark Markdown, seethe CommonMark Markdown tutorial.
Jupyter Notebook Keyboard Shortcuts. M to markdown R to raw 1 to heading 1 2,3,4,5,6 to heading 2,3,4,5,6 Up/K select cell above Down/J select cell below. Furthermore, you learned that in a Jupyter Notebook file, you can double-click in any Markdown cell to see the syntax, and then run the cell again to see the Markdown formatting. Note: if you type text in a Markdown cell with no additional syntax, the text will appear as regular paragraph text. Markdown files Jupyter Notebook files Notebooks written entirely in Markdown Custom notebook formats and Jupytext reStructuredText files Build your book Build your book Execute your computational content Formatting code outputs Execute and cache your pages. # MyST Cheat Sheet.
Markdown files¶ You can write content in regular Markdown files (e.g., files ending in.md). Jupyter Book supports any Markdown syntax that is supported by Jupyter notebooks. Jupyter Notebook Markdown is an extension of a flavour of Markdown called CommonMark Markdown. It has many elements for standard text processing, though it lacks a lot of.
This page describes some basic features of the Jupyter Notebook Markdown, and how toinclude them with your book.
Embedding media¶
Adding images¶
You can reference external media like images from your Markdown file. If you userelative paths, then they will continue to work when the Markdown files are copied over,so long as they point to a file that’s inside of the repository.
Here’s an image relative to the book content root
It was generated with this code:
See also
Images and figures for more information.
Adding movies¶
You can even embed references to movies on the web! For example, here’s a little GIF for you!
This will be included in your book when it is built.
Mathematics¶
For HTML outputs, Jupyter Book uses the excellent MathJax library,along with the default Jupyter Notebook configuration, for rendering mathematics from LaTeX-style syntax.
For example, here’s a mathematical expression rendered with MathJax:
Jupyter Lab Cheat Sheet
Block-level mathematics¶
You can include block-level mathematics by wrapping your formulas in $$
characters.For example, the following block:
Results in this output:
Jupiter Notebook Markdown Guide
You can also include math blocks by using LaTeX-style syntax using begin{align*}
.For example, the following block:
Results in:
Important
This requires the amsmath
MyST extension to be enabled.
Extended Markdown with MyST Markdown¶
In addition to CommonMark Markdown, Jupyter Book also supports a more fully-featured version of Markdown called MyST Markdown.This is a superset of CommonMark that includes syntactic pieces that are useful for publishing computational narratives.For more information about MyST Markdown, see MyST Markdown overview.
Ipython Markdown Cheat Sheet
Are you starting to create machine learning models (using python programming) using JupyterLab or Jupyter Notebook? This post list down some commands which are found to be very useful while one (beginner data scientist) is getting started with using JupyterLabnotebook for building machine learning models.
- Notebook Operations: The following command helps to perform operations with the notebook.
- Ctrl + S: Save the notebook
- Ctrl + Q: Close the notebook
- Enter: While on any cell, you want to enter edit mode, press Enter.
- Cells Operation: The following commands help with performing operations on cells:
- J: Select the cell below the current cell; This command would be used to go through cells below the current cell; Once you reached to the desired cell, you could Shift + Enter to execute the command in the given cell.
- K: Select the cell above the current cell
- X: Cut the content of the current cell
- C: Copy the content of the current cell
- V: Paste the command copied into the below cell
- Shift + Enter: Run the selected cell and insert a cell below
- Ctrl + Enter: Run the selected cell but do not add the cell below; If this command is used, one could use B to enter a cell below.
- B: Enter a cell below. This command comes handy for entering the cell at any point. Very useful if you want to add a markdown note before/after execution of any command.
- D,D: Delete the cell
- Notes taking operations using Markdown editor: If you are a blogger, you would love these shortcuts. Very useful for taking notes while you are working on your models.
- M: Go to Markdown mode to write some notes in markdown format
- Y: Go to Code mode to continue working with code
Summary
In this post, you learned about some of the quick commands (Cheat sheet) which you could use for your reference while working with JupyterLab or Jupyter Notebook. Please feel free to suggest other commands that you found to be useful which are not listed above.
- First Principles Understanding based on Physics - April 13, 2021
- Precision & Recall Explained using Covid-19 Example - April 11, 2021
- Moving Average Method for Time-series forecasting - April 4, 2021