How Can I Use Bold Face for Vectors in LaTeX?

  • LaTeX
  • Thread starter Simon Bridge
  • Start date
  • Tags
    Vectors
In summary, some people here are dissatisfied with the traditional arrowhead vector notation, and would like to see a more versatile notation.
  • #1
Simon Bridge
Science Advisor
Homework Helper
17,874
1,661
I don't know how much control admins have over how the tex parser here behaves.

Vectors can be typeset in LaTeX with the command \vec, which decorates the argument with a little arrow.
This was cute at first, but it doesn’t look very good, eg. inline [itex]\vec{r}[/itex], but especially in fractions. [tex]\frac{2\pi}{\vec{r}}[/tex]Don't get me wrong, it's not horrible ...
Textbooks use bold face for vectors, compare the above with; inline: [itex]\mathbf{r}[/itex], and in a fraction: [tex]\frac{2\pi}{\mathbf{r}}[/tex]...but I have to use the \mathbf to do it ... well OK, but let's have this as the default behavior of \vec ? I can set up [itex]\LaTeX[\itex] to do this as follows:
Code:
\let\oldhat\hat
\renewcommand{\vec}[1]{\mathbf{#1}}
\renewcommand{\hat}[1]{\oldhat{\mathbf{#1}}}
This also makes unit vectors (typeset with \hat) bold.

Maybe it's just what you're used to and it's all just cultural?
What do people think?
 
Physics news on Phys.org
  • #2
Personally, I prefer that students use arrowheads for vectors [and that they don't divide by vectors :-p].

Note that you can have macros between your PF-tex tags.
https://www.physicsforums.com/showthread.php?p=3620172#post3620172
I'm not sure if they persist between multiple tags in the same post... but a little experimentation to answer that.
 
  • #3
robphy said:
Note that you can have macros between your PF-tex tags.
https://www.physicsforums.com/showthread.php?p=3620172#post3620172
I'm not sure if they persist between multiple tags in the same post... but a little experimentation to answer that.

When I saw that post before I already experimented and found they persist between multiple tags in the same post. ;)
Then I used it for fun in a couple of posts.

For myself, I'd like to keep the option open what to use for vectors.
It depends on what the poster is used to. I respond in kind.
When I'm free to choose, I choose boldface, because that seems to be the standard, although I'm not aware yet of an official standard.
 
Last edited:
  • #4
ISO 31-11 describes the international standards for math notations ... the standard is bold-face and upright (i.e. not italic) for printing and an underscored tilde freehand. I know there are a lot of US folk who prefer the over-scored arrow ... ISO 31-11 has this as an alternate.

The APS Style and Notation Guide [pdf] for Physical Review reserves (p15) boldface (also not italic) for vectors.
AFAIK: you won't see the arrow notation in that journal.

Popular textbooks from Tipler to Halliday & Resnick use the boldface (not italic) for vectors...

I think the ISO, APS and text-book standards should be the default here.
Makes sense to stay consistent with the rest of Physics in Physics Forums?

[note: don't have to ditch the over-arrow vectors, just assign it to an alternate like \avec and \ahat.]
 
Last edited:
  • #5
Aside:
"\newcommand" is the Latex way of defining macros; "\def" is the old, plain TeX style, definition. Using "\newcommand" is far preferable, since \newcommand checks against existing definitions and generates an error message if a macro name is in use. By contrast, "\def" happily overwrites any existing definition; this may cause unexpected errors that are often hard to track down.
eg.
Code:
\newcommand{\bv}[1]{\mathbf{#1}}
\newcommand{\hv}[1]{\hat{\mathbf{#1}}}
\vec{a}=a\hat{a}, \;\;\;\; \bv{a}=a\hv{a}
... produces:[tex]
\newcommand{\bv}[1]{\mathbf{#1}}
\newcommand{\hv}[1]{\hat{\mathbf{#1}}}

\vec{a}=a\hat{a}, \;\;\;\; \bv{a}=a\hv{a}[/tex]
... meh: aesthetics!
 
Last edited:
  • #6
Simon Bridge said:
Popular textbooks from Tipler to Halliday & Resnick use the boldface (not italic) for vectors...

While it's true that textbooks used boldface for vectors,
there has been a move to use the arrowhead [possibly with boldface]
since students are unlikely to write a boldface character.

Note that the arrowhead is used in this edition of Tipler (5th ed, 2003)
http://bcs.whfreeman.com/tiplerphysics5e/content/cat_160/TiplerMoscaPhsics5ech38.pdf#page=7

The 9th edition of Halliday Resnick Walker (2010) uses arrowheads
http://books.google.com/books?id=aO-Xrlje7hMC (Preview the book and look for the section on electromagnetic waves and the Poynting Vector, near pg. 896)

The 8th edition (2010) of Serway and Jewett uses arrowheads and boldface.
http://books.google.com/books/about/Physics_for_Scientists_and_Engineers.html?id=6upvonUt0O8C (Preview the book, e.g. p. 76)

The 11th edition (2003) of Young and Friedman uses arrowheads and boldface
http://wps.aw.com/wps/media/objects/877/898586/topics/topic01.pdf\vec as the arrowhead [itex] \vec{v} [/itex] was [presumably] defined by Knuth.
Don't mess with that standard.
Alternates to that can be defined, optionally.

[itex]\mbox{my } 3c\!\!\!\!/[/itex]
 
Last edited by a moderator:
  • #7
Hmmm ... interesting, I have not the 2010 editions of these books.

Tipler 5th Ed (your example) also uses bold-face-italics with the arrow for vectors.

Perhaps a trend in text-book publishing?
How long have they been doing this for? It's been bf vectors in Tipler, for eg, for something like decades! Oh well... if popular textbooks are using bf+arrows, then perhaps consistency dictates we do the same?

APS updated their submission standard 2 years ago, and the template was updated in march 2010 ... still uses bold-face: no mention of the arrow form. May be interesting to compare the other journals people use here...

Knuth: I'll concede that the TeX/LaTeX defaults are a de-facto standard. I'll even concede that we don't want to rashly fiddle with the defaults (though some journals - APA for eg - radically alter them). Though I have a few observations which may be argued to weaken the supremacy of Knuth in the case of these forums:

1. Knuth was not a physicist
2. His math-typography reference works were divided on notation styles
3. He emphasized typographical rather than notation styles in the specs
4. He encourages changing the styles and altering his plan
5. He also advocates Computer Modern as the TeX font - do we use that?

I'm very sure the arrow form for \vec was not always there but am having trouble finding a concrete reference. I remember being surprised when it stopped giving me bf.

Leaves me with AMS and ISO standards to base my argument on - if physics standards are important here of course.

Interestingly the AMS reference cards list the vector under accents as over-arrow (math only) despite their actual journals asking for boldface.

Wikipedia uses boldface-upright... but also arrow-over in some diagrams.

Few contributors here are in the position that they will be submitting to journals any time soon, so using major journal standards would be overkill (though nice) ... the textbook argument was strongest but weakened above by the publishers just not playing ball the splitters!

It'll be interesting to see which way the publishers move. Is the bf+arrow thing a fad, here for the long-term, signalling a move to just arrows, or will it fade out.
Having used both now, I can live with either.

For now I'm prepared to rest my case.
 
  • #8
This is a bit of a non-debate using "proper" TeX or LaTeX because you can define a macro for whatever style you or your editor/publisher prefers.

The real problem is that PF Latex doesn't let you define global macros.

I haven't seen any arrows in engineering math for decades, but we all know that "real mathematicians" love inventing new notations even more than they love inventing new math :devil:
 
  • #9
The real problem is that PF Latex doesn't let you define global macros.
So you'd have to hack the style sheet or whatever the thingy is using to decide the style to use ... bummer!
 
  • #10
Regarding [itex ], indeed [itex] \frac{\vec{r}}{r^3} [/itex] looks nasty and quite unreadable. Just use \displaystyle before the \frac [itex] \displaystyle{\frac{\vec{r}}{r^3}} [/itex].
 
  • #11
[tex]\newcommand{\bv}[1]{\mathbf{#1}}
\newcommand{\hv}[1]{\hat{\mathbf{#1}}}[/tex]... and when you have more than one line? I'd normally do [itex]\vec{r}/r^3[/itex] for such fractions inline ... or I could write [itex]\frac{\bv{r}}{r^3}[/itex] or [itex]\bv{r}/r^3[/itex] which could also be r/r3... because let's face it, inline fractions are a problem anyway.

I can argue either way - the first one, the vector sits better in the line ... looks like part of the text like a word should. However the second stands out more - making an unmistakable distinction that here is a vector.

Perhaps with high quality printing and computer typesetting now commonplace, bf for vecs is no longer needed the way it used to be? To me, the arrow version looks better inline and the bold-face better for display-math... particularly in presentations.
 

Related to How Can I Use Bold Face for Vectors in LaTeX?

What is bold-face for vectors in TeX?

Bold-face for vectors in TeX is a formatting option that allows vectors to be displayed in bold font. This makes them stand out and easier to identify in mathematical equations and documents.

How do I use bold-face for vectors in TeX?

To use bold-face for vectors in TeX, you can either use the \mathbf command or the \boldsymbol command. Both will produce bold vectors, but the \boldsymbol command is more commonly used as it preserves the italic nature of vectors.

Can I customize the bold-face vector in TeX?

Yes, you can customize the bold-face vector in TeX by changing the font, size, or color of the vector. You can also adjust the thickness of the bold vector by using the \bm command instead of \boldsymbol.

Are there any limitations to using bold-face for vectors in TeX?

One limitation of using bold-face for vectors in TeX is that it may not always be compatible with certain packages or fonts. In some cases, the bold vector may not display correctly or may not be available at all.

Can I use bold-face for vectors in TeX for other symbols?

Yes, you can use bold-face for vectors in TeX for other symbols such as matrices, tensors, and other mathematical objects. However, it is important to note that not all symbols will have a bold version available.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
Replies
2
Views
337
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
3K
Replies
8
Views
591
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
298
  • Electromagnetism
Replies
1
Views
797
  • Introductory Physics Homework Help
Replies
9
Views
741
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • Differential Geometry
Replies
12
Views
3K
  • Introductory Physics Homework Help
Replies
3
Views
1K
Back
Top