测试
考虑向量 \vec x = \begin{bmatrix} x \\ y \end{bmatrix} ,水平扭曲矩阵 A = \begin{bmatrix} 1 & \tan(-\frac\theta 2) \\ 0 & 1 \end{bmatrix} ,则 A\vec x = \begin{bmatrix} x + y \tan(-\frac\theta 2) \\ y \end{bmatrix}
联立化简 \left\{
\begin{matrix}\begin{aligned}
&x_1 = x_0 + y_0 * \tan(-\frac\theta 2) \\
&y_1 = y_0 + x_1 * \tan(\varphi) \\
&x_2 = x_1 + y_1 * \tan(-\frac\theta 2)
\end{aligned}\end{matrix}\right. , \left\{
\begin{matrix}\begin{aligned}
&x_0 = 0,\ y_0 = 1 \\
&\tan(-\theta) = \frac{x_2}{y_1}
\end{aligned}\end{matrix}\right. 得 \displaystyle\frac{\tan(\frac\theta 2)[\sec(\theta)\tan(\varphi) - \tan(\theta)]}{\tan(\frac\theta 2)\tan(\varphi) - 1} = 0
\left[
\begin{matrix}
\begin{aligned}
&&\cdots &&\color{Red}{A[i-2]} &&\mathbf{\color{Red}{A[i-1]}} &&\mathbf{\color{Blue}{A[i']}} && \\\\
&&\cdots &&\color{Red}{B[j-2]} &&\mathbf{\color{Red}{B[j-1]}} &&\mathbf{\color{Blue}{B[j]}} &&
\end{aligned}\end{matrix}
\right]
lev_{A,\ B}(i,\ j) = \left\{
\begin{matrix}
\begin{aligned}
&i, &&when\ j=0 \\
&j, &&when\ i=0 \\
&min\left\{\begin{matrix}\begin{aligned}
&lev_{a,\ b}(i,\ j-1) &+\ &1 \\
&lev_{a,\ b}(i-1,\ j) &+\ &1 \\
&lev_{a,\ b}(i-1,\ j-1) &+\ &1_{(a_i\neq b_i)}
\end{aligned}\end{matrix}\right\}, &&otherwise
\end{aligned}\end{matrix}\right.
嗯没啥毛病, KaTeX 渲染的 html 一如既往的好用