I have a number of different kinds of entities in a document using the book documentclass. There are Chapters, Labs, Appendices, etc.
Just taking labs as an example, I created a newcommand that defines labs and autonumbers them. I would like them to be in the table of contents at the same level as a Chapter. Right now, as a quick hack, I make labs chapters, which makes them show up, but they display a chapter number and a lab number.
\newcounter{lab}
\newcommand{\lab}[1]{\stepcounter{lab} \chapter{Lab \arabic{lab}: #1}}
How do I specify what entities go into a table of contents?
In addition, if I were to create my own independent equivalent of a chapter, In this other question: Custom \chapter definition
In one of the answers, I saw reference to the definition of the chapter macro, and I am not seeing how chapter sets the font and text size? Here is the code:
\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
The upshot is, how can I create new entities to put into a table of contents, and how do those entities define their look?
\addcontentsline{toc}{...}. For details about how to use it look, for example, at this post. – Jul 12 '14 at 13:31\@schapter, which itself calls@makeschapterhead, see about lines 400 etc. in the currentbook.clsfile – Jul 12 '14 at 14:15list of labsetc. instead of putting them into the TOC – Jul 12 '14 at 14:16\newtheoremfromamsthmpackage or the very sophisticatedtcolorboxwhich allows for nice markup/layout and adds list of ... entries too. – Jul 12 '14 at 16:22Appendicesand chapter-likeLabsshouldm't float at all? – Jul 13 '14 at 10:15\addcontentslineetc. very often ;-) – Jul 13 '14 at 19:16