Math & ScienceSimple Question: When to use $...$ for scientific values

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
RiW
Posts: 29
Joined: Wed Sep 01, 2010 12:11 am

Simple Question: When to use $...$ for scientific values

Post by RiW »

Hi,

Just written my first report after teaching myself (basic) Latex from the wikibook. However, I still have a few questions which I was hoping people might be able to help me with.

When writing inline mathematical values and including the units, should you always or never use the math-mode? For instant, take the sentence:
The speed of light is 3 times 10 to the power of 8.

In Latex should it be:

Code: Select all

The speed of light is $3 \times 10 ^8$
OR

Code: Select all

The speed of light is 3 $\times$ 10$^8$
I suppose this is a general question and what I'm really asking is when writing technical reports, should numeric values and/or units be placed in the $....$ environment?

Many Thanks!
Last edited by RiW on Wed Sep 01, 2010 7:49 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

Simple Question: When to use $...$ for scientific values

Post by torbjorn t. »

The best way of writing units is, I think, the siunitx package. Your example could then be written

Code: Select all

The speed of light is \SI{3e8}{\metre\per\second}.
The \SI{}{}-command works both in math mode and normal text mode.
RiW
Posts: 29
Joined: Wed Sep 01, 2010 12:11 am

Re: Simple Question: When to use $...$ for scientific values

Post by RiW »

Fantastic - exactly what I was looking for thanks.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Simple Question: When to use $...$ for scientific values

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic acordingly as described in section 3 of the Board Rules (to be read before posting).


Best regards and welcome to the board
Thorsten
RiW
Posts: 29
Joined: Wed Sep 01, 2010 12:11 am

Re: Simple Question: When to use $...$ for scientific values

Post by RiW »

Apologies - have done this now & will repeat for future posts.

Thanks!
Post Reply