![]() |
Mimetex
As I promised in this thread some time ago, I will post a short install note on how to get mimetex to work on vB.
1. You need to download the mimeTex source files to compile and install mimeTeX. I don't know if it is allowed to attached the compied mimetex.cgi file, nor do I know if there is something server specific in my file. So you have to do this on your own. Compile and installation instruction can be found in the mimetex source files. http://moodle.org/download/mimetex/source/mimetex.html EDIT (2005-06-14):Added the mimetex.cgi file as attachment 2. Upload the mimetex.cgi file to a folder on your server where it could be used. As we don't wanted our users or anybody else to access this file, we put it outside the webserver root. 3. Create a folder on your webserver where the mimeTex images should be stored. 4. Open the atteched functions_mimetex.php and alter the three variables at the beginning to your needs. Upload the attached functions_mimetex.php file to your /includes/ folder. 5. Open /includes/functions_bbcodeparse.php Find: PHP Code:
PHP Code:
6. If everything went right you should now can use [tex]\frac{x^3 + 2 x^2 - 6 x + 7}{x^2+1}[/tex] which results in http://www.chemieonline.de/images/fo...97a0d49e15.gif I've put up some samples in the zip file. More samples by one of our Moderators can be found here: http://www.studenten-city.de/forum/s...91&postcount=1 It was a hack made for our forum, I have no further interest in developing this into a real stabel hack. Its working for us. I posted this, just to give other users who needed this a start into the right direction. |
Saved for future need.
|
Very cool! :)
|
Interesting stuff, I will install this soon enough.
|
sry my english is not the best and i didnt understand what mimetext does?!
can you explain it in simple words for meplease? |
Quote:
Wie w?re es auf deutsch? Mimetex erlaubt es einem Latex/Tex Formeln im Forum einzubinden. So kann man z.B. mathematische, chemische, physikalische Formeln sehr sch?n darstellen. Schau Dir einfach mal die Beispiele im ZIP an oder auf der Webseite die ich gelinkt habe. [/german] |
After The_Sisko wrote this new cool hack for our site, i make an addition for users, who don't know much about Mimetex. They can now insert mimtex code with one mouse click, just like the smilies.
Find in vbulltin_editor.js: PHP Code:
PHP Code:
Make a new file called "tex.php" (based upon: https://vborg.vbsupport.ru/showthread.php?t=62164): PHP Code:
Go into your AdminCp and make a new template called "mimetex" (Some parts are german, but you can easily make your own text). Insert the content of the attached file and check the path to your mimetex.cgi Then open template "editor_toolbar_standard" and find PHP Code:
PHP Code:
|
If you run Windows as OS, replace this line:
PHP Code:
PHP Code:
|
Maybe its just me but it seems very unclear in step 3. Create a folder on your webserver where the mimeTex images should be stored.
What pictures? |
Quote:
|
Can somebody please explain to me what this hack does?
|
Quote:
You can post latex codes on your forums which will generate a picture with the formular. |
please attach the compiled mimetex.cgi as a zip file....
and if you want give us more infromations about the installation ... I am not a profissional like you :tired: thanks and best regards |
As I said in my first post, I don't know if I can do this nor do I know if there is anything server specific in my CGI file.
Here a quote from the install README: Quote:
|
Quote:
Can you give me another way to compile the cgi file ? please ? Thanks & best regards |
:) :)
|
Added the compiled mimetex.cgi file to the first post.
|
thank you veeeeery much my friend
:) |
I've just installed this and have followed the directions thoroughly. Note that there's a missing close quote and ; from line 11 of the functions_mimetex.php in the zip file.
When I try to put an equation in a thread, I now get an error message: Warning: system() has been disabled for security reasons in /includes/functions_mimetex.php on line 49 How do I address this error message? I see the system() call is what's actually referencing the cgi file, so it's clearly critical to this functionality. |
Okay, I've found a workaround. So if you cannot use system calls on your system, replace all the lines inside the $do_latex loop as follows:
Code:
if($do_latex) { Code:
$cgi_path = "http://yourdomain/cgi-bin/mimetex.cgi"; edit: cleaned up the img tag a bit. |
I see you found a solution fpr your self, just wanted to answer to your warining message:
system() has been disabled for security reasons You or your host disabled the system function or even all execute function of php. This is done on a shared server to protect the server and clients in a better way. Your workaround is nice. Images won't be stored and rendered everytime a user visits a post. This could be a problem on big boards... |
You're right -- the re-rendering could be an issue for larger boards. In this case, you could build a new version of mimetex.cgi that uses the -DCACHEPATH=\"path/\" argument and still cache the images locally. This probably makes sense to do whenever the workaround is needed.
On that note, if you're building your own mimetex.cgi anyway, I'd recommend using the -DREFERER=\"domain\" argument too. This will add some level of security so that others cannot make use of the engine if it's located in a public area of your server. |
All times are GMT. The time now is 04:44 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|