将 LaTeX 转换为 MediaWiki 语法 [英] Convert LaTeX to MediaWiki syntax
本文介绍了将 LaTeX 转换为 MediaWiki 语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将 LaTeX 转换为 MediaWiki 语法.公式应该保持不变,但我需要转换,例如 chapter{something}
成 = something =.
I need to convert LaTeX into MediaWiki syntax. The formulas should stay the same, but I need to transform, for example chapter{something}
into = something =.
虽然这可以通过一点 sed 来获得,但 itemize 环境有点脏,所以我想知道是否可以产生更好的解决方案.
Although this can be obtained with a bit of sed, things get a little dirty with the itemize environment, so I was wondering if a better solution can be produced.
有什么对这项任务有用的吗?
Anything that can be useful for this task?
推荐答案
Pandoc 应该可以做到:
$ pandoc -f latex -t mediawiki << END
> documentclass{paper}
> egin{document}
> section{Heading}
>
> Hello
>
> subsection{Sub-heading}
>
> extbf{World}!
> end{document}
> END
== Heading ==
Hello
=== Sub-heading ===
'''World'''!
这篇关于将 LaTeX 转换为 MediaWiki 语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文