summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/dtk/dtk.clo
blob: 18c6e20b729c36a29e989484b070c679478c1233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
%%   $Id: dtk.clo 17 2011-04-23 10:42:34Z herbert $

\ProvidesFile{dtk.clo}[2010/10/17 v0.3 dtk class option (RN,hv)]

\newcommand\CoverArt[3]{%
  \ifx\CoverTitleFont\@undefined
    %\newfont\CoverTitleFont{ecrm1700 scaled \magstep 5}
    %\newfont\CoverTitleFont{lmr12 scaled 2938}
    \DeclareFixedFont\CoverTitleFont{\encodingdefault}{\rmdefault}{m}{n}{41.26}%
  \fi
  \ifx\CoverNumberFont\@undefined
    %\newfont\CoverNumberFont{ecrm1700 scaled 2986}
    \DeclareFixedFont\CoverNumberFont{\encodingdefault}{\rmdefault}{m}{n}{51.66}%
  \fi
  \newsavebox\dtk@titlebox
  \sbox\dtk@titlebox{\parbox{\textheight}{%
    \null\hfill\CoverTitleFont\fontsize{41.26}{42}\selectfont\journalname\hfill\null}}
%  \hspace*{5pt}
  \rotatebox{90}{\usebox\dtk@titlebox}\ 
  \rule{\CoverArt@barwidth}{\textheight}
  \hfill
%   
  \begin{minipage}[b]{.7\textwidth}\raggedright
    \rule{1em}{0pt}%
    \dimen2=\textwidth\advance\dimen2-1em
    \parbox{\dimen2}{\CoverArt@font
      {\Huge\DANTE}\\
      Deutschsprachige\\
      Anwendervereinigung
      \TeX\ \eV}\\[1ex]
    \dimen3=\textwidth\advance\dimen3-\CoverArt@gap
    \hfill\rule{\dimen3}{\CoverArt@linewidth}\\[-\baselineskip]
    \null\hspace{1em}%
    {\CoverArt@small\cover@sub{#1}{#2}{#3}}\\[-\baselineskip]
    \rule{0pt}{.617647\textheight}%
    \CoverNumberFont
    \null\hfill
    \makebox(0,0)[br]{%
      \textcolor{CoverArt@grey}{%
        \CoverArt@strip@no #1;\hspace{1pt}%
      }}% Warum verwendet `\CoverArt@strip@no' \CoverTitleFont? RN
  \end{minipage}%
}

%\PassOptionsToPackage{ngerman}{babel}
%\RequirePackage[ngerman]{babel}

\iffalse
\declare@shorthand{ngerman}{"`}{\frqq}%
\declare@shorthand{ngerman}{"'}{\flqq}%
%\def@dqmacro{`}{\frqq}{\frqq}
%\def@dqmacro{'}{\flqq}{\flqq}
\else
  \@ifpackageloaded{babel}{%
    \defineshorthand{"`}{\guillemotright}
    \defineshorthand{"'}{\guillemotleft}
  }{%
    \@ifpackageloaded{ngerman}{%
      \def@dqmacro{`}{\frqq}{\frqq}
      \def@dqmacro{'}{\flqq}{\flqq}
    }{}%
  }
\fi

\newif\ifDTKcolor \DTKcolorfalse

\RequirePackage{xcolor}
\RequirePackage{longtable}
\RequirePackage{caption}

\ifDTKcolor
  \definecolor{DTKlstBackground}{rgb}{1,1,0.95}
  \definecolor{DTKlstKeys}{rgb}{0,0,1}
  \definecolor{DTKlstIdentifiers}{rgb}{0,0,0}
  \definecolor{DTKlstComments}{rgb}{1,0,0}
  \definecolor{DTKlstStrings}{rgb}{0,0.5,0}
\else
  \colorlet{DTKlstBackground}{black!5}
  \colorlet{DTKlstKeys}{black}
  \colorlet{DTKlstIdentifiers}{black}
  \colorlet{DTKlstComments}{black}
  \colorlet{DTKlstStrings}{black}
\fi

\RequirePackage[final]{listings}

\newcommand*\DTK@lst@colorbox[2]{%
  \fboxsep=.16em\relax
  \settowidth\@ovxx{#2}\settoheight\@ovyy{#2}%
  \makebox[\@ovxx][c]{\colorbox{#1}{\raisebox{0pt}[\@ovyy][0pt]{#2}}}%
}
\newcommand\Small{\fontsize{8.5}{8.7}\selectfont}
\newcommand*\DTKlstfont{%
  \Small\ttfamily\SetTracking{encoding=*}{-60}\lsstyle}

\lstdefinestyle{DTKlstBase}{%
     basicstyle=\DTKlstfont,
     basewidth=0.55em,
     keepspaces,
     identifierstyle=\color{DTKlstIdentifiers},
     keywordstyle=\color{DTKlstKeys},
     stringstyle=\itshape\color{DTKlstStrings},
     commentstyle=\itshape\color{DTKlstComments},
     columns=fullflexible,
     tabsize=2,
     frame=single,
     extendedchars=true,
     showspaces=false,
     showstringspaces=false,
     breaklines=true,
     breakindent=0.5em,
     backgroundcolor=\color{DTKlstBackground},
     breakautoindent=true,
     captionpos=t,
     aboveskip=\medskipamount,
     belowskip=\medskipamount,
     xrightmargin=\fboxsep,
     emphstyle=\DTK@lst@colorbox{lightgray},
     prebreak=,
     postbreak=\mbox{$\hookrightarrow$},
     literate={ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
       {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 {ß}{\ss}1
}

\lstdefinestyle{DTKlstNumber}{%
     style=DTKlstBase,
     numbers=left,
     numberstyle=\tiny\ttfamily,
     numbersep=1em,
     xleftmargin=1.5em,
}

\lstdefinestyle{DTKlstNoNumber}{%
     style=DTKlstBase,
     numbers=none,
     xleftmargin=\fboxsep,
}

\lst@AddToHookExe{DeInit}{%
  \@tempdima=\lst@belowskip \advance\@tempdima-.65\baselineskip
  \edef\lst@belowskip{\the\@tempdima}%
}

\let\verbatim=\relax
\lstnewenvironment{verbatim}
{\lstset{language={},style=DTKlstNoNumber}}
{}

\AtBeginDocument{%
  \belowcaptionskip=\abovecaptionskip
}

\lstset{style=DTKlstNoNumber}

\def\ctanurl#1{\url{CTAN:#1}}%
\let\CTANurl\ctanurl

\endinput