Introducing LaTeX Math Typesetting

Click For Summary

Discussion Overview

The discussion centers around the introduction of LaTeX mathematical typesetting on Physics Forums, focusing on its implementation, usage, and examples. Participants explore how to effectively use LaTeX for mathematical expressions and share examples of LaTeX code.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • Warren introduces LaTeX typesetting, explaining its markup style and how to include LaTeX graphics in posts.
  • Some participants share additional examples of LaTeX code, demonstrating various mathematical expressions.
  • Warren invites suggestions for LaTeX packages to include, expressing concern about performance impacts from too many packages.
  • One participant inquires about using the LaTeX generator for personal web pages, prompting a discussion about server load and intended use.
  • Another participant expresses enthusiasm for practicing LaTeX by writing equations related to particle interactions.
  • A question arises about formatting subscripts in LaTeX, specifically how to create multi-line subscripts.
  • Participants provide tips on learning LaTeX, including quoting existing code to see how it is written and encouraging practice.
  • Warren reminds participants that clicking on LaTeX images reveals the source code, which can aid in learning.

Areas of Agreement / Disagreement

Participants generally agree on the usefulness of LaTeX for typesetting mathematics, but there are differing views on its application for personal use outside the forum, with some cautioning against it due to resource concerns.

Contextual Notes

Some participants express uncertainty about specific LaTeX formatting techniques and the potential performance implications of adding more packages to the forum's LaTeX capabilities.

  • #31
<br /> Hrm,~line~breaks \\<br /> don&#039;t~seem~to~work.<br />
 
Physics news on Phys.org
  • #32
All right, here's a new problem. How do I do this, but right?

<br /> \begin{array}{r l r l}<br /> u &amp;= \ln x \quad &amp; dv &amp;= x\,dx \\<br /> du &amp;= \frac{1}{x}\,dx &amp; v &amp;= \frac{1}{2} x^2<br /> \end{array}<br />
 
  • #33
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?
 
  • #34
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 separate columns.
 
  • #35
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:
  • #36
I was just hpoing to get something more inline with what's in my textbooks, but I suppose the font is more than adequate.
 
  • #38
Actually, you can specify that images should be centered vertically within the line of text they're in -- I'm working on getting that attribute into the image tags. Politics, shmolitics.

- Warren
 
  • #39
I just remembered that for simple annotations as that the sub and sup tags can be used :)
 
  • #40
Update!

The LaTeX code has been improved a bit. I know you guys have been frustrated with the ugliness of inline TeX, so I went ahead and improved that.

I have introduced a new LaTeX command, the \inline command. Whenever you want to include a graphic inline with your text, like \inline{C H_4} or \inline{G_\textrm{diffeo}} or \inline{y = mx + b}, you should use the \inline{...} construct. Remember: click the LaTeX images to see how they're implemented.

Of course, you can inline larger pieces of TeX too, like \inline{\frac{1}{\sqrt{1 - v^2/c^2}}} or even \inline{e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = \lim_{n\rightarrow\infty} (1+x/n)^n<br /> }. But if makes more sense to include larger graphics set apart from your text, like this:

\frac{1}{\sqrt{1 - v^2/c^2}}

e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = \lim_{n\rightarrow\infty} (1+x/n)^n

Note the difference in font sizing and layout between the normal and inlined graphics.

In addition, I have changed the TeX \vec command to boldface vectors. So feel free to use expressions like \inline{\vec{F} = m \vec{a}} to denote vector quantities.

Enjoy!

- Warren
 
  • #41
How do I get the arrows, then, if I want them?
 
  • #42
Originally posted by Hurkyl
How do I get the arrows, then, if I want them?
Hmmm well, I thought I knew how, but now I'm not so sure. I'll have to look around. Maybe Ambitwistor knows a trick to put a command that has been \renew'd back to its default behavior.

Also, I found this pdf of useful mathematical constructs, that goes a bit beyond what we already have:

http://amath.colorado.edu/documentation/LaTeX/Symbols.pdf

- Warren
 
  • #43
Originally posted by Ambitwistor
I don't know how to get a command back to its original behavior. You could try defining a new command to act like the original \vec before you redefine it. (Or else you could leave the original alone and define a new command to act like the bold version.)
Both are good ideas. Generally, boldfacing is the "proper" way to represent vectors. Unfortunately, TeX treats lowercase greek letters and uppercase greek letters differently, making it fairly complicated to just boldface any old character. I put the macro into the system so people wouldn't have to jump through hoops if they just wanted to make a boldface \inline{\vec \lambda}.

Maybe redefining \boldmath to work everywhere is the best approach here, leaving \vec alone.

- Warren
 
  • #44
I also just noticed that in IE6, the inline LaTeX images are a few pixels below the baseline of the text. In my preferred browser, Mozilla, they are exactly correct. Perhaps I need to tweak the site's style sheet to get the line spacing just right in all browsers. I'll have to think about it. In the meantime, everyone should switch to Mozilla Firebird!

- Warren
 
  • #45
Actually, scratch that -- when the font size is set to "Medium" in the view menu, it's just right in IE6 too. (whew) Are any of you experiencing inline LaTeX graphics that are NOT aligned properly with your text?

- Warren
 
  • #46
Also, Ambi, you LaTeX guru you,

Can you tell me why the font size is different between these two images?

\inline{<br /> \int_{a}^{b}} e^x dx<br /> }

\inline{<br /> e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = \lim_{n\rightarrow\infty} (1+x/n)^n<br /> }

Look at the e^x... does the integral sign somehow cause the font size to change, or what?

- Warren
 
  • #47
Originally posted by Hurkyl
How do I get the arrows, then, if I want them?

wouldn t it just be better to follow ams guidlines, and have \vec make an overline, and \mathbf make boldface? i much prefer boldface to arrows in print, but i don t see any reason to override ams defaults to get rid of arrows... they are not that bad...
 
  • #48
What about making a new tag, say, [ itex ] for inline tex? It gets annoying having to type [ tex ]\inline{x}[ /tex ] 10 times in a post!
 
  • #49
Your right it can be annoying, when I posted a load of inline text though, I just copied the commands onto the clipboard and pasted, changing the code between the inline brackets.
 
  • #50
Originally posted by Hurkyl
What about making a new tag, say, [ itex ] for inline tex? It gets annoying having to type [ tex ]\inline{x}[ /tex ] 10 times in a post!
Yeah, I was strongly considering this from the beginning. Next time Greg let's me on the site, I'll do that.

- Warren
 
  • #51
Okay guys, now [ itex ] ... [ /itex ] is equivalent to [ tex ]\inline{...}[ /tex ].

Have fun. :smile:

- Warren
 
  • #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:
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K