6

This code

\begin{equation*}
    \begin{split}
        &  \sqrt{Var_\nu(f)} \\
        &  \sqrt{Var_\mu(f)}
    \end{split}
\end{equation*}

produces

enter image description here

As you can see, the sizes of the brackets of the square root are different. I don't know why, but this depends of the letter in the subscript.

Does anyone know how to change sqrt so that both have the same size? (preferably the size of the first square root)

Comment: I think this happens inside the split environment. I don't mind changing this, but I still would like the formulas aligned.

5
  • 2
    \mu is deeper than \nu so the sqrt extends to cover it. (unrelated but define a \Var that uses roman not math italic so it doesn't look like V ar Commented Jun 26, 2021 at 13:05
  • Try \sqrt{\smash{Var_\mu(f)}} (and yes, as David Carlisle says, replace Var by a command).
    – Gaussler
    Commented Jun 26, 2021 at 13:11
  • ...or maybe \sqrt{Var_{\smash{\mu}}(f)}
    – Partha D.
    Commented Jun 26, 2021 at 13:14
  • 1
    @ParthaD. no. \smash works in math mode you should not use \text here. Commented Jun 26, 2021 at 13:15
  • @DavidCarlisle Did not know that... I just edited it (to a little-bit improvement of @Gaussler).
    – Partha D.
    Commented Jun 26, 2021 at 13:18

2 Answers 2

8

How about adding a \strut for the first \sqrt?

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
  \begin{split}
    &  \sqrt{\strut Var_\nu(f)} \\
    &  \sqrt{Var_\mu(f)}
  \end{split}
\end{equation*}
\end{document}

enter image description here

1
  • ___Thank you :D
    – Babado
    Commented Jun 26, 2021 at 17:18
9

enter image description here

\documentclass{article}

\usepackage{amsmath}
\DeclareMathOperator\Var{Var}
\begin{document}
\begin{equation*}
    \begin{split}
        &  \sqrt{\smash[b]{\Var_\nu(f)}} \\
        &  \sqrt{\smash[b]{\Var_\mu(f)}}
    \end{split}
\end{equation*}
\end{document}

where the \smash[b] hides the depth of the expression.

7
  • 1
    I would consider doing \DeclareMathOperator\Var{V\!ar}, as I don’t like the space between the V and the a. Also, for the sake of promoting good style, maybe you should replace _\mu and _\nu by _{\mu} and _{\nu}.
    – Gaussler
    Commented Jun 26, 2021 at 13:26
  • Well, it could be that your single token expanded to x^2. I think it’s better to promote good, consistent style that works everywhere.
    – Gaussler
    Commented Jun 26, 2021 at 13:38
  • Agreed. If I were in charge of LaTeX, _ and ^ would have been made active characters a long time ago. So, probably, would $. Other than slightly changed behaviour, such as what we just discussed, there really are no issues with this, right?
    – Gaussler
    Commented Jun 26, 2021 at 13:42
  • Or, as you know from my semantex stuff, if I were in charge of LaTeX, it would be much more like \Var[measure=\measuremu,map=\vf]. ;-)
    – Gaussler
    Commented Jun 26, 2021 at 13:47
  • 1
    And then we look forward to \documenttype (which activates LaTeX v. 3.0), \documentparadigm (which activates LaTeX v. 4.0), \documentcategory which activates LaTeX v. 5.0), and \documentweranoutofsynonymsforclass (which activates LaTeX v. 6.0). ;-)
    – Gaussler
    Commented Jun 26, 2021 at 15:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .