I need to change the style of sqrt and should make it a little bit narrower than the standard. second picture shows what I would like to have. any help is appreciated.

this is what I already have

what I want to have

  • You could change the font of the \sqrt to something better matching your expectations. Have a look here or here – Dan H. Aug 4 '14 at 6:56
  • With a little effort you could even draw it in TikZ. – Manuel Aug 4 '14 at 12:38
  • Right. I draw the lines using TikZ but having problem about inserting the text in it. – rask Aug 4 '14 at 15:29

I took the following approach to solve this. If I wanted \sqrt{expression} where the surd was made narrow, I first expressed \sqrt{\phantom{\cramped{#1#1}}} and horizontally compressed it by a factor of 2. I then overlaid, in a right-aligned format, the original expression overtop this squeezed-blank sqrt.

I used the \ThisStyle{...\SavedStyle...} syntax of the scalerel package to import the current math style into the expression, so that it works in \scriptstyle and \scriptscriptstyle, as well as \displaystyle.

The MWE shows expressions using the original \sqrt, and then the same expressions with the revised \sqrt.

\parskip 1em
  \[\sqrt{x^2 + y^2}\quad\sqrt{\frac{x^3}{x+1}}\]\par

enter image description here

If one is concerned that compressing the expression by a factor of 2 makes the line thickness of the surd too thin, then this more complex definition provides a remedy:


enter image description here

EDITED to insure that argument uses cramped math style (requires mathtools package).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.