I would like to suppress the typesetting of the section title in the document altogether, but still setting it for purposes of subsections, section mark / header, and table of contents.
What I tried already:
\section[MySection]{}
Still displays the section number.
\renewcommand{\thesection}{}
\section[MySection]{}
Removes the section number, but also removes it from subsection numbers and TOC. Besides, I still get a vertical space where the section title had been.
I could do (and have done so far):
\titleformat{\section}{}{}{0pt}{\vspace{-whatever_the_height_of_section_title}}
But it struck me as a bit ugly to "guess" the height of the section title (and having to re-guess if font sizes change). If there is some constant, like \sectionfontheight
or somesuch, that would be a start.
But isn't there some "correct" way to set a section title "blindly", i.e. without actually printing it in the document?