PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Inhaltsverzeichnis: mehrere Seitenzahlen zu gleicher Überschrift



vci
29-01-2009, 20:52
Hi,

ich habe mal wieder ein spezielleres Problem:
Ich erstelle ein kleines A5-Heftchen, dieses enthält regelmäßig verschiedene Seiten zu einem Thema + am Ende des Dokuments (sogesehen als Anhang) noch einmal eine Seite zu diesem Thema.

Nun würde ich gerne ein Inhaltsverzeichnis wie folgt erstellen:

Thema A 3, 19
Thema B 5, 20
Thema C 7, 21
(Also Thema A beginnt auf Seite 3 UND Seite 19 ist noch einmal etwas dazu)

Also so, dass beide Seitenzahlen angegeben werden, ist das irgendwie möglich? Ein separates Abbildungsverzeichnis oder Ähnliches wollte ich vermeiden!

Vielen Dank!

mechanicus
29-01-2009, 23:51
Hallo,

ich habe es mal so versucht, aber ich bin mir sicher, dass hier noch andere Ideen folgen. Beachte aber das zusätzliche Pflichtfeld bei chapter. Habe es noch nicht optional gemacht.

\documentclass{scrreprt}
\usepackage[ngerman]{babel}
\makeatletter
\def\@chapter[#1]#2#3{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\@maybeautodot\thechapter
\typeout{\@chapapp\space\thechapter.}%
% \addcontentsline{toc}{chapter}{\protect\numberline {\thechapter}#1}%
\addtocontents{toc}{\textbf{\thechapter\hspace{0.8 em}#1\protect\hfill\protect\thepage,{\protect\page ref{#3}}}\endgraf}
\if@chaptertolists
\doforeachtocfile{%
\iftocfeature{\@currext}{chapteratlist}{%
\addcontentsline{\@currext}{chapteratlist}{%
\protect\numberline{\thechapter}#1}%
}{}%
}%
\@ifundefined{float@addtolists}{}{%
\scr@float@addtolists@warning
\scr@ifundefinedorrelax{@currentHref}{%
\float@addtolists{%
\protect\contentsline{chapteratlist}{%
\protect\numberline{\thechapter}#1}{\thepage}%
}%
}{%
\float@addtolists{%
\protect\contentsline{chapteratlist}{%
\protect\numberline{\thechapter}#1}{\thepage}{\@cu rrentHref}%
}%
}%
}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\if@chaptertolists
\doforeachtocfile{%
\iftocfeature{\@currext}{chapteratlist}{%
\addcontentsline{\@currext}{chapteratlist}{#1}%
}{}%
}%
\@ifundefined{float@addtolists}{}{%
\scr@float@addtolists@warning
\scr@ifundefinedorrelax{@currentHref}{%
\float@addtolists{%
\protect\contentsline{chapteratlist}{#1}{\thepage} %
}%
}{%
\float@addtolists{%
\protect\contentsline{chapteratlist}{#1}{\thepage} {\@currentHref}%
}%
}%
}%
\fi
\fi
\chaptermark{#1}%
\ifdim \@chapterlistsgap>\z@
\doforeachtocfile{%
\iftocfeature{\@currext}{chapteratlist}{%
\addtocontents{\@currext}{\protect\addvspace{\@cha pterlistsgap}}%
}{}%
}%
\@ifundefined{float@addtolists}{}{%
\scr@float@addtolists@warning
\float@addtolists{\protect\addvspace{\@chapterlist sgap}}%
}%
\fi
\if@twocolumn
\if@at@twocolumn
\@makechapterhead{#2}%
\else
\@topnewpage[\@makechapterhead{#2}]%
\fi
\else
\@makechapterhead{#2}%
\@afterheading
\fi
}
\let\mychapter=\chapter
\makeatother
\usepackage{blindtext}
\begin{document}
\tableofcontents
\chapter{foo}{zusFoo}
\blindtext[4]
\section{Zusammenfassung foo}\label{zusFoo}
\blindtext
\chapter{bar}{zusBar}
\blindtext[4]
\section{Zusammenfassung foo}\label{zusBar}
\blindtext
\end{document}

mechanicus
30-01-2009, 13:06
Hier noch etwas modifiziert:


\documentclass{scrreprt}
\usepackage[ngerman]{babel}
\usepackage{amsmath}
\usepackage{ifthen}
\makeatletter
\let\origchapter\chapter
\def\test{empty}
\long\def\@chapter[#1]#2#3{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\@maybeautodot\thechapter
\typeout{\@chapapp\space\thechapter.}%
\ifthenelse{\equal{#3}{}}{%
\addtocontents{toc}{\textbf{\thechapter\hspace{0.8 em}#1\protect\hfill\thepage\endgraf}}%
}{%
\addtocontents{toc}{\textbf{\thechapter\hspace{0.8 em}#1\protect\hfill\thepage,{\protect\pageref{#3}} }\endgraf}%
}
% \addtocontents{toc}{\textbf{\thechapter\hspace{0.8 em}#1\protect\hfill\thepage,{\protect\pageref{#3}} }\endgraf}%
\if@chaptertolists
\doforeachtocfile{%
\iftocfeature{\@currext}{chapteratlist}{%
\addcontentsline{\@currxet}{chapteratlist}{%
\protect\numberline{\thechapter}#1}%
}{}%
}%
\@ifundefined{float@addtolists}{}{%
\scr@float@addtolists@warning
\scr@ifundefinedorrelax{@currentHref}{%
\float@addtolists{%
\protect\contentsline{chapteratlist}{%
\protect\numberline{\thechapter}#1}{\thepage}%
}%
}{%
\float@addtolists{%
\protect\contentsline{chapteratlist}{%
\protect\numberline{\thechapter}#1}{\thepage}{\@cu rrentHref}%
}%
}%
}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\if@chaptertolists
\doforeachtocfile{%
\iftocfeature{\@currext}{chapteratlist}{%
\addcontentsline{\@currext}{chapteratlist}{#1}%
}{}%
}%
\@ifundefined{float@addtolists}{}{%
\scr@float@addtolists@warning
\scr@ifundefinedorrelax{@currentHref}{%
\float@addtolists{%
\protect\contentsline{chapteratlist}{#1}{\thepage} %
}%
}{%
\float@addtolists{%
\protect\contentsline{chapteratlist}{#1}{\thepage} {\@currentHref}%
}%
}%
}%
\fi
\fi
\chaptermark{#1}%
\ifdim \@chapterlistsgap>\z@
\doforeachtocfile{%
\iftocfeature{\@currext}{chapteratlist}{%
\addtocontents{\@currext}{\protect\addvspace{\@cha pterlistsgap}}%
}{}%
}%
\@ifundefined{float@addtolists}{}{%
\scr@float@addtolists@warning
\float@addtolists{\protect\addvspace{\@chapterlist sgap}}%
}%
\fi
\if@twocolumn
\if@at@twocolumn
\@makechapterhead{#2}%
\else
\@topnewpage[\@makechapterhead{#2}]%
\fi
\else
\@makechapterhead{#2}%
\@afterheading
\fi
}
\makeatother
\usepackage{blindtext}
\begin{document}
\tableofcontents
\chapter{chapter ohne Zusammenfassung}{}
\blindtext[4]
\chapter{foo}{zusFoo}
\blindtext[4]
\section{Zusammenfassung foo}\label{zusFoo}
\blindtext
\chapter{zusBar}{zusBar}
\blindtext[4]
\section{Zusammenfassung foo}\label{zusBar}
\blindtext
\end{document}

Gruß
Marco

vci
31-01-2009, 13:23
Danke für deine Hilfe! Leider kann ich dein Beispiel nicht übersetzen:



Kapitel 1.
! Undefined control sequence.
\@chapter ...{#3}}}\endgraf }} \if@chaptertolists
\doforeachtocfile {\iftocf...
l.89 \chapter{chapter ohne Zusammenfassung}{}

mechanicus
31-01-2009, 14:00
Danke für deine Hilfe! Leider kann ich dein Beispiel nicht übersetzen:



Kapitel 1.
! Undefined control sequence.
\@chapter ...{#3}}}\endgraf }} \if@chaptertolists
\doforeachtocfile {\iftocf...
l.89 \chapter{chapter ohne Zusammenfassung}{}

Hat noch irgendjemand die Problem? Hast du vielleicht kein KOMA-3.

Gruß
Marco

vci
31-01-2009, 15:31
Also als Distribution benutze ich TexLive 2007. Wie stelle ich fest, welche KOMA-Version darin enthalten ist?

edit
Frage hat sich beantwortet:



Package typearea, 2006/07/30 v2.95b KOMA-Script package (type area)
Copyright (C) Frank Neukam, 1992-1994
Copyright (C) Markus Kohm, 1994-2002