summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/jknappen/parboxx.sty
blob: 576639e26da7a9748774e9327958dd842056f664 (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
%parboxx.sty
% Copyright 2003 J"org Knappen
% Neue Ausrichtungsparameter fuer Parboxen:
% New alignment options for \parbox'en:
% [T] An der Oberkante---really at top of the box
% [B] An der Unterkante---really at bottom of the box
% Works also for minipages

\ProvidesPackage{parboxx}[2003/09/27 New alignment options for parboxen (JKn)]
\NeedsTeXFormat{LaTeX2e}[1999/06/01] % Internals of parbox changed at this date

% Solides Hacking interner LaTeX2e-Befehle ist dazu n"otig ...

% F"uhre \bm@B und \bm@T ein ...
\def\bm@B{\hss\unhbox\@tempboxa\kern0pt}
\def\bm@T{\kern0pt\unhbox\@tempboxa\hss}

% Modifiziere \@iiiparbox
\long\def\@iiiparbox#1#2[#3]#4#5{%
  \leavevmode
  \@pboxswfalse
  \setlength\@tempdima{#4}%
  \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
    \ifx\relax#2\else
      \setlength\@tempdimb{#2}%
      \def\@parboxto{to\@tempdimb}%
    \fi
    \if#1b\vbox
    \else\if #1B\vbox % neue Option
    \else\if #1t\vtop
    \else\if #1T\vtop % neue Option
    \else\ifmmode\vcenter
    \else\@pboxswtrue $\vcenter
    \fi\fi\fi\fi\fi   % mehr \fi's
    \@parboxto{\let\hss\vss\let\unhbox\unvbox
       \csname bm@#3\endcsname}% % Hier kommen die bm@...-Makros her
    \if@pboxsw \m@th$\fi
  \@end@tempboxa}

\endinput

%/parboxx.sty