home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / useful / text / tex / pastex / macros / latex2e / inputs / dcolumn.sty < prev    next >
Text File  |  1994-06-09  |  2KB  |  53 lines

  1. %% 
  2. %% This is file `dcolumn.sty', generated 
  3. %% on <1994/6/9> with the docstrip utility (2.2h).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% dcolumn.dtx  (with options: `package')
  8. %% 
  9. %% IMPORTANT NOTICE: 
  10. %% This file is part of the `tools' bundle 
  11. %% in the LaTeX2e distribution. 
  12. %% 
  13. %% You are not allowed to distribute this file. 
  14. %% For distribution of the original source see 
  15. %% the copyright notice in the source file, and 
  16. %% in the file readme.txt distributed with the 
  17. %% tools bundle. 
  18. %% 
  19. %% File: dcolumn.dtx Copyright (C) 1992-1994 David Carlisle
  20. \NeedsTeXFormat{LaTeX2e}
  21. \ProvidesPackage{dcolumn}
  22.          [1994/03/14 v1.02 decimal alignment package (DPC)]
  23. \RequirePackage{array}
  24. \def\DC@#1#2#3{%
  25.   \uccode`\~=`#1\relax
  26.   \m@th
  27.   \ifnum #3 < \z@ \expandafter\DC@centre
  28.   \else \expandafter\DC@right \fi
  29.   {#1}{#2}{#3}}
  30. \def\DC@centre#1#2#3{%
  31.   \let\DC@end\DC@endcentre
  32.   \uppercase{\def~}{$\egroup\setbox\tw@=\hbox\bgroup${#2}}%
  33.   \setbox\tw@=\hbox{${\phantom{{#2}}}$}%
  34.   \setbox\z@=\hbox\bgroup$\mathcode`#1="8000 }
  35. \def\DC@endcentre{$\egroup
  36.     \ifdim \wd\z@>\wd\tw@
  37.       \setbox\tw@=\hbox to\wd\z@{\unhbox\tw@\hfill}%
  38.     \else
  39.       \setbox\z@=\hbox to\wd\tw@{\hfill\unhbox\z@}\fi
  40.     \box\z@\box\tw@}
  41. \def\DC@right#1#2#3{%
  42.   \let\DC@end\DC@endright
  43.   \uppercase{\def~}{$\egroup\setbox\tw@=\hbox to \dimen@\bgroup${#2}}%
  44.    \setbox\z@=\hbox{$1$}\dimen@=#3\wd\z@
  45.    \setbox\z@=\hbox{${#2}$}\advance\dimen@\wd\z@
  46.    \setbox\tw@=\hbox to \dimen@{}%
  47.    \setbox\z@=\hbox\bgroup$\mathcode`#1="8000 }
  48. \def\DC@endright{$\hfil\egroup\hfill\box\z@\box\tw@}
  49. \newcolumntype{D}[3]{>{\DC@{#1}{#2}{#3}}c<{\DC@end}}
  50. \endinput
  51. %% 
  52. %% End of file `dcolumn.sty'.
  53.