Skip to content

Instantly share code, notes, and snippets.

@rbeucher
Forked from DanielKotik/divtags.rst
Created August 9, 2023 22:12
Show Gist options
  • Save rbeucher/04d52672b4bd297f3b51c6754db41329 to your computer and use it in GitHub Desktop.
Save rbeucher/04d52672b4bd297f3b51c6754db41329 to your computer and use it in GitHub Desktop.
Colored note boxes inside Jupyter notebooks

############# Markdown parser in Jupyter notebooks ##################

<div class="alert alert-block alert-info"> <b>NOTE</b> Use blue boxes for Tips and notes. </div>

<div class="alert alert-block alert-success"> Use green boxes sparingly, and only for some specific purpose that the other boxes can't cover. For example, if you have a lot of related content to link to, maybe you decide to use green boxes for related links from each section of a notebook. </div>

<div class="alert alert-block alert-warning"> Use yellow boxes for examples that are not inside code cells, or use for mathematical formulas if needed. </div>

<div class="alert alert-block alert-danger"> In general, just avoid the red boxes. </div>

############# Markdown parser in Sphinx ##################

<div class="admonition note"> <p class="admonition-title">Note</p> <p>You should note that the title will be automatically capitalized.</p> </div>

<div class="admonition danger"> <p class="admonition-title">Don't try this at home</p> <p>...</p> </div>

<div class="admonition important"> <p>This is an admonition box without a title.</p> </div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment