# Introducing LaTeX Math Typesetting

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.

Staff Emeritus
Gold Member
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

Staff Emeritus
Gold Member
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

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

Staff Emeritus
Gold Member
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

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.

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.

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" ...

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}$$

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.

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?

chroot-

on the pdf how-to provided on the first post of this thread, it states that [ tex ] is equivalent to $...$ (which makes inline math mode), but i guess what we have discovered here, is that it is actually equivalent to $...$ (which makes display mode math).

perhaps the pdf can be updated?

Originally posted by lethe
. i assume that is because amsmath isn t loaded... or?
it seems that amsmath is loaded after all.

Staff Emeritus
Gold Member
Yes, amsmath & amssymb are in fact available.

The code you type into [ tex ] tags goes directly into a \begin{displaymath}...\end{displaymath} environment. This can be changed if necessary. I assumed the majority of users would be putting equations set apart from their text, but this may not be a good assumption. I believe \mbox effectively just steps out it without any downsides.

- Warren

Hurkyl
Staff Emeritus
Gold Member
$$Hrm,~line~breaks \\ don't~seem~to~work.$$

Hurkyl
Staff Emeritus
Gold Member
All right, here's a new problem. How do I do this, but right?

$$\begin{array}{r l r l} u &= \ln x \quad & dv &= x\,dx \\ du &= \frac{1}{x}\,dx & v &= \frac{1}{2} x^2 \end{array}$$

Originally posted by Hurkyl
All right, here's a new problem. How do I do this, but right?
i don t understand... what are you trying to do?

Hurkyl
Staff Emeritus
Gold Member
There's too much space to the left of the equal signs. $$u=\ln x$$ "should" be one entity instead of being spread over two seperate columns.

\begin{align} u &= \ln x \quad & dv &= x\,dx \\ du &= \frac{1}{x}\,dx & v &= \frac{1}{2} x^2 \end{align}

Last edited:
\begin{align} u &= \ln x \quad & dv &= x\,dx \\ du &= \mbox{\frac{1}{x}\,dx} & v &= \mbox{\frac{1}{2} x^2} \end{align}

jcsd
Gold Member
If I want to denote the real and complex sets, using one of the below fonts which looks better?

$$\mathbb{RC}\mathbbmss{RC}\mathds{RC}$$

edited to add: it doesn't look like we have the other two fonts. There must be someway of represintg the real and complex sets in this manner, as the first fonts don't really look right to me.

Last edited:
Well, like it or not,
$$\mathbb{RC}$$
is pretty much the standard way of doing it in TeX.

There are other fonts and macros you can install, like bbold, mathbbol, doublestroke, bbm, mathpazo, etc., which all provide variations that are preferred by various people, but it's probably not worth the effort.

jcsd