summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ncctools/mboxfill.sty
blob: 2ee614fa99c76ff9049550b1e8bc9f655ee20f81 (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
%%
%% This is file `mboxfill.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% mboxfill.dtx  (with options: `package')
%% 
%% IMPORTANT NOTICE:
%% 
%% This file is a generated file from the sources of the `ncctools'
%% bundle.
%% 
%% You are not allowed to modify this file.
%% 
%% You are allowed to distribute this file if and only if
%% it is distributed with the corresponding source files in
%% the `ncctools' bundle.
%% 
%% For the copying and distribution conditions of the source files,
%% see the README file distributed with the ncctools bundle.
%%
%% File: mboxfill.dtx Copyright (C) 2005 by Alexander I. Rozhenko
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mboxfill}
      [2005/05/13 v1.0 Fill space with mbox (NCC)]
\newcommand*\mboxfill[1][\width]{%
  \def\@tempa{\setlength\@tempdima{#1}}%
  \@ifnextchar[{\NCC@mboxfill}{\NCC@mboxfill[]}%
}
\def\NCC@mboxfill[#1]#2{%
  \@begin@tempboxa\hbox{#2}%
    \@tempa
    \edef\@tempa{#1}\def\@tempb{s}%
    \ifx\@tempa\@tempb
      \@tempdimb\width
      \advance\@tempdimb -\@tempdima
      \let\@tempa\xleaders
      \def\@tempb{\kern.5\@tempdimb}%
    \else
      \@ifundefined{#1leaders}{\let\@tempa\leaders}%
      {\def\@tempa{\csname#1leaders\endcsname}}%
      \let\@tempb\@empty
    \fi
    \leavevmode\@tempb\@tempa
      \hb@xt@\@tempdima{\hss\unhbox\@tempboxa\hss}\hfill\@tempb
  \@end@tempboxa
}
\endinput
%%
%% End of file `mboxfill.sty'.