Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Welcome to Ved's Cheat-Sheet

Ved’s Cheat-Sheet

The best way to remember something is to write it down — and the best way to share it is to build a book.

Vishal Lavangare

Welcome to Ved’s Cheat-Sheet — a living, growing personal knowledge base built with Jupyter Book and MyST Markdown. This book serves as a quick-reference guide, covering everything from programming syntax to development workflows.


About This Project

This project is authored by Vishal Lavangare (alias Vedclove) and is publicly hosted at github.com/Vedclove/Cheat-Sheet.

The book is built using:


What’s Inside

Chapters at a Glance

Table 1:Book Chapters Overview

Chapter

Description

Format

MyST Markdown syntax, roles, directives, and formatting tips

.md

Working with Jupyter Notebooks as content pages with live code

.ipynb

Combining Markdown prose with executable code cells

.md + code


How to Navigate

Step-by-step navigation guide:

  1. Browse chapters using the Table of Contents in the left sidebar

  2. Use the Previous / Next buttons at the bottom of each page

  3. Click the / arrow icons to navigate sections

  4. Use the download buttons in the top bar to export any page as .pdf or .ipynb

  5. Click “Open in Colab” or “Launch Binder” on notebook pages for interactive execution


MyST Formatting Showcase

This section is the core reference for MyST syntax. Each subsection demonstrates a specific feature — bookmark it for future use.

Admonitions (Callout Boxes)

Admonitions are styled callout boxes. Here are all the built-in types:

Custom admonitions use {admonition} with a title and optional class:

Code Blocks

Fenced code block with syntax highlighting:

# A simple Python example
def greet(name: str) -> str:
    return f"Hello, {name}!"

print(greet("World"))

{code-block} directive — supports line numbers, captions, and line emphasis:

1
2
3
pip install jupyter-book      # install the tool
cd /path/to/repo              # navigate to your project
jb build mybook/              # <- this builds the HTML book

Building this book from the terminal

Bash example:

# Build the book
jb build mybook/

# Clean the build cache
jb clean mybook/

# Create a new book scaffold
jb create my-new-book/

Common Jupyter Book Commands

Inline code uses backticks: python --version, git status, pip install.

Math & Equations

Inline math uses single dollar signs: f(x)=ax2+bx+cf(x) = ax^2 + bx + c

Block math (unnumbered) uses double dollar signs:

k=1nk=n(n+1)2\sum_{k=1}^{n} k = \frac{n(n+1)}{2}

Named, referenceable equations use the {math} directive:

eiπ+1=0e^{i\pi} + 1 = 0

Cross-reference it with: Equation (2) is Euler’s Identity — often called the most beautiful equation in mathematics.

Another named equation:

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2}\, dx = \sqrt{\pi}

The Gaussian integral (3) appears frequently in probability and statistics.

Tables

Standard Markdown table:

SyntaxDescriptionExample
**text**Boldbold
*text*Italicitalic
`code`Inline codecode
~~text~~Strikethrough~~strike~~
[text](url)Hyperlinklink

{list-table} directive — great for wide tables or programmatic content:

Table 2:MyST Roles Quick Reference

Role

Syntax

Use Case

Subscript

{sub}\text``

Chemical formulas: H2O

Superscript

{sup}\text``

Exponents: E=mc2

Abbreviation

{abbr}\X (Long Form)``

API

Keyboard key

{kbd}\Key``

Ctrl+C, ⌘+Z

Document link

{doc}\page``

Label reference

{ref}\label``

Admonitions (Callout Boxes)

Equation ref

{eq}\label``

(2)

Figure ref

{numref}\fig-label``

Figure 1

Figures

Cross-reference figures like this: see Figure 1 for the Jupyter Book logo.

Click to reveal: Why use a Cheat-Sheet book?

A structured cheat-sheet book (vs. a single file) lets you:

  1. Organize references by topic with a navigable sidebar

  2. Include runnable Jupyter Notebook examples inline

  3. Export to PDF, HTML, or share as a website

  4. Version-control your knowledge with Git

  5. Search across all pages instantly

See: Git Quick Reference
CommandDescription
git initInitialize a new repo
git add .Stage all changes
git commit -m "msg"Commit staged changes
git push origin mainPush to remote
git log --onelineCompact commit history

