PDA

View Full Version : BB Code Enhancements - vLaTeX - Math parsing with LaTeX


Pod
12-19-2009, 10:00 PM
vLaTeX allows your users to include mathematical equations written in LaTeX into their posts, rendered in high quality graphic files (either png or gif). Such ability is instrumental in scientific or educational oriented forums. When I started in vb two years ago, there ware a number of solutions available, but none of them suited my needs completely, so I developed my own integration between (a modified version of) Benjamin Zeiss' LatexRender and vBulletin. With the new vBulletin 4.0, I decided to improve some of the features of this product, and to release it with the hope that it turns out to be useful to any of you.


What is LaTeX?

LaTeX is a set of macros for the TeX typesetting system. It is the defacto standard of communication within the scientific and mathematical community. It works pretty much like a programing language: you write a text source file, and the latex executable compiles it in a DeVice Independent file (DVI), which can be later converted to the desired format (postscript, pdf, etc.).

This mod (thanks to a modified version of the LatexRender class) does all this work in the background. It takes the formula code, inserts it in a source file, compiles it and converts the output in a high quality image file (png or gif, depends on your settings) to show in the post.


Requirements

This mod relies on your server having available the following external programs. They are pretty standard in most Linux distributions, so hosts can install them easily (if they want to, some don't). Please, check your server meets this requirements (or ask your host to install the programs) before trying to use vLaTeX:

- latex: the LaTeX compiler. Check the TeX live distribution (http://www.tug.org/texlive/).

- dvips: converts the DVI file to PS. Usually included in all latex distributions.

- convert: as it name suggests, converts between a large number of graphic files. Belongs to the ImageMagick package. Needs ghostscript.

- identify: among other things, measures the size of image files. Also belongs to ImageMagick

- Ghostscript: PostScript and PDF language interpreter and previewer. Is called by convert in order to handle ps files.


Features

Creates a new BBcode, usually (thought the tag name is configurable via the admin cp), which contents are processed thought LaTeX to generate image files. There are four calling modes:

- [TEX]E= mc^2 in-line mode. The image is included in the middle of the text, without line breaks. It tries to adjust the baseline of the formula by adjusting the vertical-align CSS property; the results aren't always perfect, but it does its best.

- E = m c^2 displayed mode: The formula is displayed (usually centered) between two paragraphs.

- E = m c^2 auto-numbering mode: The formula is displayed (usually centered), and numbered.
NOTE: The auto-numbering depends on the CSS counter system, so some old browsers (most notably ie 7 and older) will show these equations untagged, like . Don't blame me, blame non-standard compilant browsers.

- [TEX=tag]E = m c^2 displayed with tag: The formula is displayed (usually centered) between two paragraphs, and tagged with the specific tag.

In the last two modes, the tags are displayed at the right (left if you use RTL) between brackets, in a (configurable) color.

The formulas are compiled by creating a small tex file and running the native LaTeX program throughout it. You can choose to wrap the formula with the standard dollar ($ ... $), the align or gather amsTeX environments. The standard dollar is recommended since the baseline hack works better with it, but the gather environment allows to create multiline equations using the \\ separator.

This mod also introduces a second BBcode, tag, which outputs (tag), with the same style of the equation tags. It's useful to let users make reference their formulas.

A double click on the image of a generated image will open a pop-up displaying the LaTeX source code used to generate the formula.

Menu with Common used LaTeX commands can be shown below the advanced mode editor. The admin can customize the commands of the menu thought the admin control panel.


Admin features

Image files are cached, so every unique formula is only processed once.

Fully configurable via Style Variables and templates. It is also fully phrased.

It doesn't change any vb default template, so upgrading should be easy.

Includes a list of blacklisted latex commands for security (configurable in the admin cp).

The admin can customize the preamble of the latex file in the admin cp. This is useful to define new commands that your community uses often, or to include packages.

Error messages can be customized in the phrase system.

Memory usage of ImageMagick commands (convert and identify) can be limited in the admin control panel.


Installation / Upgrade

1.- Unzip the mod files.

2.- Upload the vLaTeX directory to your forum root. The generated folder structure should look like this:

vLaTeX/
vLaTeX/index.htm
vLaTeX/class_vlatex.php
vLaTeX/functions_vlatex.php
vLaTeX/vlatex.js
vLaTeX/pics/
vLaTeX/pics/index.htm
vLaTeX/temp/
vLaTeX/temp/index.htm

3.- Change the permissions of the pics and temp folders so the web server can write on them.

4.- Import the product XML in your admin control panel. If you're upgrading, set "Allow Overwrite" to yes.

5.- Go to Admin CP > Settings > Options > vLaTeX - Math Parsing

6.- Make sure the path to latex, dvips, convert and identify executables is correct. Those settings default to the most common values in most linux distributions, but every host is a different world.
If you have shell access, you can check the location of the executables with the following commands:
which latex
which dvips
which convert
which identify

7.- Make sure the path to the Images and Temporal directory are correct. You can change them if you don't like the default value, but the directories must exist and the server must have permissions to write on them.
For extra safety, you could move the temp folder out of the public accessible directory three, thought it should not be needed, since files are deleted in matter of milliseconds.

8.- Set the rest of options as you wish.

9.- Test the product in some posts.

10.- If you wish to add a button in the advanced editor tool-bar for this mod, you can add it using the admin cp section Custom BB Codes (write anything you want in Replacement, this mod will overwrite it). You can use any tex icon, for instance http://www.iconfinder.com/icondetails/3780/16/tex_icon


Error messages

The LaTeX parsing can fail for a number of reasons. In such case, an error message is displayed instead of the formula. Here's a list of all possible error messages and their meaning:

- "Image too big {1}, max {2}x{3}", The resulting image is bigger than the allowed dimensions.

- "Blacklisted command", The user attempted to compile a formula with a forbidden command.

- "Can't move image", Image formula could be created, but I could not be moved to the destination folder. Check that the directory exists and has write permissions.

- "Convert failed", Formula could be compiled, but could not be converted to png/gif. Check the convert program path.

- "Compile failed", The formula could not be compiled. Check that the temporal directory has write permissions and that the latex path is correct.

- "Code too long, max. {1} characters", The formula code was too long. The maximum length can be configured in the admincp.

- "Formula not found", The compilation and convert process appeared to not raise any error, but the image was not found on the destination folder. Check for permissions in the destination folder and/or IO errors.

- "Pictures directory unwritable", The destination folder does not exist, or has no write permissions.

- "Temp. dir unwritable", The temporal folder does not exist, or has no write permissions.

- "Unknown error", Any other error condition.


Disclaimer

This mod is in beta phase, if you find bugs, please tell me how to reproduce them so I can improve it. It is distributed as is, with the hope that it is useful for someone, but without any warranty. Nor will I accept any responsibility or liability if it doesn't work as expected, or even if it breaks something.
This mod is mainly developed for personal usage. I will listen to good ideas, but I can't guaranty that I will be implemented requested features.


License

This mod is distributed under the LGPL.(http://www.gnu.org/copyleft/lesser.html). As is, you can freely distribute it or any derivative work provided that: 1) you acknowledge the work of the previous coders (like myself and Zeiss), 2) you release it under the same license (or GPL).



Acknowledgments

This mod (in particular, the class_vlatex.php file) is strongly based on the LatexRender class by Benjamin Zeiss (http://www.mayer.dial.pipex.com/tex.htm).

The baseline hack by the work of Maarten Sneep (http://mactextoolbox.sourceforge.net.../baseline.html).


Compatibility

The last version of this mod (0.5.1) requires vb4.2.0 or higher. It should work on previous CKEditor versions, but it was not tested.

If you wish to use it in a pre-CKEditor vb installation, you can use the previous vLaTeX version (0.4.1). If you want to use it in an older vb4.0.x release, you can download version 0.3 (which is compatible with vb4.0.1 or higher). Take into account that old versions of this hack have less features and might have some issues fixed in later versions.

Support will be given only for the last version of this mod.



History

2009 / 12 / 19 - First (beta) release

2009 / 12 / 20 - version 0.2
Fixed baseline problem of in-line formulas in CMS articles.
Improved error handling.
Included Spanish translation

2010 / 1 / 24 - version 0.3 (requires vb4.0.1)
Fixed extra space after in-line equations.
Won't break down if vb's CSS is stored as files.
New pop-up showing the formula source code upon double-click.

2010 / 7 / 23 - version 0.4 (requires vb4.0.4)
Improved support for CSS stored as files.
Fixed bug of js file not being loaded on certain servers.
Menu with common LaTeX commands under vb's advanced editors.
Equations will no longer be break by preview in blogs or CMS articles.

2010 / 4 / 24 - version 0.4.1 (requires vb4.0.4)
Improved compatibility of the Common Commands quick-menu with IE browser.

2012 / 12 / 07 - version 0.5.1 (requires vb4.2.0)
CKEditor support.
Memory limit for imagemagick commands.
Code pop-up now can overflow postbit boundary.

2012 / 12 / 17 - version 0.5.2 (requires vb4.2.0)
Introduced Formula Wrapper option.

Alfa1
12-20-2009, 12:16 AM
Awesome! Tagged for use, after I upgrade to vb4.

fayax
12-20-2009, 06:01 AM
Very neat. Tagges for later use.

ThorstenA
12-20-2009, 11:23 AM
Looks very promising! Planning to install it once my board goes life. Thanks for your work!

RobParker
12-20-2009, 02:18 PM
Don't have any need for this on our forums but I use latex day-to-day at work and just wanted to say this looks great. If anyone does run a forum with scientific/mathematical content then could come in really useful.

Pod
12-20-2009, 05:56 PM
Since presumably vb4 will be released tomorrow, I have released version 0.2 fixing a minor issue with formulas in the CMS (it defines a margin to images which makes the baseline hack useless, unless removed by the mod's CSS).

I took the opportunity to add some more error handling (trying to prevent php errors when directories have the wrong permissions, for instance), and to include Spanish translation (sorry, don't know more languages myself :p).

abdobasha2004
12-20-2009, 06:25 PM
very nice
thanks,

halkum
12-20-2009, 09:01 PM
Man, I wish I had a reason to install this.

fourat
12-21-2009, 01:51 PM
Thank you so much

Varsh
12-21-2009, 08:56 PM
*supertagged*

Love this mod, now I just need to install Gold when I get the time...

Carnage
12-21-2009, 10:39 PM
Have you looked into this library? http://www.math.union.edu/~dpvc/jsMath/

Pod
12-21-2009, 11:17 PM
Have you looked into this library? http://www.math.union.edu/~dpvc/jsMath/
Yes I did. As I said, there's a number of options, each one with its pros and cons.

Pod
01-24-2010, 11:43 AM
Updated with a new version (0.3) that fixes a few issues and adds a new feature: Users will be able to double-click a formula, and a pop-up will... well, pop. This pop-up displays the source code used to generate the image (of course, admin can choose to deactivate this new feature).

vLaTeX 0.3 requires vBulletin 4.0.1. I'll leave the 0.2 version available for download, since it works well with vBulletin 4.0.0 (and the RC versions).

pjkcards
01-24-2010, 09:25 PM
I am getting this error on vB 3.6.7:
Fatal error: Class 'vB_Template' not found in /home/user/public_html/domain/forum/vlatex/functions_vlatex.php on line 39

Any ideas? Thanks

Pod
01-24-2010, 10:10 PM
I am getting this error on vB 3.6.7:
Fatal error: Class 'vB_Template' not found in /home/user/public_html/domain/forum/vlatex/functions_vlatex.php on line 39

Any ideas? Thanks

Architecture changes in vB4 makes this mod (as most) not backwards compatible with vB3.

The core functionality can be used without much difficulty in any version (as it depends on external programs such as latex, dvips and convert), but the bridge between it and vB (i.e, the way to handle templates) is completely different on vB4.

pjkcards
01-25-2010, 09:38 AM
Ah, alright.

Edit: Solved: this (http://xyloid.org/projects/vblatex/) works great

Varsh
05-22-2010, 02:17 PM
Any plans for an update on this mod?

Pod
05-22-2010, 02:31 PM
Any plans for an update on this mod?

What kind of update do you mean? It already works with latest vb version (I run it on vb 4.0.3 without any issue).

If you mean update for new features, then yes. But I can't tell you when it'll release or what new will include. It will be definitively after 4.0.4 (which doesn't mean that it will come out soon after 4.0.4).

RVSmarter
06-17-2010, 08:28 PM
Hi there,

Thanks for this great mod!

its working but the double click for code doesnt work... any ideas?
http://www.mathhelpforum.com/math-help/latex-help/148729-latex-test.html#post527732

Pod
06-18-2010, 04:01 AM
Hi there,

Thanks for this great mod!

its working but the double click for code doesnt work... any ideas?
http://www.mathhelpforum.com/math-help/latex-help/148729-latex-test.html#post527732

Your bburl variable doesn't contain a trailing /, so the javascript file cannot be found. In the next release (which I don't know when will it be, but hopefully not long after 4.0.4), I'll add a check to add it manually.

In the while, so you can use the mod, please do the following. In your admincp, go to "Plugins & Products" > "Plugin manager" > "Product : vLaTeX" > "Include JS and CSS files". There, find the line

$template_hook["headinclude_javascript"] .= "<script type=\"text/javascript\" src=\"{$vboptions}vlatex/vlatex.js\"></script>\n";

It should be the 5th line in the text area. Change it to:

$template_hook["headinclude_javascript"] .= "<script type=\"text/javascript\" src=\"{$vboptions[bburl]}[B]/vlatex/vlatex.js\"></script>\n";

Note that the only difference is a new / before vlatex/vlatex.js

Hope that helps.

Other than that, I see some permissions errors in your page, did you set the temp and pics folder to be writable by the webserver?

sadiq6210
06-18-2010, 04:46 AM
Thanks
I got a white page when I write E = m c^2 and try to preview the thred !

Pod
06-18-2010, 04:53 AM
Thanks
I got a white page when I write E = m c^2 and try to preview the thred !

You don't appear as having installed it.

Anyway, I'd need more info to troubleshot your problem, a link to your site or something.

RVSmarter
06-18-2010, 05:32 PM
Your bburl variable doesn't contain a trailing /, so the javascript file cannot be found. In the next release (which I don't know when will it be, but hopefully not long after 4.0.4), I'll add a check to add it manually.

In the while, so you can use the mod, please do the following. In your admincp, go to "Plugins & Products" > "Plugin manager" > "Product : vLaTeX" > "Include JS and CSS files". There, find the line

$template_hook["headinclude_javascript"] .= "<script type=\"text/javascript\" src=\"{$vboptions}vlatex/vlatex.js\"></script>\n";

It should be the 5th line in the text area. Change it to:

$template_hook["headinclude_javascript"] .= "<script type=\"text/javascript\" src=\"{$vboptions[bburl]}[B]/vlatex/vlatex.js\"></script>\n";

Note that the only difference is a new / before vlatex/vlatex.js

Hope that helps.

Other than that, I see some permissions errors in your page, did you set the temp and pics folder to be writable by the webserver?

Awesome! Thank you.

emath
06-25-2010, 10:29 AM
thanks alot, extremely useful .

installed and nominated.

RVSmarter
06-26-2010, 08:53 PM
This isnt working yet again.
Could you help?

Your bburl variable doesn't contain a trailing /, so the javascript file cannot be found. In the next release (which I don't know when will it be, but hopefully not long after 4.0.4), I'll add a check to add it manually.

In the while, so you can use the mod, please do the following. In your admincp, go to "Plugins & Products" > "Plugin manager" > "Product : vLaTeX" > "Include JS and CSS files". There, find the line

$template_hook["headinclude_javascript"] .= "<script type=\"text/javascript\" src=\"{$vboptions}vlatex/vlatex.js\"></script>\n";

It should be the 5th line in the text area. Change it to:

$template_hook["headinclude_javascript"] .= "<script type=\"text/javascript\" src=\"{$vboptions[bburl]}[B]/vlatex/vlatex.js\"></script>\n";

Note that the only difference is a new / before vlatex/vlatex.js

Hope that helps.

Other than that, I see some permissions errors in your page, did you set the temp and pics folder to be writable by the webserver?

Pod
06-26-2010, 09:27 PM
This isnt working yet again.
Could you help?

I see the call to the javascript file has completely disapeared from your site. I really can't know why without "looking inside".

It'd help to know what happened between the moment it was working and now. Did you install some other mod? Changed the style?

On top of my head, a couple ideas you could try. If you installed a new style, make sure the headinclude template includes the line

{vb:raw template_hook.headinclude_javascript}

If you installed a new mod, it might be "eating" the template hook. If so, it might help to change the execution order of the same plug-in you edited the last time (instead of 5, make it 100 or some other number bigger than any other mod).

RVSmarter
06-27-2010, 10:04 PM
Bills PayPal Donate Lite 4.0 (https://vborg.vbsupport.ru/showthread.php?t=236380)
was the problem.
When I disabled that product the source code came back up.

I would like to run both together. Any ideas?

Pod
06-27-2010, 10:42 PM
Bills PayPal Donate Lite 4.0 (https://vborg.vbsupport.ru/showthread.php?t=236380)
was the problem.
When I disabled that product the source code came back up.

I would like to run both together. Any ideas?

I'd have to take a deeper into that mod and see why interacts with vlatex to find out what causes the problem. But I won't be able to do so until next Wednesday, I'll be out of town, I'm very sorry.

In the while, you can try to contact Bills, see if he can help you. Or you can try to paste the code directly into the headinclude template


<script type="text/javascript" src="http://www.mathhelpforum.com/math-help/vlatex/vlatex.js (https://vborg.vbsupport.ru/view-source:http://www.mathhelpforum.com/math-help/vlatex/vlatex.js)"></script>
<script type="text/javascript"> <!--
var vlatex_popup_caption = 'Formula source code:';
var vlatex_popup_close = 'Close';
--> </script>

ajhalls
07-08-2010, 02:43 PM
I LOVE THIS PLUGIN!!! There isn't a simpler way of getting LaTeX working out there. It is quite simply amazing.

I just started using it and would love to add a couple buttons to the editor for the most common expressions I use. I am working with a group of Chemistry and Math teachers that would probably prefer not to have to learn latex for the simple things like subscript, superscript, fractions...

Can someone point me in the right direction for where I might be able to add some in?

Pod
07-08-2010, 02:54 PM
I LOVE THIS PLUGIN!!! There isn't a simpler way of getting LaTeX working out there. It is quite simply amazing.

I just started using it and would love to add a couple buttons to the editor for the most common expressions I use. I am working with a group of Chemistry and Math teachers that would probably prefer not to have to learn latex for the simple things like subscript, superscript, fractions...

Can someone point me in the right direction for where I might be able to add some in?

I'd like to add something like that into the mod by default, but I'm not sure when I'll be able to get into that. If everything goes right, it could be this month.

fritz_0815
07-15-2010, 05:20 PM
First of all sorry for my bad english.
Since the version 4.05 I get shown on the CMS site following error:


Warnung: file_get_contents(.depth) [function.file-get-contents]: failed to open stream: No such file or directory in [path]/vlatex/functions_vlatex.php (Zeile 57)

In the forum everything works great.
What can be or where it goes wrong


Gr??e aus Germany :)

Pod
07-15-2010, 07:40 PM
First of all sorry for my bad english.
Since the version 4.05 I get shown on the CMS site following error:


In the forum everything works great.
What can be or where it goes wrong


Gr??e aus Germany :)

Please, click install to get support!

I'll take a look into that. Do you have the forums in a subdirectory of the CMS, or something like that?

fritz_0815
07-16-2010, 04:24 PM
In the like directory !
The error was not in 4.04 Version of vbulletin

Ps:
I have click install this great Mod :)

Pod
07-16-2010, 04:53 PM
In the like directory !
The error was not in 4.04 Version of vbulletin

Ps:
I have click install this great Mod :)

Sorry, but I cannot reproduce that problem in my vb405 test installation. Would you let me see your site? (send the link in pm if you don't want to do so publicly).

fritz_0815
07-17-2010, 06:38 PM
Hallo

The error occurs only in CMS, but not always
Here is a screenshot and the address of the Forum
Would be great if you could find the error

Greetings from Germany

http://www.hausaufgaben-forum.net/content/

Pod
07-17-2010, 09:26 PM
Hallo

The error occurs only in CMS, but not always
Here is a screenshot and the address of the Forum
Would be great if you could find the error

Greetings from Germany

http://www.hausaufgaben-forum.net/content/

Thanks for the image and the link.

I believe that the problem is caused because your widget called "Neuste Beitr?ge" (whatever that means :p) is trying to preview a post that contains a formula, the preview is stripped to a number of characters, so the code it contains becomes invalid LaTeX, causing the error. That's why it only happens in the CMS, it is the only part of vb that previews portions of posts.

As a temporary fix, please try this (untested, but should work): create a file called ".cache" (without the quotes, note there's a point in the beginning) and upload it to http://www.hausaufgaben-forum.net/vlatex/pics/.cache

This won't prevent the latex error in the widget, but at least should get rid of the php error in your header.

I've already started to work in the next release (that will at least include a quick-menu with common latex commands below the editor, among other things). I'll try to include a permanent fix for this problem in this new version.

fritz_0815
07-18-2010, 12:51 PM
As a temporary fix, please try this (untested, but should work): create a file called ".cache" (without the quotes, note there's a point in the beginning) and upload it to

This does not work with the tip. The error is to continue to see.
I'd be happy, that would see the error no longer in the CMS
Did you have another idea?

Pod
07-18-2010, 02:10 PM
This does not work with the tip. The error is to continue to see.
I'd be happy, that would see the error no longer in the CMS
Did you have another idea?


Open ./vlatex/functions_vlatex.php. Around the line 57 find

$depth_raw = file_get_contents(substr_replace($url, '.depth', -4));Replace it with

$depth_file = substr_replace($url, '.depth', -4);
if (file_exists($depth_file)) $depth_raw = file_get_contents($depth_file);

Next release of the mod will include this fix (among other things).

fritz_0815
07-19-2010, 04:36 PM
Runs perfect now
Thank you for your help :)

Pod
07-20-2010, 12:02 AM
A teaser of the menu with common used commands that will be available with the next version of this mod (to be released in a few days).

Of course, you (the admin) can customize the commands displayed.

apokphp
07-25-2010, 07:23 PM
I don't know if my server (which is shared) has the necessary requirements. I assume not, since when I don't see all the icons for the formulas (just text instead) and when I try to post a tex bbcode, I get [LaTeX ERROR: Compile failed] .

Is that what this message means?

Pod
07-25-2010, 07:37 PM
I don't know if my server (which is shared) has the necessary requirements. I assume not, since when I don't see all the icons for the formulas (just text instead) and when I try to post a tex bbcode, I get [LaTeX ERROR: Compile failed] .

Is that what this message means?

That most likely means that some of the external programs need to compile the latex files generated by the mod are not in their correct location (you can change where the mod looks for them in the admincp), or are not installed at all. If you have shell access to your host, issue the following commands to know the correct path:

which latex
which dvips
which identify
which convert
If some of this programs are not installed, ask your host to install them. Some shared hostings will be willing to install them for you, some others won't... I only can say good luck. If they have concerns about overloading the server, tell them that this mod caches the formulas, so they are only parsed the first time they are entered.

apokphp
07-25-2010, 07:54 PM
nvm. Hostgator (my host) says that because this is a shared server, they cannot install latex and dvips (the others are already installed). They said I'd have to move to a dedicated server to have these 2 installed.

When I was on 3.8.x, I used the Latex plugin, and it didn't have such server requirements. Are you the same author of that plugin?

Pod
07-25-2010, 08:08 PM
nvm. Hostgator (my host) says that because this is a shared server, they cannot install latex and dvips (the others are already installed). They said I'd have to move to a dedicated server to have these 2 installed.

When I was on 3.8.x, I used the Latex plugin, and it didn't have such server requirements. Are you the same author of that plugin?

Bad luck. Other hosts have different policies regarding the installation of this tiny programs (I know of shared hosts that run this mod without problems in medium-size boards).

I never released any latex product for 3.8.

You can try to use mimeTeX (http://www.forkosh.dreamhost.com/source_mimetex.html), which produces a bit poorer equations but has less requirements, you only need to be able to run a cgi (and don't even need a mod, only configure the proper custom bbcode).

emath
10-31-2010, 06:22 AM
hey, ive got all necessary programs (latex, dvips , Ghostscript , convert , identify) and all set to the right path in admin cp.

although , i still get this :

[LaTeX ERROR: Compile failed]

i am using vb.4.0.8

any ideas?

Pod
10-31-2010, 01:36 PM
hey, ive got all necessary programs (latex, dvips , Ghostscript , convert , identify) and all set to the right path in admin cp.

although , i still get this :



i am using vb.4.0.8

any ideas?

That error appears if it cannot call the latex executable. Make sure that the full path written in the admincp is correct (in a console, write ls [path], it should show the latex file). If the path is correct, it might be some configuration in php that doesn't give you permission to execute external programs thought the php exec command.

You can try to take a look at the error file in your server to see what was the problem.

emath
10-31-2010, 06:00 PM
latex directory is right.

where can i find the "error file"

in addition, what is the :

Document class
Class of the temporal latex file. The compiler should have access to the corresponding .cls file.

where can i see where is the .cls file ?

Pod
10-31-2010, 06:27 PM
latex directory is right.

Not only the directory, but the path to the executable.

Also, remember that this is the path in the file system of your server, not your home computer.

where can i find the "error file"

Depends on your hosting. If you have cpanel, you can probably see it there.

in addition, what is the :

Document class
Class of the temporal latex file. The compiler should have access to the corresponding .cls file.

where can i see where is the .cls file ?

You don't need the full path here, just the name of the class. You are probably safe leaving the default value (article).

emath
10-31-2010, 06:37 PM
what is the path to the executable ? i have only shell access.

Depends on your hosting. If you have cpanel, you can probably see it there.

i have directAdmin .. u know where i can find it there ?

Pod
10-31-2010, 06:48 PM
what is the path to the executable ? i have only shell access.

Write "which latex". It will tell you the path.



i have directAdmin .. u know where i can find it there ?

According to directAdmin live demo, in "Site Summary / Statistics / Logs"

emath
10-31-2010, 07:00 PM
i get :

[Sun Oct 31 21:57:30 2010] [error] [client 87.69.67.162] sh: /latex: No such file or directory, referer: http://www.emath.co.il/vbtest/forumdisplay.php?9-\xd7\xa9\xd7\x90\xd7\x9c\xd7\x95\xd7\x9f-006
[Sun Oct 31 21:57:30 2010] [error] [client 87.69.67.162] sh: /latex: No such file or directory, referer: http://www.emath.co.il/vbtest/forumdisplay.php?9-\xd7\xa9\xd7\x90\xd7\x9c\xd7\x95\xd7\x9f-006
[Sun Oct 31 21:57:30 2010] [error] [client 87.69.67.162] sh: /latex: No such file or directory, referer: http://www.emath.co.il/vbtest/forumdisplay.php?9-\xd7\xa9\xd7\x90\xd7\x9c\xd7\x95\xd7\x9f-006

in the error log, when going to "new thread"


when i type "which latex" in my shell i get

"/usr/bin/latex"

and this is the same as the default.

any ideas?

Pod
10-31-2010, 07:16 PM
i get :



in the error log, when going to "new thread"


when i type "which latex" in my shell i get

"/usr/bin/latex"

and this is the same as the default.

any ideas?

The path to the latex executable in the admincp is correct? Should be "/usr/bin/latex". The error message you get looks like it's looking at "/latex" instead.

If the path is correct, I can't tell you more without access to your testvb access. If you wish, I can take a look (with no guarantee, and the typical disclaimer stuff), send me login details by pm.

emath
11-03-2010, 02:01 PM
how can i use mimetex but also have the option in your mod , that when posting a message i can see the icons and by clicking on them get the formula ... ?

actually, how to disable the generating of the code, but keep the other things in the mod working ?

Pod
11-03-2010, 06:43 PM
how can i use mimetex but also have the option in your mod , that when posting a message i can see the icons and by clicking on them get the formula ... ?

actually, how to disable the generating of the code, but keep the other things in the mod working ?

There's not such an option in this mod. You'd have to look for a mimetex mod that provides your desired features.

emath
11-17-2010, 05:09 PM
maybe you can make such option? for all people that are using mimetex..

Pod
11-17-2010, 05:32 PM
maybe you can make such option? for all people that are using mimetex..

That's currently out of the scope of this mod, sorry.

tommac3
11-26-2010, 02:03 AM
Great mod!!! One request is that the BB code gets populated when you click on the symbol rather than someone needing to add the [ text] bb code ...

For example:

I would like to have:

E= mc^2

rather than:

E= mc^2

Pod
11-26-2010, 02:33 AM
Great mod!!! One request is that the BB code gets populated when you click on the symbol rather than someone needing to add the [ text] bb code ...

For example:

I would like to have:

E= mc^2rather than:

E= mc^2

Sorry, but I don't undestand. You can set up a TEX button in the editor toolbar by using the built-in admincp option, is that what you were asking?.

tommac3
11-26-2010, 03:13 AM
Sorry, but I don't undestand. You can set up a TEX button in the editor toolbar by using the built-in admincp option, is that what you were asking?.

Can you go into a bit of detail as to what you are suggesting?

tommac3
11-26-2010, 03:17 AM
Sorry, but I don't undestand. You can set up a TEX button in the editor toolbar by using the built-in admincp option, is that what you were asking?.


Currently someone needs to type in [ TEX] and [ / TEX] but it would be even nicer if that was included by default or if it was added to the editor as you suggested.

sadiq6210
11-27-2010, 08:13 AM
Pod, may I have the icons shown here? (I mean the icons itself)
https://vborg.vbsupport.ru/attachment.php?attachmentid=120002&d=1279931142

I can't find it in the attachments

cowboy9892
12-03-2010, 12:43 PM
Hic!
My forum is 4.1.
I setup but it doesn't run !

ajhalls
01-03-2011, 09:32 PM
I love this product, I really do.

I moved servers however and it is unable to do any new latex on the site since the move. I went from a shared virtual server to a dedicated CentOS box.

It still is working for all old things. I upgraded to the most recent version but am still getting the error:
[LaTeX ERROR: Compile failed]

I have confirmed the location of the latex, dvips, convert, identify and that it is correct in the server settings and am attaching the error_log below


GNU nano 1.3.12 File: error_log

[error] [client 72.201.125.186] kpathsea: Running mktexfmt latex.fmt,
[error] [client 72.201.125.186] fmtutil: format directory `/.texmf-var/web2c' does not exist.,
[error] [client 72.201.125.186] This is dvips(k) 5.95a Copyright 2005 Radical Eye Software (www.radicaleye.com),
[error] [client 72.201.125.186] /usr/bin/dvips: ! DVI file can't be opened.,
[error] [client 72.201.125.186] convert: unable to open image `9a78b6d174434a113fb73a3e9c01c63f.ps': No such file or directory.,
[error] [client 72.201.125.186] convert: missing an image filename `9a78b6d174434a113fb73a3e9c01c63f.png'.,
[error] [client 72.201.125.186] identify: unable to open image `9a78b6d174434a113fb73a3e9c01c63f.png': No such file or directory.,
[error] [client 72.201.125.186] identify: unable to open file `9a78b6d174434a113fb73a3e9c01c63f.png'.,

Cyamia
01-04-2011, 06:03 AM
Is this compatible with vb 4.0.x?

tini_lam
01-05-2011, 01:55 AM
how install dvipng, latex ?

nacaruncr
01-05-2011, 07:40 PM
it work in 4.0.3????

thanks :D

fritz_0815
01-07-2011, 07:40 AM
Today I installed the new version.
I get the call to write this message.
Fatal error: Call to undefined function commandmenu_icon() in /www/htdocs/w00cc1dc/includes/functions_editor.php(658) : eval()'d code on line 27

With the old version everything runs smooth. What is wrong ?
I'm using vBulletin 4.1.0

linuxwhy
01-23-2011, 12:26 PM
try to install with 4.1.1, getting this error:" [LaTeX ERROR: Compile failed]"

Pod
01-23-2011, 03:19 PM
Today I installed the new version.
I get the call to write this message.
Fatal error: Call to undefined function commandmenu_icon() in /www/htdocs/w00cc1dc/includes/functions_editor.php(658) : eval()'d code on line 27With the old version everything runs smooth. What is wrong ?
I'm using vBulletin 4.1.0

try to install with 4.1.1, getting this error:" [LaTeX ERROR: Compile failed]"

I'll probably hava a chance to look into 4.1.x in about 10 days from now, sorry.

Pod
02-13-2011, 06:35 PM
Today I installed the new version.
I get the call to write this message.
Fatal error: Call to undefined function commandmenu_icon() in /www/htdocs/w00cc1dc/includes/functions_editor.php(658) : eval()'d code on line 27With the old version everything runs smooth. What is wrong ?
I'm using vBulletin 4.1.0

try to install with 4.1.1, getting this error:" [LaTeX ERROR: Compile failed]"

Sorry about the delay, I'm back for vb at least ;D

I had no problems running vlatex 0.4.1 in vbulletin 4.1.1, both in a fresh install and upgraded forum. If you both are still facing problems, please try to delete the mod and reinstall it. If that doesn't solve anything, come back and I'll try to take a look.


Since the mood seems to work in vb4.1.1, I probably won't work on any new release until the new editor is out.

PhilG
05-29-2011, 04:01 AM
Why would my latex images look incorrect?

https://vborg.vbsupport.ru/

It should look like this:

https://vborg.vbsupport.ru/

I believe I have correctly installed the package mhchem. What else could it be?

Pod
05-29-2011, 09:06 AM
Why would my latex images look incorrect?

http://www.electro-tech-online.com/vlatex/pics/134_cb5a744f70fbb3036dd67bf61b2b71d1.png

It should look like this:

http://www.scienceforums.net/latex/img/c1cb077935f08a98869593dbc5819863-1.png

I believe I have correctly installed the package mhchem. What else could it be?
Looks like your \ are being stripped from the formula. Can't say why.

Try using double \\

Should not be needed, tho.

belbos
06-12-2011, 06:45 PM
How can I "Change the permissions of the pics and temp folders so the web server can write on them"?

Do you know why the latex editor looks like this? (see attachment)

Pod
06-12-2011, 08:39 PM
How can I "Change the permissions of the pics and temp folders so the web server can write on them"?

This depends on the details of your hosting. Usually this can be done thoguht FTP or SSH. Ask your host.

Do you know why the latex editor looks like this? (see attachment)

The buttons in the editor are compiled thoguht latex. If the permissions are not set up correctly, the images for the buttons cannot be created. Fix the first point, and this will be automatically fixed as well :D

AttalaEA
06-13-2011, 03:33 AM
I have one question is this mod working for vBulletin 4.1.4?

belbos
06-13-2011, 06:04 AM
I changed the permissions of the pics & temp folders but still can't see the images for the buttons!

Any idea? Please help...

edit: I found out that the editor in cms and the one @ forum are different (check the attachments).

Pod
06-13-2011, 09:32 AM
I have one question is this mod working for vBulletin 4.1.4?

LaTeX parsing works.

The quick-commands menu doesn't due to the new editor. If you're not using that, you're safe to go. Otherwise, I'll be working the following days on a new version to support the new editor :D

Pod
06-13-2011, 09:36 AM
I changed the permissions of the pics & temp folders but still can't see the images for the buttons!

Any idea? Please help...

edit: I found out that the editor in cms and the one @ forum are different (check the attachments).

They look the same to me. The box with a red title bar is not from my mod, it's something else. The part from my mod look exactly the same in both pics.

If the permissions were not the issue, you'll have to check that you meet all the requirements of the mod (latex and the other software installed and so on).

belbos
06-13-2011, 09:39 AM
I just want to write maths in cms and forum...

Are there any simpler ways?

Pod
06-13-2011, 10:23 AM
I just want to write maths in cms and forum...

Are there any simpler ways?

I can't say what's wrong with your installation without seeing it, obviously. If you can compile the LaTeX formulas, then the images of the buttons will appear.

belbos
06-13-2011, 10:51 AM
Probably the problem with my installation is that I haven't installed latex..

Where can I find instructions to do all of these?

Thanks a lot for your help!!!!!

Pod
06-13-2011, 11:07 AM
Probably the problem with my installation is that I haven't installed latex..

Where can I find instructions to do all of these?

Thanks a lot for your help!!!!!

That's something I cannot help you with, because it depends on the details of your server. You should give the list of requirements of the mod to your host provider.

belbos
06-13-2011, 02:51 PM
Unfortunately, my server does not support latex...

Is there any other way in order to write maths in vbulletin?

AttalaEA
06-13-2011, 02:52 PM
It doesn't work

Pod
06-13-2011, 04:00 PM
Unfortunately, my server does not support latex...

Is there any other way in order to write maths in vbulletin?

Probably the easiest option would be to set up mimetex as a custom bbcode.

It doesn't work

vb4.1.4? As my testing shows, the LaTeX parsing works just fine.

Only the quick-menu has to be adapted for the new CKeditor. I'll try to release a new version in the next few days.

elektroda
07-04-2011, 08:12 AM
any progress for vb4.1.4?

Pod
07-04-2011, 05:35 PM
any progress for vb4.1.4?

I'm currently in the process of testing a minimal change in the JS of the mod that seems to work with JS.

If you would like to help me test, i can give you the file (do no try it live, tho).

caciocode
07-22-2011, 07:54 PM
Hi,

Thanks for this great mod. I have just setup a small maths website and I have just added this mod. The icons did not appear at all. Does that mean the server does not support LaTex?

I have read through the posts and I understand you're working on a compatible version with the latest Vbulletin. Has it been released yet?

This is the forum: http://forum.mathsrev.com I have disabled the mod though.

Pod
07-23-2011, 08:50 AM
Hi,

Thanks for this great mod. I have just setup a small maths website and I have just added this mod. The icons did not appear at all. Does that mean the server does not support LaTex?

You mean the quick menu was there, but the images were missing? If so, probably yeah, it could be that your hosting might be missing what's necessary. Contact them and ask if they are willing to install it for you.

I have read through the posts and I understand you're working on a compatible version with the latest Vbulletin. Has it been released yet?

I'll try to release it on monday. The new vb editor has some quirk I could not work around yet, it always makes an ajax call when you try to insert something thought javascript, so the quick-menu will be a bit slower (thought not enough to rename it slow-menu :p).

Pod
07-26-2011, 07:37 PM
I'll try to release it on monday. The new vb editor has some quirk I could not work around yet, it always makes an ajax call when you try to insert something thought javascript, so the quick-menu will be a bit slower (thought not enough to rename it slow-menu :p).

Update, I found a problem with the quick_menu appearing wrongly in CMS comments. I'll need a couple of days to investigate and fix, but otherwise the release is almost ready.

dukeblue219
07-30-2011, 07:34 PM
Just wanted to say thanks -- I really like this latex plugin better than the system I had kludged together before (on a different forum software). Yes, everyone, it does work out of the box if you have the required software installed on your server. The quickmenu looks great, can't wait to get it operational with the upcoming fix.

juanma101285
08-07-2011, 05:12 PM
Hi, thanks for the plugin!

I am new to all this... I have been trying to install vlatex, but I am stuck in step 4. I'd really appreciate it if someone could give me a hand.

Here's what I have done so far:
Step 2 - I have upload the vLaTeX directory to the forum's root (where I have vBulletin installed, I guessed).
Step 3 - I changed the permissions of the pics and temp folders.
Step 4 - The instructions say "Import the product XML in your admin control panel. If you're upgrading, set "Allow Overwrite" to yes.", so I have put the product-pod_vlatex.xml file in the folder "/admincp/".

I then went to AdminCP > Settings > Options, but there is no "vLaTeX - Math Parsing", so I cannot go on.

What have I done wrong? Thanks!

Pod
08-07-2011, 06:07 PM
Step 4 - The instructions say "Import the product XML in your admin control panel. If you're upgrading, set "Allow Overwrite" to yes.", so I have put the product-pod_vlatex.xml file in the folder "/admincp/".


Go to the admin cp, "Plugins & products" > "Manage products", then click in [Add/Import product]. Select the product product-pod_vlatex.xml in your HDD.

dkikuchi
08-07-2011, 10:34 PM
Pod, just wanted to thank you for this mod. Looks and works great so far through my testing. I know that you had posted that the fix was almost ready a couple of weeks ago and I was wondering if there was an estimated release date expected? The forum I will be using this on is scheduled to open soon and I'm really hoping to have full functionality at that time.

Thanks again for the great product!

Pod
08-07-2011, 11:03 PM
Pod, just wanted to thank you for this mod. Looks and works great so far through my testing. I know that you had posted that the fix was almost ready a couple of weeks ago and I was wondering if there was an estimated release date expected? The forum I will be using this on is scheduled to open soon and I'm really hoping to have full functionality at that time.

Thanks again for the great product!

I do have a fix for the JS side of things (the thing that makes the buttons work), that part is done and reasonably well tested.

But after that, I found that vB changed something in the CMS that completely kills the comments editor with this mod enabled; the quick-menu should not appear in there, as it only appears in full editors, but somehow the method to detect what kind of editor we are dealing with no longer works in the CMS.

I have yet to study vB's code in order to know what to do. In the worse case, I might have to rethink the whole quick-menu system. In the best case there'll be another variable I can check and it'll be easy. So I can't say how much It'll take.

Unfortunately, I have no holidays in august, so I have little time for my hobby projects. Good news is that today I just finished another hobby project, and I promise I won't do any other thing before vlatex is ready to go with the new editor. So can't say a date, but hopefully won't take long.

If you are interested in the forum only version of vb, then this problem should not trouble you at all. I'm attaching to this post the updated JS file that should work for any vb4.x forum-only. Just overwrite the old file whit this one, but be warned to try this in a testing environment, never test it live before confirming it works for you.

dukeblue219
08-10-2011, 01:45 AM
I'm attaching to this post the updated JS file that should work for any vb4.x forum-only. Just overwrite the old file whit this one, but be warned to try this in a testing environment, never test it live before confirming it works for you.

Would like to give the update JS file a shot, but I didn't see an attachment here.

ALBCODERS
08-22-2011, 05:54 PM
after i installed

i tried E = m c^2 and i got this on my post >>> [LaTeX ERROR: Compile failed]

also icons not appear , look at the attachment in botom of this post.
If there is any problem with my hosting, what kind of files do they have to install to get this working,
i am with hostgator , is there any hostgator member who have same problem,

Please guys let me know , i really need this product

Regards

ALBCODERS
08-22-2011, 08:55 PM
Requirements

This mod relies on your server having available the following external programs. They are pretty standard in most linux distributions, so hosts can install them easily (if they want to, some don't). Please, check your server meets this requirements (or ask your host to install the programs) before trying to use vLaTeX:

- latex: the LaTeX compiler. Check the TeXlive distribution (http://www.tug.org/texlive/).

- dvips: converts the DVI file to PS. Usually included in all latex distributions.

- convert: as it name suggests, converts between a large number of graphic files. Belongs to the ImageMagick package. Needs ghostscript.

- identify: among other things, measures the size of image files. Also belongs to ImageMagick

- Ghostscript: PostScript and PDF language interpreter and previewer. Is called by convert in order to handle ps files.




can u be more specific what kind of scripts they have to install , because hostgator admins are givin me hard time on this.

dukeblue219
08-27-2011, 04:58 PM
These are not "scripts" per se. They are compiled programs that must be installed on the server. I suspect that many shared hosts, such as hostgator, will not have them all installed, even though none of them are particularly uncommon.

That said, any remotely competent admin should know what those programs are, and they should be able to give you a simple yes or no if they're available. If they're not, I would seriously doubt that they're going to install a new program on the server just for one customer, and it might be against their rules for security reasons.

tommac3
08-31-2011, 12:10 PM
I upgraded to the latest version of VBulletin and the quick menu no longer works

tommac3
08-31-2011, 03:09 PM
I think the quick menu is no longer working because of the new text box that vbulletin uses.

CvP
10-14-2011, 04:26 AM
looking forward to next update :up:

linuxwhy
10-31-2011, 05:58 PM
looking for waiting...:D

caciocode
01-11-2012, 07:52 PM
Is there a latest version for this.

Beckenbauer
04-13-2012, 08:51 PM
I have all five programs on the server, but this error when I will write a post.

exec() has been disabled for security reasons in [path]/vlatex/class_vlatex.php (line 292)

Don't work in 4.1.11 or 4.1.12?

tommac3
05-03-2012, 01:45 AM
I moved to a new host ... and now cant get this to work I am getting an error:
[LaTeX ERROR: Unknown error]

in the logs I see:

kpathsea: Running mktexfmt latex.fmt
fmtutil: format directory `/root/.texmf-var/web2c' does not exist.
/root/.dvipsrc: Permission denied
/root/.dvipsrc: Permission denied
This is dvips(k) 5.95a Copyright 2005 Radical Eye Software (www.radicaleye.com)
/usr/bin/dvips: ! DVI file can't be opened.
convert: unable to open image `ef75b81807ccf1959c5287e8321c767e.ps': No such file or directory.
convert: missing an image filename `ef75b81807ccf1959c5287e8321c767e.png'.

Do you know what i am missing?

tommac3
05-12-2012, 05:45 PM
It does not work with VB 4 ...

it just shows error

Pod
05-13-2012, 07:34 AM
It does not work with VB 4 ...

it just shows error

Which error exactly?

Does your installation satisfy all the requirements listed in the first post? This plugin is an interface to several external tools (latex, dvips, etc.), if they are not installed, obviously the plugin won't work.

sz1
06-04-2012, 01:01 PM
The Quick-Commands menu doesn´t work with the cke-editor. Is there any way you could update to get it working?

Pod
06-04-2012, 01:54 PM
I have all five programs on the server, but this error when I will write a post.

exec() has been disabled for security reasons in [path]/vlatex/class_vlatex.php (line 292)

Don't work in 4.1.11 or 4.1.12?

Sorry I didn't see that message earlier :(

That's related to the configuration of your hosting.

The Quick-Commands menu doesn?t work with the cke-editor. Is there any way you could update to get it working?

An update for vb 4.2 is in the pipeline. It will be definitively be out this month.

I currently have no intention of testing the new version with earlier cke-based versions (vb 4.1.x). But I could change plans and test those versions if there's enough need for that in the comunity. I need your feedback in that :D

apokphp
06-07-2012, 01:39 AM
Any way for this to be made to work with GD2 instead of Imagemagick? Most of us on shared servers aren't able to use this mod because of that. Imagemagick takes up a lot more memory and resources, GD2 is what is typically found on shared servers.

Pod
06-07-2012, 08:54 AM
Any way for this to be made to work with GD2 instead of Imagemagick? Most of us on shared servers aren't able to use this mod because of that. Imagemagick takes up a lot more memory and resources, GD2 is what is typically found on shared servers.

Will consider it. No promises.

But I'd say that hosts that are willing to install latex, which is not very well known for hosting managers, would have much less problems installing imagemagick.

sz1
07-03-2012, 07:05 AM
How about the update? Can´t wait ;P

I can test it on the latest vB Version and let you know if it works without problems.

Pod
07-03-2012, 07:32 AM
How about the update? Can?t wait ;P

I can test it on the latest vB Version and let you know if it works without problems.

Are you willing to beta test the mod before release? If so, PM me and I'll send it to you.

emath
11-03-2012, 09:52 AM
is there any progress with the mode update?

emath
12-12-2012, 05:06 PM
thanks for the update, buy yet i get this errors :

[LaTeX ERROR: Convert failed]

and in the error log file :

This is dvips(k) 5.95a Copyright 2005 Radical Eye Software (www.radicaleye.com), referer: http://www.emath.co.il/forums/%D7%A9%D7%90%D7%9C%D7%95%D7%9F-803/
/usr/bin/dvips: ! DVI file can't be opened., referer: http://www.emath.co.il/forums/%D7%A9%D7%90%D7%9C%D7%95%D7%9F-803/
convert: unable to open image `143ebf4431f6923c64587a2965b56602_1355335161.ps': No such file or directory., referer: http://www.emath.co.il/forums/%D7%A9%D7%90%D7%9C%D7%95%D7%9F-803/
convert: missing an image filename

all paths are double checked .

Pod
12-12-2012, 07:15 PM
thanks for the update, buy yet i get this errors :

[LaTeX ERROR: Convert failed]

and in the error log file :

This is dvips(k) 5.95a Copyright 2005 Radical Eye Software (www.radicaleye.com (http://www.radicaleye.com)), referer: http://www.emath.co.il/forums/%D7%A9%D7%90%D7%9C%D7%95%D7%9F-803/
/usr/bin/dvips: ! DVI file can't be opened., referer: http://www.emath.co.il/forums/%D7%A9%D7%90%D7%9C%D7%95%D7%9F-803/
convert: unable to open image `143ebf4431f6923c64587a2965b56602_1355335161.ps': No such file or directory., referer: http://www.emath.co.il/forums/%D7%A9%D7%90%D7%9C%D7%95%D7%9F-803/
convert: missing an image filename

all paths are double checked .

Looks like latex isn't generating the dvi file, but it's not raising any error at that stage so the error appears in a later phase (dvips and convert). That's strange since the latex compilation phase didn't have any change in this last update. I assume it was working for you earlier, which makes it even more strange.

To troubleshot this, let's try to reproduce manually all the commands that the mod issues.

Please, do something like this:

1. Log in ssh to your server
2. cd to the vlatex/temp directory
3. Make sure that the directory is almost empty (there should be only a index.htm file; if some temporary file wasn't properly deleted it should be safe to delete it now).
4. Create a test.tex file with the following contents (for instance, do it with nano test.tex)
\documentclass[10pt]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\let\dst=\displaystyle
\newcommand{\dd}{\mathrm{d}}
\newcommand{\ee}{\mathrm{e}}
\newcommand{\eee}[1]{\mathrm{e}^{#1}}\pagestyle{empty}
\newlength{\formuladepth}
\newsavebox{\formulabox}
\begin{lrbox}{\formulabox}
$E = m c^2$
\end{lrbox}
\settodepth{\formuladepth}{\usebox{\formulabox}}
\newwrite\opdepth
\immediate\openout\opdepth=\jobname.depth
\immediate\write\opdepth{\the\formuladepth}
\closeout\opdepth
\begin{document}
\usebox{\formulabox}
\end{document}
5. Compile the test file with
latex --interaction=nonstopmode test.tex
6. Please, report back tell me any error that appears after doing that. Report back also the list of files in the directory after that operation (that is, copy into the forum the result of "ls -l" after running step 5).

Feel free to send me the results via PM if you don't want to post that information to the wild :D

emath
12-12-2012, 08:02 PM
actually i didnt use this mode before, ive just installed all needed programs today.

after step5 i get in the end : No file test.aux.

ive sent you the test.log file on private .

ls -l gives :

total 28
-rw-r--r-- 1 emath emath 32 Dec 12 18:06 index.htm
-rw-rw-r-- 1 admin admin 8 Dec 12 21:51 test.aux
-rw-rw-r-- 1 admin admin 6 Dec 12 21:51 test.depth
-rw-rw-r-- 1 admin admin 308 Dec 12 21:51 test.dvi
-rw-rw-r-- 1 admin admin 4851 Dec 12 21:51 test.log
-rw-r--r-- 1 emath emath 608 Dec 12 21:51 test.tex

Pod
12-12-2012, 08:41 PM
actually i didnt use this mode before, ive just installed all needed programs today.

after step5 i get in the end : No file test.aux.

ive sent you the test.log file on private .

ls -l gives :

Everything looks ok (the absence of the aux file is not a problem, it only means that it's the first time you compile that latex file).

Right now, my best bet would be a permission problem. Please, make sure that the web server can write to vlatex/temp and vlatex/pics. That usually means chmod them to 777.

Please try that. If not, we'll try other tests :D

emath
12-12-2012, 08:47 PM
Everything looks ok (the absence of the aux file is not a problem, it only means that it's the first time you compile that latex file).

Right now, my best bet would be a permission problem. Please, make sure that the web server can write to vlatex/temp and vlatex/pics. That usually means chmod them to 777.

Please try that. If not, we'll try other tests :D

done this already.. (and checked it again now) =\
no idea what else can be wrong.

emath
12-12-2012, 08:49 PM
on the errors from the log file i wrote it says : "unable to open image `143ebf4431f6923c64587a2965b56602_1355335161.ps': No such file or directory."

so it seems that maybe something in the script is wrong, the directory isnt right..

Pod
12-12-2012, 09:06 PM
on the errors from the log file i wrote it says : "unable to open image `143ebf4431f6923c64587a2965b56602_1355335161.ps': No such file or directory."

so it seems that maybe something in the script is wrong, the directory isnt right..

Every formula goes thought several formats: tex, dvi, ps and finally png. According to your first message, the process breaks at the dvi phase, so it's expected that the ps file doesn't get created.

To test further, please do the following. Edit vlatex/class_vlatex.php. Around line 411 (pretty at the end), change

if (file_exists($f)) unlink($f);To

// if (file_exists($f)) unlink($f);This effectively disables the cleanup of the temp directory. Please clean it by hand (something like rm vlatex/temp/*) so we can see the results of the test.

Then, log into your forum and try to add a formula to a post. The temp folder will fill up with some files, so we can know how many of them get created ok. Please, tell me the result of ls -l after that test, or delte also vlatex/temp/index.htm so I can take a look at the directory listing at http://www.emath.co.il/forums/vlatex/temp/ (you can recreate the file after the test)

emath
12-12-2012, 09:26 PM
i commented the row u asked .

the ls -l gives now (while im in the temp dir) :

total 56
-rw-r--r-- 1 emath emath 49872 Dec 12 23:23 efa4c40fe23d50f46436522f01f442b1_1355350982.tex

Pod
12-12-2012, 09:36 PM
i commented the row u asked .

the ls -l gives now (while im in the temp dir) :

total 56
-rw-r--r-- 1 emath emath 49872 Dec 12 23:23 efa4c40fe23d50f46436522f01f442b1_1355350982.tex

Now, while in the temp dir, write the following:

(Path to LaTeX) --interaction=nonstopmode efa4c40fe23d50f46436522f01f442b1_1355350982.texWhe re Path to LaTeX is the path to latex as entered in the admincp. The default is /usr/bin/latex, so if you have the default value your line would be

/usr/bin/latex --interaction=nonstopmode efa4c40fe23d50f46436522f01f442b1_1355350982.tex

This is the command the mod is issuing (Assuming that you didn't delete the file generated by the previous test; if you did, please create a new one).

See if any error happens, and see if more files are generated in the directory (i.e, check ls -l again).



If the previous command failed, try the same line but without the full path (just latex instead of /usr/bin). This should work, since we tested a different thing a while ago.

emath
12-12-2012, 09:39 PM
ok, the command succeeded. (with the full path)

ls -l gives :

total 320
-rw-r--r-- 1 emath emath 54659 Dec 12 23:29 218f45bd0e29f218b0dc1857255890a0_1355351345.tex
-rw-r--r-- 1 emath emath 54659 Dec 12 23:29 5d890bc62b4786e4e033f3109d6f514f_1355351364.tex
-rw-r--r-- 1 emath emath 54659 Dec 12 23:29 bef8c61085cc0b691603940a31f6e3e8_1355351327.tex
-rw-rw-r-- 1 admin admin 8 Dec 12 23:36 efa4c40fe23d50f46436522f01f442b1_1355350982.aux
-rw-rw-r-- 1 admin admin 6 Dec 12 23:36 efa4c40fe23d50f46436522f01f442b1_1355350982.depth
-rw-rw-r-- 1 admin admin 212 Dec 12 23:36 efa4c40fe23d50f46436522f01f442b1_1355350982.dvi
-rw-rw-r-- 1 admin admin 5125 Dec 12 23:36 efa4c40fe23d50f46436522f01f442b1_1355350982.log
-rw-r--r-- 1 emath emath 54659 Dec 12 23:23 efa4c40fe23d50f46436522f01f442b1_1355350982.tex
-rw-r--r-- 1 emath emath 54659 Dec 12 23:25 fd3be24dfc7f5c66c09e58c2485731a1_1355351109.tex


the only error that might be is : /usr/bin/latex: /usr/local/lib/libpng12.so.0: no version information available (required by /usr/bin/latex)

Pod
12-12-2012, 10:00 PM
ok, the command succeeded.

ls -l gives :



the only error that might be is : /usr/bin/latex: /usr/local/lib/libpng12.so.0: no version information available (required by /usr/bin/latex)

That's very weird. The libpng error shouldn't matter at this point since the dvi file is generated; but it isn't when the same command is issued by the webserver.

It might be worth trying to install libpng just to see if that makes any difference; If you installed latex using a package manager (apt-get, yum, yast or whatever) then the dependence should have been installed, check your linux distribution on details why it wasn't.

Anyway, I don't think that's the problem, so let's try something else. I'm going to prepare a debug version of class_vlatex.php to gather more information and I'll get back to you when I have it.

That is unless... and I know this is a delicate question, but would you consider giving me temporary and limited ssh access to the restricted vlatex directory so I could perform tests by myself much more quickly?

I'll get back to you when I have the debug class_vlatex.php.

Pod
12-12-2012, 11:41 PM
That's very weird. The libpng error shouldn't matter at this point since the dvi file is generated; but it isn't when the same command is issued by the webserver.

It might be worth trying to install libpng just to see if that makes any difference; If you installed latex using a package manager (apt-get, yum, yast or whatever) then the dependence should have been installed, check your linux distribution on details why it wasn't.

Anyway, I don't think that's the problem, so let's try something else. I'm going to prepare a debug version of class_vlatex.php to gather more information and I'll get back to you when I have it.

That is unless... and I know this is a delicate question, but would you consider giving me temporary and limited ssh access to the restricted vlatex directory so I could perform tests by myself much more quickly?

I'll get back to you when I have the debug class_vlatex.php.


For the record, if it helps somebody else, it was a LaTeX install issue, latex.fmt was missing. What finally solved the problem was to run:

fmtutil-sys --all

emath
12-13-2012, 01:53 PM
For the record, if it helps somebody else, it was a LaTeX install issue, latex.fmt was missing. What finally solved the problem was to run:

fmtutil-sys --all

ive done this, and find out that the latex.fmt file is in the: /.texmf-var/web2c/

and the mod requires it to be at : /.texmf/web2c/

so ive just copied the file to that directory ( using cp command ) .

thanks to pod for the help.

one more little thing : why does the \\ command for new line doesnt work?

Pod
12-13-2012, 02:10 PM
and the mod requires it to be at : /.texmf/web2c/

Not specifically this mod, but your latex installation requires it to be there.

one more little thing : why does the \\ command for new line doesnt work?

LaTeX doesn't allow new lines in displayed equations. You can use one of amstex packages, for instance

\begin{gathered}
line 1 \\
line 2
\end{gathered}

emath
12-13-2012, 03:54 PM
in mimetex it worked with no problem, and we wrote for years like this .
is there anyway to enable this command ?

Pod
12-13-2012, 04:07 PM
in mimetex it worked with no problem, and we wrote for years like this .
is there anyway to enable this command ?

Well, mimetex has some small deviations from standard latex (see here: http://www.forkosh.com/mimetexmanual.html).

I think I can adapt the mod so you can chose a different formula wrapper (instead of the current $$) so the // command works for you. But I won't be able to do so before the weekend.

emath
12-13-2012, 04:31 PM
ok, i think it would be great, it is necessary for everyone i guess.

emath
12-16-2012, 05:31 AM
any progress within this weekend?
btw i found some more commands that doesnt work : \right , \Large{} and many others from this page : http://en.wikibooks.org/wiki/LaTeX/Text_Formatting#Spacing which i used in mimetex with no problem, why does this happenning? the code should be the same isnt ?

Pod
12-16-2012, 10:34 PM
any progress within this weekend?

I just updated the mod with a functionality that will allow you to enable the \\. Update the mod (upload the files and upgrade the xml at the admincp). In vlatex options, you'll find the new setting "Equation Wrapping". Select the third option (the gather environment).

If you want the new setting to apply retroactively to old formulas, delete the pics folder and rebuild the postcache.

any progress within this weekend?
btw i found some more commands that doesnt work : \right , \Large{} and many others from this page : http://en.wikibooks.org/wiki/LaTeX/Text_Formatting#Spacing which i used in mimetex with no problem, why does this happenning? the code should be the same isnt ?

As I said in a previous post, mimetex defines a few non-standard commands that do not exist in stock latex, so those commands will not work out of the box. There's nothing I can do about that, since I'm neither mimetex nor latex developer. This mod just offers a interface to latex.

However, you can define the most useful commands to mimic mimetex behaviour as much as possible. You can do so in the "Preamble" option in vlatex settings page (the last one). I recommend not replacing the default content in there, just append your definitions. For instance, you can get something very similar to \Large by using

\let\Large=\large

The effect won't be the same, but at least old formulas won't be broken. Again, empty the pics folder and rebuild postcache to recreate old formulas after making changes.

emath
12-18-2012, 06:14 AM
I just updated the mod with a functionality that will allow you to enable the \\. Update the mod (upload the files and upgrade the xml at the admincp). In vlatex options, you'll find the new setting "Equation Wrapping". Select the third option (the gather environment).

If you want the new setting to apply retroactively to old formulas, delete the pics folder and rebuild the postcache.



As I said in a previous post, mimetex defines a few non-standard commands that do not exist in stock latex, so those commands will not work out of the box. There's nothing I can do about that, since I'm neither mimetex nor latex developer. This mod just offers a interface to latex.

However, you can define the most useful commands to mimic mimetex behaviour as much as possible. You can do so in the "Preamble" option in vlatex settings page (the last one). I recommend not replacing the default content in there, just append your definitions. For instance, you can get something very similar to \Large by using

\let\Large=\large

The effect won't be the same, but at least old formulas won't be broken. Again, empty the pics folder and rebuild postcache to recreate old formulas after making changes.

great, thanks alot !

jackvb2013
06-23-2013, 10:15 AM
Great Job!!

oxide11
09-21-2013, 01:34 PM
Hi, I have installed the TEX live ... i have problem

the editor can't post the formulea in proper form the tag [TEX] formulea [TEX] is missing from the editor. When I'am adding tags all works fine what can be wrong?

Pod
09-21-2013, 02:40 PM
Hi, I have installed the TEX live ... i have problem

the editor can't post the formulea in proper form the tag [TEX] formulea [TEX] is missing from the editor. When I'am adding tags all works fine what can be wrong?

If I'm undestanding you, you have the mod working but you have to manually type the [tex] tags? So just you're missing the "tex" button?

oxide11
09-21-2013, 02:59 PM
yes that the one I'am trying to install Ghostscript i don't know if this helps

Vbulletin 4.2.1 Web www.4-40.co.uk


I haven't got root access by ssh so finally I manage to install the TEX live on different location than usr/bin/

Is the Ghostscript realy needed for this script?

Pod
09-21-2013, 03:24 PM
yes that the one I'am trying to install Ghostscript i don't know if this helps

Vbulletin 4.2.1 Web www.4-40.co.uk (http://www.4-40.co.uk)


I haven't got root access by ssh so finally I manage to install the TEX live on different location than usr/bin/

Is the Ghostscript realy needed for this script?

You already have everything you need installed, including ghostscript. In fact, the mod is working all right (I just checked by registering at your site; nice design btw).

The button in the editor is not installed by the mod itself, but you can install one using vb's built-in system. In the admincp, there's a section for vb codes, were you can create a tex vb code.

oxide11
09-21-2013, 04:35 PM
ok great thing this plugin thanks :)

john7911
12-06-2013, 05:31 AM
Good job , thank you ;)

Ptah
04-10-2014, 02:51 PM
Hi. I've installed it on my forum and it works great!

I have a concern though, which becomes a suggestion/request of sorts.

My understanding is that each expression rendered results in a new PNG file in /pics. Makes sense, if so. So with that understanding...

/pics files accumulating when users iteratvely tweak TEX expressions in preview/edit?
Let's say someone is using the preview-edit-preview in a loop whilst developing a post, and tweaking the latex expression each time, hence generating however many intermediate PNG files (per latex expression tweak), only the last of which is really useful (the one they wind up posting). This results in a pile of images sitting around under /pics that are effectively wasted space. I don't think this is too unrealistic of a scenario, being that people may see a problem with their (say, nontrivial) latex in preview, so then tweak it, iteratively, until they see what the want.

Concern of "waste" /pics accumulation
Now my concern. Over time this can become a problem, lots of wasted space.

For instance, anticipating this may be a problem, I have asked the users of my forum to consider using one of the freely available online, interactive LaTeX renderers to "draft" their expressions before posting them on my forum, hoping to head off useless PNG file accumulations.

Extent suggestions/workarounds...
So. I understand that you can purge the post cache and rebuild, but that seems to be long-term unfeasible as the forum ages, and accumulates many posts, right? Just to purge unused /pic files, you have to drop and rebuild the whole post cache? Seems like hitting it with a hammer, unless I've misunderstood?

Suggestion/Question?

I'd consider making the suggestion, "Hey, can we disable the TEX tag from rendering in preview mode?", but that would just encourage people to post, then edit their post. They can iteratively tweak the TEX expressions anyhow, which does not head off the accumulation problem.

So, instead I make the suggestion (or ask for the clarification): is there a way to either prevent or periodically cleanup the long-term accumulation of effectively no-longer-used/intermediately-generated PNG files?

Such as through some "smarts" to drop any net-unused, intermediately generated /pics images during preview-edit-preview loops?

OR

Such as through a cron or somesuch? I'm not sure what the effort would be, imagining something that has to effectively sweep recent posts against the /pics folder, and weed out those which are deemed unused, etc, although I admit I can imagine it being a headache...

Perhaps my understanding is off to begin with?

Any insight here would be great. This mod is a great addition to my forum, it offers a great value to my membership!

Pod
04-10-2014, 04:45 PM
Hi. I've installed it on my forum and it works great!

I have a concern though, which becomes a suggestion/request of sorts.

My understanding is that each expression rendered results in a new PNG file in /pics. Makes sense, if so. So with that understanding...

/pics files accumulating when users iteratvely tweak TEX expressions in preview/edit?
Let's say someone is using the preview-edit-preview in a loop whilst developing a post, and tweaking the latex expression each time, hence generating however many intermediate PNG files (per latex expression tweak), only the last of which is really useful (the one they wind up posting). This results in a pile of images sitting around under /pics that are effectively wasted space. I don't think this is too unrealistic of a scenario, being that people may see a problem with their (say, nontrivial) latex in preview, so then tweak it, iteratively, until they see what the want.

Concern of "waste" /pics accumulation
Now my concern. Over time this can become a problem, lots of wasted space.

For instance, anticipating this may be a problem, I have asked the users of my forum to consider using one of the freely available online, interactive LaTeX renderers to "draft" their expressions before posting them on my forum, hoping to head off useless PNG file accumulations.

Extent suggestions/workarounds...
So. I understand that you can purge the post cache and rebuild, but that seems to be long-term unfeasible as the forum ages, and accumulates many posts, right? Just to purge unused /pic files, you have to drop and rebuild the whole post cache? Seems like hitting it with a hammer, unless I've misunderstood?

Suggestion/Question?

I'd consider making the suggestion, "Hey, can we disable the TEX tag from rendering in preview mode?", but that would just encourage people to post, then edit their post. They can iteratively tweak the TEX expressions anyhow, which does not head off the accumulation problem.

So, instead I make the suggestion (or ask for the clarification): is there a way to either prevent or periodically cleanup the long-term accumulation of effectively no-longer-used/intermediately-generated PNG files?

Such as through some "smarts" to drop any net-unused, intermediately generated /pics images during preview-edit-preview loops?

OR

Such as through a cron or somesuch? I'm not sure what the effort would be, imagining something that has to effectively sweep recent posts against the /pics folder, and weed out those which are deemed unused, etc, although I admit I can imagine it being a headache...

Perhaps my understanding is off to begin with?

Any insight here would be great. This mod is a great addition to my forum, it offers a great value to my membership!


What I do myself is to add this line in a crontab:

50 4 * * * find PATH_TO_FORUM/vlatex/pics -atime +35 -name "*_*" | xargs rm -f

This removes every morning (at 4:50) all files from the directory that were not accessed in the last 35 days. You can tune this command as you wish.

It is important that the number of days is slightly larger than the duration of your post cache (it's an option somewhere in vb's admincp), because if the post is cached, then bbcodes are not reprocessed.

If you ever empty the pics folder, then also clear or rebuild the post cache (which can be done in the admincp as well). Doing so, png's will be rebuilt the first time every post is visited by someone (I suggest doing this with the forum closed and visit yourself the posting page, 'cause the large number of formulas in the quick-menu take a while to be processed).

Ptah
04-10-2014, 04:58 PM
Pod, thanks for the quick reply. I'll play around with your suggested cron-based (and rather pragmatic) approach and see how that works.

Thanks again.

oxide11
05-20-2014, 05:45 AM
After update to latest Vbulletin 4.2.2 and php 5.4 on server this function doesn't work

\begin{align} (formula) \end{align}
\begin{gather} (formula) \end{gather}
\begin{eqnarray} (formula) \end{eqnarray}

Does anyone know what can cause this problem.

Pod
05-20-2014, 05:19 PM
After update to latest Vbulletin 4.2.2 and php 5.4 on server this function doesn't work

\begin{align} (formula) \end{align}
\begin{gather} (formula) \end{gather}
\begin{eqnarray} (formula) \end{eqnarray}

Does anyone know what can cause this problem.


I don't think the update should affect the mod. You could try to reinstall the mod.

tn5421
05-23-2014, 01:46 AM
You should include mimetex in your install, for people who's servers don't have LaTeX installed.

Pod
05-23-2014, 05:18 AM
You should include mimetex in your install, for people who's servers don't have LaTeX installed.

mimeTeX can be easily integrated with VB using the built in bbcode editor, no need for a mod if you're going with mimeTeX ;)

Daniel
01-04-2015, 10:11 PM
Any suggestions for something like this? I'm on GoDaddy shared hosting (linux)

fsrmw_tudd
03-08-2017, 11:49 AM
When I'm trying this mod with the gather environment, I get the "Convert failed" error on the snippets where I'm using "\\" "\newline".
Single line formulas do work without any error.

Is there a solution for the multiline functionality or a better workaround than using multiple tex-fields?


vb 4.2.3 PL2

emath
03-08-2017, 11:52 AM
When I'm trying this mod with the gather environment, I get the "Convert failed" error on the snippets where I'm using "" "\newline".
Single line formulas do work without any error.

Is there a solution for the multiline functionality or a better workaround than using multiple tex-fields?

might be that this command does not exist, try \\ instead.

anyway, I would use MathJax instead, there is no need for this plugin anymore. mathjax is gr8 ! (being used in mathstack as well )

fsrmw_tudd
03-08-2017, 12:16 PM
I wrote \\ the first set of quotation marks (where did it go? :confused:).

As I tried to write a new formula with no line break it also went "Convert failed". So I guess, the gather doesn't work at all and it was bad luck that I had an already compiled picture of the single line equation.
I edited a post where the \\ did not do anything and changed the settings from $ formula $ to gather.

MarkFL
03-08-2017, 12:26 PM
I second the opinion that MathJax works very well...we use it at MHB too. If you want to get started with that, try this product:

LaTeX By MathJax [v1.2] (https://vborg.vbsupport.ru/showthread.php?t=320276)

Pod
03-08-2017, 12:27 PM
When I'm trying this mod with the gather environment, I get the "Convert failed" error on the snippets where I'm using "\" "\newline".
Single line formulas do work without any error.

Is there a solution for the multiline functionality or a better workaround than using multiple tex-fields?


vb 4.2.3 PL2

First, you should use the "gathered" environment, not the "gather" one. The "gather" cannot be used inside math mode. Note that this plugin compiles your formula directly in math mode.

Also, make sure that \usepackage{amsmath} is included in the preamble (in your admin panel).

anyway, I would use MathJax instead, there is no need for this plugin anymore. mathjax is gr8 ! (being used in mathstack as well )

I strongly recommend KaTeX (https://khan.github.io/KaTeX/) over MathJax (even tho both are great).

In fact, if I ever consider updating this plugin, I'd make it KaTeX based with server-side latex (converted to SVG instead of PNG) as fallback for full compatibility with desktop LaTeX.

I believe that server-side and client-side LaTeX have pros and cons, so both of them still have room nowadays.

fsrmw_tudd
03-08-2017, 12:43 PM
First, you should use the "gathered" environment, not the "gather" one. The "gather" cannot be used inside math mode. Note that this plugin compiles your formula directly in math mode.

I was referring to the options of this mod in the admin panel.

---

Due to security regulations I am not allowed to have things running on a server outside the university network.

Pod
03-08-2017, 12:56 PM
I was referring to the options of this mod in the admin panel.

---

Due to security regulations I am not allowed to have things running on a server outside the university network.

You don't need any software running anywhere except where your forum is hosted.

Please find attached an example of a multi-line equation compiled with this mod. Note that I'm using the gathered environment, not simple gather. It will work if you have LaTeX correctly configured and the amsmath package is listed in the preamble (it is by default when you install the product).

fsrmw_tudd
03-08-2017, 01:31 PM
Well, I have a bunch of old posts with the syntax $formula$ from a 10 years old database here and don't want to cannot rewrite that.

I hoped that the settings option within the mod would do the trick since you declared it as a feature.
The formulas are compiled by creating a small tex file and running the native LaTeX program throughout it. You can choose to wrap the formula with the standard dollar ($ ... $), the align or gather amsTeX environments. The standard dollar is recommended since the baseline hack works better with it, but the gather environment allows to create multiline equations using the \\ separator.

Pod
03-08-2017, 02:25 PM
Well, I have a bunch of old posts with the syntax $formula$ from a 10 years old database here and don't want to cannot rewrite that.

I hoped that the settings option within the mod would do the trick since you declared it as a feature.

Thanks for the image. Now I understand what you mean.

I see that you merge text and equations inside your [latex] tags. This is not how this mod is designed. This mod assumes that everything you put inside the tags is in math mode, and everything is converted to a single image.

I don't know what system you used to parse your old syntax, but I'd argue that this is not a suitable approach: in a forum, the text should be written using the editor of the forum, and use latex only for the equations.

Anyhow, the syntax of your old system is basically incompatible with this mod.

It could be easy to modify the mod so it doesn't wrap the contents of the tag in a math environment, but I'm not sure how that'd work. The system would generate a "normal" latex file that would have pretty much the width of a printed page.

If you give me more details on the system you have been using for the last 10 years, then I could try to give you some alternative. It is probably not this mod, since as I said, its design seems to differ from your syntax.