in the MWE below, the norm symbol appears in different sizes in the denominator like this:
I would like the \norm
lines to be the same length in the denominator. Thanks for your help.
Here is the code that I have:
\documentclass{book}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{mathtools}
\usepackage{commath}
\usepackage[sc,osf]{mathpazo}
\begin{document}
\begin{equation*}
\mu(\mathbf{A}) = \max_{1\leqslant i,j\leqslant n, i\neq j}\dfrac{|\mathbf{A'}_{:,i}\mathbf{A}_{:,j}|}{\norm{\mathbf{A}_{:,i}}\norm{\mathbf{A}_{:,j}}}
\end{equation*}
\end{document}
Best Answer
This is because the subscripts
i
andj
have different depths and you are using automatic scaling.There are two easy ways to fix this, since you are already using the
mathtools
andcommath
packages:Solution with
mathtools
(preferred solution†)Make the
\norm
symbols the same size by using\DeclarePairedDelimiter
frommathtools
to declare\norm
, and give a size as an optional argument as\norm[\big]{...}
. Since you are using thecommath
package, which itself defines\norm
, you can "save" and "undefine" the old definition of\norm
before (re)declaring it usingmathtools
. You should also place the prime outside of\mathbf{...}
, otherwise the subscript is placed too far right.or without optional argument (most correct size in my opinion), i.e. with
{\norm{\mathbf{A}_{:,i}}\norm{\mathbf{A}_{:,j}}
:Solution with
commath
The
\norm
command from thecommath
also takes an optional argument, ranging from0
to4
where0
is the smallest size and4
the biggest. Notice how the spacing before the first\norm
is wrong – you will have to manually adjust this with e.g.\;
to get a pleasing result.You should consider using
\abs
instead of|...|
as well. Same approach as above withmathtools
:and then use
\abs*{...}
to get automatic sizing, or with optional argument to manually size\abs[\big]{...}
.For
commath
the approach is also the same as above:\abs[1]{...}
.†As you can see, the spacing before the first
\norm
in the denominator withcommath
(last image) is wrong, so personally I'd recommend using themathtools
approach, as that gives the correct spacing.