pandoc 和 mathjax 遇到一些问题

2024-01-01

我正在尝试使用 pandoc 从包含一些乳胶的 markdown 文件生成 html 幻灯片。

该文件是在github上 https://raw.github.com/rcalsaverini/ThesisPresentation/master/apresentacao.md.

如果我运行以下 pandoc 命令:

pandoc -s -t s5 --mathjax apresentacao.md -o index.html

MathJax 完美地显示了数学,但我只得到一个包含所有幻灯片的网页,没有幻灯片功能。

如果我运行以下命令:

pandoc -s --self-contained -t s5 --mathjax apresentacao.md -o index.html

我得到了一个完美的演示文稿,但 MathJax 无法加载。生成的 html 文件(不可理解地)充满了加载的图像和 JavaScript 库的二进制文件。但它似乎未能正确合并MathJax。

你们有这个问题吗?有什么简单的方法可以解决这个问题吗?

我正在使用以下 pandoc 版本:

$ pandoc --version
pandoc 1.11.1
Compiled with citeproc-hs 0.3.8, texmath 0.6.1.3, highlighting-kate 0.5.3.8.
Syntax highlighting is supported for the following languages:
    actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
    clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
    diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
    fortran, fsharp, gnuassembler, go, haskell, haxe, html, ini, java, javadoc,
    javascript, json, jsp, julia, latex, lex, literatecurry, literatehaskell,
    lua, makefile, mandoc, matlab, maxima, metafont, mips, modula2, modula3,
    monobasic, nasm, noweb, objectivec, objectivecpp, ocaml, octave, pascal,
    perl, php, pike, postscript, prolog, python, r, relaxngcompact, rhtml, ruby,
    rust, scala, scheme, sci, sed, sgml, sql, sqlmysql, sqlpostgresql, tcl,
    texinfo, verilog, vhdl, xml, xorg, xslt, xul, yacc, yaml
Default user data directory: /home/calsaverini/.pandoc
Copyright (C) 2006-2013 John MacFarlane
Web:  http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions.  There is no
warranty, not even for merchantability or fitness for a particular purpose.

It's a 已知问题 https://github.com/jgm/pandoc/issues/682: --mathjax不能很好地配合--self-contained。我还没有充分研究它来提出修复方案,但欢迎提出建议。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

pandoc 和 mathjax 遇到一些问题 的相关文章

随机推荐