### Using TeX translators

Number of replies: 16I have been trying to get the tex translators working on my site. I have Math Type, so I have been using it to translate to TeX.

Here what I tried:

Here what I get:

Something appears to be working, but I don't know what the "garbage" is before it.

Also, I notice that the bottom of the fraction is cut off, and I have tried inserting a return underneath it, but it doesn't seem to help. Anyway to see the entire image?

I have tried this with the integral symbol and get the same result.

Thanks for any help, pointers to a discussion involving this (I tried searching the forum), or anything else someone can think of. The site is hosted at SiteGround--I know very little of what the hosting involves.

Also, if anyone has suggestions on exactly what Math Type filter to use (I have Math Type 5.1 and have tried most of them and the garbage still appears).

Curtis

### Re: Using TeX translators

What I typed link

The output I received

Sorry about that.

Curtis

### Re: Using TeX translators

I'm having the same problem on one of my sites and I'd be interested in hearing from anyone who knows how to fix it.

### Re: Using TeX translators

Take a look -- you'll notice that my $$$-\infty$$$ lower limit is vignetted exactly like your $$${3\over{2^4}}$$$ I tried to fix that problem but couldn't figure it out. Here's what I do know.

The latex solution proceeds in three steps. First latex creates a dvi output file from your input, i.e., latex:input-->dvi. Then ghostscript:dvi-->ps creates a postscript file from the dvi. Finally, ImageMagick's convert:ps-->png (or ps-->gif) creates a png (or gif) image from the postscript.

The postscript output looks fine (not vignetted) when viewed with ghostview. So it's convert that's apparently introducing the problem. Convert has _lots_ of command line options, and I tried playing with lots of them to no avail (using both png and gif output). I also couldn't google up a discussion of the problem. Please follow up here if you find out more.

### Re: Using TeX translators

Just a thought.

Davide

### Re: Using TeX translators

I'm not familiar with dvipng to be honest. I guess it's incompatible with ghostscript/ImageMagick. The solution implemented was chosen because it is really common and, in any case, the images are cached once created so in most cases will only be rendered once.

### Re: Using TeX translators

### Re: Using TeX translators

Davide

### Re: Using TeX translators

Thanks to everyone for their comments and suggests!

Curtis

### Re: Using TeX translators

$$$7 {\buildrel \times 2 \over \longrightarrow} 14$$$

$$7 {\buildrel \times 2 \over \longrightarrow} 14$$

It didn't happen with $$$\frac{3}{4}$$$.

$$\frac{3}{4}$$

(Hmmmm... the buildrel part looks different here than it did on my system: DIFFERENT garbage, but garbage nonetheless.

Here is a _picture_ of my output:

### Re: Using TeX translators

Your site is not using the mimeTeX-based tex filter but rather the filter that calls an actual copy of TeX. The text that you see as part of the image is what is supposed to be the preamble to LaTeX, but apparently the backslashes have been lost (for example, it should be \usepackage[latin1] not just usepackage[latin1]. There is probably a configuration page for this filter that contains this text, and Moodle has removed the backslashes (as it is prone to do). See the two messages just before yours for more information on this problem.

Davide

### Re: Using TeX translators

### Re: Using TeX translators

Note also that there is a handly debugging screen available for the TeX filter at http://your.moodle/filter/tex/texdebug.php. However it only works with the full TeX implementation as of 1.8.3!

### Re: Using TeX translators

I know this has been answered above... but it does not come up on the forum search straight away... as the original pre-amble was not quoted in a non-graphical way in the replies above... So I will repeat the solution here for the forum searchers.

To get rid of the 'rubbish' appearing before any Tex formulas... "**usepackage[latin1]{inputenc} usepackage{amsmath} usepackage{amsfonts} RequirePackage{amsmath,amssymb,latexsym}**".

Basically I went to:

**Site Administration -> Modules -> Filters -> Tex Notation -> Settings**

I tried to correct the Preamble back to this string: (With the space character on the front of each line).

__ \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \RequirePackage{amsmath,amssymb,latexsym}__

But it still messed up...

In the end I spotted the "** Reset to defaults**" button at the bottom of the settings screen... pressing that... fixed it all!

### Re: Using TeX translators

### Re: Using TeX translators

I was just using my own server to play with the TeX capabilities and ran into this same problem. Pressing the "reset to defaults" button did not work for me. However, if you edit the preamble in the html editor and place two backslashes before each line, then it worked for me. You may have to refresh your browser pages.

Thanks and hope that this helps anyone looking in the future.

### Re: Using TeX translators

The packages mentioned in the preamble actually have to be installed in your LaTeX system. I got tripped up with this on Ubuntu where everything is optional. The debugger script for the TeX filter (1.8.3 on) show this up quite readily.