Efficient LaTeX for web pages?

  • LaTeX
  • Thread starter dave morgan
  • Start date
  • Tags
    Latex Web
In summary, PF does LaTeX equations on the fly using ps2img andLatexrender. Latexrender is a program that converts Latex into images. There is also a Linux program tex2im that will do the same.
  • #1
dave morgan
5
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
  • #3
Not bad, is that what these forums use, mimeTex? It seems faster, though they say it's not 100% compliant.
 
  • #4
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.
 
  • #5
The code for PF is custom-written, and is based on standard LaTeX coupled with a modified ps2img.

- Warren
 
  • #6
I've incorporated mimeTex into my converter:
http://www.bloo.us/tex/services/ [Broken]
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:
  • #7
There is also a Linux program called tex2im that will convert Latex into .png images. Use google if you want to find it.
 

1. What is LaTeX and why is it used for web pages?

LaTeX is a typesetting system used for creating documents and web pages. It is popular among scientists and researchers because it allows for the creation of professional-looking documents with complex equations and mathematical symbols.

2. How can I make my LaTeX documents more efficient for web pages?

To make your LaTeX documents more efficient for web pages, you can use online tools or packages that convert LaTeX code into HTML code. This will make your documents more accessible and easier to view on the web.

3. Can I use LaTeX for all types of web pages?

While LaTeX is a powerful tool for creating scientific and technical documents, it may not be suitable for all types of web pages. Its focus on precise formatting and equations may not be necessary for simpler web pages.

4. Are there any limitations to using LaTeX for web pages?

One limitation of using LaTeX for web pages is that it may not be compatible with all web browsers. Some browsers may not support the rendering of complex equations and symbols, making the page difficult to read for some users.

5. Are there any tips for optimizing LaTeX for web pages?

One tip for optimizing LaTeX for web pages is to use a responsive design that adjusts to different screen sizes. Additionally, avoiding excessive use of complex equations and symbols can improve the loading speed and accessibility of your web page.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
223
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
12K
  • Programming and Computer Science
Replies
3
Views
268
Replies
2
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Back
Top