# Runaway error in section title [duplicate]

I'm using overleaf and getting errors while trying to run

\subsection{Decomposition of circular functions as a product of elemental trigonometric functions \footnote{We take elemental trigonometric functions to mean circular functions having a period of $2 \pi$ (i.e. $\sin x$, $\cos x$).}}


The error im getting is:

Argument of \@sect has an extra }.

<inserted text>
\par
l.24 ...od of $2 \pi$ (i.e. $\sin x$, $\cos x$).}}

I've run across a }' that doesn't seem to match anything.
For example, \def\a#1{...}' and \a}' would produce
this error. If you simply proceed now, the \par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your }' was spurious, just type 2' and it will go away.
main.tex, line 24

Runaway argument?

{\normalfont \large \bfseries }{\@xfootnote }\def \reserved@b {\stepcounter \ETC.
! Paragraph ended before \@sect was complete.
l.24 ...od of $2 \pi$ (i.e. $\sin x$, $\cos x$).}}
I suspect you've forgotten a }', causing me to apply this

• Try with \subsection[<ToC entry>]{<regular title>}; the issue is probably related to using a fragile argument (something like \footnote) inside the sectional title... – Werner Dec 18 '19 at 2:05
• Welcome to tex.sx. As @Werner says, this is probably related to \footnote. In addition to providing the optional <TOC entry> (you really don't want a footnote marker in the TOC), you might need to add \protect just before \footnote`. – barbara beeton Dec 18 '19 at 2:27