# Adding a Pseudo Chapter with (!) Page Number

I want to manually add a chapter to the ToC and add a specific number to the page counter. This is meant for adding to my document a number of papers, which are printed out elsewhere and which I cannot add into the LaTeX file.

I tried this,

\newcommand{\pseudochapter}[2][0]
{
{chapter}{\protect\numberline {\thechapter}#2}{\thepage}{}}
\clearpage
}


However, invoking this,

\pseudochapter[3]{Pseudo Contents}
\chapter{Real Contents}


leads to output in the ToC like this,

Pseudo Contents ... 4
Real Contents ..... 4


What I expected (or wished) to find, is this,

Pseudo Contents ... 1
Real Contents ..... 4


This

\chapter{Real Contents}
\pseudochapter[3]{Pseudo Contents}
\chapter{Real Contents}


gives me

Real Contents ..... 1
Pseudo Contents ... 1
Real Contents ..... 5


when expecting

Real Contents ..... 1
Pseudo Contents ... 2
Real Contents ..... 5


I'm using KOMA class scrbook.

Here is a MWE:

\documentclass[openany]{scrbook}

\newcommand{\pseudochapter}[2][0]
{
{chapter}{\protect\numberline {\thechapter}#2}{\thepage}{}}
\clearpage
}

\begin{document}
\tableofcontents\thispagestyle{empty}\clearpage
\setcounter{page}{1}
\chapter{Real Contents}
\pseudochapter[3]{Pseudo Contents}
\chapter{Real Contents}
\end{document}


You nearly got it right

\newcommand{\pseudochapter}[2][0]
{
{chapter}{\protect\numberline {\thechapter}#2}{\thepage}{}}
\clearpage
}


You have to move the \clearpage after the \addtocontents, so that the \addtocounter won't affect the pseudo chapter.

EDIT:

To solve your new problem you can use

\newcommand{\pseudochapter}[2][0]
{
\clearpage\phantom{empty}
{chapter}{\protect\numberline {\thechapter}#2}{\thepage}{}}
\clearpage
}


You need \phantom for the second \clearpage to work, since yor the page after the first stays clear. This command provides empty pages, so you can't use it in the middle of the first chapter (What I don't think you want).

EDIT #2:

\newcommand{\pseudochapter}[2][0]
{
\newcounter{tmppage}
\setcounter{tmppage}{\thepage}
\stepcounter{tmppage}


• Great. That does the job. It may look like an ugly workaround, but I think it is the simplest and most obvious way to do this. However, you forgot the \addtocounter{chapter}{1} cmd. You wanna add this? – PhilippVerpoort Sep 18 '15 at 12:28