doocs / md

✍ WeChat Markdown Editor | 一款高度简洁的微信 Markdown 编辑器:支持 Markdown 语法、色盘取色、多图上传、一键下载文档、自定义 CSS 样式、一键重置等特性
https://doocs.github.io/md/
Do What The F*ck You Want To Public License
5.68k stars 905 forks source link

feat: add mathjax renderer #385

Closed YangFong closed 4 weeks ago

github-actions[bot] commented 4 weeks ago

🎊 PR Preview has been successfully built and deployed to https://doocs-md-preview-pr-385.surge.sh

cloudflare-workers-and-pages[bot] commented 4 weeks ago

Deploying doocs-md with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1a3ff17
Status: ✅  Deploy successful!
Preview URL: https://a8cf54bd.doocs-md.pages.dev
Branch Preview URL: https://dev-katex.doocs-md.pages.dev

View logs

YangFong commented 4 weeks ago

测试数据:

# 测试

前面一半

$$
\underbrace{| Z - \text{sg}[\tilde{Z}] |2^2}
$$

后面一半

$$
{\mathcal{L}{commit}}
$$

完整

$$
\underbrace{| Z - \text{sg}[\tilde{Z}] |2^2}{\mathcal{L}{commit}}
$$
yanglbme commented 4 weeks ago

测试用例:

  1. 引用内加公式:
> 这段代码时间复杂度 $O(n^2)$,空间复杂度 $O(n)$。
  1. 复杂公式:
$$
\mathcal{L}_{VQ} = \underbrace{\mathcal{L}_{CE}(X, \hat{X})}_{\mathcal{L}_{rec}} + \underbrace{\| \text{sg}[Z] - \tilde{Z} \|_2^2}_{\mathcal{L}_{code}} + \beta \underbrace{\| Z - \text{sg}[\tilde{Z}] \|_2^2}_{\mathcal{L}_{commit}}, \tag{4}
$$
  1. 行内公式,前后不加空格:
这段代码时间复杂度$O(n^2)$,空间复杂度$O(n)$。
yanglbme commented 4 weeks ago
$$
f[i][h]=
\begin{cases}
\max(f[i][h], f[j][h] + 1234343243444554545), & \textit{if } nums[i] = nums[j], \\
\max(f[i][h], f[j][h - 1] + 1), & \textit{if } h > 0.
\end{cases}
$$
yanglbme commented 4 weeks ago

376 #384