title: LaTeX remove subsection from TOC
body: <p>I use the following code in LaTeX to set the level of contents in the table of contents:</p>
  
  <pre class="lang-latex prettyprint-override"><code>\setcounter{secnumdepth}{2}\newcommand{\restoretoc}\addtocontents{toc}
  {\protect\vspace*{2.5em}{\setcounter{tocdepth}{1}{\setcounter{secnumdepth}{2}}}
  </code></pre>
  
  <p>The ouput is the following:</p>
  
  <p><img src="https://i.stack.imgur.com/xhQ9b.jpg" alt="enter image description here"></p>
  
  <p>The counter disappears but subsubtitle and page number are still there. How to remove all the counter, title and page number in the table of contents for the subsubsection?</p>