Cross-References & Labels

You can label any heading or block with (label)= placed above it, then reference it using {ref}:

Definition Lists

Jupyter Book
A tool for building beautiful, publication-quality books from Markdown and Jupyter Notebooks.
MyST Markdown
MyST — a rich Markdown dialect supporting Sphinx roles and directives.
Sphinx
The Python-based documentation engine that powers Jupyter Book under the hood.
Directive
A multi-line content block that acts like a function, e.g., ```{note} ... ```.
Role
An inline markup element that acts like a function, e.g., {kbd}`Ctrl`.

Footnotes

This sentence references a footnote.[1]

Footnotes can contain any Markdown — links, bold, code, etc.[2]

Line Blocks

Line blocks preserve newlines and indentation — useful for addresses, poetry, or structured prose:

| Vishal Lavangare | GitHub: github.com/Vedclove | Project: Cheat-Sheet | Branch: main

Margin Notes

Margin content is placed using the {margin} directive. It renders alongside the main text in the page margin.

Epigraph & Pull-Quote

Programs must be written for people to read, and only incidentally for machines to execute.

Harold Abelson, Structure and Interpretation of Computer Programs

Keep it simple. Keep it readable. Keep it in version control.

The {sidebar} directive floats content to the side, letting it coexist with surrounding body text. It’s great for short bios, glossary terms, or quick links.

Rubric (Un-numbered Heading)

rubric - Unknown Directive

A {rubric} creates a styled, un-numbered heading — useful for visual separation without affecting the TOC hierarchy.

Comments

Comments in MyST use a % prefix. They are stripped from output entirely.

Syntax:

% This is a comment
% It won't appear in the rendered output

Quick Reference Card

This is your at-a-glance cheat sheet for the cheat sheet:

MyST Formatting Quick Reference

Feature

Directive / Syntax

Notes

Note box

```{note} ```

Also: warning, tip, important, caution, danger, hint, seealso, error

Custom admonition

```{admonition} Title ```

Use :class: tip etc. to style it

Code block

```{code-block} python ```

Options: linenos, emphasize-lines, caption

Inline code

`code`

Standard Markdown

Math (inline)

$formula$

LaTeX syntax

Math (block)

$$formula$$ or ```{math} ```

Use :label: for numbered equations

Figure

```{figure} path ```

Use :name: to make cross-referenceable

Dropdown

```{dropdown} Title ```

Use :open: to start expanded

Table (list-table)

```{list-table} ```

Use :header-rows: 1

Target label

(label)= above heading

Reference with {ref}\label``

Cross-reference

{doc}\page`, {ref}`label`, {eq}`label``

Links to pages, headings, equations

Figure ref

{numref}\fig-name``

Auto-numbered “Figure X”

Abbreviation

{abbr}\X (Full Form)``

Shows tooltip on hover

Keyboard

{kbd}\Key``

Renders as a styled key badge

Sub/Superscript

{sub}\x`, {sup}`x``

Inline sub/superscript

Footnote

[^label] + [^label]: text

Renders at page bottom

Definition list

Term\n: Definition

CommonMark extension

Line block

\| line one\n\| line two

Preserves line breaks

Margin note

```{margin} ```

Floats to right gutter

Epigraph

```{epigraph} ```

Styled block quote with attribution

Pull-quote

```{pull-quote} ```

Highlighted inline quote

Sidebar

```{sidebar} Title ```

Floated side content block

Rubric

```{rubric} Title ```

Un-numbered styled heading

Comment

% comment text

Invisible in output

TOC

```{tableofcontents} ```

Renders the book’s TOC tree

Bibliography

```{bibliography} ``` + {cite}\key``

Requires a .bib file


Contributing

Spotted a mistake or want to add a new topic?

  1. Fork the repo at github.com/Vedclove/Cheat-Sheet

  2. Create a new branch: git checkout -b add/my-topic

  3. Add or edit .md / .ipynb files in the mybook/ directory

  4. Update _toc.yml to include your new page

  5. Submit a Pull Request


Built with Jupyter Book · Authored by Vedclove · Source on GitHub

Footnotes
  1. Footnotes are defined anywhere in the document and automatically rendered at the bottom of the page.

  2. This is the second footnote. It contains inline code and a link.