将 mediawiki 转换为 LaTeX 语法
我需要将 mediawiki 转换为 LaTeX 语法。公式应该保持不变,但我需要进行转换,例如 = something = 转换为 \chapter{something}。
虽然这可以通过一些 sed 来获得,但 itemize 环境会变得有点脏,所以我想知道是否可以产生更好的解决方案。有什么对这项任务有用的吗?
I need to convert mediawiki into LaTeX syntax. The formulas should stay the same, but I need to transform, for example = something = into \chapter{something}.
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 ?
This is the reverse of this question (graciously copied). Pandoc was the answer to that question, but probably not yet for this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
wiki2latex 怎么样?
http://code.google.com/p/wiki2latex/
http://www.mediawiki.org/wiki/Extension:Wiki2LaTeX
引用自 mediawiki 站点:
how about wiki2latex?
http://code.google.com/p/wiki2latex/
http://www.mediawiki.org/wiki/Extension:Wiki2LaTeX
Quoting from the mediawiki site:
我花了两年时间为此编写了一个工具。
您可以在这里获取它,它遵循 GPL。
http://de.wikibooks.org/wiki/Benutzer:Dirk_Huenniger/wb2pdf
编辑:该项目已被 Debian 接受。还提供适用于 Windows 的二进制版本。
编辑:还有一个网络界面 http://mediawiki2latex.wmflabs.org/
I spend two years writing a tool for that.
You can get it here it's under GPL.
http://de.wikibooks.org/wiki/Benutzer:Dirk_Huenniger/wb2pdf
Edit: The project has been accepted into Debian. A binary version for Windows is also available.
Edit: There also is a web interface http://mediawiki2latex.wmflabs.org/
我使用 sed。例如,以下脚本将您的 = Something = 转换为 \chapter{something}:
I use sed. For example, the following script converts your = something = into \chapter{something}:
我还没有机会测试这些,但这三个看起来最有前途:
Pandoc (< a href="https://devotter.com/converter" rel="nofollow noreferrer">Web 界面)
在 Ubuntu 中:
Dirk Hünniger。 MediaWiki 到 LaTeX (网络界面)
在 Ubuntu 中:
作为一种专用工具,它可能比其他工具具有更好的功能,但它需要完整的 TexLive 安装 (~2.5 Gb)
C.斯科特·阿纳尼安 &维基媒体基金会。 mw-ocg-latexer。
这是为捆绑 wiki 页面的 WikiBooks 设计的,因此它可能不如前两个那么容易使用。
我也发现了以下项目,但它们没有维护,所以我不建议尝试它们,除非你知道自己在做什么。这些日期表明开发似乎已经停止。
我做了非常彻底的互联网搜索,所以我相信这是互联网上所有将 MediaWiki 标记转换为 LaTex 的软件的综合。
I haven't had a chance to test these out, but these three look most promising:
Pandoc (Web interface)
In Ubuntu:
Dirk Hünniger. MediaWiki to LaTeX (Web interface)
In Ubuntu:
As a special-purpose tool, this might have better features than the others, but it requires a full TexLive installation (~2.5 Gb)
C. Scott Ananian & Wikimedia Foundation. mw-ocg-latexer.
This is designed for WikiBooks of bundled wiki pages, so it probably isn't as easy to use as the first two.
I found the following projects as well, but they are unmaintained, so I don't recommend trying them unless you know what you're doing. The dates indicate when development seems to have stopped.
I did a very thorough internet search, so I believe that this is comprehensive of all software on the internet to convert MediaWiki markup to LaTex.
当使用在 Mediawiki 上运行的 HandWiki 时,您可以使用内置转换器对 wiki 文本文章进行转换。打开任何文章,然后使用“操作”菜单(右上角)选择“导出到 LaTeX”
When using HandWiki that runs on Mediawiki, you can do the conversion of wikitext articles using the built-in convertor. Open any article and the select "Export to LaTeX" using the Action menu (top-right)