[Tex/LaTex] \sqrt: The vinculum and the rest of the radical are misaligned

math-modesymbols

When the height of the radicand exceeds a certain threshold, LaTeX replaces the check-sign-like part of the root sign with a more vertical one. This behavior has a flaw: The vertical replacement part does not align properly with the vinculum (the horizontal bar). For example,

\documentclass{article}
\begin{document}
\[
\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{}}}}}}}
\]
\end{document}

produces

Nested radicals.

I've found a few related questions here on Stack Exchange. The question problem compiling some 'math' using LuaLaTeX is nominally about LuaLaTeX, but the first comment, by user egreg, seems to imply that the question is related to mine. The comment blames the PDF rendering, and there may be some truth to that — the misalignment seems less noticeable to me on a high-density screen (eg. the retina MacBook Pro). However, it's not a problem with any single PDF viewer: I've seen the misalignment in Latexian, Preview, and Skim on OS X, in Adobe Reader on Windows, and on a printed copy.

The solitary answer to that question, by the way, doesn't seem to relate my problem.

The misalignment is also evident in the question \sqrt symbol with a vertical part. Its solution produces a slanted radical, but leaves a noticeable gap between the two components of the radical.

Does anyone else see the misalignment? Any idea what the underlying cause is? And are there any workarounds?

Best Answer

The effect depends a lot on the viewer, I just tried your file and it's more noticeable in xpdf than acrobat, but in both it comes and goes to a certain extent at different zoom levels.

It's hard to make the two parts exactly match at all resolutions as the left hand part is made of one or more characters from the font so is subject to the renderer's font hinting and anti-aliasing (note a slight fuzziness in the small horizontal segment in the left of your image) But the horizontal rule is drawn as a rule not using a font character so goes through a different code path in the renderer. This means that even if they are specified to be exactly the same width and alignment, then at certain resolutions they may snap to different pixel boundaries.