TeX on Webpage Forums: Implement, Compiler, Script?

  • Thread starter -Job-
  • Start date
In summary, The forums implement TeX functionality through a PHP script that calls a compiler for TeX, resulting in images that are linked to posts. The compiler used is MikTeX, which can be called from a PHP or ASP.NET script. To convert the output file from a .dvi to an image, dvipng is used. This is a two step process, but it is doable. The poster also found a way to implement TeX in a full editor for their independent study class.
  • #1
-Job-
Science Advisor
1,158
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
  • #2
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.
 
  • #3
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.
 
  • #4
Yes, it's working!
 
  • #5
Seems you solved your own problem.
 
  • #6
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:

1. What is TeX and how is it used on webpage forums?

TeX is a typesetting system designed for formatting scientific and mathematical documents. This system is often used on webpage forums to allow for the inclusion of complex equations and mathematical expressions in posts and comments.

2. What is the process for implementing TeX on a webpage forum?

The implementation of TeX on a webpage forum involves installing a TeX distribution and a JavaScript library such as MathJax on the server. This allows the forum to render TeX code into mathematical expressions on the user's browser.

3. What is a compiler and how does it relate to TeX on webpage forums?

A compiler is a program that translates human-readable code into machine-readable code. In the context of TeX on webpage forums, a compiler is used to convert TeX code into HTML and CSS, allowing for the proper rendering of mathematical expressions on the webpage.

4. Are there any limitations to using TeX on webpage forums?

One limitation of using TeX on webpage forums is that it may not be supported by all browsers. Additionally, the use of TeX may increase the loading time of the webpage. It is also important to note that not all forum users may be familiar with TeX, and thus may have difficulty understanding and responding to posts that utilize it.

5. Can TeX be used on all types of webpage forums?

In general, TeX can be used on most webpage forums as long as the necessary software is installed on the server. However, some forums may have limitations on the types of scripts and code that can be used, so it is best to check with the forum's guidelines before implementing TeX on a particular forum.

Similar threads

  • Programming and Computer Science
Replies
7
Views
439
Replies
6
Views
1K
Replies
2
Views
863
  • STEM Academic Advising
Replies
5
Views
1K
  • Feedback and Announcements
Replies
21
Views
2K
Replies
1
Views
793
  • Programming and Computer Science
Replies
14
Views
2K
  • Special and General Relativity
Replies
6
Views
1K
  • Sticky
  • Quantum Physics
Replies
1
Views
5K
Back
Top