12

I'm having a problem where the line that runs the top length of my square root sign is discontinuous.

\begin{equation}
    N_t(\text{V})=\sqrt{\sum_{i=0}^{n}N_i^2}
\end{equation}

Yields this...Sad broken line

Any ideas what's causing that broken line on the top of my root symbol??

6
  • 6
    The left part is a character (or characters) from the font, the top part is a rule drawn by TeX, these are specified to be the same width but font hinting and pixel rounding and bad luck can mean that the join shows at some zoom levels. Commented Apr 1, 2014 at 0:35
  • So, am I just out of luck?
    – slowaudio
    Commented Apr 1, 2014 at 0:55
  • @user2865011 In what sense? You are “out of luck”, but does it matter? As David pointed: “the join shows at some zoom levels”.
    – Manuel
    Commented Apr 1, 2014 at 1:06
  • Using the old \surd symbol would make the join less obvious. Commented Apr 1, 2014 at 4:52
  • @JohnKormylo why? Commented Apr 1, 2014 at 8:19

1 Answer 1

3

The idea is to overlay a thicker line over the two joined lines.

overlay

\documentclass{standalone}
\usepackage{mathtools}

\newsavebox{\mybox}
\newlength{\mywidth}
\newlength{\myheight}
\newlength{\myline}
\newlength{\myoffset}
\newcommand{\mysqrt}[1]%
{\setlength{\myline}{.1ex}%
\addtolength{\myline}{.06pt}%
\setlength{\myoffset}{.9em}
\addtolength{\myoffset}{-2pt}
\savebox{\mybox}{$\displaystyle\sqrt{#1}$}%
\settoheight{\myheight}{\usebox{\mybox}}%
\addtolength{\myheight}{-.2ex}
\settowidth{\mywidth}{\usebox{\mybox}}%
\addtolength{\mywidth}{-\myoffset}%
 \rlap{\usebox{\mybox}}\hspace{\myoffset}{\raisebox{\myheight}{\rule{\mywidth}{\myline}}}}

\begin{document}
\begin{minipage}{2in}
\begin{equation*}
\mysqrt{\sum_{k=0}^\infty} \quad {\huge\mysqrt{\sum_{k=0}^\infty}} \quad {\tiny\mysqrt{\sum_{k=0}^\infty}}
\end{equation*}
\end{minipage}
\end{document}
2
  • This kind of works, but now I get thin->thick line step, for a change.
    – MightyPork
    Commented Apr 29, 2016 at 16:40
  • So much work for a line!
    – vyi
    Commented May 8, 2017 at 14:33

You must log in to answer this question.

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