PDA

View Full Version : What are the chances we can get a LaTeX preprocessor for 2+2 posts?


Borodog
12-06-2006, 10:47 PM
Just wondering. Some admin should implement a latex2html layer in the page renderer. That would rock and stuff.

Phil153
12-06-2006, 11:16 PM
You could always talk to the ubbthreads people, there's probably something like this floating around there.

Metric
12-07-2006, 12:25 AM
Wow. Great idea. That would definately take things to another level.

Borodog
12-07-2006, 12:51 AM
[ QUOTE ]
Wow. Great idea. That would definately take things to another level.

[/ QUOTE ]

Done!

http://i27.photobucket.com/albums/c153/Borodog/MadeYouLook.gif

<font color="white"> Just kidding. </font>

evank15
12-07-2006, 05:05 AM
I would definitely be in favour of this. A physics forum I post on supports latex and it really helps along discussion.

thylacine
12-07-2006, 11:45 AM
[ QUOTE ]
[ QUOTE ]
Wow. Great idea. That would definately take things to another level.

[/ QUOTE ]

Done!

http://i27.photobucket.com/albums/c153/Borodog/MadeYouLook.gif

<font color="white"> Just kidding. </font>

[/ QUOTE ]

How did you do that? Oh wait, that's not LaTeX! That's just an image. /images/graemlins/frown.gif

Borodog
12-07-2006, 01:48 PM
Yeah, it was kind of mean. But after three martinis, also quite funny. /images/graemlins/wink.gif

But, actually, that was LaTeX at one time; it's a screen capture from my dissertation. I guess that's the best solution for now. But a latex2html layer would [censored] rock hard.

hmkpoker
12-07-2006, 02:59 PM
If I may ask a dumb question, what is a LaTeX preprocessor?

Borodog
12-07-2006, 03:09 PM
LaTeX is a typesetting language, similar to HTML, except that rather than a "hypertext" markup language, it is a typsetting markup language, and its particular strength is mathematics.

Normally one writes their documents, say an article or book manuscript, in plain text using LaTeX markup, like this:

<font class="small">Code:</font><hr /><pre>\begin{equation}
\mu_n = \min_{\substack{u_1,\ldots, u_{n-1}\in H}} m(u_1,\ldots, u_{n-1}) \label{eqn20}
\end{equation}
</pre><hr />

Then you compile your document, which produces something akin to an "executable" document, which really means that it is simply ready to be rendered, either by a program that will display it on the screen, or to a postscript file, or pdf file, whatever.

LaTeX2HTML compiles LaTeX source into web pages, an automagically renders the mathematics into images, like this:

http://i27.photobucket.com/albums/c153/Borodog/img12.png

So what I would like to see would be an implementation that went like this:

<font class="small">Code:</font><hr /><pre>\mu_n = \min_{\substack{u_1,\ldots, u_{n-1}\in H}} m(u_1,\ldots, u_{n-1}) </pre><hr />

The ubb post processing could pick off the latex tags, run the code within through LaTeX2HTML to render an image, host it locally, and inline the image reference into the post. It would actually be fairly simple; LaTeX2HTML is all perly and everything.

That would give me a tremendous stiffy.

Ratamahatta
12-11-2006, 02:14 PM
Can you give an example of a forum that has a LaTeX preprocessor? I know I saw one once, but can't remember where.

Borodog
12-11-2006, 02:29 PM
I've never seen one, which is really sort of strange, because it would definitely be (relatively) simple to implement.

jogsxyz
12-11-2006, 07:00 PM
Looks wonderful. Would be nice if subscripts were allowed. Have seen them on other forums.

jason1990
12-11-2006, 07:08 PM
[ QUOTE ]
Can you give an example of a forum that has a LaTeX preprocessor? I know I saw one once, but can't remember where.

[/ QUOTE ]
http://www.physics.ohio-state.edu/grad/f...dd7f2d18c0b1b9e (http://www.physics.ohio-state.edu/grad/forums/viewtopic.php?p=12&amp;sid=02fa501692cdc00c2dd7f2d18c0 b1b9e)

thylacine
12-11-2006, 07:27 PM
t^es_ti^{n_g}

oh well /images/graemlins/frown.gif

Borodog
12-11-2006, 08:55 PM
[ QUOTE ]
[ QUOTE ]
Can you give an example of a forum that has a LaTeX preprocessor? I know I saw one once, but can't remember where.

[/ QUOTE ]
http://www.physics.ohio-state.edu/grad/f...dd7f2d18c0b1b9e (http://www.physics.ohio-state.edu/grad/forums/viewtopic.php?p=12&amp;sid=02fa501692cdc00c2dd7f2d18c0 b1b9e)

[/ QUOTE ]

Oh. My God.

This is just cruel. Why would you show me this if I can't have it? What kind of soulless bastard are you? /images/graemlins/frown.gif

evank15
12-11-2006, 09:01 PM
http://physicsforums.com/showthread.php?t=8997

sexy time.

CheckRaise
12-11-2006, 09:21 PM
[ QUOTE ]
http://physicsforums.com/showthread.php?t=8997

sexy time.

[/ QUOTE ]
I was just gonna post this site, 2+2 could definitely use something like that.

Borodog
12-11-2006, 09:49 PM
Ah, wicked cool:

http://i27.photobucket.com/albums/c153/Borodog/test.png

thylacine
12-11-2006, 09:58 PM
[ QUOTE ]
Ah, wicked cool:

http://i27.photobucket.com/albums/c153/Borodog/test.png

[/ QUOTE ]

[ QUOTE ]
Ah, wicked cool:

[i.m.a.g.e]http://i27.photobucket.com/albums/c153/Borodog/test.png[/i.m.a.g.e]

[/ QUOTE ]

Stop doing that!! /images/graemlins/mad.gif

Borodog
12-11-2006, 10:16 PM
No, no! Sorry!

I wasn't trying to trick you. I found a command line tool that will render small latex docs straight to pngs (should do gifs, but that part appears busted).

It's a perl script called textogif. You need a latex install, plus netpbm, etc.

Seems like a solid workaround if we can't have latex capability built right in.

Borodog
12-11-2006, 10:19 PM
Here's the latex file it was generated from. The beginning and end are boilerplate; the bit in green is the equation.

\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}

\begin{displaymath}
<font color="green">\int H(x,x')\psi(x')dx' = -\frac{\hbar^2}{2m}\frac{d^2}{dx^2}
\psi(x)+V(x)\psi(x) </font>
\end{displaymath}

\end{document}

Metric
12-12-2006, 07:38 AM
Interesting -- I may have to use that, if I ever get around to setting up a photobucket account.

MelchyBeau
12-13-2006, 01:19 AM
I think if you really want to use LaTex for 2+2 you should ask in ATF. YOu might have a better shot