Introducing LaTeX Math Typesetting

  • Thread starter chroot
  • Start date
837
1
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.
 

chroot

Staff Emeritus
Science Advisor
Gold Member
10,166
34
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
 

chroot

Staff Emeritus
Science Advisor
Gold Member
10,166
34
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
 
656
0
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
 

chroot

Staff Emeritus
Science Advisor
Gold Member
10,166
34
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:

[tex]y = m x + b[/tex]

[tex]\mbox{ $ y = m x + b $ }[/tex]

- Warren
 
656
0
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.
 
656
0
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.
 
837
1
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" ...
 
837
1
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 ...

[tex]\mbox{$\sum_i x^i$}[/tex]
[tex]\text{$\sum_i x^i$}[/tex]
 
656
0
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.
 
656
0
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?
 
656
0
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?
 
656
0
Originally posted by lethe
. i assume that is because amsmath isn t loaded... or?
it seems that amsmath is loaded after all.
 

chroot

Staff Emeritus
Science Advisor
Gold Member
10,166
34
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
Science Advisor
Gold Member
14,845
17
[tex]
Hrm,~line~breaks \\
don't~seem~to~work.
[/tex]
 

Hurkyl

Staff Emeritus
Science Advisor
Gold Member
14,845
17
All right, here's a new problem. How do I do this, but right?

[tex]
\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}
[/tex]
 
656
0
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
Science Advisor
Gold Member
14,845
17
There's too much space to the left of the equal signs. [tex]u=\ln x[/tex] "should" be one entity instead of being spread over two seperate columns.
 
837
1
[tex]
\begin{align}
u &= \ln x \quad & dv &= x\,dx \\
du &= \frac{1}{x}\,dx & v &= \frac{1}{2} x^2
\end{align}
[/tex]
 
Last edited:
837
1
[tex]
\begin{align}
u &= \ln x \quad & dv &= x\,dx \\
du &= \mbox{$\frac{1}{x}\,dx$} & v &= \mbox{$\frac{1}{2} x^2$}
\end{align}
[/tex]
 

jcsd

Science Advisor
Gold Member
2,085
11
If I want to denote the real and complex sets, using one of the below fonts which looks better?

[tex]\mathbb{RC}\mathbbmss{RC}\mathds{RC}[/tex]

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:
837
1
Well, like it or not,
[tex]
\mathbb{RC}
[/tex]
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

Science Advisor
Gold Member
2,085
11
I was just hpoing to get something more inline with what's in my textbooks, but I suppose the font is more than adequate.
 
837
1
You might be able to hack in a smaller font, but there's no way around the subscript issue. The problem is that HTML doesn't know that the image is supposed to represent text with descenders in it, so it can't align the image's baseline with the normal HTML text surrounding it.
 

Related Threads for: Introducing LaTeX Math Typesetting

  • Last Post
Replies
10
Views
11K
  • Last Post
Replies
2
Views
11K
  • Last Post
2
Replies
29
Views
17K
  • Last Post
Replies
4
Views
1K
Replies
1
Views
11K
Replies
8
Views
694
Replies
6
Views
3K
Replies
1
Views
10K

Hot Threads

Recent Insights

Top