Skip to main content

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:

  1. Special relativity (1905)
  2. General relativity (1915)
  3. Photoelectric effect (1905) — Nobel Prize basis

Unordered list:

  • Tensor calculus
  • Differential geometry
  • Riemannian geometry

Tables

YearPaperJournal
1905On the Electrodynamics of Moving BodiesAnnalen der Physik
1905Does the Inertia of a Body Depend Upon Its Energy Content?Annalen der Physik
1915The Foundation of the General Theory of RelativityAnnalen der Physik
1935Can QM Description Be Considered Complete? (EPR)Physical Review

Horizontal rule


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

  1. Footnotes are rendered at the bottom of the page.