LaTeX forum ⇒ Math & ScienceI hate radicals in LaTeX ! Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
User avatar
Cham
Posts: 734
Joined: Sat Apr 02, 2011 4:06 pm

I hate radicals in LaTeX !  Topic is solved

Postby Cham » Thu Oct 27, 2016 5:10 pm

I'm having troubles with an index and an exponent under a radical, and I don't know anymore what to do ! :x

Here's a MWE to show the problem :
  1. \documentclass[12pt,letterpaper,twoside]{book}
  2. \usepackage{lmodern}
  3. \usepackage{amsmath}
  4. \usepackage{tensor}
  5.  
  6. \begin{document}
  7. \begin{equation}
  8. I =
  9. \begin{cases}
  10. \, \displaystyle{\frac{1}{2} \; A \smash{\left( \tensor{t}{_0} + \alpha - \frac{\beta}{\displaystyle{\sqrt{2 \alpha \, \smash{\tensor{t}{_0} + t_0^2}}}} \, \right)}}, &\text{if $k = - 1$.} \\[18pt]
  11. \, \displaystyle{\frac{2}{3} \; A \, \tensor{t}{_0}}, &\text{if $k = 0$.} \\[18pt]
  12. \, \displaystyle{\frac{1}{2} \; A \smash{\left( \tensor{t}{_0} - \alpha + \frac{\beta}{\displaystyle{\sqrt{2 \alpha \, \tensor{t}{_0} - t_0^2}}} \, \right)}}, &\text{if $k = + 1$.}
  13. \end{cases}
  14. \end{equation}
  15. \end{document}


Here's a preview of what it does :
radical.jpg
radical.jpg (25.48 KiB) Viewed 1027 times


Now, the first radical has a proper size, since I smashed the "0" index, but then the "2" exponent is too close to the horizontal bar. The second radical is too big and there is too much space inside, while the "2" exponent is right.

Take note that smashing each "0" index separately doesn't change anything.

How can I lower the "2" exponent in the first line ?

Tags:

User avatar
Cham
Posts: 734
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Thu Oct 27, 2016 5:33 pm

Ah ! Removing the \displaystyle{} around the radical and adding \vphantom{1^1} inside seems to fix the problem.

Is there a better way in doing this ?


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 6 guests