Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want a 'b' with an arrow on top, enclosed in angle brackets.

\left<\overrightarrow{b}\right>

gives angle brackets which are far too high.

<\overrightarrow{b}>

gives far too much horizontal space between the brackets and the \overrightarrow{b}:

\left<\smash{\overrightarrow}\right>

makes that formula look good, but the upper end of the 'b' touches the line above.

So what I want is basically a \smash that only affects the brackets, but not e.g. line spacing. Is this possible?

share|improve this question
    
This is off-topic for this site, there is an SE specifically for such questions: tex.stackexchange.com –  Orbling Mar 21 '11 at 16:19
1  
There is also \vec{b} to make that arrow---perhaps you like it better. –  Svante Mar 21 '11 at 20:05
add comment

migrated from stackoverflow.com Mar 21 '11 at 17:10

This question came from our site for professional and enthusiast programmers.

3 Answers

up vote 8 down vote accepted

< and > are less than and greater than. If you use them where TeX expects delimiters (such as after \left, then you get angle brackets instead. I suspect what you want is just

\langle\overrightarrow{b}\rangle

which produces enter image description here

share|improve this answer
    
Works like a charm. Thanks. –  rainmaker Mar 21 '11 at 18:34
add comment

use \big instead of \left/ \right

$\big<\overrightarrow{b}\big>$
share|improve this answer
    
Gives the same result as @TH 's variant, except for the brackets being a bit bigger. Thanks. –  rainmaker Mar 21 '11 at 18:40
add comment

What about

\left<\smash{\overrightarrow{b}}\vphantom{b}\right>\vphantom{\overrightarrow{b}}

This is probably going to give the same result as TH.'s answer, but it illustrates the technique to get what you want: a b with an arrow on top which is treated for the purpose of expanding delimiters as a plain b.

Edit You are right about the line spacing--the \smashed \overrightarrow{b} will run over the line above. I've added another \vphantom to stretch the line after the delimiter.

share|improve this answer
1  
not quite. - As the arrow is not considered for line spacing, it can interfere with the above line. (at least it happened to me). Thanks however for explaining the \vphantom command. –  rainmaker Mar 21 '11 at 18:36
    
@rainmaker: good point. I fixed that. –  Matthew Leingang Mar 22 '11 at 0:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.