diff options
author | Karl Berry <karl@freefriends.org> | 2023-09-01 21:19:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-09-01 21:19:44 +0000 |
commit | 27d05e705e75259a904502763104b47814ebcf3e (patch) | |
tree | 679f96665b70ed713b41d523c208d1f56b1cfa28 /Master/texmf-dist/tex/latex | |
parent | 63b1de3dc657c563490e2d8fe79b9145c7df5982 (diff) |
wrapfig2 (1sep23)
git-svn-id: svn://tug.org/texlive/trunk@68142 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/wrapfig2/wrapfig2.sty | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/wrapfig2/wrapfig2.sty b/Master/texmf-dist/tex/latex/wrapfig2/wrapfig2.sty index 5c87db5f5c5..6367708c889 100644 --- a/Master/texmf-dist/tex/latex/wrapfig2/wrapfig2.sty +++ b/Master/texmf-dist/tex/latex/wrapfig2/wrapfig2.sty @@ -12,15 +12,16 @@ %% \NeedsTeXFormat{LaTeX2e}[2019/01/01] \ProvidesPackage{wrapfig2}% - [2023-02-23 v.6.1.1 Wrap text around figures, tables, framed text blocks] + [2023-09-01 v.6.2.0 Wrap text around figures, tables, framed text blocks] \ifcsname c@WF@wrappedlines\endcsname -\PackageError{wrapfig2}{ \MessageBreak - ****************************************************\MessageBreak +\PackageError{wrapfig2}{ +\MessageBreak +**************************************************\MessageBreak Package `wrapfig' has already been loaded perhaps \MessageBreak by other packages, for example caption or subcaption.\MessageBreak Such packages are incompatible with wrapfig2 \MessageBreak Loading of`wrapfig2' is aborted \MessageBreak - ****************************************************\MessageBreak +**************************************************\MessageBreak }{You might type X <return> and might get along without\MessageBreak this package if you don't use the new environment \MessageBreak `wraptext' and the new commands; otherwise you get \MessageBreak @@ -28,15 +29,6 @@ you must kill your job!} \expandafter\endinput\fi -\@ifpackageloaded{amsmath}{% - \PackageError{wrapfig2}{ \MessageBreak - +++++++++++++++++++++++++++++++++++++++++++\MessageBreak - Package amsmath already loaded \MessageBreak - If you need amsmath, load it after wrapfig2\MessageBreak - Expect error messages \MessageBreak - +++++++++++++++++++++++++++++++++++++++++++\MessageBreak - \MessageBreak - }{Abort the job}}{\relax} \def\WF@warning{\PackageWarning{wrapfig2}} \DeclareOption{verbose}{\def\WF@info{\PackageInfo{wrapfig2}}} \newif\ifWFnew \let\ifWFnew\iftrue @@ -55,6 +47,10 @@ \@ifpackageloaded{curve2e}{}{\RequirePackage{curve2e}} \@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}} +\@ifpackageloaded{amsmath}{% +\let\amsmathtext\text +\AtEndPreamble{\let\text\amsmathtext}% +}{\relax} \ifboolexpr{ bool{WFfive} or bool{WFnew} }% {\floatstyle{plain}% \ifcsname chapter\endcsname @@ -134,7 +130,8 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth} {\endwrapfloat} \ifbool{WFnew}{% -\NewDocumentCommand\includeframedtext{O{\insertwidth} m O{} o}{\bgroup% +\NewDocumentCommand\includeframedtext{% + O{\insertwidth} m O{} o}{\bgroup% \ExecuteOptionsX<wraptext>{#3}% executes possible key=value options \insertwidth=#1\WFscalewidth \framedbox{#2}{\fboxrule}{\fboxsep}[\radius]\egroup} @@ -153,10 +150,10 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth} \NewDocumentCommand\framedbox{ m m m O{#3}}{\bgroup \fboxrule=#2\fboxsep=#3\relax \setbox0\hbox{\fboxrule=\z@\fboxsep=#3\relax -\framebox{\parbox{% draw a framed box without the frame +\framebox{\parbox{% draw a framed box without the frame \fpeval{\insertwidth-2\fboxrule-2\fboxsep}\p@}{\textcolor{WFtext}{#1}}}} -\unitlength=\fpeval{\wd0/100}\p@ % set the picture \unitlength +\unitlength=\fpeval{\wd0/100}\p@ % set the picture \unitlength % determine the picture coordinates and displacement of the axes origin \edef\x{100}% \edef\y{\fpeval{(\ht0 +\dp0)/\unitlength}}% @@ -193,15 +190,15 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth} \def\textplacement{#2}% \def\textcorrection{#1}% \def\textoverhang{#3}% - \IfBooleanTF{#5}{\PackageWarning{wrapfig2}{% + \IfBooleanT{#5}{\PackageWarning{wrapfig2}{% *********************************************\MessageBreak With wraptext the optional star is useless \MessageBreak because the first optional argument always \MessageBreak means the "lines number CORRECTION" \MessageBreak - *********************************************\MessageBreak}}{}%%%<------------------ + *********************************************\MessageBreak}} \bgroup\edef\x{\egroup\noexpand\wrapfloat{text}% [\textcorrection]{\textplacement}[\textoverhang]{\insertwidth}*}\x% - \def\caption{\unskip + \def\caption{\unskip\unskip \refstepcounter\@captype \let\@tempf\@caption \unless\ifcsname @float@c@\@captype\endcsname |