Introducing LaTeX Math Typesetting

In summary, Physicsforums.com has introduced the addition of LaTeX mathematical typesetting to their forum software. This professional-grade typesetting system allows for pleasing mathematical presentation and can be included in any post on the forum. Users can include LaTeX graphics by using the [ tex ]...[ /tex ] or [ itex ]...[ /itex ] tags, with the latter being used for inline graphics. The forum provides a pdf file and symbol reference for the most useful LaTeX commands, symbols, and constructs. The amsmath package is also available for more information. Examples of various techniques are provided, including subscripts, superscripts, and equations. Users can also use the [ tex usepackage= ] tag to include additional packages.
  • #106
Originally posted by lethe
can we make feynman diagrams?
Not yet. I have considered adding the feynmf package, but, since it uses metafont, it would involve adding an additional stage to the image generation process. I'm not sure I want to go through all that trouble!

- Warren
 
Physics news on Phys.org
  • #107
Originally posted by chroot
Not yet. I have considered adding the feynmf package, but, since it uses metafont, it would involve adding an additional stage to the image generation process. I'm not sure I want to go through all that trouble!

- Warren

stop being so lazy!

just kidding, chroot.

actually, i just tried to get feynmf working on my computer, and failed. grr...

so i can sympathize.
 
  • #108
Just wondering!

[tex]\ddot{\smile}}[/tex]
 
  • #109
I seem to be having a problem generating "n choose m"

Let's see if it works better here

[tex]x=({\colv{n}{m}})[/tex]

Did that work?
 
  • #110
What's this? The sample I used as my template before just used the \colv command to line up two expressions over each other, but if I click the sample above that, I se a \newcommand statement that uses an array construct. Aha! Let's see if I can do that myself, as in


