Unless your publisher takes LaTeX files (.tex), then you wouldn’t be able to copy how the user manual is doing this. This is probably the most comprehensive post on how I would work with ToCs, were I to use word processors instead of LaTeX for formatting the final PDFs.
In short though, I wouldn’t bother with trying to do any of this in Scrivener itself. It’s going to be very labour intensive, not only to create them initially, but to keep them up to date if the outline is revised in any way. This feature in Scrivener is better thought of as a convenience for quick proofing rather than a production tool.