问题描述
我想在MediaWiki网站上语法突出显示Mathematica代码.我已经安装好了MediaWiki扩展 SyntaxHighlight GeSHi ,并验证了它适用于其他语言.
I'd like to syntax highlight Mathematica code on a MediaWiki site. I've already installedthe MediaWiki extension SyntaxHighlight GeSHi and verified that it works for other languages.
我尝试简单地放置Mathematica语言数据文件 mathematica.php
放入MediaWiki的扩展路径wiki/extensions/SyntaxHighlight_GeSHi/geshi
中,但是没有正确突出显示Mathematica代码块,例如:
I tried simply putting a Mathematica langauge data file mathematica.php
into MediaWiki's extension path wiki/extensions/SyntaxHighlight_GeSHi/geshi
, however it didn't correctly highlight a Mathematica code block such as:
<syntaxhighlight lang="Mathematica">
(* this is a comment *)
List[Sin[x], Cos[x], Tan[x]];
</syntaxhighlight>
有什么想法吗?
推荐答案
在 http://qbnz.com/highlighter/,所以我想GeSHi根本不知道.如果您愿意,我想您可以为geshi项目贡献各自的突出显示代码.
I do not see Mathematica listed as a supported language at http://qbnz.com/highlighter/, so I suppose GeSHi simply doesn't know it. I suppose you could contribute the respective highlighting code to the geshi project, if you like.
这篇关于如何使用扩展名"SyntaxHighlight GeSHi"为MediaWiki启用Mathematica语法突出显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!