summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-02-23 21:26:20 +0000
committerKarl Berry <karl@freefriends.org>2023-02-23 21:26:20 +0000
commit995776a464feea0e68df51382dff5719cfc6b1ee (patch)
treee950628a28fa7d6443fe455b594a6fa3990d1af6
parente9600298c460ca15456c5ec10317b032d5bd57a4 (diff)
wrapfig2 (23feb23) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2022.final@66098 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/wrapfig2/README.txt13
-rw-r--r--Master/texmf-dist/doc/latex/wrapfig2/wrapfig2.pdfbin697282 -> 706149 bytes
-rw-r--r--Master/texmf-dist/source/latex/wrapfig2/wrapfig2.dtx218
-rw-r--r--Master/texmf-dist/tex/latex/wrapfig2/wrapfig2.sty23
4 files changed, 163 insertions, 91 deletions
diff --git a/Master/texmf-dist/doc/latex/wrapfig2/README.txt b/Master/texmf-dist/doc/latex/wrapfig2/README.txt
index 368a0784d04..45260e19090 100644
--- a/Master/texmf-dist/doc/latex/wrapfig2/README.txt
+++ b/Master/texmf-dist/doc/latex/wrapfig2/README.txt
@@ -1,5 +1,5 @@
%%%% README.txt file
-This README.txt for package wrapfig2[2022-02-16 v.6.0.0 ...]
+This README.txt for package wrapfig2[2023-02-23 v.6.1.1 ...]
This work is author maintained
@@ -7,8 +7,8 @@ This work consists of wrapfig2.dtx, the main file, this README.txt
and the derived files wrapfig2.pdf and wrapfig2.sty.
The package besides the source documented source file contains the
-image file commodilla.jpg, a slightly cropped image downloaded from
-the internet site of the Bibliotheca Augustiana in Germany. Apparently
+image file stele-todi-small.jpg, a slightly cropped image downloaded from
+the internet site of the Gregorian Etruscan Museum in Rome. Apparently
this image is free provided the source is duly acknowledged.
Licence appended to the wrapfig2.sty file.
@@ -27,9 +27,14 @@ older than 1st January 2019. In any case this package loading is
aborted in order to avoid conflicts, and in some other circumstances;
the error messages describe why the process was aborted.
-Version 6 of this package accepts options in the form key=value.
+Version 6 of this package accepts options in the form key = value.
Options are available to fall back to version 5 and version 4.
+IMPORTANT NOTICE: An incompatibility with the amsmath package was
+discovered, but it vanishes if amsmath is loaded after wrapfig2.
+The source of this incompatibility was not discovered, therefore
+wrapfig2 produces an error message when it is loaded after amsmath.
+
Claudio Beccari
claudio dot beccari at gmail dot com \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/wrapfig2/wrapfig2.pdf b/Master/texmf-dist/doc/latex/wrapfig2/wrapfig2.pdf
index d8b27c3e18a..22c81080cf2 100644
--- a/Master/texmf-dist/doc/latex/wrapfig2/wrapfig2.pdf
+++ b/Master/texmf-dist/doc/latex/wrapfig2/wrapfig2.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/wrapfig2/wrapfig2.dtx b/Master/texmf-dist/source/latex/wrapfig2/wrapfig2.dtx
index dbcec7a0c62..f54c71c6c28 100644
--- a/Master/texmf-dist/source/latex/wrapfig2/wrapfig2.dtx
+++ b/Master/texmf-dist/source/latex/wrapfig2/wrapfig2.dtx
@@ -8,7 +8,7 @@
\preamble
Copyright (C) 1991-2003 by Donald Arseneau (asnd@triumf.ca)
-Copyright (C) 2021-2022 by Claudio Beccari (claudio.beccari@gmail.com)
+Copyright (C) 2021-2023 by Claudio Beccari (claudio.beccari@gmail.com)
License information appended
\endpreamble
@@ -45,7 +45,7 @@ wrapfig2.sty and wrapfig2.pdf, plus this file README.txt.
%<+package>\ProvidesPackage{wrapfig2}%
%^^A<+readme>File README.txt for package wrapfig2
%<*package|readme>
- [2022-02-16 v.6.0.0 Wrap text around figures, tables, framed text blocks]
+ [2023-02-23 v.6.1.1 Wrap text around figures, tables, framed text blocks]
%</package|readme>
%<*driver>
%
@@ -56,8 +56,8 @@ wrapfig2.sty and wrapfig2.pdf, plus this file README.txt.
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{mflogo}
-\usepackage{multicol,amsmath,fancyvrb,verbatim,microtype}
-\usepackage{wrapfig2,kantlipsum,xspace}
+\usepackage{multicol,fancyvrb,verbatim,microtype}
+\usepackage{wrapfig2,amsmath,kantlipsum,xspace}
%
\GetFileInfo{wrapfig2.dtx}
\title{The \textsf{wrapfig2} package}
@@ -324,13 +324,24 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
%\qquad\cs{includeframedtext}\oarg{insertion measure}\marg{text to frame}\oarg{settings}\oarg{radius}
%\Eambiente{wraptext}
% \end{ttsintassi}
-%^^A
-% Please notice that all three syntaxes, thanks to differently
-% delimited optional arguments with peculiar default values,
+%
+% \noindent
+%\textcolor{red}{Please notice that the\Env{wraptext} environment
+% does not require any optional star, because the specified indented
+% lines number is always interpreted as its \emph{correction, not
+% its absolute value}; this difference is clearly marked in the above
+% syntax medallion. If users specified the star in similitude with
+% the other two environments, with versions~5.* and~6.* the unnecessary
+% star produces a strongly emphasised warning message visible in the
+% editor console and in the \texttt{.log} file. With the old version~4.*
+% the unnecessary star is printed as part of the text to be framed.
+%\newline
+% Please notice also that all three \Env{wraptext} syntaxes, thanks to
+% differently delimited optional arguments with peculiar default values,
% become very similar when such optional arguments are reduced
% to a minimum; only the \meta{location} argument is delimited
% by brackets with the old version and with braces with the newer
-% ones.
+% ones.}
%
% It may be useful to compare the \cs{includeframedtext} macro,
% used to insert a framed test into a \Env{wraptext} environment,
@@ -357,7 +368,8 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% We display some examples by using fake objects and suitably
% long paragraphs; some fake-language long-paragraphs are
% obtained by means of the \pack{kantlipsum} package functionalities;
-% they are emphasised with an italic font.
+% they are typeset with an italic font in order to distinguish their
+% text from the normal one.
%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{A wrapped figure}
@@ -420,10 +432,15 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
%\Eambiente{wraptable}
%\Marg{\cs{itshape} \cs{kant}\Oarg{2}}
%\end{flushleft}
-%
+% Notice the absence of the braced width value; as said below,
+% this braced value is optional, and the software autonomously
+% computes the width of the wrapped object. This feature may be
+% useful in many instances, although a smart use of this width
+% parameter might yield better looking results.
+%
% Wrapping a small table is a little more difficult than wrapping
-% a figure, because the width of the inserted object is not known
-% exactly in advance, and it is difficult to estimate; therefore
+% a figure, because the width of the inserted object is not exactly
+% known in advance, and it is difficult to estimate; therefore
% it might be necessary to execute several trial compilations. In any
% case a \cs{centering} command might help to center the table
% within the indention of the wrapping text. Nevertheless the
@@ -432,7 +449,13 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% with its braces; this second possibility is a feature of this
% package, that uses a \LaTeXiii property by which even a braced
% argument can be treated as an optional argument with a predefined
-% default value; see below more details about this feature.
+% default value; see below more details about such feature.
+%
+% On the opposite if the user estimates that the table with its
+% caption might use 5~lines, and specified such a value as the
+% first (optional) argument to the environment, the result is
+% shown in table~\ref{tab:wrong-wrapped-table}, but it is a very
+% poor one, with the last caption line overlapping the wrapping text.
%
%\begin{wraptable}[5]{l}
%\centering
@@ -446,21 +469,6 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
%\end{wraptable}
%{\itshape \kant[2]}
%
-% Notice the absence of the braced width value; as said above,
-% this braced value is optional, and the software autonomously
-% computes the width of the wrapped object. This feature may be
-% useful in many instances, although a smart use of
-% this width parameter might yield better looking results.
-%
-% On the opposite if the user estimates that the table with its
-% caption might use 5~lines, and specified such a value as the
-% first (optional) argument to the environment, the result is
-% shown in table~\ref{tab:wrong-wrapped-table}, but it is a very
-% poor one, with the last caption line overlapping the wrapping text.
-%
-%^^A\goodpagebreak
-%^^A \newpage
-%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{A wrapped text}
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -482,6 +490,12 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% package, but the \meta{location} argument specification is braced
% instead of bracketed.
%
+% Remember, though, what was previously remarked about using an
+% unnecessary optional star with the \Env{wraptext} environment;
+% with this package versions~5 and~6 the unnecessary star produces
+% a warning message, while with version~4 it prints the star as if
+% it was part of the text to be wrapped.
+%
% If a caption is specified, version~4 would print it within the
% framed box, while versions~5 and~6 print it outside the framed box.
%
@@ -491,21 +505,20 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% \end{wraptext}
% {\itshape \kant[3]}
%
-% The further feature introduced by version~5 is the
-% possibility of choosing the colours for all three elements of the
-% framed text; if within the environment \Env{wraptext} and before using
-% \cs{includeframedtext} the following colours are set, it is
-% possible to set different colours from the default light grey for
-% the background, the black text, and the almost black frame:
+% With version~5 users have the possibility of choosing the colours for
+% all three elements of the framed text; if within the environment
+% \Env{wraptext} and before using \cs{includeframedtext} the colours
+% may be set different from the default light grey for
+% the background, black for the text, and almost black for the frame:
% \begin{ttsintassi}
%\cs{SetWFfrm}\marg{frame colour}
%\cs{SetWFbgd}\marg{background colour}
%\cs{SetWFtxt}\marg{text colour}
% \end{ttsintassi}
% Such commands, in version~6, are already taken care by the relevant
-% \texttt{key=value} options. With version~5 these are user commands.
-% See figure~\ref{fig:framed text} typeset with various version~6
-% options.
+% \texttt{key=value} options, while with version~5 these are user
+% commands. See figure~\ref{fig:framed text} typeset with various
+% version~6 options.
%
%\begin{figure}
%\makebox[\textwidth]{\includeframedtext{Text}[insertionwidth=0.45\linewidth]
@@ -554,19 +567,18 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
%\Eambiente{figure}
%\end{flushleft}
%
-%
% As it is possible to notice from figure~\ref{fig:framed text},
% version~6 adds another facility; the colours and dimensions of the
% elements of the wrapped objects are inserted as
% \textit{key=value} options to the \cs{includeframedtext} third
-% argument \meta{settings}; its default value is “empty”; the
+% argument \meta{settings}; its default value is “empty”;
% users can introduce as many options as they desire, among the
% valid ones; if an option is misspelled or its value is not
% coherent with its nature, either the option is ignored, or an
-% error is raised. The valid options are the following; they are
+% error is raised. The valid options are the following ones; they are
% listed in alphabetical order, because the options described with the
% \texttt{key=value} syntax do not require either a specific order
-% or their presence; the users can therefore specify from zero to
+% or their presence; users can therefore specify from zero to
% nine options.
%\begin{description}
%^^A
@@ -624,9 +636,9 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% the wrapped text should never have a too short measure and the
% wrapping indented lines never have a too short measure. If users
% specify a different value to this key, they might get problems
-% with inter word spacing and of hyphenation.
+% with inter word spacing and with hyphenation.
%^^A
-%\item{\ttfamily textcolor} sets the text colour among those available
+%\item{\ttfamily textcolor} sets the text colour
% among those available with the default set provided by package
% \pack{xcolor}. The default colour is black.
%^^A
@@ -656,7 +668,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% word spacing might be too large; at the same time the measure
% of the mini paragraph cannot be too large, otherwise the indented
% wrapping lines, generally justified, might get a bad word
-% spacing. As it was already explained, it is recoommended to avoid
+% spacing. As it was already explained, it is reccommended to avoid
% specifying the optional \meta{widh} outside the range of 40\% to 60\%
% the column width. Actually specifying \texttt{0.2\cs{textwidth}}
% or \texttt{0.4\cs{columnwidth}} when typesetting in two column
@@ -736,14 +748,13 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% to abide from using it; we believe that a wrapped text logically
% pairs the wrapping text; of course this personal opinion might be wrong.
%
-%
% The \meta{width} parameter has been already sufficiently described;
% we just remember that for \Env{wraptext} this parameter is optional
% and its default value amounts to half the current measure; this
% insertion width can be specified but it should not be too different
% from its default value $y_0$, set to 50\% of the current measure.
% For the standard environments this parameter value appears to be
-% mandatory; actually it is a braced really optional argument only for the
+% mandatory; actually it really is a braced optional argument only for the
% redefined environments \env{wrapfigure} and \env{wraptable}.
%
% Matter of facts, for the \Env{wraptext} environment we defined a
@@ -773,7 +784,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% it with the \Env{wraptext} one as we did with text~\ref{txt:todi-stela}.
%
% The wrapped text may be written also in a foreign language, even
-% if it uses a differente alphabet. Evidently this language should
+% if it uses a different alphabet. Evidently this language should
% be specified in the preamble of the author's document, either
% when using \pack{babel} or \pack{polyglossia}. The example
% text~\ref{txt:greek} was typeset with the following code:
@@ -793,7 +804,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% objects may be defined by means of other packages, such as
% \pack{float}, or classes, such as \class{memoir}. Besides floating,
% the main difference is the name of the caption “label”: Figure, Table,
-% Algorithm, Example, and so on, and the lists of such objects.
+% Algorithm, Example, and so on, in addition to the lists of such objects.
%
% If floating is not necessary, this package (as well as the original
% one) allows to use the underlying environment \Env{wrapfloat}
@@ -846,8 +857,8 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
%
% It is possible that such resetting of the original definition is
% necessary also with floating objects defined by other means, for
-% example by using the functionalities of \class{memoir}. We admit
-% we did not test this package functionality with class
+% example by using the functionalities of the \class{memoir} class.
+% We admit we did not test this package functionality with class
% \class{memoir}; \textcolor{red}{feedback on this compatibility issue
% is very welcome}.
%
@@ -876,8 +887,15 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% Warm thanks also to Juan Luis Varona Malumbres for his precious
% feedback and his suggestions.
%
+% Herbert Voß spotted the necessity to follow a specific loading
+% order if the \pack{amsmath} needs to be used; he was so kind to
+% send me a bug notice together with a minimum working example.
+% Thanks a lot Herbert! The best I could do to manage this bug
+% consisted in adding an error message, if \pack{wrapfig2} during its
+% loading process found \pack{amsmath} already loaded.
+%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \CheckSum{1411}
+% \CheckSum{1428}
% \StopEventually{}
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -935,9 +953,30 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
\expandafter\endinput\fi
% \end{macrocode}
+%
+% {\color{red}{\paragraph{Loading order} Some users needed to use
+% \pack{wrapfig2} in documents where they required also the
+% \pack{amsmath} package functionalities; they noticed that some
+% incompatibility showed up if package \pack{amsmath} was input
+% before \pack{wrapfig2}. Such incompatibility vanishes if
+% \pack{amsmath} is loaded \emph{after} \pack{wrapfig2}. This
+% package now issues an error message if it finds \pack{amsmath}
+% already loaded.}}
+% \begin{macrocode}
+\@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}
+% \end{macrocode}
+%
% We keep the original definition of the \cs{WF@warning} and the
% original definition of the \opt{verbose} option; but we add the
-% new \opt{WFold} and \opt{WFfivw} options in order to fall back
+% new \opt{WFold} and \opt{WFfive} options in order to fall back
% to the functionalities of the previous version~4 or~5, at least
% for what concerns the \Env{wraptext} environment.
%
@@ -956,7 +995,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% We load the \pack{etoolbox} package, in order to have available
% its powerful macros.
%
-% If is was not previously loaded, we load the \pack{xfp} package,
+% If it was not previously loaded, we load the \pack{xfp} package,
% that allows us to perform precise calculations. Loading the
% \pack{xparse} package is necessary in order to use one of its
% rare features that did not migrate to the \LaTeX kernel. From the
@@ -1003,7 +1042,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
%
% In order to define the new floating object \texttt{text} we have
% to load the package \pack{float}, but only if versions~5 or~6
-% ae used; in other words only if the \cs{ifWFnew} switch
+% are used; in other words only if the \cs{ifWFnew} switch
% is \texttt{true}.
%
% If the \cs{chapter} command is or is not defined we have to load
@@ -1252,13 +1291,13 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% we have four quarter circles joined by straight lines; therefore
% we need eight nodes.
%
-% The shaded background and the coloured frame have the same contour;
+% The coloured background and the coloured frame have the same contour;
% but the former is filled, while the latter is stroked; we have to
-% draw the same curve two times; first the shaded background, then we
-% superimpose the frame
+% draw the same curve two times; first the coloured background, then the
+% superimposed frame
%
-% This shaded framed curved corners rectangle is at the center of the
-% coordinate system of a \Env{piture} environment, and has the correct
+% This coloured framed curved corners rectangle is at the center of the
+% coordinate system of a \Env{picture} environment, and has the correct
% dimensions to receive the boxed text; it is trivial to center the text
% by means of a zero dimensioned box, typical of the \Env{picture}
% environment.
@@ -1316,12 +1355,12 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% used within the body of the \cs{includeframedtext}; but if this
% command received a different value the frame may be thicker,
% or even vanish; we discourage values higher than \texttt{3pt}
-% (about \texttt{1mm}) and lower than \texttt{1pt} unless is zero.
+% (about \texttt{1mm}) and lower than \texttt{1pt} unless it is zero.
%
% The definition of the \Env{wraptext} environment is more detailed,
% because most of the computations must be done on the actual text
% to be wrapped, that does not have a specific width; moreover the
-% inserted text must not be too wide, nor too short in order to avoid
+% inserted text must not be too wide, nor too slim in order to avoid
% problems with its justification or the justification of the wrapping
% lines. The framed box width is preset to 50\% of the normal text
% measure, but it can be optionally specified to a different value (not
@@ -1338,9 +1377,12 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% and that of the inserted block and/or the measure of the indented
% wrapping lines; sometimes it might be necessary to get rid of the
% space below the inserted block when it gets typeset at the bottom
-% of a page. The asterisk is not needed because for this environment
+% of a page. The star is not needed because for this environment
% the optional first argument is always interpreted as the indented
-% lines number correction.
+% lines number \emph{correction}; nevertheless if users specify the
+% optional star, as they are used to with the other environments, such
+% star produces a visible warning message that reminds the user about
+% its uselessness.
%
% It is true that some of the input parameters specified to the opening
% command of any environment with \LaTeXiii are available also to the
@@ -1351,8 +1393,8 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% macros of the \Env{wrapfloat} environment; such procedure
% breaks this second availability of the input parameters,
% therefore it is necessary to save them into local macros or count
-% registers (assignments to \TeX count registers are \emph{local},
-% while assignment to \LaTeX\ named counters, through the
+% registers (remember that assignments to \TeX count registers are
+% \emph{local}, while assignment to \LaTeX\ named counters, through the
% \cs{setcounter} macro and its siblings, are \emph{global}) so
% that we can use their values within the closing commands.
%
@@ -1369,9 +1411,9 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% implies much less memory used by the almost unlimited,
% but unused, functionalities of the \pack{tikz} package on which
% \pack{tcolorbox} relies. Notice that the plain \Env{picture}
-% environment extended with the \pack{pict2e} package can draw
-% “ovals”, that is rectangles with rounded corners, but as far as
-% we know they have the frame but cannot be filled.
+% environment, extended with the \pack{pict2e} package, can draw
+% “ovals”, that is rectangles with rounded corners, but, as far as
+% we know, they have the frame but cannot be filled.
%
% Notice the \Env{wraptext} has two or three definitions depending on the
% logical switches \texttt{WFnew} and \texttt{WFfive}; if one of these
@@ -1417,11 +1459,17 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% while it is optional for version~4.
% \begin{macrocode}
\ifboolexpr{bool{WFnew} or bool{WFfive}}{% definition for versions 5 and 6
-\NewDocumentEnvironment{wraptext}{O{0} m O{0pt} G{0.5\columnwidth}}{%
+\NewDocumentEnvironment{wraptext}{O{0} m O{0pt} G{0.5\columnwidth} s}{%
\insertwidth=#4\WFscalewidth
\def\textplacement{#2}%
\def\textcorrection{#1}%
\def\textoverhang{#3}%
+ \IfBooleanTF{#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}}{}%%%<------------------
\bgroup\edef\x{\egroup\noexpand\wrapfloat{text}%
[\textcorrection]{\textplacement}[\textoverhang]{\insertwidth}*}\x%
\def\caption{\unskip
@@ -1436,7 +1484,7 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
}{\endwrapfloat\ignorespaces}%
% \end{macrocode}
%
-% For the fallback to version!4 definition of this \Env{wraptext}
+% For the fallback to version~4 definition of this \Env{wraptext}
% environment we have to start with the old list of specifically
% delimited optional arguments. We remember that this opening statement
% receives in order a bracket delimited optional \meta{location}
@@ -1449,8 +1497,9 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
%
% Notice that the third optional argument contains the
% \meta{line number correction}, therefore the star used with the
-% other environments is useless; if an asterisk is indadvertedly
-% specified, it is typeset as the first token of the wrapped test.
+% other environments is useless; contrary to versions~5 and~6, if
+% an asterisk is indadvertedly specified, it is typeset as the first
+% token of the wrapped test.
%
% The text to be wrapped, that forms the body of the environment,
% must be first boxed into a correct width vertical box; this is
@@ -1521,7 +1570,7 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% Now comes the new actual definition of the fundamental environment
% \Env{wrapfloat}; compared to the original Arseneau's definition it is
% much longer, but it contains the code that Arseneau, who used the
-% \LaTeXe language, and had to split it in several macros in order to
+% \LaTeXe language, had to split it in several macros in order to
% handle the multitude of interspersed mandatory and optional arguments.
%
% The main function of this environment is to handle the box that
@@ -1605,18 +1654,19 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% \Env{wraptext} environment does not accept the optional star; if the
% user indadvertedly specifies it for this environment, an
% asterisk appears at the beginning of the wrapped text with version~4;
-% with versions~5 and~6 the asterisk appears at the left of the framed
-% text. In all three cases, in facts, the first optional parameter is
-% always interpreted as the \meta{line number correction}.
+% with versions~5 and~6 the asterisk produces a warning that remind
+% users that this environment does not use any optional star. In all
+% three versions, in facts, the first optional parameter is always
+% interpreted as the \meta{line number correction}.
%
% The braced \meta{width} fourth parameter (actually a
% \textit{braced optional parameter}) may be specified
% to be \texttt{0pt}; in any case \texttt{0pt} is the default parameter
% value; if so, the object is treated at its natural width, by
% boxing it into an hbox and using this box width as the working
-% width of course this works only with \Env{wrapfigure} and
+% width; of course this works only with \Env{wrapfigure} and
% \Env{wraptable}, because what is being wrapped has its own natural
-% width; with text the natural width is the default setting made
+% width; with text the width is the default setting made
% with the \emph{braced optional argument} described with the
% \texttt{G} descriptor.
% \begin{macrocode}
@@ -1679,7 +1729,7 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% The trick of creating an alias for the \cs{caption} macro is
% used by Arseneau to redefine one of the two macros according to
% certain conditions. Here \cs{wf@caption} is actually redefined
-% if the \meta{width} parameter has been specified.
+% if the \meta{width} parameter has been specified or has been computed.
% \begin{macrocode}
\def\wf@caption{\relax% redefine \wf@caption in case \hsize is zero
\ifdim\hsize>\z@
@@ -1692,7 +1742,7 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% \end{macrocode}
%
-% One of these unusual macros was introduced by Arseneau
+% One of the following unusual macros was introduced by Arseneau
% to deal with paragraph parameters and possibly to float the
% object to be wrapped.
% \begin{macrocode}
@@ -1882,7 +1932,8 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% \end{macrocode}
%
-% This macro resets the paragraph properties and terminates the job.
+% This macro resets the paragraph properties and terminates the wrapping
+% job.
% \begin{macrocode}
\def\WF@mypar{\relax
\WF@@par
@@ -2051,7 +2102,8 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
% \meta{foo}, it suffices to define the new environment
% \Env{wrap\meta{foo}}. This fork version of his package should do
% the same: it suffices to mimic the definitions of environments
-% \Env{wrapfigure} or \Env{wraptable}.
+% \Env{wrapfigure} or \Env{wraptable}. But as we saw with the
+% \Env{wraptext}, the above statement is not always true.
%
% Here there is some Arseneau's code that renders his \pack{wrapfig}
% code compatible with \cs{newfloat} of class \class{memoir}, and
@@ -2078,7 +2130,7 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
\@ifundefined{float@restyle}%
{% older float.sty
- \toks@=\expandafter{\restylefloat{##1}% env. might be undefined
+ \toks@=\expandafter{\restylefloat{##1}% env. might be undefined
\@namedef{wrap#1}{%
\def\@captype{#1}\@nameuse{fst@#1}%
\def\WF@floatstyhook{\let\@currbox\WF@box \columnwidth\wd\WF@box
diff --git a/Master/texmf-dist/tex/latex/wrapfig2/wrapfig2.sty b/Master/texmf-dist/tex/latex/wrapfig2/wrapfig2.sty
index 508e88fc576..5c87db5f5c5 100644
--- a/Master/texmf-dist/tex/latex/wrapfig2/wrapfig2.sty
+++ b/Master/texmf-dist/tex/latex/wrapfig2/wrapfig2.sty
@@ -7,12 +7,12 @@
%% wrapfig2.dtx (with options: `package')
%%
%% Copyright (C) 1991-2003 by Donald Arseneau (asnd@triumf.ca)
-%% Copyright (C) 2021-2022 by Claudio Beccari (claudio.beccari@gmail.com)
+%% Copyright (C) 2021-2023 by Claudio Beccari (claudio.beccari@gmail.com)
%% License information appended
%%
\NeedsTeXFormat{LaTeX2e}[2019/01/01]
\ProvidesPackage{wrapfig2}%
- [2022-02-16 v.6.0.0 Wrap text around figures, tables, framed text blocks]
+ [2023-02-23 v.6.1.1 Wrap text around figures, tables, framed text blocks]
\ifcsname c@WF@wrappedlines\endcsname
\PackageError{wrapfig2}{ \MessageBreak
****************************************************\MessageBreak
@@ -28,6 +28,15 @@
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
@@ -179,11 +188,17 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
\egroup}
\ifboolexpr{bool{WFnew} or bool{WFfive}}{% definition for versions 5 and 6
-\NewDocumentEnvironment{wraptext}{O{0} m O{0pt} G{0.5\columnwidth}}{%
+\NewDocumentEnvironment{wraptext}{O{0} m O{0pt} G{0.5\columnwidth} s}{%
\insertwidth=#4\WFscalewidth
\def\textplacement{#2}%
\def\textcorrection{#1}%
\def\textoverhang{#3}%
+ \IfBooleanTF{#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}}{}%%%<------------------
\bgroup\edef\x{\egroup\noexpand\wrapfloat{text}%
[\textcorrection]{\textplacement}[\textoverhang]{\insertwidth}*}\x%
\def\caption{\unskip
@@ -584,7 +599,7 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
\@ifundefined{float@restyle}%
{% older float.sty
- \toks@=\expandafter{\restylefloat{##1}% env. might be undefined
+ \toks@=\expandafter{\restylefloat{##1}% env. might be undefined
\@namedef{wrap#1}{%
\def\@captype{#1}\@nameuse{fst@#1}%
\def\WF@floatstyhook{\let\@currbox\WF@box \columnwidth\wd\WF@box