How do Physics Forums implement TeX rendering?

  • Thread starter -Job-
  • Start date
5 replies · 4K views · last reply
Science Advisor
Messages
1,152
Reaction score
4
How do thse forums implement the TeX functionality? Did it come with the vBulletin software or is it separate? I want to get a TeX tool on my server but i haven't a lot of experience with it. I assume that, in these forums, there is a compiler for TeX which is called by a PHP script producing images which are then linked to the respective posts. Is this the case or is there an actual PHP based TeX compiler script?
 
After a lot of searching and experimenting i ended up downloading MikTeX (for windows), from www.miktex.com. Compiling is a as simple as:
latex -job-name=<output file's name> <input file's name> -output-directory=<out put directory>

So now i should be able to call this from a PHP or ASP.NET script and i'll be all set. :smile:
Except of course that it outputs as a .dvi file, and i want an image, but i'll get around it.
 
Yes, there is a dvipng tool which builds a png image from the dvi file. It comes with MikTex, so no extra files to install, you call it with:
dvipng <path to input dvi file> -o <path to output file>

So it's a two step process, but it's doable. How cool.
 
I'm still curious how these boards implement it. I think there must be an easier way. For those who are curious, this is what i have:
http://www.bloo.us/tex/services/previewer.aspx
It works with the Latex found in posts throughout these forums. I'm thinking of doing a full LaTex editor this coming semester in my independent study class.
 
Last edited by a moderator: