summaryrefslogtreecommitdiff
path: root/info/examples/Einfuehrung2/06-02-1.ltxps
blob: f1a3804b826976c4a742e9097fac52b6bb735476 (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
%% 
%%  Ein Beispiel der DANTE-Edition
%%  
%%  2. Auflage
%% 
%%  Beispiel 06-02-1 auf Seite 214.
%% 
%%  Copyright (C) 2016 Herbert Voss
%% 
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%% 
%%  See http://www.latex-project.org/lppl.txt for details.
%% 
%% 
%% ==== 
% Show page(s) 1
%% 
%% 
\documentclass[de]{exaarticle}
\pagestyle{empty}
\setlength\textwidth{169.16928pt}
\setlength\parindent{0pt}
\usepackage[T1]{fontenc}
\usepackage{Alegreya,AlegreyaSans}
\usepackage[scale=0.9,ttdefault]{AnonymousPro}
%StartShownPreambleCommands
\usepackage{array,pstricks}
\newcommand\Lcs[1]{\texttt{\textbackslash#1}}
\let\Ldim\Lcs
\newsavebox\TabBox
%StopShownPreambleCommands
\begin{document}
\begin{center}
\newlength\Start
\newlength\End
\setlength\Start{\tabcolsep}
\setlength\End{\tabcolsep}
\savebox\TabBox{Links}
\addtolength\Start{\wd\TabBox}
\begin{pspicture}(0,0.3cm)(5.6cm,-0.8cm)
\rput[lb](0,0){\begin{tabular}{|l|r|p{3cm}|}\hline
Links & Rechts & p\{3cm\}\\\hline
%\rule{\wd\TabBox}{5mm}
\end{tabular}}
\psframe[fillcolor=black!30,fillstyle=solid](0,0)(\tabcolsep,-5mm)
\addtolength\End{\wd\TabBox}\addtolength\End{\tabcolsep}
\addtolength\End{\fboxrule}
\rput[lb](\tabcolsep,-5mm){Links}
%\psline{<->}(\tabcolsep,-2mm)(\Start,-2mm)
\psframe[fillcolor=black!50,fillstyle=solid](\Start,0)(\End,-5mm)
\addtolength\Start{\tabcolsep}\addtolength\End{\tabcolsep}
\addtolength\Start{\fboxrule}\addtolength\End{\fboxrule}
\psframe[fillcolor=black!30,fillstyle=solid](\Start,0)(\End,-5mm)
\rput[lb](\End,-5mm){Rechts}
\savebox\TabBox{Rechts}
\addtolength\Start{\wd\TabBox}\addtolength\End{\wd\TabBox}
\addtolength\Start{\tabcolsep}\addtolength\End{\tabcolsep}
\addtolength\Start{\fboxrule}\addtolength\End{\fboxrule}
\psframe[fillcolor=black!50,fillstyle=solid](\Start,0)(\End,-5mm)
\addtolength\Start{\tabcolsep}\addtolength\End{\tabcolsep}
\addtolength\Start{\fboxrule}\addtolength\End{\fboxrule}
\psframe[fillcolor=black!30,fillstyle=solid](\Start,0)(\End,-5mm)
\rput[lb](\End,-5mm){p\{3cm\}}
\addtolength\Start{\tabcolsep}\addtolength\End{\tabcolsep}
\addtolength\Start{3cm}\addtolength\End{3cm}
\addtolength\Start{\fboxrule}\addtolength\End{\fboxrule}
\psframe[fillcolor=black!50,fillstyle=solid](\Start,0)(\End,-5mm)
\end{pspicture}\par
\begin{tabular}{@{}l >{\ttfamily}l@{}}
\emph{Breite}        & \multicolumn{1}{c@{}}{\textrm{\emph{Wert}}}\\\hline
\Ldim{tabcolsep}     & \phantom{00}\the\tabcolsep\\
\Lcs{widthof}\{Links\} & \settowidth\Start{\textrm{Links}}\phantom{0}\the\Start\\
2\Ldim{tabcolsep}    & \Start=2\tabcolsep \phantom{0}\the\Start\\
\Lcs{widthof}\{Rechts\} & \settowidth\Start{\textrm{Rechts}}\phantom{0}\the\Start\\
2\Ldim{tabcolsep}    & \Start=2\tabcolsep \phantom{0}\the\Start\\
p\{3cm\}	     & \Start=3cm \phantom{0}\the\Start\\
\Ldim{tabcolsep}     & \phantom{00}\the\tabcolsep\\\hline
\textbf{Gesamtbreite}&
\Start=6\tabcolsep%
\settowidth\End{\textrm{Links}}%
\addtolength\Start{\End}%
\settowidth\End{\textrm{Rechts}}%
\addtolength\Start{\End}%
\addtolength\Start{3cm}%
\the\Start \global\End=\Start
\end{tabular}
\end{center}
\end{document}