Latex for webpages - help wanted

  • LaTeX
  • Thread starter pervect
  • Start date
  • Tags
    Latex
In summary, the conversation is discussing the best and easiest way to convert latex equations into a format that can be used on a webpage. Various solutions are suggested, including using jpg or png files, downloading conversion programs, or taking a screenshot and pasting it into a graphics program. The equation in question is a part of a problem in the restricted three body problem and there are also suggestions for other conversion tools. One individual has modified a code to handle large images.
  • #1
pervect
Staff Emeritus
Science Advisor
Insights Author
10,302
1,472
The latex thread itself is getting long, and this question is enough different that I thought it deserved a thread of its own. I have some specific questions, I think they may be of some general interest as well.

Basically, the question is what is the best and/or easiest way to go from latex equations for short formulas to something that can be put into a webpage?

The ideal solution should work with all browsers - definitely both Internet Explorer and Mozilla - without plugins.

It seems to me that most websites use jpg's. .png's have been mentioned as another possibility.

The second question is how to generate them. I tried downloading the program Latex2Rtf that was recommended in the latex thread. Unfortunately, running included "friendly shell" only yields the error message "out of environment space". Attempting to run the program manually yields some sort of .rtf file, but viewing this file with either wordpad or with Mozilla does not give me a readable equation.

The particular equation that I'm using as a test case is

[tex]
J = -{{\it xdot}}^{2}-{{\it ydot}}^{2}+{w}^{2} \left( {x}^{2}+{y}^{2}
\right) +{\frac {2\,G{\it m1}}{\sqrt { \left( x+{\frac {{\it m2}\,d}
{{\it m1}+{\it m2}}} \right) ^{2}+{y}^{2}}}}+{\frac {2\,G{\it m2}}{
\sqrt { \left( x-{\frac {{\it m1}\,d}{{\it m1}+{\it m2}}} \right) ^{2}
+{y}^{2}}}}
[/tex]

If any of the formatting looks odd, it wasn't manually generated, but was the output of (an old version of) Maple's latex() command. It's not absolutely necessary that the conversion program be able to handle Maple's output, but it would definitely be nice.

I see that for some reason or other this formula gets truncated here, at least in the preview. My fplatex does apparently generate a good .dvi and .pdf file, though.

I've been struggling through the latex documentation trying to get my fplatex package to do the job, but I'm really not sure what needs to be done, so far I've had no success.

On a related note might be the best latex package to use. fplatex is hoging a lot of disk space, but what parts of it I've gotten to work seem to work very well. But I haven't gotten any of the web-related parts to work :-(.

BTW, this particular expression is for one of the invariants of the restricted three body problem, usually called the Jacobi intergal, though it could also be recognized by other names - it's basically a multiple of the energy function, which is the Hamiltonian of the problem expressed with different variables. Not that that matters to the specific question as hand, it's just some background info for anyone who is curious :-).
 
Physics news on Phys.org
  • #2
Simply take a screen shot of your Latex created work and cut and paste into your graphics program. Paint Shop Pro 7 works great for this !

Vern
 
  • #3
Vern said:
Simply take a screen shot of your Latex created work and cut and paste into your graphics program. Paint Shop Pro 7 works great for this !

Vern

Thanks! This isn't the most elegant solution, perhaps, but it sounds like it should work, and I've been a bit frustrated that something so seemingly simple should eat up so much time.
 
  • #4
  • #5
I have modified PF's code to be able to handle these extra-large images:

[tex]
J = -{{\it xdot}}^{2}-{{\it ydot}}^{2}+{w}^{2} \left( {x}^{2}+{y}^{2}
\right) +{\frac {2\,G{\it m1}}{\sqrt { \left( x+{\frac {{\it m2}\,d}
{{\it m1}+{\it m2}}} \right) ^{2}+{y}^{2}}}}+{\frac {2\,G{\it m2}}{
\sqrt { \left( x-{\frac {{\it m1}\,d}{{\it m1}+{\it m2}}} \right) ^{2}
+{y}^{2}}}}
[/tex]

- Warren
 

1. What is Latex for webpages?

Latex for webpages is a markup language that allows for the creation of mathematical equations, symbols, and formulas on webpages. It is based on the Latex typesetting system, which is commonly used in academic and scientific writing.

2. How is Latex for webpages different from regular HTML?

Latex for webpages is specifically designed for mathematical and scientific content, while HTML is a more general markup language used for creating webpages. Latex for webpages offers more advanced features for displaying mathematical equations and symbols, making it a better choice for scientific websites.

3. Is Latex for webpages difficult to learn?

It can be challenging to learn Latex for webpages, especially for those who are not familiar with the Latex typesetting system. However, there are many online resources and tutorials available to help users learn the language.

4. Can Latex for webpages be used on all browsers?

Yes, Latex for webpages can be used on all modern web browsers. However, some older browsers may not support the language, so it is important to test the compatibility of your webpage before publishing it.

5. How can I incorporate Latex for webpages into my website?

You can incorporate Latex for webpages into your website by including the necessary code in your HTML document. There are also plugins and libraries available that can make it easier to use Latex for webpages on your website.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
275
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
2K
Back
Top