Documentation – How to Find Programming Language/API-like Documentation for Common LaTeX Packages like amsmath

documentation

I just tried to figure out limitations (in a very abstract manner of the \sqrt makro in math package of LaTeX. Even after reading http://bay.uchicago.edu/tex-archive/macros/latex/required/amslatex/math/amsldoc.pdf it appears poorly documented (so poorly that I don't believe that so many production focused people use it without every having complain and/or improved it). How would I figure out from a technical absract documentation (not that sort of common example soaked package documentations) whether e.g. \sqrt can be broken over multiple lines? There has to be links to available containing environments, etc.

Best Answer

Well, texdef -t latex sqrt returns:

\long macro:->\@ifnextchar [\@sqrt \sqrtsign

This brings us to \sqrtsign (since we assume the optional argument is not present) and texdef -t latex sqrtsign returns:

\macro:->\radical "270370\relax

So you either open The TeXbook or go to the reference manual, where two keywords: rule and subformula tell you that the thing is unbreakable. Or you search this site for sqrt break and one of the results is How to break this long radical into multiple lines? which clearly shows that \sqrt construct is unbreakable.

Once you know the TeX programming layer, you can decode any definition and see what's inside. Or you just look for other sources. (As a side note, I don't see how breaking an \sqrt over multiple lines can even come up to someone's mind.)