diff options
author | Karl Berry <karl@freefriends.org> | 2020-06-22 20:52:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-06-22 20:52:37 +0000 |
commit | 3ecbf376e71759e258381ba5bdd32c1e2da07600 (patch) | |
tree | 66a2bf52649f4dd960bd7cbc5fc0b468b4537d25 /Master/texmf-dist/tex/latex | |
parent | 05761c2234110d9e0e74000a9b02db81b18aab76 (diff) |
fbox (22jun20)
git-svn-id: svn://tug.org/texlive/trunk@55627 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/fbox/fbox.sty | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/fbox/fbox.sty b/Master/texmf-dist/tex/latex/fbox/fbox.sty index 24dd9a71064..9c6aa93fd49 100644 --- a/Master/texmf-dist/tex/latex/fbox/fbox.sty +++ b/Master/texmf-dist/tex/latex/fbox/fbox.sty @@ -11,11 +11,23 @@ %% and version 1.3c or later is part of all distributions of LaTeX %% version 2005/12/01 or later. % -% $Id: fbox.sty 1128 2020-01-03 20:57:59Z herbert $ +% $Id: fbox.sty 10 2020-06-22 10:15:39Z herbert $ % % ------------------------------------- -\ProvidesPackage{fbox}[2020/01/03 v. 0.04 allow parts of the frame (hv)] +\ProvidesPackage{fbox}[2020/06/22 v. 0.05 allow parts of the frame (hv)] % +\RequirePackage{xkeyval} + +\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} + +% latex.ltx +%\fboxsep = 3pt +%\fboxrule = .4pt + \let\orig@fbox\fbox \def\fb@lowerc@se#1{% make \lowercase expandable \begingroup\edef\x{% @@ -30,6 +42,9 @@ \def\FBox@*{\@ifnextchar[\FBox@i\orig@fbox} % \def\FBox@i[#1]{% + \def\XKV@rm{}% + \setkeys*{fbox}{boxrule=\fboxrule, boxsep=\fboxsep, #1}% + \typeout{===>#1: \XKV@rm}% \if@fbox@star \@fbox@space@leftfalse \@fbox@space@rightfalse @@ -37,11 +52,11 @@ \@fbox@space@lefttrue \@fbox@space@righttrue \fi - \ifx\relax#1\relax + \expandafter\ifx\expandafter\relax\XKV@rm\relax \@tempcntb=15 \else \@tempcntb=\z@ - \fb@lowerc@se{#1}% + \expandafter\fb@lowerc@se\expandafter{\XKV@rm}% \expandafter\FBox@ii\@tempa\@nil\relax \fi \FBox@iii @@ -64,34 +79,34 @@ \leavevmode \setbox\@tempboxa\hbox{% \color@begingroup - \if@fbox@space@left\kern\fboxsep\fi{#1}\if@fbox@space@right\kern\fboxsep\fi + \if@fbox@space@left\kern\fbox@@sep\fi{#1}\if@fbox@space@right\kern\fbox@@sep\fi \color@endgroup}% \@FrameB@x\relax} % \def\@FrameB@x#1{% - \@tempdima\fboxrule - \advance\@tempdima\fboxsep + \@tempdima\fbox@@rule + \advance\@tempdima\fbox@@sep \advance\@tempdima\dp\@tempboxa \hbox{% \lower\@tempdima\hbox{% \vbox{% \ifnum\the\@tempcntb>8\relax \advance\@tempcntb by -8 - \hrule\@height\fboxrule % top + \hrule\@height\fbox@@rule % top \fi \hbox{% \ifnum\@tempcntb>3 \advance\@tempcntb by -4 - \vrule\@width\fboxrule + \vrule\@width\fbox@@rule \fi % left #1% \vbox{% - \vskip\fboxsep + \vskip\fbox@@sep \box\@tempboxa - \vskip\fboxsep}% + \vskip\fbox@@sep}% #1% - \ifnum\@tempcntb>1\vrule\@width\fboxrule\fi}% right - \ifodd\@tempcntb\hrule\@height\fboxrule\fi}% bottom + \ifnum\@tempcntb>1\vrule\@width\fbox@@rule\fi}% right + \ifodd\@tempcntb\hrule\@height\fbox@@rule\fi}% bottom }% }% } @@ -101,10 +116,10 @@ \long\def\fparbox{\@ifnextchar*{\@fbox@startrue\FParBox@}{\@fbox@starfalse\FParBox@*}} \def\FParBox@*{\@ifnextchar[\FParBox@i\FParBox@ii} \long\def\FParBox@i[#1]#2{% - \savebox\fpar@b@x{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{#2}}% + \savebox\fpar@b@x{\parbox{\dimexpr\linewidth-2\fbox@@sep-2\fbox@@rule}{#2}}% \FBox@i[#1]{\usebox\fpar@b@x}} \long\def\FParBox@ii#1{% - \savebox\fpar@b@x{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{#1}}% + \savebox\fpar@b@x{\parbox{\dimexpr\linewidth-2\fbox@@sep-2\fbox@@rule}{#1}}% \orig@fbox{\usebox\fpar@b@x}} |