Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/tex/latex/dvilj/graybox.sty

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


% graybox.sty  9.3.1989
% print fboxes with various backgrounds
%
%    graybox#1#2
%        #1 -> grayscale; valid values are 2, 10, 15, 30, 45, 70, 90, 100
%        #2 -> textargument (exactly like fbox)
%
%    patbox#1#2
%        #1 -> pattern; valid values are:
%              1: horizontal lines
%              2: vertical lines
%              3: diagonal lines
%              4: diagonal lines
%              5: square grid
%              6: diagonal grid
%        #2 -> textargument (exactly like fbox)
%
\makeatletter
%
%
%

\long\def\graybox#1#2{\leavevmode\setbox\@tempboxa\hbox{#2}\@tempdima\fboxrule
\advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
   \hbox{\lower \@tempdima\hbox
  {\vbox{\special{defpoint=1(,)}%
          \hrule \@height \fboxrule
          \hbox{\vrule \@width \fboxrule \hskip\fboxsep
            \vbox{\vskip\fboxsep \box\@tempboxa\vskip\fboxsep}\hskip
                         \fboxsep\vrule \@width \fboxrule%
                         \special{defpoint=2(,)}\special{gray=#1}%
                         \special{fill=1/2}%
                     }\hrule \@height \fboxrule%
                   }}}}


\long\def\patbox#1#2{\leavevmode\setbox\@tempboxa\hbox{#2}\@tempdima\fboxrule
\advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
   \hbox{\lower \@tempdima\hbox
  {\vbox{\special{defpoint=11(,)}%
          \hrule \@height \fboxrule
          \hbox{\vrule \@width \fboxrule \hskip\fboxsep
            \vbox{\vskip\fboxsep \box\@tempboxa\vskip\fboxsep}\hskip
                         \fboxsep\vrule \@width \fboxrule%
                         \special{defpoint=12(,)}\special{pattern=#1}%
                         \special{fill=11/12}%
                     }\hrule \@height \fboxrule%
                   }}}}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.