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
The book is built using:
Jupyter Book — for beautiful, publication-quality books from Markdown and Notebooks
MyST Markdown — a powerful Markdown flavor supporting roles and directives
GitHub Actions — for automated CI/CD builds and deployments
Sphinx — the underlying Python documentation engine
What’s Inside¶
Chapters at a Glance¶
Table 1:Book Chapters Overview
How to Navigate¶
Step-by-step navigation guide:
Browse chapters using the Table of Contents in the left sidebar
Use the Previous / Next buttons at the bottom of each page
Click the ↑ / ↓ arrow icons to navigate sections
Use the download buttons in the top bar to export any page as
.pdfor.ipynbClick “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 3pip 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:
Block math (unnumbered) uses double dollar signs:
Named, referenceable equations use the {math} directive:
Cross-reference it with: Equation (2) is Euler’s Identity — often called the most beautiful equation in mathematics.
Another named equation:
The Gaussian integral (3) appears frequently in probability and statistics.
Tables¶
Standard Markdown table:
| Syntax | Description | Example |
|---|---|---|
**text** | Bold | bold |
*text* | Italic | italic |
`code` | Inline code | code |
~~text~~ | Strikethrough | ~~strike~~ |
[text](url) | Hyperlink | link |
{list-table} directive — great for wide tables or programmatic content:
Table 2:MyST Roles Quick Reference
Role | Syntax | Use Case |
|---|---|---|
Subscript |
| Chemical formulas: H2O |
Superscript |
| Exponents: E=mc2 |
Abbreviation |
| API |
Keyboard key |
| Ctrl+C, ⌘+Z |
Document link |
| |
Label reference |
| |
Equation ref |
| |
Figure ref |
|
Figures¶
Figure 1:Figure 1 — The Jupyter Book logo. This book is built on top of it.
Cross-reference figures like this: see Figure 1 for the Jupyter Book logo.
Dropdowns¶
Click to reveal: Why use a Cheat-Sheet book?
A structured cheat-sheet book (vs. a single file) lets you:
Organize references by topic with a navigable sidebar
Include runnable Jupyter Notebook examples inline
Export to PDF, HTML, or share as a website
Version-control your knowledge with Git
Search across all pages instantly
See: Git Quick Reference
| Command | Description |
|---|---|
git init | Initialize a new repo |
git add . | Stage all changes |
git commit -m "msg" | Commit staged changes |
git push origin main | Push to remote |
git log --oneline | Compact commit history |
Cross-References & Labels¶
You can label any heading or block with (label)= placed above it, then reference it using {ref}:
Admonitions (Callout Boxes) — jumps to the Admonitions section
Code Blocks — jumps to Code Blocks
Math & Equations — jumps to Math & Equations
Tables — jumps to Tables
Cross-References & Labels — jumps to this very section
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.
Sidebar¶
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
rubric - Unknown DirectiveA {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 outputQuick Reference Card¶
This is your at-a-glance cheat sheet for the cheat sheet:
MyST Formatting Quick Reference
Feature | Directive / Syntax | Notes |
|---|---|---|
Note box |
| Also: warning, tip, important, caution, danger, hint, seealso, error |
Custom admonition |
| Use |
Code block |
| Options: linenos, emphasize-lines, caption |
Inline code |
| Standard Markdown |
Math (inline) |
| LaTeX syntax |
Math (block) |
| Use |
Figure |
| Use |
Dropdown |
| Use |
Table (list-table) |
| Use |
Target label |
| Reference with |
Cross-reference |
| Links to pages, headings, equations |
Figure ref |
| Auto-numbered “Figure X” |
Abbreviation |
| Shows tooltip on hover |
Keyboard |
| Renders as a styled key badge |
Sub/Superscript |
| Inline sub/superscript |
Footnote |
| Renders at page bottom |
Definition list |
| CommonMark extension |
Line block |
| Preserves line breaks |
Margin note |
| Floats to right gutter |
Epigraph |
| Styled block quote with attribution |
Pull-quote |
| Highlighted inline quote |
Sidebar |
| Floated side content block |
Rubric |
| Un-numbered styled heading |
Comment |
| Invisible in output |
TOC |
| Renders the book’s TOC tree |
Bibliography |
| Requires a |
Contributing¶
Spotted a mistake or want to add a new topic?
Fork the repo at github
.com /Vedclove /Cheat -Sheet Create a new branch:
git checkout -b add/my-topicAdd or edit
.md/.ipynbfiles in themybook/directoryUpdate
_toc.ymlto include your new pageSubmit a Pull Request
Built with Jupyter Book · Authored by Vedclove · Source on GitHub