# How to find the error?

I was typing easily when I got the message:

Runaway argument?
{\contentsline {section}{\numberline {4.3}Gr\'afico de uma Fun\c
! File ended while scanning use of \@writefile.
<inserted text>
\par
l.102 \begin{document}


I undone everything I have done this afternoon, but it don't compile anymore.

Is there a way to find where is the error?

• first quick thing to try is delete all your auxiliary files (.aux, .toc, etc.) and try recompiling – Troy Dec 31 '18 at 17:02
• you should delete your aux file and toc file, but the actual error is probably a fragile command in the section heading that starts Gr\'afico de uma Fun the command may need to be prefixed with \protect but as you have not shown a test file it is hard to say exactly. – David Carlisle Dec 31 '18 at 17:06
• @David Carlisle \colorbox{pink}{ \begin{minipage}{.9\linewidth} \section{Gráfico de uma Função\label{gráfico}} \end{minipage} } – spohreis Dec 31 '18 at 17:10
• don't use accented letters in \label – David Carlisle Dec 31 '18 at 17:19
• I removed the accent, but the problem remains. – spohreis Dec 31 '18 at 17:24

You should only use ascii characters in \label, this runs without error

\documentclass{article}
\usepackage{color}
\definecolor{pink}{rgb}{1,.5,.5}
\begin{document}
\tableofcontents

\colorbox{pink}{ \begin{minipage}{.9\linewidth}
\section{Gráfico de uma Função\label{grafico}}
\end{minipage} }
\end{document}