LaTeX Introducing LaTeX Math Typesetting

AI Thread Summary
Physics Forums has integrated LaTeX mathematical typesetting into its platform, allowing users to create visually appealing mathematical expressions using markup similar to HTML. Users can include LaTeX graphics in posts by wrapping their code in [tex] or [itex] tags for display or inline formatting, respectively. A PDF guide with essential LaTeX commands and symbols is available, along with links to additional resources. The community is encouraged to experiment with the system and share examples, while also being mindful of server load when generating graphics. This addition aims to enhance the clarity and professionalism of mathematical discussions on the forum.
  • #51
Okay guys, now [ itex ] ... [ /itex ] is equivalent to [ tex ]\inline{...}[ /tex ].

Have fun. :smile:

- Warren
 
Physics news on Phys.org
  • #52
Woot!
 
  • #53
Also, \vec now does \lambda_j = \vec{\lambda} \cdot \vec{e}_j while \mathbf does \lambda_j = \mathbf{\lambda} \cdot \mathbf{e}_j.

- Warren
 
  • #54
And ams math environments should work now too:

a + b + c + d + e + f<br /> +g+h+i+j+k+l+m+n

<br /> \begin{multline*}<br /> a + b + c + d + e + f\\<br /> +g+h+i+j+k+l+m+n<br /> \end{multline*}<br />

<br /> \begin{gather*}<br /> a_1 = b_1 + c_1\\<br /> a_2 = b_2 + c_2 - d_2 + e_2<br /> \end{gather*}<br />

- Warren
 
  • #55
Guide to using the amsmath package:

http://www.cds.caltech.edu/~dunbar/docs/amsldoc.pdf

- Warren
 
Last edited by a moderator:
  • #56
What are all the spacers available to us? (like '~' and '\,')

(and remember, I'm a LaTeX newbie, so mentioning what they're supposed to do is nice :smile: probably should go in the .pdf too)
 
  • #57
Is there a smaller triangle that goes well here? What's the command for the floor and ceiling functions? Am I spelling the command for omicron wrong, or is omicron identical to 'o' so there isn't a command?

\Delta x \triangle x
\Delta x \triangle x
 
Last edited:
  • #58
f(x + \Delta x) = f(x) + f&#039;(x) \Delta x + \varepsilon(\Delta x) \Delta x

The triangle seems a little on the big side to me.
 
  • #59
Yes, it's the letter delta; I want to use it as one notates a differential or a difference, as in \Delta x (my previous post is the theorem I wanted to state in a post; I copped out with \delta x but I prefer the capital delta).

When I write it by hand, I usually write the delta as the same height as a lower case letter... but now that I've checked some reference material, it seems that the full-size is the norm; ah well. I'd still like to know if I can make a half sized one should I want to in a post. :smile:
 
  • #62
\frac{\mathbb{N}}{\mathbb{N}}=\mathbb{N}why am I over here?

For some reason this image contains a lot of whitespace on my browser; the text is all on the right side of the message!
 
  • #63
This LaTeX seems to be missing the Greek letter "omicron."
 
  • #64
Originally posted by Loren Booda
This LaTeX seems to be missing the Greek letter "omicron."
All LaTeX is "missing" this character. The Greek omicron is exactly the same as the Roman 'o,' and thus has no special \omicron command. Just use 'o.' It's the same story with \Alpha and \Rho and so on.

- Warren
 
  • #65
Hurkyl,

I'm not exactly sure why that's happening. Apprently it's the \frac command that's doing it, coupled with the way I crop inline images. (Inline images are cropped differently from display-mode images, so that they appear at the right location vertically). I'll have to do some more thorough experimenting next time I'm on the site. In the meantime, don't inline \frac I guess.

You can also inline it manual-style like this: \mbox{ \Large $ \frac{\mathbb{N}}{\mathbb{N}}=\mathbb{N} $}. Doing so renders the image as inline-mode, but crops the image as display-mode (meaning it may not appear at the right position vertically). It works, but that's a bit ridiculous. I'll look into it next time I get the chance.

- Warren
 
  • #66
One should probably use \mathbb{N}/\mathbb{N} style fractions in inline text anyways, but a bug is still a bug!
 
  • #67
Originally posted by Hurkyl
One should probably use \mathbb{N}/\mathbb{N} style fractions in inline text anyways, but a bug is still a bug!

I agree with Hurkyl. fraction type \frac{\mathbb{N}}{\mathbb{N}}=\mathbb{N} should only be used in equation ( or eqnarray), but while writing along with text we should use \mathbb{N}/\mathbb{N}

cheers,
Nagaraj
/**********************/
VU3OGI is my HAM callsign
/**********************/
 
  • #68
any ideas why this isn t working?

<br /> \begin{multline*}<br /> \tan^n \theta=\tan^{n-2}\theta \tan^2 \theta\\ =\tan^{n-2}\theta(\sec^2\theta-1)=\tan^{n-2}\theta\sec^2\theta-\tan^{n-2}\theta<br /> \end{multline*}<br />
 
Last edited:
  • #69
Mainly because the environment is not called multiline, it's called multline (without the 'i'). Try this:

<br /> \begin{multline*}<br /> \tan^n \theta=\tan^{n-2}\theta \tan^2 \theta\\ =\tan^{n-2}\theta(\sec^2\theta-1)=\tan^{n-2}\theta\sec^2\theta-\tan^{n-2}\theta<br /> \end{multline*}<br />

- Warren
 
  • #70
