texlive[55627] Master/texmf-dist: fbox (22jun20)
commits+karl at tug.org
commits+karl at tug.org
Mon Jun 22 22:52:38 CEST 2020
Revision: 55627
http://tug.org/svn/texlive?view=revision&revision=55627
Author: karl
Date: 2020-06-22 22:52:37 +0200 (Mon, 22 Jun 2020)
Log Message:
-----------
fbox (22jun20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/fbox/CHANGELOG
trunk/Master/texmf-dist/doc/latex/fbox/fbox.pdf
trunk/Master/texmf-dist/doc/latex/fbox/fbox.tex
trunk/Master/texmf-dist/tex/latex/fbox/fbox.sty
Modified: trunk/Master/texmf-dist/doc/latex/fbox/CHANGELOG
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fbox/CHANGELOG 2020-06-22 20:52:23 UTC (rev 55626)
+++ trunk/Master/texmf-dist/doc/latex/fbox/CHANGELOG 2020-06-22 20:52:37 UTC (rev 55627)
@@ -1,3 +1,4 @@
+0.05 2020-06-22 - added optional arguments boxrule and boxsep
0.04 2020-01-03 - added \fparbox[]{}
0.03 2019-11-04 - added star version
0.02 2019-03-08 - modified version for expandable \lowercase
Modified: trunk/Master/texmf-dist/doc/latex/fbox/fbox.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/fbox/fbox.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fbox/fbox.tex 2020-06-22 20:52:23 UTC (rev 55626)
+++ trunk/Master/texmf-dist/doc/latex/fbox/fbox.tex 2020-06-22 20:52:37 UTC (rev 55627)
@@ -1,4 +1,4 @@
-%% $Id: fbox.tex 1128 2020-01-03 20:57:59Z herbert $
+%% $Id: fbox.tex 10 2020-06-22 10:15:39Z herbert $
%
\listfiles\setcounter{errorcontextlines}{100}
\documentclass[paper=a4,fontsize=11pt,DIV=13,parskip=half-,
@@ -62,7 +62,7 @@
\def\setVersion#1{\setVVersion#1!!}
\def\setVVersion#1=#2!!{\def\fboxVersion{#2}}
-\setVersion{version = 0.04}%
+\setVersion{version = 0.05}%
\title{Package \texttt{fbox} \\--\\ \normalsize \fboxVersion\ (\today)}
\author{Herbert Voß\thanks{\url{hvoss at tug.org}\newline Thanks to Rolf Niepraschk}}
@@ -91,10 +91,15 @@
\fparbox ...
\end{verbatim}
-The optional argument can be of any combination of the letters
-l, r, b, and t or altenatively L, R, B, and T. This l)eft, r)right, b)ottom, and t)op
-for the frame parts. A missing or an empty argument is the same as the default
-\Lcs{fbox} from standard \LaTeX.
+The optional argument can be
+\begin{description}
+\item[boxrule] The rule width is predefined to the current value of \Ldim{fboxrule} (0.4pt)
+\item[boxsep] The box separation is predefined to the current value of \Ldim{fboxsep} (3pt)
+\item[<letters>] Any combination of the letters
+l, r, b, and t, or altenatively L, R, B, and T for l)eft, r)right, b)ottom, and t)op
+of the frame parts. A missing or an empty argument is the same as the default
+\Lcs{fbox} command from standard \LaTeX.
+\end{description}
\begin{LTXexample}
@@ -142,28 +147,31 @@
\end{LTXexample}
\begin{LTXexample}
-\setlength\fboxrule{5pt}
-\fbox[bT]{foo gar baz}
+\fbox[bT,boxrule=5pt]{foo gar baz}
\end{LTXexample}
\begin{LTXexample}
-\setlength\fboxrule{5pt}
-\fbox*[bT]{foo gar baz}
+\fbox*[bT,boxrule=5pt]{foo gar baz}
\end{LTXexample}
+
\begin{LTXexample}
-\setlength\fboxrule{5pt}
-\fbox[Br]{foo gar baz}
+\fbox[Br,boxrule=5pt]{foo gar baz}
\end{LTXexample}
+
\begin{LTXexample}
-\setlength\fboxrule{5pt}
-\fbox*[Br]{foo gar baz}
+\fbox*[boxrule=5pt,Br]{foo gar baz}
\end{LTXexample}
+\begin{LTXexample}
+\fbox*[boxsep=5mm,bT,boxrule=2pt]{foo gar baz}
+\end{LTXexample}
+
+
\begin{LTXexample}
\fparbox{\demoText}
\end{LTXexample}
@@ -172,6 +180,7 @@
\fparbox[]{\demoText}
\end{LTXexample}
+
\begin{LTXexample}
\fparbox[rbt]{\demoText}
\fparbox[brt]{\demoText}
@@ -209,24 +218,24 @@
\end{LTXexample}
\begin{LTXexample}
-\setlength\fboxrule{5pt}
-\fparbox[bT]{\demoText}
+\fparbox[bT,boxrule=5pt]{\demoText}
\end{LTXexample}
\begin{LTXexample}
-\setlength\fboxrule{5pt}
-\fparbox*[bT]{\demoText}
+\fparbox*[bT,boxrule=5pt,boxsep=6pt]{\demoText}
\end{LTXexample}
+\begin{LTXexample}
+\fparbox*[bT,boxrule=3pt,boxsep=10pt]{\demoText}
+\end{LTXexample}
+
\begin{LTXexample}
-\setlength\fboxrule{5pt}
-\fparbox[Br]{\demoText}
+\fparbox[Br,boxrule=5pt,boxsep=10pt]{\demoText}
\end{LTXexample}
\begin{LTXexample}
-\setlength\fboxrule{5pt}
-\fparbox*[Br]{\demoText}
+\fparbox*[boxrule=5pt,Br]{\demoText}
\end{LTXexample}
Modified: trunk/Master/texmf-dist/tex/latex/fbox/fbox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fbox/fbox.sty 2020-06-22 20:52:23 UTC (rev 55626)
+++ trunk/Master/texmf-dist/tex/latex/fbox/fbox.sty 2020-06-22 20:52:37 UTC (rev 55627)
@@ -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 at key{fbox}{boxrule}[3pt]{\setlength\fbox@@rule{#1}}
+\define at key{fbox}{boxsep}[0.4pt]{\setlength\fbox@@sep{#1}}
+\setkeys*{fbox}{boxrule=\fboxrule,boxsep=\fboxsep}
+
+% latex.ltx
+%\fboxsep = 3pt
+%\fboxrule = .4pt
+
\let\orig at fbox\fbox
\def\fb at lowerc@se#1{% make \lowercase expandable
\begingroup\edef\x{%
@@ -30,6 +42,9 @@
\def\FBox@*{\@ifnextchar[\FBox at i\orig at fbox}
%
\def\FBox at i[#1]{%
+ \def\XKV at rm{}%
+ \setkeys*{fbox}{boxrule=\fboxrule, boxsep=\fboxsep, #1}%
+ \typeout{===>#1: \XKV at rm}%
\if at fbox@star
\@fbox at space@leftfalse
\@fbox at space@rightfalse
@@ -37,11 +52,11 @@
\@fbox at space@lefttrue
\@fbox at space@righttrue
\fi
- \ifx\relax#1\relax
+ \expandafter\ifx\expandafter\relax\XKV at rm\relax
\@tempcntb=15
\else
\@tempcntb=\z@
- \fb at lowerc@se{#1}%
+ \expandafter\fb at lowerc@se\expandafter{\XKV at rm}%
\expandafter\FBox at ii\@tempa\@nil\relax
\fi
\FBox at iii
@@ -64,13 +79,13 @@
\leavevmode
\setbox\@tempboxa\hbox{%
\color at begingroup
- \if at fbox@space at left\kern\fboxsep\fi{#1}\if at fbox@space at right\kern\fboxsep\fi
+ \if at fbox@space at left\kern\fbox@@sep\fi{#1}\if at fbox@space at right\kern\fbox@@sep\fi
\color at endgroup}%
\@FrameB at x\relax}
%
\def\@FrameB at x#1{%
- \@tempdima\fboxrule
- \advance\@tempdima\fboxsep
+ \@tempdima\fbox@@rule
+ \advance\@tempdima\fbox@@sep
\advance\@tempdima\dp\@tempboxa
\hbox{%
\lower\@tempdima\hbox{%
@@ -77,21 +92,21 @@
\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 at startrue\FParBox@}{\@fbox at starfalse\FParBox@*}}
\def\FParBox@*{\@ifnextchar[\FParBox at i\FParBox at ii}
\long\def\FParBox at i[#1]#2{%
- \savebox\fpar at b@x{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{#2}}%
+ \savebox\fpar at b@x{\parbox{\dimexpr\linewidth-2\fbox@@sep-2\fbox@@rule}{#2}}%
\FBox at i[#1]{\usebox\fpar at b@x}}
\long\def\FParBox at ii#1{%
- \savebox\fpar at b@x{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{#1}}%
+ \savebox\fpar at b@x{\parbox{\dimexpr\linewidth-2\fbox@@sep-2\fbox@@rule}{#1}}%
\orig at fbox{\usebox\fpar at b@x}}
More information about the tex-live-commits
mailing list.