在MediaWiki 1.24.1(Ubuntu)中显示数学公式

在MediaWiki 1.24.1(Ubuntu)中显示数学公式,ubuntu,math,mediawiki,mediawiki-extensions,Ubuntu,Math,Mediawiki,Mediawiki Extensions,数学扩展2.0.0 MediaWiki 1.24.1 Ubuntu 14.04.3 我已经按步骤完成了 在my LocalSettings.php的底部,我有: require_once "$IP/extensions/Math/Math.php"; $wgDefaultUserOptions['math'] = 'mathml'; $wgMathFullRestbaseURL= 'https://api.formulasearchengine.com/'; 这要感谢Tgr的回答。所以我尝试使

数学扩展2.0.0
MediaWiki 1.24.1
Ubuntu 14.04.3

我已经按步骤完成了

在my LocalSettings.php的底部,我有:

require_once "$IP/extensions/Math/Math.php";
$wgDefaultUserOptions['math'] = 'mathml';
$wgMathFullRestbaseURL= 'https://api.formulasearchengine.com/';
这要感谢Tgr的回答。所以我尝试使用远程Mathoid服务

但是,如果我尝试使用以下内容创建wiki页面:

<math>x^2</math>
…而这个自述文件似乎只包含构建
texvc
的说明。但是根据Tgr的回答,我不想使用
texvc
。我想使用远程Mathoid服务

尽管说明中没有建议,但多亏了#mediawiki IRC上的家伙,我做到了:

pi@PiDroplet:~$ cd web/wiki/extensions/Math/

pi@PiDroplet:~/web/wiki/extensions/Math$ make
cd math; make 
make[1]: Entering directory `/home/pi/web/wiki/extensions/Math/math'
ocamlopt -c util.ml
make[1]: ocamlopt: Command not found
make[1]: *** [util.cmx] Error 127
make[1]: Leaving directory `/home/pi/web/wiki/extensions/Math/math'
make: *** [texvc] Error 2
要安装
ocamlopt
,我需要
apt-get-install-ocaml-nox
——现在完成,我遇到了一个不同的渲染错误:

"Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)):"
以下是我所做的:

。。。这告诉我我没有“皈依者”——其他一切都存在

sudo-apt-get-install-imagemagick
。。。现在我有了一个/usr/bin/convert

看起来我还需要
sudo-apt-get-install-dvipng

仍然从同一个链接工作,我必须执行
sudo apt get install texlive latex extra
,然后重新启动服务器,并且渲染正确

但是,如果我打开我的错误:

# DEBUG
error_reporting( -1 );
ini_set( 'display_errors', 1 );

$wgShowSQLErrors = true;
$wgDebugDumpSql  = true;
$wgShowExceptionDetails = true;
$wgShowDBErrorBacktrace = true;
我在页面顶部看到:

PHP Notice:  Missing <code>texvccheck</code> executable. 
Please see math/README to configure. 
in /var/www/wiki/extensions/Math/MathInputCheckTexvc.php on line 65
有一个解决方案:

sudo apt-get install ocaml
cd extensions/Math/texvccheck
make
我从更高的页面得到了第一个命令

$wgMathTexvcCheckExecutable = "$IP/extensions/Math/texvccheck/texvccheck";

哈!!最后,纠正输出和0个错误

使用用于编译texvc的数学;扩展页的第页将告诉您如何操作。当前版本使用Mathoid(一种运行在不同机器上的服务,wiki引擎可以通过HTTP与之交互);同样,扩展页面会告诉您如何操作。您可能不想在自己的服务器上安装Mathoid,这是一项额外的工作。

谢谢,我终于让它工作了。但这需要很多工作!我错过什么了吗?
sudo apt-get install ocaml
cd extensions/Math/texvccheck
make
$wgMathTexvcCheckExecutable = "$IP/extensions/Math/texvccheck/texvccheck";