How to make this equation look more aesthetic and balanced

amsmathdisplaystylemath-mode

I have a mathematical equation

$$
K = \sum_{i \in \mathcal{V}} \left\lvert i^p - \mathbbm{1}_{\{i \in \mathcal{J}\}} \cdot k^p \right\rvert
$$

that when compiled, looks like:

enter image description here

Is there a way I could lengthen the absolute value verticals and to somehow not make the p power exponentials crunch the i and the k, as well as a better indicator function. Any suggestions what I could do will be greatly appreciated. Thanks!

Best Answer

  • please always provide MWE, not just code fragment
  • use $$ for switch to math mode is not LaTeX command, instead it use \[ ... \] or \begin{equation*} ... \end{equation*}
  • for absolute value is sensible to define new delimiters as enable mathtools package (see MWE below)
  • your equation doesn't look so bad ...
\documentclass[border=3.141592, varwidth]{standalone}
\usepackage{bbm, mathtools}
\DeclarePairedDelimiter\abs{\lvert}{\rvert}

\begin{document}
\[
K = \sum_{i \in \mathcal{V}} \abs*{i^p - \mathbbm{1}_{i \in \mathcal{J}}^{}{\cdot}k^p}
\]
\end{document}

enter image description here

Related Question