summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fbox/fbox.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/fbox/fbox.sty')
-rw-r--r--Master/texmf-dist/tex/latex/fbox/fbox.sty30
1 files changed, 18 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/fbox/fbox.sty b/Master/texmf-dist/tex/latex/fbox/fbox.sty
index 9c6aa93fd49..b12207a78de 100644
--- a/Master/texmf-dist/tex/latex/fbox/fbox.sty
+++ b/Master/texmf-dist/tex/latex/fbox/fbox.sty
@@ -1,6 +1,6 @@
-%% This is file `fbox.sty',
+%% This is file `fbox.sty'
%%
-%% Copyright (C) 2019, 2020
+%% Copyright (C) 2019, 2022
%% Herbert Voss <hvoss@tug.org>
%%
%% It may be distributed and/or modified under the
@@ -11,18 +11,23 @@
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%
-% $Id: fbox.sty 10 2020-06-22 10:15:39Z herbert $
+% $Id: fbox.sty 449 2022-02-20 20:50:12Z herbert $
%
% -------------------------------------
-\ProvidesPackage{fbox}[2020/06/22 v. 0.05 allow parts of the frame (hv)]
+\ProvidesPackage{fbox}[2022/02/20 v. 0.06 allow parts of the frame (hv)]
%
\RequirePackage{xkeyval}
+\RequirePackage{xcolor}
\newlength\fbox@@rule
\newlength\fbox@@sep
-\define@key{fbox}{boxrule}[3pt]{\setlength\fbox@@rule{#1}}
-\define@key{fbox}{boxsep}[0.4pt]{\setlength\fbox@@sep{#1}}
-\setkeys*{fbox}{boxrule=\fboxrule,boxsep=\fboxsep}
+\define@key{fbox}{boxrule}[0.4pt]{\setlength\fbox@@rule{#1}}
+\define@key{fbox}{boxsep}[3pt]{\setlength\fbox@@sep{#1}}
+\define@key{fbox}{bcolor}[black]{\def\fbox@bcolor{#1}}
+\define@key{fbox}{tcolor}[black]{\def\fbox@tcolor{#1}}
+\define@key{fbox}{lcolor}[black]{\def\fbox@lcolor{#1}}
+\define@key{fbox}{rcolor}[black]{\def\fbox@rcolor{#1}}
+\setkeys*{fbox}{boxrule=\fboxrule,boxsep=\fboxsep,lcolor,rcolor,bcolor,tcolor}
% latex.ltx
%\fboxsep = 3pt
@@ -44,7 +49,7 @@
\def\FBox@i[#1]{%
\def\XKV@rm{}%
\setkeys*{fbox}{boxrule=\fboxrule, boxsep=\fboxsep, #1}%
- \typeout{===>#1: \XKV@rm}%
+% \typeout{===>#1: \XKV@rm}%
\if@fbox@star
\@fbox@space@leftfalse
\@fbox@space@rightfalse
@@ -92,12 +97,12 @@
\vbox{%
\ifnum\the\@tempcntb>8\relax
\advance\@tempcntb by -8
- \hrule\@height\fbox@@rule % top
+ {\color{\fbox@tcolor}\hrule\@height\fbox@@rule}% % top
\fi
\hbox{%
\ifnum\@tempcntb>3
\advance\@tempcntb by -4
- \vrule\@width\fbox@@rule
+ \textcolor{\fbox@lcolor}{\vrule\@width\fbox@@rule}%
\fi % left
#1%
\vbox{%
@@ -105,8 +110,9 @@
\box\@tempboxa
\vskip\fbox@@sep}%
#1%
- \ifnum\@tempcntb>1\vrule\@width\fbox@@rule\fi}% right
- \ifodd\@tempcntb\hrule\@height\fbox@@rule\fi}% bottom
+ \ifnum\@tempcntb>1\textcolor{\fbox@rcolor}{\vrule\@width\fbox@@rule}\fi}% right
+ \ifodd\@tempcntb{\color{\fbox@bcolor}\hrule\@height\fbox@@rule}\fi% bottom
+ }%
}%
}%
}