From f679ef07dfc2ce90dd3cdac2f7bc0681cea74171 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 21 Apr 2020 21:22:17 +0000 Subject: boxedminipage (21apr20) git-svn-id: svn://tug.org/texlive/trunk@54827 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/boxedminipage/boxedminipage.sty | 121 ++++++++++----------- 1 file changed, 57 insertions(+), 64 deletions(-) (limited to 'Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty') diff --git a/Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty b/Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty index b74368fa7b9..90aab282f87 100644 --- a/Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty +++ b/Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty @@ -1,65 +1,58 @@ -%%% ==================================================================== -%%% @LaTeX-style-file{ -%%% author = "Mario Wolczko", -%%% version = "2", -%%% date = "21 May 1992", -%%% time = "20:55:01 BST", -%%% filename = "boxedminipage.sty", -%%% email = "mario@acm.org", -%%% codetable = "ISO/ASCII", -%%% keywords = "LaTeX, minipage, framebox", -%%% supported = "no", -%%% docstring = "LaTeX document-style option which defines -%%% the boxedminipage environment -- just like minipage, but with -%%% a box around it.", -%%% } -%%% ==================================================================== -% -% This file is in the public domain -% -% The thickness of the rules around the box is controlled by -% \fboxrule, and the distance between the rules and the edges of the -% inner box is governed by \fboxsep. -% -% This code is based on Lamport's minipage code. -% -% Fixed, 7 Jun 89 by Jerry Leichter -% Leave \fboxsep worth of separation at top and bottom, not just at -% the sides! -% -\def\boxedminipage{\@ifnextchar [{\@iboxedminipage}{\@iboxedminipage[c]}} - -\def\@iboxedminipage[#1]#2{\leavevmode \@pboxswfalse - \if #1b\vbox - \else \if #1t\vtop - \else \ifmmode \vcenter - \else \@pboxswtrue $\vcenter - \fi - \fi - \fi\bgroup % start of outermost vbox/vtop/vcenter - \hsize #2 - \hrule\@height\fboxrule - \hbox\bgroup % inner hbox - \vrule\@width\fboxrule \hskip\fboxsep \vbox\bgroup % innermost vbox - \vskip\fboxsep - \advance\hsize -2\fboxrule \advance\hsize-2\fboxsep - \textwidth\hsize \columnwidth\hsize - \@parboxrestore - \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ - \let\@footnotetext\@mpfootnotetext - \let\@listdepth\@mplistdepth \@mplistdepth\z@ - \@minipagerestore\@minipagetrue - \everypar{\global\@minipagefalse\everypar{}}} - +%% +%% This is file `boxedminipage.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% boxedminipage.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2015-2020 by Scott Pakin +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.3c of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl/ +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2008/05/04 or later. +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{boxedminipage} + [2020/04/19 v1.1 Boxed LaTeX2e minipages] +\newsavebox{\bmp@box} +\newlength{\bmp@width} +\newlength{\bmp@height} +\def\bmp@relax{\relax} +\newcommand{\boxedminipage}[1][c]{% + \@ifnextchar[{\bminipage@i[#1]}{\bminipage@i[#1][\relax]}% +} +\def\bminipage@i[#1][#2]{% + \@ifnextchar[{\bminipage@ii[#1][#2]}{\bminipage@ii[#1][#2][s]}% +} +\def\bminipage@ii[#1][#2][#3]#4{% + \setlength{\bmp@width}{#4}% + \addtolength{\bmp@width}{-2\fboxrule}% + \addtolength{\bmp@width}{-2\fboxsep}% + \def\bmp@heighttext{#2}% + \begin{lrbox}{\bmp@box}% + \ifx\bmp@heighttext\bmp@relax + \begin{minipage}[#1][#2][#3]{\the\bmp@width}% + \else + \setlength{\bmp@height}{\bmp@heighttext}% + \addtolength{\bmp@height}{-2\fboxrule}% + \addtolength{\bmp@height}{-2\fboxsep}% + \begin{minipage}[#1][\bmp@height][#3]{\the\bmp@width}% + \fi +} \def\endboxedminipage{% - \par\vskip-\lastskip - \ifvoid\@mpfootins\else - \vskip\skip\@mpfootins\footnoterule\unvbox\@mpfootins\fi - \vskip\fboxsep - \egroup % ends the innermost \vbox - \hskip\fboxsep \vrule\@width\fboxrule - \egroup % ends the \hbox - \hrule\@height\fboxrule - \egroup% ends the vbox/vtop/vcenter - \if@pboxsw $\fi} - + \end{minipage}% + \end{lrbox}% + \fbox{\usebox{\bmp@box}}% +} +\endinput +%% +%% End of file `boxedminipage.sty'. -- cgit v1.2.3