summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-02-19 00:39:28 +0000
committerKarl Berry <karl@freefriends.org>2010-02-19 00:39:28 +0000
commitcd303990af597b79db7f5b69b5650dc6e646e077 (patch)
tree5c74d2286856b54a6c455df001a4052ad203a88c /Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty
parentb2de7075dcbdca386025be8f7afbabebb13f65e1 (diff)
boxedminipage separated from ltxmisc, now with doc
git-svn-id: svn://tug.org/texlive/trunk@17087 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty')
-rw-r--r--Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty65
1 files changed, 65 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty b/Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty
new file mode 100644
index 00000000000..b74368fa7b9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/boxedminipage/boxedminipage.sty
@@ -0,0 +1,65 @@
+%%% ====================================================================
+%%% @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{}}}
+
+\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}
+