PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Inhaltsverzeichnisseite vergrößern?



pospiech
26-11-2007, 12:09
Ich habe ein Inhaltsverzeichnis das um wenige Zeilen auf die nächste Seite hinausgeht und würde gerne alles auf einer Seite haben.

Dazu habe ich ausprobiert im Text vor dem entsprechenden Abschnitt ein


\addtocontents{toc}{\enlargethispage{10cm}}


zu setzen.

Das bringt mir jedoch nur wirre Fehlermeldungen:


! Use of \@flstop doesn't match its definition.
\new@ifnextchar ...served@d = #1\def \reserved@a {
#2}\def \reserved@b {#3}\f...
l.56 \addtocontents{toc}{\enlargethispage{10cm}}

If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.
...



Im folgenden Minimalbeispiel sind die Fehler anders, aber funtkionieren tut es dennoch nicht



\documentclass{report}
\begin{document}
\tableofcontents
\chapter{ABC}
\section{abc}\section{abc}\section{abc}\section{ab c}\section{abc}\section{abc}\section{abc}
\chapter{ABC}
\section{abc}\section{abc}\section{abc}\section{ab c}\section{abc}\section{abc}\section{abc}
\chapter{ABC}
\section{abc}\section{abc}\section{abc}\section{ab c}\section{abc}\section{abc}\section{abc}
\addtocontents{toc}{\enlargethispage{10cm}}
\chapter{ABC}
\section{abc}\section{abc}\section{abc}\section{ab c}\section{abc}\section{abc}\section{abc}
\end{document}




! Argument of \@sect has an extra }.
<inserted text>
\par
l.11 \addtocontents{toc}{\enlargethispage{10cm}}

I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
{\normalfont \Large \bfseries }{\@firstoftwo {\@enlargepage {\hbox {\kern \ETC.
! Paragraph ended before \@sect was complete.
<to be read again>
\par
l.11 \addtocontents{toc}{\enlargethispage{10cm}}

I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.


Was wäre die Lösung ?

Matthias

localghost
26-11-2007, 12:31
Warum dieser Fehler zustande kommt, kann ich dir nicht erklären. Es gibt aber eine Lösung, mit der Du auch zum Ziel kommst.

\documentclass{report}
\begin{document}
\tableofcontents\enlargethispage{1\baselineskip}\n ewpage
\chapter{ABC}
\section{abc}\section{abc}\section{abc}\section{ab c}\section{abc}\section{abc}\section{abc}
\chapter{ABC}
\section{abc}\section{abc}\section{abc}\section{ab c}\section{abc}\section{abc}\section{abc}
\chapter{ABC}
\section{abc}\section{abc}\section{abc}\section{ab c}\section{abc}\section{abc}\section{abc}
\chapter{ABC}
\section{abc}\section{abc}\section{abc}\section{ab c}\section{abc}\section{abc}\section{abc}
\end{document}
Das funktioniert zumindest mal für dein Beispiel. Den Seitenumbruch kann man weglassen. Der spielt nur bei Verwendung von hyperref (http://dante.ctan.org/CTAN/help/Catalogue/entries/hyperref.html) eine Rolle.

rais
26-11-2007, 13:16
evtl. klappt auch


\addtocontents{toc}{\protect\enlargethispage{1cm}}

MfG,

pospiech
26-11-2007, 19:06
evtl. klappt auch


\addtocontents{toc}{\protect\enlargethispage{1cm}}


Ja das funktioniert.

Matthias