Formatting Examples
This post demonstrates the various formatting options available in as-folio.
Headings
Headings use --font-sans (Roboto) and scale gracefully from h1 through h4.
Level 3 heading
Level 4 heading
Text formatting
You can use bold text, italic text, strikethrough, and inline code.
A blockquote looks like this. It uses a left border with the theme color and italic text for emphasis.
— Albert Einstein
Code blocks
Syntax highlighting is handled by Shiki with github-light / github-dark themes:
def lorentz_factor(v, c=3e8):
"""Compute the Lorentz factor γ = 1 / sqrt(1 - v²/c²)."""
import math
return 1 / math.sqrt(1 - (v / c) ** 2)
# At 90% the speed of light:
print(lorentz_factor(0.9 * 3e8)) # ≈ 2.294
// TypeScript example
interface Author {
name: string;
email: string;
institution: string;
}
const einstein: Author = {
name: 'Albert Einstein',
email: 'einstein@example.com',
institution: 'Institute for Advanced Study',
};
Lists
Ordered list:
- Special relativity (1905)
- General relativity (1915)
- Photoelectric effect (1905) — Nobel Prize basis
Unordered list:
- Tensor calculus
- Differential geometry
- Riemannian geometry
Tables
| Year | Paper | Journal |
|---|---|---|
| 1905 | On the Electrodynamics of Moving Bodies | Annalen der Physik |
| 1905 | Does the Inertia of a Body Depend Upon Its Energy Content? | Annalen der Physik |
| 1915 | The Foundation of the General Theory of Relativity | Annalen der Physik |
| 1935 | Can QM Description Be Considered Complete? (EPR) | Physical Review |
Horizontal rule
Links
Internal links use the theme color on hover. External links open in a new tab with a small indicator icon.
Footnotes
This feature is supported by the MDX renderer1.
Footnotes
-
Footnotes are rendered at the bottom of the page. ↩