7

Example:

\documentclass{article}
\begin{document}
\
\begin{equation}v=\sqrt{\frac{2k\left(\frac{qQ_1}{r_i}+\frac{qQ_2}{r_i}-\frac{qQ_1}{r_f}-\frac{qQ_2}{r_f}\right)}{m}}\end{equation}
\end{document}

Renders to: enter image description here

Joy Jin
  • 205
  • The output looks fine to me. I think square roots in general look ugly regardless of the font or even when handwritten. If your question is about the ugliness of the code, then perhaps it would be helpful to split the code into multiple lines for ease of readability. – User23456234 Feb 21 '23 at 02:50
  • 1
    One or more persons have voted to close this query as "opinion based"; the site defines this closure category via "This question is likely to be answered with opinions rather than facts and citations". Now, the OP is not asking others whether they agree or disagree with the view stated in the title, that very large square root symbols are ugly; the OP is simply providing a reason for why he/she is posting a query. It should be entirely ok to post a reason for posting a query, no? – Mico Feb 21 '23 at 05:29
  • 4
    The question could be improved by first asking a question at all. In addition, it would certainly be good to describe what exactly bothers the OP about the root sign and what he would like to have differently. Then it would clearly not be "opinion based". – dexteritas Feb 21 '23 at 10:24
  • 1
    Depending on what exactly is the problem with the root, this question could be a duplicate of \sum caused \sqrt to not be slanted. – dexteritas Feb 21 '23 at 10:28
  • 1
    Ugliness is in the eye of the beholder. I think that the expression looks fine. What is your problem with it? Don't make us (wrongly) guess. – Peter Wilson Feb 21 '23 at 17:54
  • @dexteritas Yes, that's my problem with it. Thank you for linking that question! Although the solution posted isn't really a solution (you can't fix it; just reduce the thing in the sqrt). Feel free to close as a duplicate. – Joy Jin Mar 24 '23 at 20:23

1 Answers1

11

I assume that by "ugly", you mean that the square root symbol in question -- see the top row of the following screenshot -- somehow looks either "too big" (in an absolute sense) or "bigger than is otherwise optimal", i.e., in a relative sense. You may also be thinking about a second source of typographic ugliness: The \frac terms inside \left(...\right) may appear to be "too small" relative to the 2k and m terms.

If these assumptions are correct, I would like to suggest that you

  • remove the m term from the big/overall \frac expression and replace 2k with \frac{2k}{m}. This change has two beneficial effects: the terms in side the tall parentheses are now a lot bigger, and the square root symbol is now less tall

  • apply further tweaks: (a) encase the \left(...\right) material in a \smash[b] "wrapper", (b) load the mleftright package and switch from \left(...\right) to \mleft(...\mright), and (c) "snug" up the i and f subscripts to the associated letters r. The main benefit is a further reduction in the height of the square root symbol.

  • last but not least, replace the \sqrt{...} notation with \mleft[ ... \mright] ^{1/2} notation.

enter image description here

\documentclass{article}
\usepackage{amsmath,mleftright}
\newcommand\ri{r_{\mkern-2mu i}} % place subscripts closer to 'r'
\newcommand\rf{r_{\mkern-2mu f}}
\begin{document}
\addtolength\jot{4pt}
\begin{align*}
v&= \sqrt{\frac{2k \left(\frac{qQ_1}{r_i}+\frac{qQ_2}{r_i}
          -\frac{qQ_1}{r_f}-\frac{qQ_2}{r_f}\right)}{m}} \\
 &= \sqrt{\frac{2k}{m}\left(\frac{qQ_1}{r_i}+\frac{qQ_2}{r_i}
          -\frac{qQ_1}{r_f}-\frac{qQ_2}{r_f}\right)} \\
 &= \sqrt{\frac{2k}{m}\smash[b]{%
           \mleft(\frac{qQ_1}{\ri}+\frac{qQ_2}{\ri}
          -\frac{qQ_1}{\rf}-\frac{qQ_2}{\rf}\mright)}} \\
 &= \mleft[ \frac{2k}{m}
            \mleft(\frac{qQ_1}{\ri}+\frac{qQ_2}{\ri}
           -\frac{qQ_1}{\rf}-\frac{qQ_2}{\rf}\mright)
    \mright]^{1/2}
\end{align*}
\end{document}
Imran
  • 3,096
Mico
  • 506,678
  • 3
    To my mind, the presentation with \frac{2k}{m}\frac{... is more logical as well as more aesthetically pleasing – Chris H Feb 21 '23 at 12:12