Ubuntu MediaWiki 中的 LaTeX 方程

发布于 2024-08-08 20:42:50 字数 1683 浏览 9 评论 0原文

我的 Texvc 似乎可以工作,因为 texvc /home/wiki/tmp /home/wiki/math "y=x+2"

Cdaa63ef966cc412541190bc8794731de<i>y</i> = <i>x</i> + 2<mi>y</mi><mo>=</mo><mi>x</mi><mo>+</mo><mn>2</mn>

在 /var/ 处提供了我的 LocalSettings.php www/wiki (source)

$IP = "81.111.1.1";
$wgMathPath         = "{$wgUploadPath}/math";
$wgMathDirectory = "{$IP}/images/math";
$wgUploadDirectory  = "{$IP}/images";
$wgUploadPath       = "{$wgScriptPath}/images";
$wgTexvc            = "{$IP}/math/texvc";  # Path to compiled 
texvc
$wgMathDirectory    = "{$wgUploadDirectory}/math";
$wgTmpDirectory     = "{$wgUploadDirectory}/tmp";

我在 Firefox 中访问我的 wiki,看到了

Warning: require_once(81.111.1.1/includes/OutputHandler.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/wiki/includes/WebStart.php on line 123

Fatal error: require_once() [function.require]: Failed opening required '81.111.1.1/includes/OutputHandler.php' (include_path='/var/www/wiki:/var/www/wiki/includes:/var/www/wiki/languages:.:/usr/share/php:/usr/share/pear') in /var/www/wiki/includes/WebStart.php on line 123

我的 输出在 /var/www/wiki/LocalSettings.php 的变量 $IP 中使用我的正确 IP。 我将 /wiki/includes/DefaultSettigs.php 复制到 /wiki/,但数学方程仍然无法正常工作。

我未能成功运行 RCS 关于将 PATH 包含到变量 $IP 的建议。 我收到与上面类似的警告和错误。

您会在我的设置中更改哪些内容以使数学公式发挥作用?

My Texvc seems to works, since texvc /home/wiki/tmp /home/wiki/math "y=x+2" gives

Cdaa63ef966cc412541190bc8794731de<i>y</i> = <i>x</i> + 2<mi>y</mi><mo>=</mo><mi>x</mi><mo>+</mo><mn>2</mn>

My LocalSettings.php at /var/www/wiki (source)

$IP = "81.111.1.1";
$wgMathPath         = "{$wgUploadPath}/math";
$wgMathDirectory = "{$IP}/images/math";
$wgUploadDirectory  = "{$IP}/images";
$wgUploadPath       = "{$wgScriptPath}/images";
$wgTexvc            = "{$IP}/math/texvc";  # Path to compiled 
texvc
$wgMathDirectory    = "{$wgUploadDirectory}/math";
$wgTmpDirectory     = "{$wgUploadDirectory}/tmp";

I go to my wiki in Firefox and I see the output

Warning: require_once(81.111.1.1/includes/OutputHandler.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/wiki/includes/WebStart.php on line 123

Fatal error: require_once() [function.require]: Failed opening required '81.111.1.1/includes/OutputHandler.php' (include_path='/var/www/wiki:/var/www/wiki/includes:/var/www/wiki/languages:.:/usr/share/php:/usr/share/pear') in /var/www/wiki/includes/WebStart.php on line 123

I am using my correct IP in the variable $IP at /var/www/wiki/LocalSettings.php.
I copied /wiki/includes/DefaultSettigs.php to /wiki/, but Math equations are not still working.

I run unsuccessfully RCS' suggestion about including the PATH to the variable $IP.
I get the similar warning and error as above.

What would you change in my settings to make Math formulee work?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

静若繁花 2024-08-15 20:42:50

检查数学临时目录是否存在以及该目录的权限。我认为模式 777 是必要的(即 chmod a+w /path/to/dir)。

MediaWiki 手册中提供了一些进一步的帮助。

编辑:变量 $IP 是(本地)包含路径,而不是 IP 地址:

包含路径
$IP(包含路径)变量保存 wiki 基本安装的本地文件路径。确保引用完全限定的文件路径。不要在路径末尾包含斜杠。
DefaultSettings.php 文件从 IP 变量指定的目录加载。

Check if the math temp directory exists and the permissions on that directory. I think mode 777 is necessary (i.e., chmod a+w /path/to/dir).

There is some further help in the MediaWiki Manual.

edit: the variable $IP is the (local) include path and not an IP-address:

Include path:
The $IP (include path) variable holds the local file path to the base installation of your wiki. Make sure you refer to the fully qualified file path. Do not include a slash at the end of the path.
The DefaultSettings.php file gets loaded from the directory designated by the IP variable.

若相惜即相离 2024-08-15 20:42:50

我的 mediawiki 位于 /var/www/wiki。
然而,我的$IP仅指IP地址。
它还应该指安装目录的位置。

我将 $IP 变量从 /usr/share/mediawiki 更改为 /var/www/wiki
根本没有我的IP。尽管变量中没有我的 IP,但我似乎能够在家里之外访问我的 wiki。

这一变化使数学公式发挥作用。

My mediawiki locates at /var/www/wiki.
However, my $IP refers only to an IP address.
It should also refer to the location of the installation directory.

I changed the $IP variable from /usr/share/mediawiki to /var/www/wiki
wihout my IP at all. I seem to be able to access my wiki outside of my home though I do not have my IP in the variable.

This change made the Math formulee to work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文