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)

-
Welcome to TeX.SE! Which document class do you use: `book`, `report`, ...? Also, do you already use a package (such as `titlesec` and `sectsty`) that may be used affect the appearance of sectioning headers. Finally, do you want to suppress the appearance of all sectioning headers (including subsections, subsubsections, etc) or "just" `section`-level headers? –  Mico Aug 22 '12 at 15:33
Just `section`-level will be fine. –  BigDawg Aug 22 '12 at 15:40
Will you use some sort of separator, other than the actual section name, to mark where one section ends and the next one begins? –  Ricardo Aug 22 '12 at 16:19
No. The thing is that new sections will necessary be at the beginning of new pages, I just want to remove the "X. Section name", as it will already be written in the header (via fancyhdr) –  BigDawg Aug 22 '12 at 16:45

Something like this:

``````\newcommand\invisiblesection[1]{%
\refstepcounter{section}%
Perfect ! I was missing the `\sectionmark` in what I tried before coming here. Thanks for the help. –  BigDawg Aug 22 '12 at 17:18
Don't you have an issue that several `\invisiblesection{}` in row are linked to the same (wrong) pages in the TOC or don't appear there at all? –  Anton Dec 11 '13 at 6:55
Just do not `\refstepcounter`, and do not add `\numberline` to the TOC –  Boris Jan 15 '14 at 16:53