Introduction

Welcome to the Jupyter Markdown Quickstart Guide. This tutorial is created for software engineers who are interested in utilizing Markdown within their Jupyter notebooks. We will explore the basics of Markdown in Jupyter, providing numerous code examples that you can use and modify for your projects.

What is Jupyter Markdown

Jupyter uses cells to structure content, which can be done in two primary formats - Code and Markdown. While Code cells contain the actual scripts, Markdown cells contain text, images, links, and equations. The Markdown language allows us to style our text in a format that’s easier to read and write.

Getting started with Jupyter Markdown

Before we dive into writing in Markdown, ensure you have Jupyter installed in your local environment. If not, you can install with pip:

pip install jupyter

To start a Jupyter notebook, run:

jupyter notebook

Your default web browser will open with the Jupyter Notebook homepage. Here, you can create a new Jupyter notebook by clicking on ‘New’ > ‘Python 3’.

creating-jupyter-notebook

A new notebook will open. In the first cell, you can select the dropdown at the top of the notebook that says ‘Code’, and change it to ‘Markdown’:

markdown-type

You’re now ready to write in Markdown!

Basic Jupyter Markdown Syntax

Headers:

We can create a header in Jupyter markdown using the ‘#’ symbol. The number of ‘#’ symbols determines the header level, for example:

# H1
## H2
### H3
#### H4

Bold and Italic:

If we want to make a text bold, we wrap it within two asterisks or two underscores. To make a text italic, we wrap it within a single asterisk or a single underscore.

**Bold Text**
__Bold Text__
*Italic Text*
_Italic Text_

For more detailed and extensive markdown styling like coloring text, visit this previous post.

Lists:

Making lists in Markdown is straightforward. You can create an unordered list using ‘*’ or ‘-‘ or ‘+’, and an ordered list using numbers:

- List item 1
- List item 2
- List item 3

1. List item 1
2. List item 2
3. List item 3

Check our extensive guide on nested lists and sub bullets in markdown.

Code:

Enclose your code between two backticks for inline code. For a code block, enclose your code between three backticks:

Inline code: `print('Hello, world!')`

Code block:

def func():
print(‘Hello, world!’)
func()

Create a link with the format [Link Text](URL):

Visit our site: [here](https://blog.markdowntools.com/)

Images:

Insert an image using the format ![Alt Text](URL).

![My Image](image.png)

For advanced markdown features such as tables, quotes, horizontal rules, and more, refer to this comprehensive guide on markdown syntax.

Utilizing Jupyter Markdown for Better Documentation

By combining text and scripts in one document, Jupyter Markdown can help you create a detailed documentation for your software project, enabling you to explain what your code does in a clear and engaging way. After all, code that’s better documented is easier to understand, maintain, and reuse.

In conclusion, understanding Markdown and effectively using it can significantly contribute to collaborative and reproducible data science. Happy coding!