# Introducing LaTeX Math Typesetting

by chroot
Tags: introducing, latex, math, typesetting
 P: 419 Lets have a go.... $$2\pi\sqrt{l/g}$$ $$\gamma \equiv \frac{1}{\sqrt{1 - v^2/c^2}}$$ edit: After three attempts I got it to work!! [:)]
 PF Patron Sci Advisor Emeritus P: 10,400 Displaying vectors can be tricky. The default \vec LaTeX command produces a little arrow over the top of vectors, e.g. $$\lambda_j = \vec{\lambda} \cdot \vec{e}_j$$ If you'd prefer to make your vectors boldface, just redefine the \vec command. See the source for this image to see how the command is redefined. $$\renewcommand{\vec}[1]{\mbox{\boldmath  #1 }} \lambda_j = \vec{\lambda} \cdot \vec{e}_j$$ - Warren
 P: 657 does this always generate display mode, or can we make it do inline mode as well?
PF Patron
Emeritus
P: 10,400
 Originally posted by lethe does this always generate display mode, or can we make it do inline mode as well?
You mean, can you typeset your entire post in TeX and use  to set off the math?

- Warren
P: 657
 Originally posted by chroot You mean, can you typeset your entire post in TeX and use  to set off the math? - Warren
no, LaTeX has two modes, one for displaying equations inline (with $...$), where stuff is smaller, and another for display mode equations ($....$). the same equation will display differently depending on which you use. can we have access to both methods?
PF Patron
Emeritus
P: 10,400
 Originally posted by lethe no, LaTeX has two modes, one for displaying equations inline (with $...$), where stuff is smaller, and another for display mode equations ($....$). the same equation will display differently depending on which you use. can we have access to both methods?
In what way are equations displayed differently in these two modes? AFAIK, math is displayed the same way in between $$as in the displaymath environment. - Warren  P: 837 Display math: $$\sum_i x^i$$ (inline) math, $$\mbox{\sum_i x^i}$$, hacked P: 837  Originally posted by chroot In what way are equations displayed differently in these two modes? AFAIK, math is displayed the same way in between$$ as in the displaymath environment.
The 'displaymath' environment is the same as $$...$$, to show equations on a line by themselves, but $...$ is the 'math' environment, which is intended for equations inlined with other text.
 PF Patron Sci Advisor Emeritus P: 10,400 Ambi, Cool, I tried a few things and couldn't find anything that displayed differently! Using \mbox is a fine way to do it. - Warren
 PF Patron Sci Advisor Emeritus P: 10,400 If it becomes a serious wishlist item for a lot of people, I can consider adding some attributes like mode=displaymath or mode=inline to the [ tex ] tag. Otherwise, \mbox is the easiest way to accomplish it. - Warren
P: 657
 Originally posted by chroot Ambi, Cool, I tried a few things and couldn't find anything that displayed differently!
yeah, neither could i, because apparently the software doesn t recognize the inline mode commands...

 Using \mbox is a fine way to do it.
OK, good enough
PF Patron
Emeritus
P: 10,400
 Originally posted by lethe yeah, neither could i, because apparently the software doesn t recognize the inline mode commands...
No, I tried \mbox too -- but I tried y = mx + b, which looks the same in both environments, lol:

$$y = m x + b$$

$$\mbox{  y = m x + b  }$$

- Warren
P: 657
 Originally posted by chroot Otherwise, \mbox is the easiest way to accomplish it. - Warren
do we have the amsmath package? mbox is a little limited, (like it doesn t go into subscripts very well), and \text is better.
P: 657
 Originally posted by chroot No, I tried \mbox too -- but I tried y = mx + b, which looks the same in both environments, lol:
yeah, i think the only place where this makes a difference is for larger things like fractions, summations and integrations.
P: 837
 Originally posted by chroot If it becomes a serious wishlist item for a lot of people, I can consider adding some attributes like mode=displaymath or mode=inline to the [ tex ] tag. Otherwise, \mbox is the easiest way to accomplish it.
It seems to me that typing "\mbox{}" is still easier than typing "mode=inline" ...
 P: 837 Yes, we have amsmath; I only recently started using it, so I keep forgetting about it... However, if you're proposing \text as a replacement for \mbox in this instance ... $$\mbox{\sum_i x^i}$$ $$\text{\sum_i x^i}$$
P: 657
 Originally posted by lethe do we have the amsmath package? mbox is a little limited, (like it doesn t go into subscripts very well), and \text is better.
apparently not.
P: 657
 Originally posted by Ambitwistor Yes, we have amsmath; I only recently started using it, so I keep forgetting about it... However, if you're proposing \text as a replacement for \mbox in this instance ...
yes, it doesn t work... i assume that is because amsmath isn t loaded... or?

 Related Discussions Forum Feedback & Announcements 5 General Math 2 General Math 10 General Math 29 General Math 0