An Example Post For Style Testing
Test of Austin’s Custom LaTeX Style
This document tests various custom commands and environments from austin.sty. For those fo you reading, my system allows me to write a single tex file and then when uploading it to the web uses pandoc to convert to a md version and then also links the origninal compiled pdf! (nontirivality in converting macros i.e. replicate my main .sty file lol)
Custom Math Commands
Here are some custom math symbols:
-
Complex numbers: $\mathbb{C}$
-
Natural numbers: $\mathbb{N}$
-
Rational numbers: $\mathbb{Q}$
-
Real numbers: $\mathbb{R}$
-
Integers: $\mathbb{Z}$
Some custom operators: $\mathrm{cis}(\theta) = \cos(\theta) + i\sin(\theta)$
The least common multiple: $\mathrm{lcm}(12, 18) = 36$
Automorphism group: $\mathrm{Aut}(G)$
Custom Math Shortcuts
Cube root: $\sqrt[3]{27} = 3$
Floor and ceiling: $\lfloor 3.7 \rfloor = 3$ and $\lceil 3.2 \rceil = 4$
Boxed result: $\boxed{E = mc^2}$
Fraction shortcut: $\frac{a}{b} = \frac{a}{b}$
Vector notation: $\mathbf{v} = \begin{bmatrix}x \ y \ z\end{bmatrix}$
Theorem-Like Environments
Theorem:
If $f$ is continuous on $[a,b]$ and $F$ is an antiderivative of $f$, then \(\int_a^b f(x) \, dx = F(b) - F(a)\)
Lemma:
Every partially ordered set in which every chain has an upper bound contains at least one maximal element.
Corollary:
Every vector space has a basis.
Proposition:
For any vectors $\mathbf{u}, \mathbf{v} \in \mathbb{R}^n$: \(|\langle \mathbf{u}, \mathbf{v} \rangle| \leq \|\mathbf{u}\| \|\mathbf{v}\|\)
Definition:
A group is a set $G$ together with a binary operation $\cdot: G \times G \to G$ satisfying:
Associativity: $(a \cdot b) \cdot c = a \cdot (b \cdot c)$
Identity: $\exists e \in G \ \text{s.t.} \ a \cdot e = e \cdot a = a$ for all $a \in G$
Inverses: For each $a \in G$, $\exists a^{-1} \in G \ \text{s.t.} \ a \cdot a^{-1} = a^{-1} \cdot a = e$
Example:
The symmetric group $S_n$ consists of all permutations of $n$ elements. It has order $n!$.
Remark:
The notation $\mathrm{Hom}(G, H)$ denotes the set of all homomorphisms from $G$ to $H$.
Probability and Statistics
Expected value: $\mathbb{E}[X] = \sum_{x} x \cdot P(X = x)$
Variance: $\mathrm{Var}(X) = \mathbb{E}[X^2] - \mathbb{E}[X]^2$
Covariance: $\mathrm{Cov}(X, Y) = \mathbb{E}[XY] - \mathbb{E}[X]\mathbb{E}[Y]$
Bernoulli distribution: $X \sim \mathrm{Bern}(p)$
Binomial distribution: $Y \sim \mathrm{Binom}(n, p)$
Code Listings
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
Problem Environment
Problem:
Prove that $\sqrt{2}$ is irrational.
Subproblem:
Assume $\sqrt{2} = \frac{p}{q}$ where $p, q \in \mathbb{Z}$ and $\gcd(p, q) = 1$.
Subproblem:
Derive a contradiction.