Shortcut For Markdown In Jupyter Notebook



  1. How To Use Jupyter Notebook Markdown
  2. Shortcut For Markdown In Jupyter Notebook Download
  3. Shortcut For Markdown In Jupyter Notebook 2016
  • Jupyter Tutorial

See full list on tutorialspoint.com. Beautiful graphs in notebooks are great, but I want my explanatory text to look good too! Somehow I can’t remember all the Markdown tags, so I created this cheatsheet. Headings: Use #s followed by a.

Jupyter
  • IPython
  • Jupyter
  • QtConsole
  • JupyterLab
  • Jupyter Resources
  • Selected Reading

Markdown cell displays text which can be formatted using markdown language. In order to enter a text which should not be treated as code by Notebook server, it must be first converted as markdown cell either from cell menu or by using keyboard shortcut M while in command mode. The In[] prompt before cell disappears.

Header cell

A markdown cell can display header text of 6 sizes, similar to HTML headers. Start the text in markdown cell by # symbol. Use as many # symbols corresponding to level of header you want. It means single # will render biggest header line, and six # symbols renders header of smallest font size. The rendering will take place when you run the cell either from cell menu or run button of toolbar.

Following screenshot shows markdown cells in edit mode with headers of three different levels.

When cells are run, the output is as follows −

Note that Jupyter notebook markdown doesn’t support WYSWYG feature. The effect of formatting will be rendered only after the markdown cell is run.

Ordered Lists

To render a numbered list as is done by <ol> tag of HTML, the First item in the list should be numbered as 1. Subsequent items may be given any number. It will be rendered serially when the markdown cell is run. To show an indented list, press tab key and start first item in each sublist with 1.

If you give the following data for markdown −

It will display the following list −

Bullet lists

Each item in the list will display a solid circle if it starts with – symbol where as solid square symbol will be displayed if list starts with * symbol. The following example explains this feature −

The rendered markdown shows up as below −

Hyperlinks

Markdown text starting with http or https automatically renders hyperlink. To attach link to text, place text in square brackets [] and link in parentheses () optionally including hovering text. Following screenshot will explain this.

The rendered markdown appears as shown below −

Bold and Italics

To show a text in bold face, put it in between double underscores or two asterisks. To show in italics, put it between single underscores or single asterisks.

The result is as shown below −

Images

To display image in a markdown cell, choose ‘Insert image’ option from Edit menu and browse to desired image file. The markdown cell shows its syntax as follows −

Image will be rendered on the notebook as shown below −

Table

In a markdown cell, a table can be constructed using | (pipe symbol) and – (dash) to mark columns and rows. Note that the symbols need not be exactly aligned while typing. It should only take respective place of column borders and row border. Notebook will automatically resize according to content. A table is constructed as shown below −

The output table will be rendered as shown below −

Learning Objectives

  • List useful keyboard shortcuts in Jupyter Notebook.
  • Be able to access the list of keyborad shortcuts in Jupyter Notebook.

List of Useful Jupyter Notebook Shortcuts

Menu Tools vs. Keyboard Shortcuts

As you have seen in this chapter, you can manipulate your Jupyter Notebook using the drop-down tools from the menu, with keyboard shortcuts, or using both.

The table below lists common tasks in Jupyter Notebook and how to do them using keyboard shortcuts or the menu tool.

FunctionKeyboard ShortcutMenu Tools
Save notebookEsc + sFile → Save and Checkpoint
Create new cellEsc + a (above), Esc + b (below)Insert→ cell above Insert → cell below
Run CellCtrl + enterCell → Run Cell
Copy CellcCopy Key
Paste CellvPaste Key
Interrupt KernelEsc + i iKernel → Interrupt
Restart KernelEsc + 0 0Kernel → Restart
Find and replace on your code but not the outputsEsc + fN/A
merge multiple cellsShift + MN/A
When placed before a function Information about a function from its documentation?N/A

For a full list of keyboard shortcuts, click the help button, then the keyboard shortcuts button.

Additional Resources

  • Dataquest tips and tricks for Jupyter Notebook.

How To Use Jupyter Notebook Markdown

Practice Your Jupyter Notebook Skills

Test your Jupyter Notebook skills to:

  1. Launch Jupyter Notebook from your earth-analytics directory.

  2. Create a new Jupyter Notebook file called jupyter-notebook-interface.ipynb.

  3. Add a Code cell and copy/paste the following Python code to determine which day had the most precipitation (i.e. the day of the greatest flooding) during the Fall 2013 flood in Boulder, CO, U.S.A.

Shortcut For Markdown In Jupyter Notebook Download

  1. Run the Python cell.

You have now experienced the benefits of using Jupyter Notebook for open reproducible science!

Without writing your own code, you were able to easily replicate this analysis because this code block can be shared with and run by anyone using Python in Jupyter Notebook.

  1. Add a Code cell and run each of the following Python calculations:
    • 16 - 4
    • 24 / 4
    • 2 * 4
    • 2 ** 4
      • What do you notice about the output of 24 / 4 compared to the others?
      • What operation does ** execute?
  2. Create a new directory called chap-3 in your earth-analytics directory.

  3. Create a new directory called test in your earth-analytics directory and move it into in the newly created directory called chap-3.

  4. Delete the test directory - do you recall how to find the test directory in its new location?

  5. Rename the Jupyter Notebook file that you created in step 2 (e.g. jupyter-notebook-interface.ipynb) using your first initial and last name (e.g. jpalomino-jupyter-notebook-interface.ipynb).

  6. Create a new folder called chap-3 in your earth-analytics directory.

  7. Move your renamed Jupyter Notebook file (e.g. jpalomino-jupyter-notebook-interface.ipynb) into the new chap-3 directory.

Shortcut For Markdown In Jupyter Notebook 2016

Manage Jupyter Notebooks