[tex]\newcommand{\colv}[2] {\left(\begin{array}{c} #1 \\ #2 \end{array}\right)}X = {\colv{n}{m}}[/tex]

I hope that does the trick!
 
  • #111
Yes! Hallelluah! Now, let's see if that new command works as the first nonprintable line in a post and applies throughout it.

no, it's a transient macro. It has to go on every tex statement and gets forgotten on the /tex. Too bad.

[tex]\newcommand{\colv}[2] {\left(\begin{array}{c} #1 \\ #2 \end{array}\right)}\colv{n}{m} = \frac{n!}{(n-m)!m!}[/tex]

[tex]\newcommand{\colv}[2] {\left(\begin{array}{c} #1 \\ #2 \end{array}\right)}\colv{n}{m} = \colv{n}{n-m}[/tex]

Plus, it is so easy to mistype a brace as a parentheses! I hate it when that happens.

But, at least that's one problem down. Onwards to the prefix superscript next.
 
Last edited:
  • #112
If you want choose notation, just use

[tex]\binom{n}{m}=\binom{n}{n-m}[/tex]
 
  • #113
This is a test - and a place to make experimental edits. I'll remove most of this post and post it with explanatory comments in the general math folder later.

Editing a long post doesn't always work (get a lot of "website not responding" errors). Let's see if shortening the post helps.

tbd
 
Last edited:
  • #114
You know, it doesn't all have to be written on one line.
 
  • #115
Originally posted by Hurkyl
You know, it doesn't all have to be written on one line.

Perhaps not, but it's been a fun (and frustrating!) exercise to learn LaTex, and get it to do exactly what I want it to. If I make compromises before I learn how to do it, I'll never learn what it's capable of.
 
  • #116
Originally posted by master_coda
If you want choose notation, just use

[tex]\binom{n}{m}=\binom{n}{n-m}[/tex]

Thanks, Coda. That's much easier!
 
  • #117
I mean your actual LaTeX source code can be written across several lines, making it easier to read sometimes.
 
  • #118
Okay, back to experimenting/debugging tex:

Got it. Oh, happy day...er.. night.
 
Last edited:
  • #119
You do it like this:

[tex]3^n = \sum_{m=0}^n \left( \binom{n}{m} \cdot \sum_{p=0}^m \binom{m}{p} \right)[/tex]
 
  • #120
Originally posted by master_coda
You do it like this:

I see. The \left and \right are generic, and you ave to supply the character specific delimiter following.

Thanks again!

I do wish LaTex had error messages, giving hints aout why it's parser is bailing out, but I guess that's a bit much to ask for. Ah well, if it was easy, anybody could do it. :smile:
 
Last edited:
  • #121
Originally posted by Bob3141592
I see. The \left and \right are generic, and you ave to supply the character specific delimiter following.

Thanks again!

I do wish LaTex had error messages, giving hints aout why it's parser is bailing out, but I guess that's a bit much to ask for. Ah well, if it was easy, anybody could do it. :smile:
That sort of output IS generated by the latex program itself -- but getting that parsed into the PHP output would be a bear, basically.

I also have to add the fact that LaTeX errors are usually pretty unhelpful anyway, so there doesn't seem to be much reason to provide it for the user.

- Warren
 
  • #122
I've seen &=& used, but I don't understand the difference it makes. Is there a simple explanation? What's the & do in general, if it has a general interpretation.

This stuff is great. Not easy, I must admit, but definitely worth it.
 
  • #123
Usually & acts as an alignment character. For example, in:

[tex]
\begin{align*}
D^{-\nu}e^{at}&=\frac{1}{\Gamma(\nu)}e^{at}\int_0^t x^{\nu-1}e^{ax}\;dx \\
&=E_t(\nu,a)
\end{align*}
[/tex]

the & character specifies how the columns are supposed to be lined up. Note that \\ specifies the end of each line.

The & character is also used to separate columns in a matrix. If someone is using &=& to line up their equations instead of &=, they may be using matrices to align equations.
 
  • #124
Just figuring this out...

[tex]y = a x^2 + b x + c[/tex]
[tex]x = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a}[/tex]
 
Last edited:
  • #125
hmmmm

[tex] d = \frac{1}{2}a t^2 [/tex]

[tex] \sum F = ma [/tex]

[tex] \lim_{x\rightarrow c} f(x) = L [/tex]

[tex] 0 \leq |x - c| \leq \delta [/tex]

[tex] |f(x) - L| \leq \epsilon [/tex]

[tex] F_g = G \frac{m_1 m_2}{d^2} [/tex]

[tex] this = fun [/tex]
 
  • #126
Let's give it a try (using TexAide):

[tex]\frac{{\sqrt s }}{{s - a^2 }}
[/tex]





[tex]\displaystyle{\int_2^4 {\left[ {8(t - 2)} \right]^{-0.5} dt = } \left[ {\frac{1}{{\sqrt 2 }}(t - 2)^{0.5} } \right]_2^4 = 1}[/tex]


With compliments to TeXaide.
 
Last edited:
  • #127
how do i go about installing such a thing on my discussion forum? any help much appreciated!
 
  • #128
TeXaide

Hello phoenixthoth,

#1.
Download TeXaide:
http://www.mathtype.com/en/products/TeXaide/

#2.
Type in an equation in TeXaide and copy it.

#3
Paste it in your message on the Physics Forum,then go to my previous message and click on quote,then you can see how it is done.

Delete all superfluous characters.


Best regards.
 
Last edited:
  • #129
Originally posted by Allegro
Hello phoenixthoth,

#1.
Download TeXaide:
http://www.mathtype.com/en/products/TeXaide/

#2.
Type in an equation in TeXaide and copy it.
Paste it in your message on the Physics Forum,between:
First type: [tex]\displaystyle{....}and finish with [/tex]
where ... is your equation.
Delete all superfluous characters.

#3.
Go to my previous message and click on quote,then you can see how it is done.

Best regards.

how do i go about installing such a thing on my discussion forum? any help much appreciated!

thanks for trying to help but that wasn't my question. let me try to be more careful.
0. i already know how to make equations appear on this forum.
1. i have my own discussion forum.
2. i want to install something that will enable me to do what i can do on this forum on that forum.

i tried mimetex (from http://www.forkosh.com/htdocs/mimetex.html), but I'm having trouble compiling their source files into a mimetex.cgi file. it would help trememdously to just have a copy of that cgi file in question so that i can put it on my server. when i tried compiling their source files, i got a bunch of errors that i suspect are related to the fact that I'm running windows or perhaps the compiler I'm using. I'm trying to get the anti-aliasing gif version to work by entering
cc -DAA mimetex.c gifsave.c -lm -o mimetex.cgi
but it gives lots of errors.

so if you know anything on how to install an equivalent gif generator that uses html, let me know. any help is appreciated!
 
  • #130
Oh [itex]no[/itex]! The inline [itex]TeX[/itex] no longer is aligned!
 
  • #131
What in the world are you doing? It works fine for me... [itex]\vec F = m \vec a[/itex]

And how about this? [itex]\TeX[/itex]

If you put random text in, though... [itex]hmmm who knows?[/itex]

- Warren
 
  • #132
It's because I've written superscripted normal text.
 
  • #133
Originally posted by Hurkyl
It's because I've written superscripted normal text.
Oh, of course... hmmm, yeah. There's really no way around that. :frown:

- Warren
 
  • #134
Originally posted by chroot
Oh, of course... hmmm, yeah. There's really no way around that. :frown:

- Warren

There really isn't any reason you would want superscripted text and tex in the same message anyway.
 
  • #135
I put a footnote in one of my messages. I had an itex formula in it, and I tend to put my footnote tags in superscripts1. Thus, the bug was discovered. :frown:



1: such as this one
 
  • #136
what is going on with TeX today? is it broken?

see this thread
 
  • #137
let's see if it works over here:

[tex]\int_M d\omega=\int_{\partial M}\omega[/tex]
 
  • #138
lethe, your link is apparently not valid. What is happening? As far as I know, [itex]\TeX[/itex] is working fine.

- Warren
 
  • #139
Originally posted by chroot
lethe, your link is apparently not valid. What is happening? As far as I know, [itex]\TeX[/itex] is working fine.

- Warren

this morning, it seemed like LaTeX wasn't working. i guess i linked to a post that i later deleted or something. i guess that is why the link i gave didn't work (although i don't think a broken anchor is usually enough to break a link, but whatever.)

anyway, try this link. look at matt grime's post near the bottom.

everywhere there should be a LaTeX image, intsead, you get "latex still being generated, please reload" messages. i was getting the same thing in my posts, which i later deleted in order to try to recify the problem.

at any rate, whatever the problem was, it seems to be fixed now, although you can still see the weird messages now.
 
  • #140
More misformatting

I can't figure out what's going on with this one (though I haven't tried a lot)

Using this theorem, if [itex]x^3 - x^2 - 8x + 12[/itex] has a rational root, then it can be written in the form [itex]p/q[/itex] where [itex]p \in \{1, -1\}[/itex] and [itex]q \in \{1, -1, 2, -2, 3, -3, 4, -4, 6, -6, 12, -12\}[/itex]. Only 12 possibilities to try, so if one exists you can find it by exhaustion. :smile:
 
Last edited by a moderator:

Similar threads

Replies
5
Views
2K
Replies
3
Views
1K
Replies
4
Views
2K
Replies
8
Views
2K
Replies
3
Views
933
Replies
2
Views
1K
Back
Top