diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/dtk/dtk.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/dtk/dtk.cls | 119 |
1 files changed, 91 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/latex/dtk/dtk.cls b/Master/texmf-dist/tex/latex/dtk/dtk.cls index 12d273b2605..816af176367 100644 --- a/Master/texmf-dist/tex/latex/dtk/dtk.cls +++ b/Master/texmf-dist/tex/latex/dtk/dtk.cls @@ -14,6 +14,13 @@ %% version 2005/12/01 or later. \listfiles + +\InputIfFileExists{dtk-requirepackages.tex}{% + \typeout{*************************************^^J% + * File `dtk-requirepackages.tex' used.^^J% + *************************************}% +}{}% + \NeedsTeXFormat{LaTeX2e}[1999/12/01] \RequirePackage{hyphsubst}% Trennregeln austauschen \HyphSubstIfExists{ngerman-x-latest}{% @@ -21,8 +28,8 @@ \HyphSubstIfExists{german-x-latest}{% \HyphSubstLet{german}{german-x-latest}}{} -\def\DTKversion{2.07a} -\def\DTKversiondate{2017/06/07} +\def\DTKversion{2.08a} +\def\DTKversiondate{2019/01/31} \ProvidesClass{dtk}[\DTKversiondate v\DTKversion dtk documentclass (RN)] \RequirePackage{ifxetex,ifluatex,ifpdf,ifvtex,luatex85} @@ -56,6 +63,10 @@ \newlength\DTK@tempdimb \newlength\DTK@tempdimc \newlength\DTK@tempdimd +\newlength\DTK@tempdime + +\newlength\Linewidth +\AtBeginDocument{\Linewidth=\dimexpr\linewidth-2\fboxsep-2\fboxrule} \newcommand*\journalname{Die \protect\TeX{}nische Kom\"odie} @@ -164,7 +175,7 @@ \ClassError{dtk2}{% Eines der Makros `\string\DTKrmFontName', `\string\DTKsfFontName', \MessageBreak - `\string\DTKttFontName`' oder `\string\DTKmathFontName' + `\string\DTKttFontName' oder `\string\DTKmathFontName' \MessageBreak ist nicht korrekt definiert% }{}% @@ -180,6 +191,9 @@ \input{dtk-new-engines.clo}% LuaTeX oder XeTeX \fi +\@ifpackagelater{csquotes}{2018/02/11}{}{% + \def\@inpenc@undefined{} +} \RequirePackage[autostyle=true,german=guillemets,maxlevel=3]{csquotes}% \MakeAutoQuote{»}{«} \defineshorthand{"`}{\openautoquote}% @@ -256,6 +270,11 @@ \let\DTK@thispagestyle=\thispagestyle +\newcommand*\DTK@Author@list@content{} +\newcommand\DTK@Author@list@exec{% + \DTK@Author@list@content + \global\let\DTK@Author@list@content=\@empty +} \newcommand\DTK@maketitle[1][]{% \begingroup \dimen0=\textheight @@ -265,19 +284,20 @@ \fi \endgroup \def\and{\end{tabular}, \begin{tabular}[t]{@{}c@{}}}% - \chapter[\@@title]{\@title}% - %%%\ifx\@author\@empty\else\addsec*{\@author}\fi + \leavevmode% erzwingt \everypar (speziell: \DTK@Author@list@exec) + \vspace*{-8mm}% + \addchap[\@@title]{\@title}% \begingroup \usekomafont{author}\lineskip 0.75em % - \begin{tabular}[t]{@{}c@{}}\@author\end{tabular}\par + \begin{tabular}[t]{@{}c@{}}\@author\end{tabular}\par\medskip \endgroup - \DTK@thispagestyle{plain.scrheadings}% \@thanks \global\let\@thanks=\@empty \global\let\@title=\@empty \global\let\@author=\@empty \global\let\@thanks=\@empty \global\let\and\relax + \global\let\DTK@license=\@empty } \renewcaptionname{ngerman}{\bibname}{Literatur und Software} @@ -286,12 +306,44 @@ \RequirePackage[automark,draft=false]{scrlayer-scrpage} \pagestyle{scrheadings} \clearpairofpagestyles -\ihead{\headmark} -\ohead{\pagemark} +% https://komascript.de/node/2177 +\ihead{\ifstr{\righttopmark}{\rightbotmark}{\leftmark}{}} +\ohead{\ifstr{\righttopmark}{\rightbotmark}{\pagemark}{}} \ofoot*{\normalsize\DTKcorrVersion} \ifoot*{\journalname~~\DTKdate} \automark[chapter]{chapter} +\newcommand*\DTK@license{} +\newcommand*\license[1]{% + \gdef\DTK@license{#1}% +} +\iffalse +\RedeclareSectionCommand[% + ,style=part + %,indent=\z@ + ,beforeskip=40mm + ,afterskip=60mm % + ,pagestyle=plain.scrheadings + %,innerskip=\z@ +]{part} +\fi + +\RedeclareSectionCommand[% + ,style=section + ,indent=\z@ + ,beforeskip=-2\baselineskip \@plus -.2\baselineskip \@minus -.2\baselineskip + ,afterskip=.4\baselineskip \@plus .04\baselineskip \@minus .04\baselineskip +]{chapter} + +\RedeclareSectionCommand[% + ,beforeskip=-2.4ex \@plus -1ex \@minus -.2ex % Betrag ist von Bedeutung! + ,afterskip=0.8ex \@plus .1ex \@minus .1ex % +]{section} + +\RedeclareSectionCommand[% + ,afterskip=0.8ex \@plus .1ex % +]{subsection} + \RequirePackage{xcolor} \ifDTKcolor @@ -354,7 +406,8 @@ \def\bibliography#1{% \ClassError{dtk2}{% Das Makro `\string\bibliography' wird nicht unterstützt!\MessageBreak - Verwende stattdessen `\string\addbibresource\string{#1.bib\string}'\MessageBreak + Verwende stattdessen `\string\addbibresource\string{#1.bib\string}' + \MessageBreak und `\string\printbibliography' (siehe biblatex-Dokumentation) }{}% }% @@ -362,10 +415,11 @@ %%%\ifDTKrecord \expandafter \endinput \fi % lohnt es? -\addtokomafont{caption}{\RaggedRight\small} +\addtokomafont{caption}{%\RaggedRight + \small} \setkomafont{captionlabel}{\sffamily} \setcapindent{0pt} -\setcapwidth[c]{\textwidth} +%\setcapwidth[c]{\textwidth} \renewcaptionname{ngerman}{\figurename}{Abb.} \renewcaptionname{ngerman}{\tablename}{Tab.} \def\thefigure{\@arabic\c@figure} @@ -373,22 +427,6 @@ \def\theequation{\@arabic\c@equation} \def\thelstlisting{\@arabic\c@lstlisting} -\RedeclareSectionCommand[% - ,beforeskip=-2.4ex \@plus -1ex \@minus -.2ex % Betrag ist von Bedeutung! - ,afterskip=0.8ex \@plus .1ex \@minus .1ex % -]{section} - -\RedeclareSectionCommand[% - ,afterskip=0.8ex \@plus .1ex % -]{subsection} - -\RedeclareSectionCommand[% - ,style=section - ,indent=\z@ - ,beforeskip=-2\baselineskip \@plus -.2\baselineskip \@minus -.2\baselineskip - ,afterskip=1\baselineskip \@plus .1\baselineskip \@minus .1\baselineskip -]{chapter} - \setkomafont{disposition}{\normalfont\sffamily} \setkomafont{part}{\usekomafont{disposition}\huge} \setkomafont{chapter}{\usekomafont{disposition}\Large} @@ -398,6 +436,20 @@ \setkomafont{pagefoot}{\footnotesize\sffamily\slshape}% \itshape? \setkomafont{author}{\usekomafont{section}} +\RequirePackage{marginnote} +\renewcommand*{\marginfont}{\normalfont\itshape\small} +\renewcommand*{\sectionlinesformat}[4]{% + % reagiert auf \addchap in \maketitle (wegen "style=section") + \@hangfrom{% + \ifx\DTK@license\@empty\else + \marginnote{\rotatebox{90}{\makebox[.5em][r]{% + Lizenz:~\DTK@license + }}}% + \fi + \hskip #2#3% + }{#4}% +} + %\addtokomafont{footnote}{\RaggedRight} \deffootnote[1.2em]{1.2em}{1.2em}{\textsuperscript{\thefootnotemark}\,} \newcommand*\DTK@footnote{} @@ -409,6 +461,7 @@ \def\footnote{% \@ifstar\DTK@@footnote\DTK@footnote } +%\setfootnoterule{.15\textwidth} \RequirePackage{enumitem} \setlist{leftmargin=*,nosep} @@ -423,6 +476,16 @@ % Listings \newcommand*\DTKlstfont{\small\ttfamily} +\let\lstlisting=\relax +\let\lstlisting@=\relax +% Correct wrong vertical spaces +\lstnewenvironment{lstlisting}[2][]{% + %%%%\leavevmode% + \lst@TestEOLChar{#2}% + \lstset{#1}% + \csname\@lst @SetFirstNumber\endcsname +}{\csname\@lst @SaveFirstNumber\endcsname} + % siehe ggf.: https://github.com/jez/latex-solarized \lstdefinestyle{DTKlstSimple0}{% |