Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

如何让 epub 输出格式支持数学公式 \bcancel{///} #4

Open
XiangyunHuang opened this issue Mar 28, 2020 · 4 comments
Open
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@XiangyunHuang
Copy link
Owner

有类似在 header.html 中加载 cancel.js 的方式吗?使得 epub 支持 (\bcancel{///})

目前 Travis CI 上给出的警告信息如下

/usr/bin/pandoc +RTS -K512m -RTS ElegantBookdown.utf8.md --to epub3 --from markdown+autolink_bare_uris+tex_math_single_backslash --output ElegantBookdown.epub --number-sections --filter /usr/bin/pandoc-citeproc 
[WARNING] Could not convert TeX math '\bcancel{///}', rendering as TeX:
  \bcancel{///}
          ^
  unexpected "{"
  expecting "%", "\\label", "\\nonumber" or whitespace

然后 epub 没有渲染数学公式

cancel

网上搜到一个相关帖子 crypto101/book#62

@XiangyunHuang XiangyunHuang added the question Further information is requested label Mar 28, 2020
@fyuniv
Copy link
Collaborator

fyuniv commented Mar 28, 2020

试试把math都变成图片。虽然不美观,但是至少可以显示出来。

bookdown::epub_book:
  pandoc_args: --webtex

@XiangyunHuang
Copy link
Owner Author

虽然不完美但是效果也凑合,我先关闭这个 Issue

@XiangyunHuang
Copy link
Owner Author

想了想还是开着吧,我发现对于多行公式似乎不支持

@XiangyunHuang XiangyunHuang reopened this Mar 29, 2020
@fyuniv
Copy link
Collaborator

fyuniv commented Mar 29, 2020

开着好,我昨天试了一天,也没有找到解决办法。回头再想想吧。如果知道pandoc是怎么把tex转成mathml的,问题倒是可能有解。

@XiangyunHuang XiangyunHuang added the help wanted Extra attention is needed label Mar 30, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants