TeX and LaTeX Square Root Symbols – How TeX and LaTeX Produce Square Root Symbols

tex-coreunicodeunicode-math

When you type commands like $\sqrt {x}$, $\sqrt {x^2 – y^2}$, or $\sqrt {\sum_{i=0}^n i^2}$, latex produces square root symbols, that "grow" with the size of the thing of which you are taking a square root.

My question is how does tex produce this? Does it draw the lines by itself? I have the impression that it does not do this; I believe that it draws the symbol by combining several possible unicode characters. If this is the case, which unicode symbols does it use?

I had a look and found 0x23b7 and I also found 0x221a. However I don't know if it actually uses these. In any case these can't be all, because in tex the upwards line the sqrt symbol can have at least 4 or 5 different slopes and the symbol grows.

Best Answer

The left "tick" is produced by font, either a range of characters of different size and slopes then a vertical repeatable extender, as for extending brackets. The font also specifies the width (thickness) required for the over-bar, which TeX draws in with a rule.

The variant characters for the square roots at different sizes do not correspond to different Unicode code points but will have different glyph names in the font.

For opentype fonts as used by unicode-math, the information is all in the MATH table which is now part of OpenType but was originally specified in this Microsoft document

https://docs.microsoft.com/en-us/typography/opentype/spec/math

In particular here: radicalRuleThickness