How to exclude a section from the TOC?

I am preparing a template for the final year project for my students. I use the book style and included an acknowledgment section*. But I don’t want it to appear in the TOC, which appears after it. The section macro has Toc next and Toc prefix options, but I didn’t find help on them.

Please try the following definition; it looks like a section, but it does not add an entry in the Table of Contents.


I did it by guessing, starting from the definition of section which I found with the Macro Editor. I hope that it works, id est I do not know if everything, except the inclusion in the TOC, works like for a default section. In particular I did not try referencing and I did not try the “smart reference” packages preview-ref and smart-ref.

You could also temporarily redefine the section-toc macro to do nothing:


My infinite gratitude goes to X and Y<text-dots>

It looks to me that this risks less than mine to “break something”. So I would use this, and not my way.