summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ptptex/wrapft.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:04:46 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:04:46 +0000
commit216a2aa599705471c6e163494809182ff8813663 (patch)
treece874506cb400238dcc6b94882cc04439224c023 /Master/texmf-dist/tex/latex/ptptex/wrapft.sty
parent66d29c69ae98733ef41c67e277be2668b506ae74 (diff)
ptptex
git-svn-id: svn://tug.org/texlive/trunk@1258 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ptptex/wrapft.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ptptex/wrapft.sty35
1 files changed, 35 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ptptex/wrapft.sty b/Master/texmf-dist/tex/latex/ptptex/wrapft.sty
new file mode 100644
index 00000000000..cba2177f7c5
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ptptex/wrapft.sty
@@ -0,0 +1,35 @@
+\ProvidesPackage{wrapft}[2004/04/12 ver.0.9]
+\RequirePackage{wrapfig}[1999/10/12 \space v 3.3]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newdimen\WF@hsep %horizontal separation between fig and text
+\newdimen\WF@vsep %vspace on the top and the bottom of the figure
+\WF@hsep=1.6\columnsep
+\WF@vsep=\intextsep
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width,
+ \ifnum `c=\WF@place % fig in the center
+ \@tempdima\hsize \advance\@tempdima-#2 \divide\@tempdima\tw@
+ \vskip\WF@vsep
+ \noindent \hspace*{\@tempdima}\begin{minipage}[t]{#2}%
+ \else
+ \gdef\WF@ovh{#1}% hold overhang for later, when \width is known
+ \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}%
+ \ifdim\hsize>\z@ \@parboxrestore \else
+ \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption
+ \ignorespaces \fi
+ \fi}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\let\WF@@putfigmaybe\WF@putfigmaybe
+\def\WF@putfigmaybe{%
+ \columnsep \WF@hsep \intextsep \WF@vsep
+ \WF@@putfigmaybe}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\let\@endwr@pfigure\endwrapfigure
+\def\endwrapfigure{%
+ \ifnum `c=\WF@place % fig in the center
+ \end{minipage} \vskip\WF@vsep
+ \else
+ \@endwr@pfigure
+ \fi}
+\let\endwraptable\endwrapfigure
+%----- end of wrapft.sty ---------