How to Efficiently Integrate LaTeX Equations into Web Pages?

  • Context: LaTeX 
  • Thread starter Thread starter dave morgan
  • Start date Start date
  • Tags Tags
    Latex Web
Click For Summary

Discussion Overview

The discussion centers around methods for efficiently integrating LaTeX equations into web pages, particularly for educational purposes in fluid mechanics. Participants explore various tools and approaches for generating and displaying LaTeX content dynamically on websites.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant expresses a desire for a streamlined method to incorporate LaTeX equations into web pages, similar to the functionality on Physics Forums.
  • Another suggests using mimetex as a potential solution, providing links for further exploration.
  • A participant questions whether Physics Forums uses mimetex, noting its speed but also its lack of full compliance.
  • Concerns are raised about IT restrictions preventing the installation of mimetex, leading to a search for alternatives that require no new installations.
  • Latexrender is mentioned as a possible tool worth investigating, especially for those with MikTeX and ImageMagick installed locally.
  • A participant shares insights about the custom code used by Physics Forums, which combines standard LaTeX with a modified ps2img.
  • Another participant describes their integration of mimetex into a converter that generates images from LaTeX code, highlighting efficiency issues with the .cgi approach.
  • A suggestion is made to create a web-based editor for LaTeX that would streamline the process of generating images from LaTeX code.
  • A Linux program called tex2im is mentioned as another option for converting LaTeX into .png images.

Areas of Agreement / Disagreement

Participants express a variety of opinions on the best tools and methods for integrating LaTeX into web pages, with no consensus reached on a single solution. Some participants support mimetex, while others seek alternatives due to technical constraints.

Contextual Notes

Participants mention limitations related to IT policies that restrict the installation of certain software, as well as concerns about the efficiency and compliance of various tools discussed.

dave morgan
Messages
5
Reaction score
0
I'm doing some web-based college-level course design in fluid mechanics. I'd like an efficient way to incorporate LaTeX equations - preferably on the fly like PF does here. I can create the equations elsewhere (e.g., using TexPoint, PowerPoint and Miktex) and then insert them into my pages but it seems a laborious process.

Does anyone know how PF does it? Is it open-source, proprietory, available...?

Anyone have any other ideas on this?
 
Physics news on Phys.org
Not bad, is that what these forums use, mimeTex? It seems faster, though they say it's not 100% compliant.
 
Our IT dept is pretty "careful" (they won't even install a PHP engine) so I won't be able to get them to install mimetex. I was hoping (dreaming?) for something that would allow me just to write some LaTeX code and have an image generated and inserted into the page so that there is nothing "new" to scare our IT people. Maybe that's not possible?

Although not quite what I want, Latexrender seems worth invesigating since I have MikTeX and ImageMagick on my local machine.
 
The code for PF is custom-written, and is based on standard LaTeX coupled with a modified ps2img.

- Warren
 
I've incorporated mimeTex into my converter:
http://www.bloo.us/tex/services/
So now it can convert to .gif or .png
I have to say mimeTex is nice but it's not very feasible as .cgi
The way they suggest using mimeTex.cgi is to use it on image tags like:
Code:
<img src="../cgi-bin/mimetex.cgi?f(x)=\int_{-\infty}^xe^{-t^2}dt"
alt="" border=0 align=middle>
What this means is that:
. for large Latex documents your img tags can be pretty large.
. everytime you want to read the html file there is a call to the cgi script, unnecessary processing.
I used the .exe version and use it to save Latex into a gif only once and then link it statically. This is more efficient.
I want to put all these converters together and then write a web-based editor for latex. It will be able to convert to:
. gif
. png
. html
. mathml (xml)
. ps
. pdf
Obviously anyone can just download the respective converters and use them, but that's a pain (speaking from experience) because most of the time it's not straightforward how to install or run these, so i think my CSE department is going to like it, we'll see.
Anyway, getting to the question here, Dave what i suggest is have a main webpage with a text area. People can type text/html into this text area, being careful to have the Latex code in between the {tex}{/tex} tags. You would then have a button that submits this to the server, the server checks for any {tex} tags, removes them, processes the Latex code, generates the image, puts an <img> tag where the {tex} tag used to be and creates an html file which it saves locally.
Basically the very same thing as we have in the forums here. If you want a standalone application the idea would be the same. I think i could build such a standalone app pretty easily to tell you the truth, nothing outstanding. If you don't find a solution i may be able to help you.
 
Last edited by a moderator:
There is also a Linux program called tex2im that will convert Latex into .png images. Use google if you want to find it.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 8 ·
Replies
8
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 4 ·
Replies
4
Views
5K