View Full Version : MediaWiki: using pre-installed math texvc script
cassinmi
11-28-2006, 11:16 AM
Hi,
SiteGround installed MediaWiki for me and it came with pre-installed math scripts for displaying LaTex.
According to http://meta.wikimedia.org/wiki/Enable_TeX, the installation steps are:
1. Change to the "math" sub-directory of your MediaWiki install
2. Run 'make' (or 'gmake' if GNU make is not your default make). This should produce the texvc executable.
3. Enable $wgUseTeX in your LocalSettings.php and everything should work.
I'm not sure if SiteGround have already done step 1 and 2. The \math directory is full of *.ml scripts. I'm presuming these need to be compiled or seomthing as I'm getting an error on wiki pages that use the <math> tag: "Failed to parse (Missing texvc executable; please see math/README to configure.)"
How can I run make without shell access?
I have done step 3, changing my LocalSettings.php to the following
######################
## If you have the appropriate support software installed
## you can enable inline LaTeX equations:
$wgUseTeX = true;
$wgMathPath = "{$wgScriptPath}/math";
$wgMathDirectory = "{$wgScriptPath}/math";
$wgTmpDirectory = "{$wgUploadDirectory}/tmp";
#####################
$wgScriptPath is set earlier to "/wiki". Note that I changed the $wgMathPath and $wgMathDirectory from the defaults, which I believe are incorrect:
############
$wgMathPath = "{$wgUploadPath}/math";
$wgMathDirectory = "{$wgUploadDirectory}/math";
#############
Kind regards,
Mike
talberts
04-24-2007, 12:06 AM
Did anybody ever get an answer for this? I installed my own version of MediaWiki but would like to compile the texvc executable so I can use the TeX support. Or does SiteGround have a version of texvc that I can call, presumably by adding a line to the LocalSettings.php file?
cassinmi
04-24-2007, 03:50 AM
Yes, I contacted support directly. Using shared web hosting (http://www.siteground.com), without root access, you need to get them to compile it for you. That falls under their "exclusive professional services", so there will be a charge.
talberts
04-24-2007, 01:26 PM
Thanks for the quick answer. I can't believe they charge for having to run "make", especially when the source code is already sitting there in the proper directory.
BurroWrangler
04-28-2008, 08:19 PM
Is it still the case that siteground charges for compiling texvc so I can have Math support? I'm trying to get this working on my site. I found the following page, which has instructions on how to setup math support on a MediaWiki site, and I find it hard to believe that you would have to pay for this when it is in their knowledge base:
http://kb.siteground.com/article/How_to_enable_Math_support_in_my_MediaWiki_applica tion.html
I'd appreciate any information. Thanks,
BurroW
We do not charge for the actual 'make' of the source code, but for the service itself. Installing additional plugins/modules is considered as a non-hosting related issue and is usually a time consuming job. That's why the service is a paid one.
However, as you have noticed, you do not have to pay us to have this feature eneabled on your wiki, unless you would like our support team to do the actual configuration for you. If you would like to do this yourself, you can follow the simple instructions found in our KB. There is no compilation required.
BurroWrangler
04-29-2008, 01:02 PM
Val,
I have followed the instructions on the "KB" help page to install the extension and the math extension did not work for me. I make a page with the following and I get an error when I try to run it:
<math>a=b+c</math>
<math>d_{50}=2^{-\phi}</math>
I tried defining some other variables as recommended by the person who first posted on this topic, and made sure the permissions were set to "755" on my texvc file and the directory where it is located. I set the permissions on my images/tmp directory to "777", thinking that everybody needs write access to this directory to be able to upload files. I tried running my math equation wiki page and still obtained the following errors:
Failed to parse (Can't write to or create math output directory): a=b+c
Failed to parse (Can't write to or create math output directory): d_{50}=2^{-\phi}
Here are my configuration variables in the LocalSettings.php file:
## If you have the appropriate support software installed
## you can enable inline LaTeX equations:
$wgUseTeX = true;
$wgMathPath = "{$wgScriptPath}/math";
$wgMathDirectory = "{$wgScriptPath}/math";
$wgTmpDirectory = "{$wgUploadDirectory}/tmp";
I'd appreciate any help I can get on this.
Thanks,
BurroW
Looking at the error message, it seems that the math image directory is either not writable or is not existing. Please double check the permissions of your
/math and /tmp
folders and make sure they are existing and their permissions are set to 755.
BurroWrangler
05-01-2008, 07:32 PM
Hi,
I just thought I would give an update on the success/failures I have been having with trying to get the MediaWiki math stuff working. I have 4 MediaWiki sites I am trying to get it working on, and I now have it working on 3 of them. On one of the sites, I made sure the "math" folder with the "texvc" executable and the "tmp" directory were in my main (public_html) directory. The instructions on siteground tell you to put these directories in the "images" directory, but this did not work. Doing this seemed to solve the problem. On two of my other sites, I made a "math" and "tmp" folder in both my main folder and my "images" folder (putting them in one or the other alone did not work). After doing this, the math markup worked on these other two sites. I tried adding the "math" and "tmp" folders on my final site, and I get the following error message:
Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert): a=b+c
...etc. for the rest of my equations.
Any idea on how to fix this problem?
The last one seems to have its math/tmp folder setup correctly, but it seems that the binary files (the last step from the KB article) are either not presented or the files are not chmoded to 755. Could you please double check that?
BurroWrangler
05-02-2008, 01:32 PM
The math and tmp folders exist in both the public_html and images directories for the account that has the error. Each of the "math" folders has a "texvc" executable file. The permissions on all the files in these folders and the directories themselves are all set to 755, so I don't think any of these things are related to the problem I'm having.
From the error message, it seems as if the "texvc" is trying to use 4 different programs. One of the 4 programs (latex, dvips, gs, and convert) may not be installed, or the texvc program may not be able to find one of the programs.
You might want to post a ticket under the cPanel ticket category to ensure that the server has the above components installed. The setup is quite the same with all our servers, though there might be some differences and any/some of the components might be broken and not working as expected.
Rob Cranfill
05-27-2009, 04:11 PM
I found this discussion because I was having the same problem, and I just wanted to contribute the fact that after following the directions found at
http://kb.siteground.com/article/How_to_enable_Math_support_in_my_MediaWiki_applica tion.html
it all works for me. At first I didn't notice, as stated in those directions, that I didn't have the *binary* for 'texvc' (even tho all the source is there), and went down a wrong path. Once I uploaded the SourceForge executable, the SiteGround instructions worked perfectly.
The more I use SiteGround the more impressed I am!
- rob
thespider
07-09-2009, 12:28 AM
Hi,
I have done all steps instructed. But I am not able to see math equations in mediawiki.
For <math>x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}</math> its showing only x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} in the wiki page. But one thing, the corresponding png image is created at /images/math/8/c/5/8c58ae2d322a33f3036800d96db0e91a.png. Can you say why I am not able to see the math expressions correctly in my wiki page.
Thanks
stephengallops
08-17-2009, 02:30 AM
I found this discussion because I was having the same problem, and I just wanted to contribute the fact that after following the directions found at
http://kb.siteground.com/article/How_to_enable_Math_support_in_my_MediaWiki_applica tion.html
it all works for me. At first I didn't notice, as stated in those directions, that I didn't have the *binary* for 'texvc' (even tho all the source is there), and went down a wrong path. Once I uploaded the SourceForge executable, the SiteGround instructions worked perfectly.
The more I use SiteGround the more impressed I am!
- rob
Check that post. It seems like it should fix it unless I am wrong.