I have the following equation: $\|\text{DFT}\left( f_t (n) \right)\|^2 $
()
This equation is rendered with a space before the second $\|$
. Why is this and how can I fix it?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityUse $\left\|\text{DFT}\left( f_t (n) \right)\right\|^2$
. Otherwise LaTeX does not know that the first \|
is supposed to be a left delimiter and the second \|
a right one.
This is due to some weird design choices by Knuth. Notice that there's also an extra space after \text{DFT}
. They are produced because \left
and \right
follow different spacing rules.
To obtain the expected spacing, use
$\|\text{DFT}\mathopen{}\left( f_t (n) \right)\mathclose{}\|^2$
For a more complete discussion, see this answer.
\providecommand\norm[1]{\lVert#1\rVert}
?\DeclareMathOperator\DFT{DFT}
in your preamble, and use\DFT\left(f_t(n)\right)
instead of\text{DFT}\left(...
(I am assuming that you use the amsmath package, since you use\text
.)