Register to reply

Latex vector notation.

by IlyaZ
Tags: latex, notation, vector
Share this thread:
IlyaZ
#1
Sep20-07, 07:41 AM
P: 17
1. The problem statement, all variables and given/known data
a. How do I write vectors bold within displaymath and frac. I want Phi, r and r_1 bold. But get G M_1 bold as well = bad.
b. How do I use arrows instead of the bold notation?

3. The attempt at a solution
\begin{displaymath}
a1. textbf{\Phi(r)} = -\frac{G M_1}{| textbf{r}-textbf{r_1} |}
\end{displaymath}
a2. \bf{\Phi}(\bf{r}) = -\frac{G M_1}{| \bf{r}-\bf{r_1} |}
Phys.Org News Partner Science news on Phys.org
An interesting glimpse into how future state-of-the-art electronics might work
Tissue regeneration using anti-inflammatory nanomolecules
C2D2 fighting corrosion
Timo
#2
Sep20-07, 08:13 AM
P: 321
Arrows: \vec : [tex]\vec \Phi ( \vec r) = -\frac{G M_1}{| \vec{r}-\vec r_1 |} [/tex]
Bold: \mathbf : [tex]\mathbf{\Phi}( \mathbf{r}) = -\frac{G M_1}{| \mathbf{r}-\mathbf{r_1} |} [/tex]

I don't think you really want the potential to be a vector, but that's what your code implied, so I kept it.
D H
#3
Sep20-07, 08:34 AM
Mentor
P: 15,157
Quote Quote by IlyaZ View Post
a. How do I write vectors bold within displaymath and frac. I want Phi, r and r_1 bold. But get G M_1 bold as well = bad.
You get other bad stuff as well using \textbf. Don't use it in math mode.

\textbf{\Phi(r)} = -\frac{G M_1}{| \textbf{r}-\textbf{r_1} |}
[tex]\textbf{\Phi(r)} = -\frac{G M_1}{| \textbf{r}-\textbf{r_1} |}[/tex]

\bf doesn't work at all:
\bf{\Phi}(\bf{r}) = -\frac{G M_1}{| \bf{r}-\bf{r_1} |}
[tex]\bf{\Phi}(\bf{r}) = -\frac{G M_1}{| \bf{r}-\bf{r_1} |}[/tex]

Timo suggested \mathbf, but that doesn't work on some things.
If you have access to the AMSLaTeX macros, (and you should), use \boldsymbol.

\boldsymbol{\Phi}(\boldsymbol{r}) = -\frac{G M_1}{| \boldsymbol{r}-\boldsymbol{r}_1 |}
[tex]\boldsymbol{\Phi}(\boldsymbol{r}) = -\frac{G M_1}{| \boldsymbol{r}-\boldsymbol{r}_1 |}[/tex]

b. How do I use arrows instead of the bold notation?
Use \vec.

An even better solution is to define your own vector macro that formats vectors the way you want them to appear. For example,
\newcommand{\vect}[1]{\boldsymbol{#1}}
Then when someone tells you to format your vectors with arrows instead you can simply change that one macro.
\newcommand{\vect}[1]{\vec{#1}}
Bold symbols are used for things other than vectors (matrices, for example). A global search-and-replace is not a good idea.

IlyaZ
#4
Sep20-07, 09:01 AM
P: 17
Latex vector notation.

Thanks, that works great!


Register to reply

Related Discussions
Bra-ket notation in latex Quantum Physics 4
Latex - how to do Dirac slash notation Math & Science Software 2
Unit vector notation Introductory Physics Homework 2
Vector calculus Notation Calculus 13
Derivatives in Vector Notation Calculus & Beyond Homework 17