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.

Silly question maybe - but why are the two sets of absolute different sizes?

Is there an easy way to set the size locally - or globally?

\documentclass{article}
\usepackage{amsmath}
\newcommand{\vect}[1]{\mathbf{\underline{#1}}}

\begin{document}

$
I (\theta, \varphi) =
\left |
\vect{E}_{dir}^p(\theta, \varphi, r)_{\infty}
+
\vect{E}_{ref}^p(\theta, \varphi, r)_{\infty}
\right |^2
+
\left |
\vect{E}_{dir}^s(\theta, \varphi, r)_{\infty}
+
\vect{E}_{dir}^s(\theta, \varphi, r)_{\infty}
\right |^2
$

\end{document}
share|improve this question
2  
Welcome to TeX.sx!Can you wrap your code with a simple MWE with your definition of \vect or the package loading it? –  percusse Mar 14 '13 at 0:40
    
I don't see what "absolute different sizes" are you refering to.. I get this result (defined \vect as \vec) –  JLDiaz Mar 14 '13 at 0:43
2  
Also, you should use \text{dir}, \text{ref} instead of dir and ref. Note the weird kerning you got in "ref". In math mode a sequence of letters is not considered a word, but instead a product of single-char named variables, hence the odd spacing. –  JLDiaz Mar 14 '13 at 0:46
    
thanks for the advice. As for your questions - I redefined the 'vect' command - since I wasn't 100% sure what look I would go for in general (in terms of bold\underline etc - so I figured that if i defined it right at the beginning it would sort it out. –  JPH Mar 14 '13 at 1:34
    
I added the newcommand...BTW what does MWE stand for? –  JPH Mar 14 '13 at 1:38
show 1 more comment

1 Answer

up vote 4 down vote accepted

You get different sizes because of the f in the subscript.

There's no need of \left and \right here; in other words, they are not the best choice here.

I propose two versions, one with normal sized bars (which I prefer), one with slightly bigger ones.

\documentclass{article}
\usepackage{amsmath}
\newcommand{\vect}[1]{\mathbf{#1}}
\newcommand{\tsub}[1]{\textnormal{#1}}
\begin{document}
$
I (\theta, \varphi) = 
\lvert
\vect{E}_\tsub{dir}^p(\theta, \varphi, r)_{\infty}
+
\vect{E}_\tsub{ref}^p(\theta, \varphi, r)_{\infty}
\rvert^2
+
\lvert 
\vect{E}_\tsub{dir}^s(\theta, \varphi, r)_{\infty}
+
\vect{E}_\tsub{dir}^s(\theta, \varphi, r)_{\infty}
\rvert^2
$

$
I (\theta, \varphi) = 
\bigl\lvert
\vect{E}_\tsub{dir}^p(\theta, \varphi, r)_{\infty}
+
\vect{E}_\tsub{ref}^p(\theta, \varphi, r)_{\infty}
\bigr\rvert^2
+
\bigl\lvert 
\vect{E}_\tsub{dir}^s(\theta, \varphi, r)_{\infty}
+
\vect{E}_\tsub{dir}^s(\theta, \varphi, r)_{\infty}
\bigr\rvert^2
$
\end{document}

enter image description here

Notice how I realized the textual subscripts; this kind of subscript should go in upright type and \textnormal ensures it.

share|improve this answer
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.