如何使用pandoc将mathjax转换为latex? [英] How to convert HTML with mathjax into latex using pandoc?

查看:868
本文介绍了如何使用pandoc将mathjax转换为latex?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些带有MathJax方程的HTML文档,我想将它们转换为latex,然后转换为pdf。



然而,pandoc用 \替换 $ $ ,它用 \textbackslash {} 替换公式中的 \ 。 p>

是否有可能让pandoc将html直接从latex传递到latex?

解决方案

使用最新版本的pandoc(1.12.2),您可以这样做:

  pandoc -f html + tex_math_dollars + tex_math_single_backslash -t latex 

更好!如果你不想转换由 \( \)定界的数学,只需

  pandoc -f html + tex_math_dollars -t latex 


I have some HTML documents with MathJax equations, and I want to convert them to latex, and then to pdf. I'd like to use pandoc.

However, pandoc replaces $ with \$ and it replaces \ in formulas with \textbackslash{}.

Is it possible to get pandoc to pass Mathjax formulas literally from html to latex?

解决方案

With the latest version of pandoc (1.12.2), you can do this:

pandoc -f html+tex_math_dollars+tex_math_single_backslash -t latex

Much nicer! If you don't want to convert math delimited by \( and \), just do

pandoc -f html+tex_math_dollars -t latex

这篇关于如何使用pandoc将mathjax转换为latex?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