summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/dvdcoll/dvdcoll.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/dvdcoll/dvdcoll.cls')
-rw-r--r--Master/texmf-dist/tex/latex/dvdcoll/dvdcoll.cls267
1 files changed, 203 insertions, 64 deletions
diff --git a/Master/texmf-dist/tex/latex/dvdcoll/dvdcoll.cls b/Master/texmf-dist/tex/latex/dvdcoll/dvdcoll.cls
index 9bb54484a8f..507ea447d5c 100644
--- a/Master/texmf-dist/tex/latex/dvdcoll/dvdcoll.cls
+++ b/Master/texmf-dist/tex/latex/dvdcoll/dvdcoll.cls
@@ -22,11 +22,12 @@
%
\NeedsTeXFormat{LaTeX2e}%
%
-\ProvidesClass{dvdcoll}[2006/06/14 dvdcoll.cls v0.52 - Josef Kleber (C) 2006]%
+\ProvidesClass{dvdcoll}[2006/10/06 dvdcoll.cls v0.6 - Josef Kleber (C) 2006]%
%
\RequirePackage{xkeyval}%
\RequirePackage{ifthen}%
%
+%
\define@key{dvdcoll.cls}{language}[babel]%
{%
\ifthenelse{\NOT\equal{#1}{babel}}%
@@ -142,26 +143,54 @@
\fi%
}%
%
+\define@choicekey*{DvdSeries}{dvdnumbering}[\valuedvdnumbering\nr]{normal,season}[normal]%
+{%
+ \ifcase\nr\relax%
+ \renewcommand{\dc@option@dvdnumbering}{normal}%
+ \or%
+ \renewcommand{\dc@option@dvdnumbering}{season}%
+ \fi%
+}%
+%
+\define@choicekey*{DvdSeries}{titlenumbering}[\valuetitlenumbering\nr]{normal,season}[normal]%
+{%
+ \ifcase\nr\relax%
+ \renewcommand{\dc@option@titlenumbering}{normal}%
+ \or%
+ \renewcommand{\dc@option@titlenumbering}{season}%
+ \fi%
+}%
+%
+%
\ExecuteOptionsX{dvdlabel,dvdskip,pagenumbers,heading,language}%
%
\ProcessOptionsX\relax%
%
\LoadClassWithOptions{scrreprt}%
%
-\RequirePackage{xspace}%
\RequirePackage{tabularx}%
\RequirePackage{booktabs}%
\RequirePackage{array}%
+\RequirePackage{pdfnotiz}%
\RequirePackage[naturalnames=true,hypertexnames=false]{hyperref}%
%--- naturalnames=true,hypertexnames=false --- verhindert das mehrfache Anlegen von hyperref-Ankern
% (bedingt durch das Rücksetzen des Zahlers chapter)
% und beseitigt die Warnungen (ext4) von hyperref
%
%
+%--- Package adjustments ---
+%
+%avoid ugly looking frame overlays in \DvdTitleWithDescription
+\setlength\extrarowheight{2pt}%
+%
+%
%--- Counters ---
%
\newcounter{dvdcount}[chapter]%
\newcounter{titlecount}[dvdcount]%
+\newcounter{season}%
+\newcounter{seasontitlecount}%
+\newcounter{seasondvd}%
%
%
%--- Variables ---
@@ -175,12 +204,55 @@
%
\def\dc@third{min}%
\def\dc@addhspace@title@count{0.7em}%
+%
+% \***skip aus source2e; etwas vergrößert
+\def\dc@smallskip{\vspace{6pt plus 2pt minus 2pt}}%
+\def\dc@medskip{\vspace{12pt plus 4pt minus 4pt}}%
+\def\dc@bigskip{\vspace{18pt plus 6pt minus 6pt}}%
+%
+% font sizes used in the tables
+\def\dc@size@table@cells{\large}%
+\def\dc@size@table@title{\Large}%
+%
+% dummy for .dcl definitons
\newcommand*\dc@miss{}%
\newcommand*\dc@lfrname{}%
-% \***skip aus source2e; etwas vergrößert
-\def\dc@smallskip{\vspace{6pt plus 2pt minus 2pt}}
-\def\dc@medskip{\vspace{12pt plus 4pt minus 4pt}}
-\def\dc@bigskip{\vspace{18pt plus 6pt minus 6pt}}
+\newcommand*\dc@pdf@subject{}%
+%
+%
+\newcommand*\dc@option@titlenumbering{}%
+\newcommand*\dc@option@dvdnumbering{}%
+%
+%
+\newcommand*\dc@pcwlz[1]% PrintCounterWithLeadingZero
+{%
+ \ifnum\value{#1}<10{0}\fi%
+ \arabic{#1}%
+}%
+%
+%
+\newcommand*\dc@print@counter%
+{%
+ \ifthenelse{\equal{\dc@option@titlenumbering}{season}}%
+ {%season
+ \dc@pcwlz{season}x\dc@pcwlz{seasontitlecount}%
+ }%
+ {%normal
+ \thetitlecount{}.%
+ }%
+}%
+%
+%
+\newcommand*\dc@calc@dvdcounter%
+{%
+ \ifthenelse{\equal{\dc@option@dvdnumbering}{season}}%
+ {%season
+ \def\dc@dvdcounter{\theseason.\theseasondvd}%
+ }%
+ {%normal
+ \def\dc@dvdcounter{\thedvdcount}%
+ }%
+}%
%
%
\newcommand*\dc@print@dvdlabel[1]%
@@ -195,6 +267,18 @@
%
%--- Commands ---
%
+\newcommand*\SetLFRName[1]%
+{%
+ \renewcommand*\dc@lfrname{#1}%
+}%
+%
+%
+\newcommand\Description[1]%
+{%
+ \gdef\pn@pdf@desc{#1}%
+}%
+%
+%
\newcommand*\SetCounterSpace[1]%
{%
\def\dc@addhspace@title@count{#1}%
@@ -209,7 +293,7 @@
%
\newcommand*\DvdCounter%
{%
- \DvdSpace\thedvdcount%
+ \DvdSpace\dc@dvdcounter%
}%
%
%
@@ -225,6 +309,17 @@
}%
%
%
+\newcommand*\SetSeason[2][1]%
+{%
+ \setcounter{season}{#2}%
+ \ifthenelse{#1 = 1}%
+ {\setcounter{seasondvd}{0}}% just reset if #1 equal 1
+ {}%
+ \setcounter{seasontitlecount}{#1}%
+ \addtocounter{seasontitlecount}{-1}%
+}%
+%
+%
\newcommand*\DvdPart[1]%
{%
\part{#1}%
@@ -233,10 +328,15 @@
}%
%
%
-\newcommand*\DvdSeries[1]%
-{%
- \chapter{#1}%
- \def\dc@series{#1}%
+\newcommand*\DvdSeries[2][titlenumbering=normal,dvdnumbering=normal]%
+{%default - default setting of xkeyval seem not to work??? all or nothing???
+ \renewcommand*\dc@option@dvdnumbering{normal}%
+ \renewcommand*\dc@option@titlenumbering{normal}%
+%
+ \setkeys{DvdSeries}{#1}%
+ \chapter{#2}%
+ \def\dc@series{#2}%
+ \setcounter{season}{-1}%
\ifthenelse{\equal{\valueheading}{nonumber}}%
{%
\setcounter{dvdcount}{0}%
@@ -250,10 +350,12 @@
%
\newcommand*\DvdTitle[2]%
{%
- %\refstepcounter für richtigen (DvdTitle anstatt Dvd) Hyperref-Link in lfr
- \refstepcounter{titlecount}%
+ %increasing counter depending on titlenumbering
+ \ifthenelse{\equal{\dc@option@titlenumbering}{season}}%
+ {\refstepcounter{seasontitlecount}}%
+ {\refstepcounter{titlecount}}%
\ifthenelse{\equal{\dc@miss}{#2}}%
- {
+ {%
%Eintrag in lfr unbedingt vor Tabelleneintrag, ansonsten Fehler in der Tabelle - don't no why!
%Eintrag in lfr bei heading=nonumber OHNE Nummern
\ifthenelse{\equal{\valueheading}{nonumber}}%
@@ -261,17 +363,58 @@
\addcontentsline{lfr}{lfrsec}{\protect\numberline{} \dc@series\ - #1}%
}%
{%
- \addcontentsline{lfr}{lfrsec}{\protect\numberline{\thepart.\thechapter.\thedvdcount.\thetitlecount} \dc@series\ - #1}%
- }%
- \thetitlecount{}. & #1 & \hfill\dc@miss \tabularnewline%
- }
+ \ifthenelse{\equal{\dc@option@titlenumbering}{season}}%
+ {%season
+ \addcontentsline{lfr}{lfrsec}{\protect\numberline{\thepart.\thechapter.\theseason.\theseasontitlecount} \dc@series\ - #1}%
+ }%
+ {%normal
+ \addcontentsline{lfr}{lfrsec}{\protect\numberline{\thepart.\thechapter.\thedvdcount.\thetitlecount} \dc@series\ - #1}%
+ }%
+ }%
+ \dc@print@counter & #1\strut & \hfill\dc@miss \tabularnewline%
+ }%
{%
\ifthenelse{\equal{}{#2}}%
% keine Minutenangabe
- {\thetitlecount{}. & #1 & \tabularnewline}%
+ {\dc@print@counter & #1\strut & \tabularnewline}%
% mit Minutenangabe
- {\thetitlecount{}. & #1 & \hfill{}#2~\dc@third \tabularnewline}%
+ {\dc@print@counter & #1\strut & \hfill{}#2~\dc@third \tabularnewline}%
+ }%
+}%
+%
+%
+\newcommand*\DvdTitleWithDescription[2]%
+{%
+ %increasing counter depending on titlenumbering
+ \ifthenelse{\equal{\dc@option@titlenumbering}{season}}%
+ {\refstepcounter{seasontitlecount}}%
+ {\refstepcounter{titlecount}}%
+ \ifthenelse{\equal{\dc@miss}{#2}}%
+ {%
+ %Eintrag in lfr unbedingt vor Tabelleneintrag, ansonsten Fehler in der Tabelle - don't no why!
+ %Eintrag in lfr bei heading=nonumber OHNE Nummern
+ \ifthenelse{\equal{\valueheading}{nonumber}}%
+ {%
+ \addcontentsline{lfr}{lfrsec}{\protect\numberline{} \dc@series\ - #1}%
+ }%
+ {%
+ \ifthenelse{\equal{\dc@option@titlenumbering}{season}}%
+ {%season
+ \addcontentsline{lfr}{lfrsec}{\protect\numberline{\thepart.\thechapter.\theseason.\theseasontitlecount} \dc@series\ - #1}%
+ }%
+ {%normal
+ \addcontentsline{lfr}{lfrsec}{\protect\numberline{\thepart.\thechapter.\thedvdcount.\thetitlecount} \dc@series\ - #1}%
+ }%
+ }%
+ \dc@print@counter & \makebox[0pt]{}\pdfnote{#1\strut} & \hfill\dc@miss \tabularnewline%
}%
+ {%
+ \ifthenelse{\equal{}{#2}}%
+ % keine Minutenangabe
+ {\dc@print@counter & \makebox[0pt]{}\pdfnote{#1\strut} & \tabularnewline}%
+ % mit Minutenangabe
+ {\dc@print@counter & \makebox[0pt]{}\pdfnote{#1\strut} & \hfill{}#2~\dc@third \tabularnewline}%
+ }%
}%
%
%
@@ -294,69 +437,70 @@
}%
%
%
-\newcommand\l@lfrsec{\@dottedtocline{1}{0em}{0em}}
+\newcommand\l@lfrsec{\@dottedtocline{1}{0em}{0em}}%
%
%
\newcommand\SetLFRSecNumwidth[1]%
{%
- \renewcommand*\l@lfrsec{\@dottedtocline{1}{0pt}{#1}}
+ \renewcommand*\l@lfrsec{\@dottedtocline{1}{0pt}{#1}}%
}%
%
%
\newcommand\SetTOCSecIndent[1]%
{%
- \renewcommand*\l@section{\@dottedtocline{1}{#1}{0pt}}
+ \renewcommand*\l@section{\@dottedtocline{1}{#1}{0pt}}%
}%
%
%
\newcommand*\SetTOCNumwidth[1]%
{%
\renewcommand*\l@chapter[2]{%
- \ifnum \c@tocdepth >\m@ne
+ \ifnum \c@tocdepth >\m@ne%
\addpenalty{-\@highpenalty}%
- \vskip 1.0em \@plus\p@
+ \vskip 1.0em \@plus\p@%
\setlength\@tempdima{#1}%
- \if@tocleft
- \ifx\toc@l@number\@empty\else
+ \if@tocleft%
+ \ifx\toc@l@number\@empty\else%
\setlength\@tempdima{0\toc@l@number}%
- \fi
- \fi
- \begingroup
- \parindent \z@ \rightskip \@pnumwidth
- \parfillskip -\@pnumwidth
- \leavevmode \sectfont
- \advance\leftskip\@tempdima
- \hskip -\leftskip
- ##1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss ##2}\par
- \penalty\@highpenalty
- \endgroup
- \fi}
+ \fi%
+ \fi%
+ \begingroup%
+ \parindent \z@ \rightskip \@pnumwidth%
+ \parfillskip -\@pnumwidth%
+ \leavevmode \sectfont%
+ \advance\leftskip\@tempdima%
+ \hskip -\leftskip%
+ ##1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss ##2}\par%
+ \penalty\@highpenalty%
+ \endgroup%
+ \fi}%
%
\renewcommand*\l@part[2]{%
- \ifnum \c@tocdepth >-2\relax
+ \ifnum \c@tocdepth >-2\relax%
\addpenalty{-\@highpenalty}%
\addvspace{2.25em \@plus\p@}%
\setlength\@tempdima{#1}%
- \if@tocleft
- \ifx\toc@l@number\@empty\else
+ \if@tocleft%
+ \ifx\toc@l@number\@empty\else%
\setlength\@tempdima{0\toc@l@number}%
- \fi
- \fi
- \begingroup
- \parindent \z@ \rightskip \@pnumwidth
- \parfillskip -\@pnumwidth
- \leavevmode\sectfont\large
- \advance\leftskip\@tempdima
- \hskip -\leftskip
- ##1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss ##2}\par
- \penalty\@highpenalty
- \endgroup
- \fi}
+ \fi%
+ \fi%
+ \begingroup%
+ \parindent \z@ \rightskip \@pnumwidth%
+ \parfillskip -\@pnumwidth%
+ \leavevmode\sectfont\large%
+ \advance\leftskip\@tempdima%
+ \hskip -\leftskip%
+ ##1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss ##2}\par%
+ \penalty\@highpenalty%
+ \endgroup%
+ \fi}%
}%
%
%
%--- Environments ---
%
+%
\newenvironment{Dvd}[2]%
{%
%
@@ -367,13 +511,15 @@
\SavedEndTab%
}%
\refstepcounter{dvdcount}% \refstepcounter für hyperref-Link auf die jeweilige DVD
+ \refstepcounter{seasondvd}%
+ \dc@calc@dvdcounter% to have correct counter in "text" form
\ifthenelse{\equal{}{#1}}{\def\dc@title{\dc@series\DvdCounter}}{\def\dc@title{#1}}%
\addcontentsline{toc}{section}{\dc@title}%
\phantomsection% korrigiert fehlerhafte (falsch positionierte) Links auf dvd-Tabellen
\noindent%
% verhindert overfull \hbox Errors wegen \tabularx{\linewidth}...
- \tabularx{\linewidth}{>{\large}r>{\large}X>{\large}l}%
- \multicolumn{3}{l}{\Large\dc@title\dc@option@dvdlabel\dc@print@dvdlabel{#2}}\\%
+ \tabularx{\linewidth}{>{\dc@size@table@cells\hfill}r>{\dc@size@table@cells}X>{\dc@size@table@cells}r}%
+ \multicolumn{3}{l}{\dc@size@table@title\dc@title\dc@option@dvdlabel\dc@print@dvdlabel{#2}}\\%
\midrule%
}%
{%
@@ -382,11 +528,4 @@
\dc@addvspace@endDvd%
}%
%
-%
-%----------------------------------------------------------------------------------------------------------------
-%
-% ToDo:
-%
-% - Option titlenumbers: verringern auf 2 Spalten unter Weglassen der Nummerierung
-% Fehler bei Implementationsversuch (1. ifthenelse mit tabularx / 2. \multicolumn)
-% mal in Newsgroup fragen \ No newline at end of file
+\endinput% \ No newline at end of file