Originally posted by chroot
Mainly because the environment is not called multiline, it's called multline (without the 'i'). Try this:

oops... i m an idiot.

thanks chroot.
 
  • #71
How do I make a script P, such as is typically used in the notation for a power set P(X)?
 
  • #72
Hi folks!

I'm just setting up a practice spot for myself here. Don't mind me. These will be changing/dissappearing as I get new thoughts, but feel free to watch my struggles.

<br /> M^2 = \left(<br /> \begin{array}{cc}<br /> M^2_{11} &amp; M^2_{18}\\<br /> M^2_{18} &amp; M^2_{88}<br /> \end{array}<br /> \right)<br />

<br /> M^2_{88} = \frac {1}{3} \left(4m^2_{K} - m^2_{\pi}\right)<br />

<br /> M^2_{11} = m^2_{\eta} + m^2_{\eta&#039;} - M^2_{88}<br />

<br /> M^2_{18} = - \sqrt{(M^2_{88} - m^2_{\eta})(m^2_{\eta&#039;} - M^2_{88})}<br />

<br /> \tan\theta_{P} = \frac {M^2_{88} - m^2_{\eta}}{M^2_{18}}<br />

Dang this is freakin' cool!

<br /> \begin{multline*}<br /> \eta = \eta_{8}\cos\theta_{P} - \eta_{1}\sin\theta_{P}\\<br /> \eta&#039; = \eta_{8}\sin\theta_{p} + \eta_{1}\cos\theta_{P}<br /> \end{multline*}<br />

<br /> \eta_{1} = \frac {u\bar{u} + d\bar{d} + s\bar{s}}{\sqrt{3}}, <br /> \eta_{8} = \frac {u\bar{u} + d\bar{d} - 2s\bar{s}}{\sqrt{6}}<br />

I just can't stop...

<br /> \nu_e<br />

<br /> \nu_e\bar<br />
 
Last edited:
  • #73
\neq

What would be the symbol for 'not equivalent to' and how would you represent it in latex?
 
Last edited:
  • #74
Wouldn't it just be a crossed equivalent sign (or is that stronger than 'not equivalent to'?)? which I can't seem to get that anyway.

\nequiv \notequiv
 
  • #75
thanks!

I was looking at a table of glyphs used in maths and it had that sign as 'not identical to' is that interchangable with 'not equivalent to' or can the sign mena both things?
 
  • #76
Wow this is awesome, but is there a sperate program or way that I can do the Math Typesetting offline or find it as a standard software? I would like to be able to type out some mathematical notes for my self since my hand writing is a bit sloppy and my notebook becomes incoherent...
 
  • #77
Originally posted by phnatomAI
Wow this is awesome, but is there a sperate program or way that I can do the Math Typesetting offline or find it as a standard software? I would like to be able to type out some mathematical notes for my self since my hand writing is a bit sloppy and my notebook becomes incoherent...

You can use MiKTeX if you use Windows. If you use Linux, your distro should already have TeX and LaTeX software.
 
  • #78
im kinda slow, andim not that advanced, so I am tryin lil things. but i like this thing, ima be the only person in my class with a fully typed physics report.


f_{x}=f\cos\theta
 
Last edited:
  • #79
Originally posted by master_coda
You can use MiKTeX if you use Windows. If you use Linux, your distro should already have TeX and LaTeX software.

I installed it but how do I use it? Do I just go to notepad and type up and save it as a .dvi file?
 
  • #80
Originally posted by phnatomAI
I installed it but how do I use it? Do I just go to notepad and type up and save it as a .dvi file?

You type it up in a regular text file, then save it with a .tex extension. Then, you need to compile it by typing "latex file" (no quotes, in Windows, at a DOS prompt, in the directory where the file is saved), where file.tex is the thing you just saved. This will generate a DVI file. With Miktex, you can then type "yap file", which opens the Yap DVI viewer.

Alternatively, you can output to a PDF file by typing "pdflatex file" at the prompt.
 
  • #81
Unfortunately, LaTeX has a rather stiff learning curve.

Fortunately, there are 4.9 gabillion webpages to help you out. Just google around for some sample documents.

- Warren
 
  • #82
can we make feynman diagrams?

\begin{fmfchar*}(40,25)<br /> \fmfleft{em,ep}<br /> \fmf{fermion}{em,Zee,ep}<br /> \fmf{photon,label=$Z$}{Zee,Zff}<br /> \fmf{fermion}{fb,Zff,f}<br /> \fmfright{fb,f}______<br /> \fmfdot{Zee,Zff}<br /> \end{fmfchar*}
 
  • #83
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
 
  • #84
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.
 
  • #85
Just wondering!

\ddot{\smile}}
 
  • #86
I seem to be having a problem generating "n choose m"

Let's see if it works better here

x=({\colv{n}{m}})

Did that work?
 
  • #87
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


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

I hope that does the trick!
 
  • #88
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.

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

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

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:
  • #89
If you want choose notation, just use

\binom{n}{m}=\binom{n}{n-m}
 
  • #90
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:
  • #91
You know, it doesn't all have to be written on one line.
 
  • #92
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.
 
  • #93
Originally posted by master_coda
If you want choose notation, just use

\binom{n}{m}=\binom{n}{n-m}

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

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

3^n = \sum_{m=0}^n \left( \binom{n}{m} \cdot \sum_{p=0}^m \binom{m}{p} \right)
 
  • #97
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:
  • #98
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
 
  • #99
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.
 
  • #100
Usually & acts as an alignment character. For example, in:

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

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.
 

Similar threads

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