summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fbox
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-04 22:16:05 +0000
committerKarl Berry <karl@freefriends.org>2019-11-04 22:16:05 +0000
commit3967559960643046de4814d26abeea701dc88cab (patch)
tree0062206335aed1d5b382b0c63e0cc36c055fd109 /Master/texmf-dist/tex/latex/fbox
parent0b3e5af7b26102b1ed839f1bb1916af1aa0c8e3a (diff)
fbox (4nov19)
git-svn-id: svn://tug.org/texlive/trunk@52637 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fbox')
-rw-r--r--Master/texmf-dist/tex/latex/fbox/fbox.sty35
1 files changed, 26 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/fbox/fbox.sty b/Master/texmf-dist/tex/latex/fbox/fbox.sty
index b3227b36caa..01c90824356 100644
--- a/Master/texmf-dist/tex/latex/fbox/fbox.sty
+++ b/Master/texmf-dist/tex/latex/fbox/fbox.sty
@@ -11,17 +11,32 @@
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%
-% $Id: fbox.sty 946 2019-03-08 12:08:22Z herbert $
+% $Id: fbox.sty 947 2019-03-08 17:06:20Z herbert $
%
% -------------------------------------
-\ProvidesPackage{fbox}[2019/03/00 v. 0.01 allow parts of the frame (hv)]
+\ProvidesPackage{fbox}[2019/11/04 v. 0.03 allow parts of the frame (hv)]
%
\let\orig@fbox\fbox
-\def\fb@lowerc@se#1{\lowercase{\edef\@tempa{#1}}}
+\def\fb@lowerc@se#1{% make \lowercase expandable
+ \begingroup\edef\x{%
+ \lowercase{\endgroup\def\noexpand\@tempa{#1}}}\x
+}
%
-\long\def\fbox{\@ifnextchar[\FBox@i\orig@fbox}
+\newif\if@fbox@star
+\newif\if@fbox@space@left
+\newif\if@fbox@space@right
+
+\long\def\fbox{\@ifnextchar*{\@fbox@startrue\FBox@}{\@fbox@starfalse\FBox@*}}
+\def\FBox@*{\@ifnextchar[\FBox@i\orig@fbox}
%
\def\FBox@i[#1]{%
+ \if@fbox@star
+ \@fbox@space@leftfalse
+ \@fbox@space@rightfalse
+ \else
+ \@fbox@space@lefttrue
+ \@fbox@space@righttrue
+ \fi
\ifx\relax#1\relax
\@tempcntb=15
\else
@@ -32,13 +47,15 @@
\FBox@iii
}
\def\FBox@ii#1#2\@nil{%
- \ifx#1t\advance\@tempcntb by 8% top
+ \ifx#1t\advance\@tempcntb by 8 % top
\else
- \ifx#1l\advance\@tempcntb by 4% left
+ \ifx#1l\advance\@tempcntb by 4 % left
+ \if@fbox@star\@fbox@space@lefttrue\fi
\else
- \ifx#1r\advance\@tempcntb by 2% right
+ \ifx#1r\advance\@tempcntb by 2 % right
+ \if@fbox@star\@fbox@space@righttrue\fi
\else
- \ifx#1b\advance\@tempcntb by 1% bottom
+ \ifx#1b\advance\@tempcntb by 1 % bottom
\fi\fi\fi\fi
\if\relax#2\relax\def\next{}\else\def\next{\FBox@ii#2\@nil}\fi
\next
@@ -47,7 +64,7 @@
\leavevmode
\setbox\@tempboxa\hbox{%
\color@begingroup
- \kern\fboxsep{#1}\kern\fboxsep
+ \if@fbox@space@left\kern\fboxsep\fi{#1}\if@fbox@space@right\kern\fboxsep\fi
\color@endgroup}%
\@FrameB@x\relax}
%