In my moodle site I use tex filter to display equation and it display correctly. But the images show different font from site's font. Is it possible to config tex filter to create image with the same font as site font.
Not with Mimetex but if you have a better distribution of Latex that has required font packages installed and if you add the needed \usepackage tags to preamble settings of tex filter it is possible to use any available font. See for example
Thank a lot for your reply and information. But I not familiar with LaTex and Font setting. If I want to use Times font what I need to do, what LaTeX preamble?
Read the docs about your Latex distribution first - Tex Live, MikTex, MacTex, TeTeX etc...
Then check those links from my previous post...
If you have some functional distribution of Latex (other than mimetex) installed on your site you can change latex preamble from Administration > Modules > Filters > TeX Notation where you have
You could try for example what happens if you use
If nothing happens your Latex may not have Arev font installed. Here a couple of examples from my cgi mathtex. Note that there are not many Latex fonts avilable that support math - see for example http://www.tug.dk/FontCatalogue/mathfonts.html
It take times that I read Latex distribution docs and make me understand over all.
But first I want to know what current engine use to render image memitex or latex.
I attach example image I rendered at my moodle site.
At my site I config LaTex preamble with your suggestion
But the image still same as image I attached. Although I change the text that never render before.
To my eye that is normal Mimetex output - meaning that your site is using Mimetex from folder filter/tex and your site does not probably have any such distribution of latex together with Ghostscript or Imagemagic and required font packages (here arev) installed that could use different fonts.
Mimetex exacutable can be recompiled - see http://www.forkosh.com/mimetexmanual.html - but I don't think it is a good solution.
On my test site I have a full package of Tex Live 2007 (Debian Lenny) that has most of those listed font packages included by default.
It is also possible that those latex binaries are there and readable (green ticks) and even executable but for some reason (other permissions or disabled functions of php for example) your site may actually use mimetex as second option if the actual Latex is not rendered - see for example http://moodle.org/mod/forum/discuss.php?d=88676
Try that tex filter debugging first ( http://yoursite/filter/tex/texdebug.php )
An easy test to see if it is mimetex code or other latex is to try which one is rendered by your tex filter and which is not: \Heart or \heartsuit
\Heart is mimetex code and gives
\heartsuit is typical Latex and gives
Is there any difference if you try Euler font package instead of Arev (different distros/versions of distros have different selections of available fonts)?
I follow your suggestion by test heart text and it show me that mimetex is used, image 1 of attached file.
And I try that tex filter debugging it result error messages both mimetex and LaTex, image 2 of attached file.
What next step I should do?
A little similar issue was related to version of php (5.3.X) and fixed on 2nd of April - see file modifications from http://tracker.moodle.org/browse/MDL-22006?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acvs-tabpanel but I think that then also mimetex was not rendering images and error reporting caused failure of rendering images.
You could try to copy that image link ( http address ) from the box and paste it directly to browser address bar. If you have set debugging to ALL from Administration > Server >Debugging you may get some debugging message from the image and that line of code where errors come from...
It is also possible that "something else" might break latex images - test also what happens if you totally delete line 28 from file filter/tex/texdebug.php:
(take a copy of this file first and move it back after test...)
I had read tracker #MDL-22006 and follow it already. So the images can show on my site but not show on filter/tex/texdebug.php script.
After I type URL directly it show error messages as image 1 of attached file.
Then I use preg_match instead of eregi at line 499 of lib/filelib.php file according to docs from http://php.net/manual/en/migration53.deprecated.php. See image 2.
I refesh URL again and first error message disappear but the lest are still.
I test filter/tex/texdebug.php the choose choice 3 and image rendered correctly (see image 3) but choice 4 show error.
What should I do next?
So you have php 5.3.X...
An "easy solution" would be to downgrade to php 5.2.13 because moodle 1.9.9 is still using some functions that are deprecated in php 5.3.X and won't work in php 6 anymore...
I suppose you want to use php 5.3.X so check if http://moodle.org/mod/forum/discuss.php?d=146787 gives more help...be careful if you edit moodlelib.php - using a non suitable tex editor can corrupt utf-8 format moodlelib.php and cause some new problems (BOMs or whitespaces) so take a copy of moodlelib.php first...
File filter/tex/texdebug.php is used only for debugging and that last image is normal (tiny bug there...) - you could also upgrade to the latest moodle 1.9.9+
I can't choose easy solution because it not my server, it shared hosting server.
So I try upgrade my site to moodle 1.9.9+.
The site work properly the texdebug.php show mimetex image correctly but Tex/Ghostscript not.
The three execute files have 777 permission.
In LaTeX renderer Settings page I use PNG file format. And then PNG files was created in Moodledata folder.
The attached image show text not symbol I expect.
What 's wrong?
In that last image \heartsuit is just not mimetex syntax and mimetex can't show it. If you had \Heart xyz you would get a mimetex heart followed by xyz.
The only problem is that the local distribution of latex together with Ghostscript or ImageMagic does not seem to work for what ever reason and therefore your site is using mimetex as a second option. Usually you would get error debugging messages from possible reason of failure but in this case when you have php 5.3 error reporting corrupts images...or if error reporting is taken away you don't get debugging messages ...
One option could be to install moodle 2.0 to an other folder like moodle2 with different moodledata folder and either different database or different $CFG->prefix if you use only one database and test if it works with local latex or at least gives some debugging info when debugging is enabled from administration menu. Moodle 2.0 does not have those deprecated functions of php 5.3 anymore.
These latex rendering issues are sometimes mystical - I remember well my first trials (days or moths???) to get Tex Live or MikTex working on my local test PC and finally I had to edit system paths to get the package installed - and on my test server (Debian Lenny) everything went smoothly and full TexLive package was up and running in a few hours. On shared hosts it may be hard to control all settings and permissions.