Math & ScienceExponent Hitting Radical

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
jsbeardsley
Posts: 5
Joined: Wed Jul 20, 2011 7:47 pm

Exponent Hitting Radical

Post by jsbeardsley »

Hi, the following is the code that is troubling me. Specifically, the exponenent on the tangent function is running into the radical. I have tried using \cramped from the mathtools package which was honestly kind of a shot in the dark, and I can't find any other documentation on customizing either exponents or \sqrt. Does anyone know how to fix this, or just push down the exponent a little, or anything?

Thanks!

Code: Select all

\documentclass{article}

\usepackage{amsmath}
\usepackage{mathtools}

\begin{document}
$\sqrt{\tan^2(x)}$
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Exponent Hitting Radical

Post by localghost »

Works fine for me. Hence I can't confirm what you described.


Thorsten
jsbeardsley
Posts: 5
Joined: Wed Jul 20, 2011 7:47 pm

Re: Exponent Hitting Radical

Post by jsbeardsley »

Interesting. Now it doesn't look like it's touching, at least in just that environment. The problem occurs for me inside of \documentclass{exam} and inside of a \part environment (similar to enumerate), so I'm not sure. Maybe there's some weird spacing going on under the surface. Are there any commands that would bring that exponent lower though, or increase the height of \sqrt?
User avatar
shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Exponent Hitting Radical

Post by shadgrind »

The 2 isn't hitting the square root bar for me either, but it is very close. You could add vertical space inside the square root with the \vphantom command. For example:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\begin{document}
$\sqrt{\vphantom{x^{x^x}}\tan^2(x)}$
\end{document}
That adds only the vertical space needed as if the triple exponent x^x^x were inside the square root. The result does look a bit better, in my opinion.
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2
jsbeardsley
Posts: 5
Joined: Wed Jul 20, 2011 7:47 pm

Re: Exponent Hitting Radical

Post by jsbeardsley »

Thanks for that. Yeah, when I just compile that code as written, it actually looks okay, but for some reason in my document (which is long and unpleasant, which is why I'm not posting it), it touches.

Anyway,
Thanks.
Post Reply