You are not logged in.

- Topics: Active | Unanswered

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,657

I have now got LaTeX working for those who know what it is!

Example:

I did this using:

`[math]f(x)=\int_{-\infty}^x e^{-t^2}dt[/math]`

The server creates a ".gif" file each time, so to avoid slowing things down, only use it when plain old "x=y+2" won't do!

Another example:

`[math]x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}[/math]`

Another example (definition of derivative):

`[math]f^\prime(x)\ = \lim_{\Delta x\to0}\frac{f(x+\Delta x)-f(x)}{\Delta x}[/math]`

Another example:

`[math]e^x=\sum_{n=0}^\infty\frac{x^n}{n!}[/math]`

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**ganesh****Administrator**- Registered: 2005-06-28
- Posts: 23,082

Great....

It would take some time to be familiar with the codes

It is no good to try to stop knowledge from going forward. Ignorance is never better than knowledge - Enrico Fermi.

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

good work! thanks a lot!

Offline

**Zach****Member**- Registered: 2005-03-23
- Posts: 2,075

Boy let me tell you what:

I bet you didn't know it, but I'm a fiddle player too.

And if you'd care to take a dare, I'll make a bet with you.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,657

Great! This can be the place to test stuff (the "sandbox") - if it loads really slowly we will know it is the math tag doing it. (Well, we may not know because our browsers will cache the results, but a new visitor may see it load slowly)

Offline

**Zach****Member**- Registered: 2005-03-23
- Posts: 2,075

The problem is; that your image writing CGI is really shoddy and the GIFs look bad.

Boy let me tell you what:

I bet you didn't know it, but I'm a fiddle player too.

And if you'd care to take a dare, I'll make a bet with you.

Offline

**justlookingforthemoment****Moderator**- Registered: 2005-05-26
- Posts: 2,161

But you have to admit...it's better than nothing Zach. Well done MathsIsFun!

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,657

The renderer isn't mine, it is "mimetex".

It is supposed to make formulas easier to present - so long as you can understand it and it doesn't take too long to render, then that are the first two criteria done. Fast is good, and mimetex seem to be reasonably fast.

Mimetex is fully self-contained, whilst other LaTeX renderers rely on 3 or 4 processes to complete the task (for example, arranging the letters and symbols, then outputting them to postscript using another package, then converting that to a gif using yet another package)

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

normal

large

*Last edited by kylekatarn (2007-02-02 01:18:32)*

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,657

normal

large

I tried with a capital "L"

Apparently I can recompile the tag and "upsize" it so that large is normal - would that be better?

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

latex tutorial @ here

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

MathsIsFun wrote:

normal

large

I tried with a capital "L"

Apparently I can recompile the tag and "upsize" it so that large is normal - would that be better?

"normal" is a bit small. **L**arge seems a nice size

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

normal

large

Large

LARGE

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

what's the minitex version the forum is running?

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

what's wrong with the following syntax:

It's valid latex. why is the forum's parser rejecting it?

*Last edited by kylekatarn (2005-09-17 07:57:07)*

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,657

This is the homepage for mimetex: http://www.forkosh.com/mimetex.html

If you have any suggestions about other renderers, I can have a look at them.

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

mimtex is nice, but somehow the MATH tag only alows single-line commands

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,657

I will happily try other renderers - I could have a "mathtest" tag to try them out, I just don't want slow ones. Slow is no fun for anyone.

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

why don't you talk with other admins?

for example, Valentin Vornicu from http://www.artofproblemsolving.com/Forum/

in that forum the latex support is very good. the main difference is that they use PHPBB instead of PUNBB(I really don't know what this means in terms of latex support)

*Last edited by kylekatarn (2005-09-18 03:24:38)*

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,657

Well, I have been researching, and have found a utility that can help. It takes "dvi" output and turns it into "png" in one step. This means that I may be able to use the standard "latex" program, (which creates "dvi"s). If I can crack this nut then we might have a better solution.

It could be CPU-intensive, so I would need to cache the answers (so it is only run once not every time someone looks at the page), maybe use the first 50 characters as an identifier, or something.

I will continue to investigate.

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

you can produce MD5 hashes to identify each file

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,657

You may have noticed I am playing with the tag at the moment.

Don't worry, I can revert back easily.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,657

A completely different method is now used for the math tag. They take longer to create using this method, but I cache the results, so it should be slow only once.

Are they pretty now?

(For those who know LaTeX, "\displaystyle" is the default format)

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

yes! very pretty!

:):):):):):):):)

*claps*

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

*Last edited by kylekatarn (2005-11-06 00:52:34)*

Offline