# create section without printing it

I am working on my own recipe collection. I want to add sections to the TOC and maybe have them in the running head but I do not want them to be printed to the body of the page at all. Each page shall only display a recipe. The typical commands \section or \addsec do not have such functionality. The always print the section title to the body.

Is there such a command or is it necessary to create that on my own?

Something like this?

Code

\documentclass[a5paper]{article}

\begin{document}
\tableofcontents
\newpage

\phantomsection
This is recipe 1
\newpage

\phantomsection
This is recipe 2
\newpage

\end{document}


## EDIT

In order to achieve what you've requested in the comment, you can modify the above code as follows (hope I haven't misunderstood)

\documentclass[a5paper]{article}

\begin{document}
\tableofcontents
\newpage

\phantomsection
\stepcounter{section}
This is recipe 1
\newpage

\phantomsection
\stepcounter{section}
This is recipe 2
\newpage

\end{document}


Output:

Something like

\newcommand{\invisiblesection}[1]{%
\phantomsection%
\stepcounter{section}%

\invisiblesection{Recipe 1}