Skip to content

通过 CLI 发布 markdown 文章到知乎时 LaTeX 公式未被渲染 #175

@Juemuren

Description

@Juemuren

一个简单的复现例子 test.md

# 测试

行内 $111$ 公式

行间公式

$$222$$

运行

wechatsync sync test.md -p zhihu

最后的效果为

Image

希望的效果为

Image

一种可能的实现方式 test2.md

# 测试

行内 <img src="https://www.zhihu.com/equation?tex=111" alt="111" class="ee_img tr_noresize" eeimg="1"> 公式

行间公式

<img src="https://www.zhihu.com/equation?tex=222" alt="222" class="ee_img tr_noresize" eeimg="2">

运行 wechatsync sync test2.md -p zhihu 后效果为

Image

但这种方式有一些缺点

  1. 上传好像会变慢,而且当公式非常多的时候(我的情况是包含了 353 个行内公式和 79 个行间公式)会一直卡在同步,无法成功上传
  2. 如上所示,行内公式前莫名出现了空格

我不知道还有没有更好的解决方案

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions