GeneralProblems with \tableofcontents and \newpage

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
vlad
Posts: 1
Joined: Fri May 09, 2008 10:19 pm

Problems with \tableofcontents and \newpage

Post by vlad »

Hi

Suddenly I am having trouble compiling my latex into pdf. I use Winedt, and it gives me an error at \newpage just after \tableofcontents. If i delete \newpage its just the next line, there's an error in, so I think there something wrong with the toc.

The code is as following:

Code: Select all

...
\newpage
\setcounter{tocdepth}{3}              % Define that the TOC only shows two levels
%\setcounter{secnumdepth}{3}
\tableofcontents                            % Generate the TOC

\newpage                                     % Begin a new page after the TOC
\setcounter{page}{1}                    % Define the first content page as page one
\pagenumbering{arabic} 
...
It's an template I have used before without any trouble, and I have tried both to update and reinstall MikTex and WinEdt.

Can anyone tell me why it doesn't work?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Problems with \tableofcontents and \newpage

Post by localghost »

Create a minimal working example (MWE) that reproduces the occurring error. This code snippet itself is not suitable for finding any irregularities.


Best regards
Thorsten¹
Post Reply