I need to put tables of contents on the beginning of the document and also at the last page. When I am using \tableofcontents second time it appears empty.
I want to achieve:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}
\begin{document}
%first toc
\tableofcontents
\section{Test}
test test
\section{Test 2}
test test
\newpage
%second toc - generates empty
\tableofcontents
\end{document}
How can I achieve the same toc on the last page?