Introducing LaTeX Math Typesetting

  • Thread starter chroot
  • Start date
  • #26
841
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.
 
  • #27
chroot
Staff Emeritus
Science Advisor
Gold Member
10,226
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
 
  • #28
chroot
Staff Emeritus
Science Advisor
Gold Member
10,226
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
 
  • #29
653
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
 
  • #30
chroot
Staff Emeritus
Science Advisor
Gold Member
10,226
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
 
  • #31
653
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.
 
  • #32
653
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.
 
  • #33
841
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" ...
 
  • #34
841
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]
 
  • #35
653
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.
 
  • #36
653
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?
 
  • #37
653
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?
 
  • #38
653
0
Originally posted by lethe
. i assume that is because amsmath isn t loaded... or?
it seems that amsmath is loaded after all.
 
  • #39
chroot
Staff Emeritus
Science Advisor
Gold Member
10,226
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
 
  • #40
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,916
19
[tex]
Hrm,~line~breaks \\
don't~seem~to~work.
[/tex]
 
  • #41
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,916
19
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]
 
  • #42
653
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?
 
  • #43
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,916
19
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.
 
  • #44
841
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:
  • #45
841
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]
 
  • #46
jcsd
Science Advisor
Gold Member
2,090
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:
  • #47
841
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.
 
  • #48
jcsd
Science Advisor
Gold Member
2,090
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.
 
  • #50
841
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 on Introducing LaTeX Math Typesetting

  • Last Post
Replies
2
Views
1K
Replies
1
Views
5K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
8
Views
14K
Replies
14
Views
2K
  • Last Post
Replies
10
Views
8K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
9
Views
886
Replies
2
Views
4K
Replies
7
Views
1K
Top