[tex-eplain] fcolorbox misses fbox
Helmut Jarausch
jarausch at igpm.rwth-aachen.de
Thu Dec 5 10:15:44 CET 2013
Hi,
I've tried to use \fcolorbox from the color package.
This fails with an unknown \fbox macro unless I add the code below.
I have blindly copied these macros from
/usr/share/texmf-dist/tex/latex/base/latex.ltx
Is there a more eplain friendly definition of \fbox ?
Many thanks for a hint,
Helmut
\beginpackages
\usepackage{color}
\endpackages
\makeatletter
\def\@frameb at x#1{%
\@tempdima\fboxrule
\advance\@tempdima\fboxsep
\advance\@tempdima\dp\@tempboxa
\hbox{%
\lower\@tempdima\hbox{%
\vbox{%
\hrule\@height\fboxrule
\hbox{%
\vrule\@width\fboxrule
#1%
\vbox{%
\vskip\fboxsep
\box\@tempboxa
\vskip\fboxsep}%
#1%
\vrule\@width\fboxrule}%
\hrule\@height\fboxrule}%
}%
}%
}
\long\def\fbox#1{%
\leavevmode
\setbox\@tempboxa\hbox{%
\color at begingroup
\kern\fboxsep{#1}\kern\fboxsep
\color at endgroup}%
\@frameb at x\relax}
\makeatother
\pagecolor{black} % schwarzer Seitenhintergrund
\color{red} % roter Text
\definecolor{gray}{gray}{.5}
\fcolorbox{green}{gray}{Box with a green boundary on a gray background
--- the text is read}
\bye
More information about the tex-eplain
mailing list