[Tex/LaTex] make section headings invisible

sectioningtable of contents

Simple question here: how to make section headings invisible, but still get the correct list of sections in the TOC and headers ? e.g. on page 10, if I do a \section{New section}, I must not see the text "X. New section", but I still want the section to be in the TOC and in the \rightmark of the following pages, until a new section of course.

I'm using a minimalistic document (class article, with no package that are used to adjust section headings style)

Best Answer

Something like this:

\newcommand\invisiblesection[1]{%
  \refstepcounter{section}%
  \addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}%
  \sectionmark{#1}}
...

\invisiblesection{Blah}