Testing code and latex with markdown
This post demonstrates full LaTeX rendering and code syntax highlighting in MDX.
Inline Mathematics
Einstein's famous equation relates energy to mass. The quadratic formula solves any quadratic equation.
Block Mathematics
The Gaussian integral is one of the most beautiful results in mathematics:
The Euler Identity
Perhaps the most elegant equation in all of mathematics:
This single equation connects five fundamental constants: , , , , and .
Fourier Transform
The Fourier transform decomposes a function into its constituent frequencies:
Maxwell's Equations
The four Maxwell equations in differential form:
Matrices and Linear Algebra
A rotation matrix in 2D:
Summations and Products
The Basel problem:
Euler's product formula for the Riemann zeta function:
Code Example
Here's how you might compute the Gaussian integral numerically in Python:
import numpy as np
from scipy import integrate
def gaussian(x):
return np.exp(-x**2)
result, error = integrate.quad(gaussian, -np.inf, np.inf)
print(f"Result: {result:.10f}") # Should be close to sqrt(pi) ≈ 1.7724538509Conclusion
LaTeX rendering in MDX enables writing rich mathematical content with beautiful typography, perfect for technical blogs, documentation, and educational materials.