/ concept-collection / mdshare
Sign in
concept-collection / mdshare
mdshare / src / sample.md
1.4 KBPreviewCodeBlameHistoryRaw

mdshare#

Type markdown on the left, see it rendered on the right. The document is compressed and stored in the URL itself, so sharing the page is just copying the link: there is no server and nothing is uploaded.

Math#

Inline math like eiπ+1=0e^{i\pi} + 1 = 0 works, and so do display equations:

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}
(abcd)(xy)=(ax+bycx+dy)\begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax + by \\ cx + dy \end{pmatrix}

Code#

import numpy as np

def gaussian(x, sigma=1.0):
    """The integrand from the equation above."""
    return np.exp(-x**2 / sigma**2)

x = np.linspace(-4, 4, 1000)
print(np.trapezoid(gaussian(x), x))  # ~ sqrt(pi)
// The URL encoding used by this page
const payload = deflate(new TextEncoder().encode(text))
location.hash = base64url(payload)

Tables and task lists#

Feature Plugin Status
Math remark-math + KaTeX works
Code highlighting highlight.js works
Tables, footnotes remark-gfm works
Diagrams mermaid works

Diagrams#

graph LR
    A[edit markdown] --> B[compress]
    B --> C[base64url]
    C --> D[URL hash]
    D --> E[share the link]
    E --> A

Notes#

Footnotes[1], strikethrough, and block quotes:

The URL is the document.


  1. Like this one. ↩︎

moveopenescclose