# Latex Two Title Pages with Manually Set Table of Contents

I need to make a title page that includes title, abstract, and manually set table of contents (I'm combining multiple existing pdfs). To manually set the TOC I'm using this solution: Manually create a table of contents (instead of automatically generated)? Here's my code:

\documentclass[preprint,12pt]{elsarticle}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{lineno}

\usepackage[margin=1in]{geometry}
\pagestyle{empty}

\begin{document}
\begin{frontmatter}

\title{This is the Title}
\begin{abstract}
This is the abstract.
\end{abstract}

\maketitle
\toccontents

\end{frontmatter}
\end{document}


The first page of my output appears exactly as it should. But there is also a second page that has the title, a blank abstract, and no TOC. I need the code to ONLY generate the first page. Is it misuse of \maketitle or \tableofcontents or something else?

Also: the script only generates the TOC after being run once(and the .toc file has been generated. Is there a way to make it generate the TOC on the first run?

Welcome! Your command \toccontents does not exist within the packages you are loading. And you might want to replace \maketitle by \titlepage.

\documentclass[preprint,12pt]{elsarticle}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{lineno}

\usepackage[margin=1in]{geometry}
\pagestyle{empty}

\begin{document}
\begin{frontmatter}

\title{This is the Title}
\begin{abstract}
This is the abstract.
\end{abstract}
\end{frontmatter}