TeX on Webpage Forums: Implement, Compiler, Script?

  • Thread starter Thread starter -Job-
  • Start date Start date
AI Thread Summary
TeX functionality in forums can be implemented through various methods, often involving a combination of a TeX compiler and a PHP script to generate images from LaTeX code. Users have found success using MikTeX, which simplifies the compilation process, allowing for the generation of .dvi files that can be converted to PNG images using the dvipng tool. This two-step process is manageable, and users have successfully integrated it into their web applications. There is curiosity about whether there are more efficient implementations available for forum software. Overall, the discussion highlights practical solutions for integrating TeX into web platforms.
-Job-
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?
 
Physics news on Phys.org
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.
 
Yes, it's working!
 
Seems you solved your own problem.
 
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:
I want to thank those members who interacted with me a couple of years ago in two Optics Forum threads. They were @Drakkith, @hutchphd, @Gleb1964, and @KAHR-Alpha. I had something I wanted the scientific community to know and slipped a new idea in against the rules. Thank you also to @berkeman for suggesting paths to meet with academia. Anyway, I finally got a paper on the same matter as discussed in those forum threads, the fat lens model, got it peer-reviewed, and IJRAP...
About 20 years ago, in my mid-30s (and with a BA in economics and a master's in business), I started taking night classes in physics hoping to eventually earn the science degree I'd always wanted but never pursued. I found physics forums and used it to ask questions I was unable to get answered from my textbooks or class lectures. Unfortunately, work and life got in the way and I never got further the freshman courses. Well, here it is 20 years later. I'm in my mid-50s now, and in a...
Back
Top