summaryrefslogtreecommitdiff
path: root/info/examples/ltt/kasten.sty
blob: b1244629c11d119a3982286eb775f7d1ad7f1385 (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
%  kasten.sty
\RequirePackage{calc}

%  Der Kastenzaehler.
\newcommand{\kastenname}{Kasten}
\newcounter{kasten}
\renewcommand{\thekasten}{\arabic{kasten}}

% Box fuer den Kasteninhalt und Rahmenparameter
\newsavebox{\kbox}
\newlength{\kastensep}    
  \setlength{\kastensep}{5mm}

\newlength{\kastenindent} 
  \setlength{\kastenindent}{0.5cm}

% der Befehl selbst
\newenvironment{kasten}
 {\renewcommand{\@makecaption}[2]{\textsc{##1} ##2}
  \@float{kasten}
  \begin{lrbox}{\kbox}
    \begin{minipage}
      {\columnwidth-\kastensep*2-\fboxrule-%
       \kastenindent*2}
      \scriptsize}
 {  \end{minipage}
  \end{lrbox}
  {\fboxsep=\kastensep
   \hspace{\kastenindent}\fbox{\usebox{\kbox}}
  }  
  \end@float}
\newenvironment{kasten*}
 {\renewcommand{\@makecaption}[2]{\textsc{##1} ##2}
  \@dblfloat{kasten}
  \begin{lrbox}{\kbox}
  \begin{minipage}
    {\textwidth-
     (\kastensep+\fboxrule+\kastenindent)*2}
      \scriptsize}
 {\end{minipage}
  \end{lrbox}
  {\fboxsep=\kastensep
   \hspace{\kastenindent}\fbox{\usebox{\kbox}}
  }  
  \end@dblfloat}

\newcommand{\fps@kasten}{htbp}
\newcommand{\ftype@kasten}{4}
\newcommand{\ext@kasten}{lok}
\newcommand{\fnum@kasten}{\kastenname~\thekasten}