From 0a2b52f618c8a76a2f2a0e29223b5289c0225634 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Sun, 24 Mar 2024 15:50:38 -0700 Subject: [PATCH] simpler katex fix --- docs/features/Latex.md | 11 +++++++++++ quartz/styles/base.scss | 9 +-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/features/Latex.md b/docs/features/Latex.md index b2bdb2d..fdc9d27 100644 --- a/docs/features/Latex.md +++ b/docs/features/Latex.md @@ -39,6 +39,17 @@ a & b & c \end{bmatrix} $$ +$$ +\begin{array}{rll} +E \psi &= H\psi & \text{Expanding the Hamiltonian Operator} \\ +&= -\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2} \psi + \frac{1}{2}m\omega x^2 \psi & \text{Using the ansatz $\psi(x) = e^{-kx^2}f(x)$, hoping to cancel the $x^2$ term} \\ +&= -\frac{\hbar^2}{2m} [4k^2x^2f(x)+2(-2kx)f'(x) + f''(x)]e^{-kx^2} + \frac{1}{2}m\omega x^2 f(x)e^{-kx^2} &\text{Removing the $e^{-kx^2}$ term from both sides} \\ +& \Downarrow \\ +Ef(x) &= -\frac{\hbar^2}{2m} [4k^2x^2f(x)-4kxf'(x) + f''(x)] + \frac{1}{2}m\omega x^2 f(x) & \text{Choosing $k=\frac{im}{2}\sqrt{\frac{\omega}{\hbar}}$ to cancel the $x^2$ term, via $-\frac{\hbar^2}{2m}4k^2=\frac{1}{2}m \omega$} \\ +&= -\frac{\hbar^2}{2m} [-4kxf'(x) + f''(x)] \\ +\end{array} +$$ + > [!warn] > Due to limitations in the [underlying parsing library](https://github.com/remarkjs/remark-math), block math in Quartz requires the `$$` delimiters to be on newlines like above. diff --git a/quartz/styles/base.scss b/quartz/styles/base.scss index 1af96f6..859bb43 100644 --- a/quartz/styles/base.scss +++ b/quartz/styles/base.scss @@ -516,12 +516,5 @@ ol.overflow { .katex-display { overflow-x: auto; - overflow-y: visible; - - & > .katex .katex-html { - .base, - .strut { - display: inline; - } - } + overflow-y: hidden; }