Not to be too nitpicky, but TeX is not really an exemplar of any hierarchical document format. I think the author is thinking of LaTeX, which has the \section, \subsection, and similar headings. LaTeX is just a macro package built on top of the TeX language (similar to how Ruby on Rails is a library built on top of the Ruby language).