# How to remove the section title and the section counter?

From here, I have the fakesection, like this

\newcommand{\fakesection}[1]{%
\par\refstepcounter{section}% Increase section counter
% Add more content here, if needed.
}


which servers the purpose of not having the section tile.

MWE

\documentclass[a4paper,12pt]{article}

\usepackage{hyperref}

\newcommand{\fakesection}[1]{%
\par\refstepcounter{section}% Increase section counter
% Add more content here, if needed.
}

\begin{document}

\tableofcontents

\part{ Basic }
\fakesection{My section 08}
\fakesection{My section 09}
\fakesection{My section 10}
\fakesection{My section 11}

\part{ Intermediate }
\fakesection{My section 08}
\fakesection{My section 09}
\fakesection{My section 10}
\fakesection{My section 11}

\fakesection{My section 08}
\fakesection{My section 09}
\fakesection{My section 10}
\fakesection{My section 11}

\end{document}


How can I remove the section counters in the toc too? (keeping the title)

Thanks.

• As always on this site please post a full minimal example others can copy and work from. Btw what do you think the \protect\numberline{....} , play with it. Jul 29 '18 at 16:04

As suggested by @daleif in the comment,

\newcommand{\fakesection}[1]{%
\par\refstepcounter{section}% Increase section counter

• Remember to remove the space in from of #1, also, you probably don't need the \refstepcounter  Jul 29 '18 at 16:11
• @daleif Tried it. I do need it, as I want the hyper link to work in the bookmarks. Removing it would result them all being linked to the first section. So the whole document only has one section. Jul 29 '18 at 16:17
• One word: \phantomsection , provides the necessary anchor Jul 29 '18 at 16:24