Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The following lines caught my attention while browsing source2e while looking for the definition of another command.

\DeclareMathRadical{\sqrtsign}{symbols}{"70}{largesymbols}{"70}

and

\DeclareRobustCommand\sqrt{\@ifnextchar[\@sqrt\sqrtsign}
\def\@sqrt[#1]{\root #1\of}

What was \sqrtsign for? I tried \sqrtsign{x} and it outputs something similar to \sqrt{x}.

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

The definition of LaTeX's \sqrt is

\DeclareRobustCommand\sqrt{\@ifnextchar[\@sqrt\sqrtsign}
\def\@sqrt[#1]{\root #1\of}

which means that if the optional argument is used (i.e., if the next character after \sqrt is [), \@sqrt is used (and this in its turn, uses \root#1\of whose definition can be found on page 210 of source2e.pdf) to typeset the radical index and the subradical expression; if no optional argument is given,\sqrtsign is used to typeset the subradical expression (\sqrtsign doesn't allow an optional argument).

share|improve this answer
    
Thank whoever invented the find text and go to page capabilities of document readers:) –  hpesoj626 Oct 3 '12 at 3:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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