在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):ajtulloch/LaTeX2Markdown开源软件地址(OpenSource Url):https://github.com/ajtulloch/LaTeX2Markdown开源编程语言(OpenSource Language):Python 100.0%开源软件介绍(OpenSource Introduction):LaTeX2MarkdownAn AMS-LaTeX compatible converter from (a subset of) LaTeX to MathJaX compatible Markdown. Who should use this?Anyone who writes LaTeX documents using the AMS-LaTeX packages ( In short, if you seek to use MathJaX to view your LaTeX documents online, then you might be interested in this. DemonstrationCheck out tullo.ch/projects/LaTeX2Markdown for a live demonstration of the converter. Getting StartedInstallationThe project is available on PyPI, so getting it is as simple as using
or
UsageThe utility can be called from the command line, or from within a Python script. For the command line, the syntax to convert a LaTeX file to a Markdown file is as follows:
For example, to compile a LaTeX file
To use it within a Python script (to extend it, modify output, etc.), you can use it as follows:
Finally, add the following snippet to your HTML when loading this document.
For a working example, have a look at the source of the tullo.ch homepage here. Why not use Pandoc?Pandoc is an excellent document converter for less complex LaTeX documents. Indeed, I've used it to convert this README document to a reST version for use on PyPI. Unfortunately, it is not designed to deal with documents that use the AMSTeX extensions - which include the theorem, lemma, proof, and exercise environments that are heavily used for typesetting papers, lecture notes, and other documents. As neither Pandoc nor MathJaX can deal with these documents, I hacked together a set of regular expressions that can convert a subset of LaTeX to Markdown, and used a few more to convert the sMarkdown to MathJaX-convertible Markdown. ExampleAs an example, the following LaTeX code:
is converted into the following Markdown:
Supported LaTeX/AMSTeX Environments
along with everything supported by MathJax - list available online. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论