Physics Forums

Physics Forums (http://www.physicsforums.com/index.php)
-   Forum Feedback & Announcements (http://www.physicsforums.com/forumdisplay.php?f=19)
-   -   Suggestion Bold-face for vectors in tex (http://www.physicsforums.com/showthread.php?t=565882)

Simon Bridge Jan8-12 01:51 AM

bold-face for vectors in tex
 
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 lets 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?

robphy Jan8-12 06:38 AM

Re: bold-face for vectors in tex
 
Personally, I prefer that students use arrowheads for vectors [and that they don't divide by vectors :tongue:].

Note that you can have macros between your PF-tex tags.
http://www.physicsforums.com/showthr...72#post3620172
I'm not sure if they persist between multiple tags in the same post... but a little experimentation to answer that.

I like Serena Jan8-12 06:44 AM

Re: bold-face for vectors in tex
 
Quote:

Quote by robphy (Post 3701192)
Note that you can have macros between your PF-tex tags.
http://www.physicsforums.com/showthr...72#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.

Simon Bridge Jan8-12 08:01 AM

Re: bold-face for vectors in tex
 
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 text books 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.]

Simon Bridge Jan8-12 08:37 AM

Re: bold-face for vectors in tex
 
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!

robphy Jan8-12 04:42 PM

Re: bold-face for vectors in tex
 
Quote:

Quote by Simon Bridge (Post 3701258)

Popular text books 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/tiplerphysi...h38.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/...d=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/...cs/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]

Simon Bridge Jan8-12 07:27 PM

Re: bold-face for vectors in tex
 
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.

AlephZero Jan8-12 08:39 PM

Re: bold-face for vectors in tex
 
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:

Simon Bridge Jan8-12 08:55 PM

Re: bold-face for vectors in tex
 
Quote:

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!

dextercioby Jan9-12 02:31 AM

Re: bold-face for vectors in tex
 
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].

Simon Bridge Jan9-12 11:21 AM

Re: bold-face for vectors in tex
 
[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 lets 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.


All times are GMT -5. The time now is 04:55 AM.

Powered by vBulletin Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2014 Physics Forums