From 1903b598f8dda613f5c584bb18ccfd2fd8c278bb Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 4 Jan 2022 03:01:50 +0000 Subject: CTAN sync 202201040301 --- macros/latex/contrib/wrapfig2/wrapfig2.dtx | 150 ++++++++++++++--------------- 1 file changed, 75 insertions(+), 75 deletions(-) (limited to 'macros/latex/contrib/wrapfig2/wrapfig2.dtx') diff --git a/macros/latex/contrib/wrapfig2/wrapfig2.dtx b/macros/latex/contrib/wrapfig2/wrapfig2.dtx index 5b6d9f8813..36b142c967 100644 --- a/macros/latex/contrib/wrapfig2/wrapfig2.dtx +++ b/macros/latex/contrib/wrapfig2/wrapfig2.dtx @@ -45,7 +45,7 @@ wrapfig2.sty and wrapfig2.pdf, plus the auxiliary file README.txt. %<+package>\ProvidesPackage{wrapfig2}% %^^A<+readme>File README.txt for package wrapfig2 %<*package|readme> - [2021-12-21 v.4.0 Wrapfig extended] + [2022-01-03 v.4.0.1 Wrapfig extended] % %<*driver> % @@ -217,25 +217,27 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % % The original software had some idiosyncrasies; Donald Arseneau % described them in the documentation of his package; I am sorry -% to say that such idiosyncrasies have not been reduced; but in any case -% the solution is to wrap the inserted object with a sufficient -% number of lines, i.e. by a sufficiently long paragraph. -% -% The above implies that no wrapped object code should be inserted -% by the end of a paragraph; again no object code should be inserted -% within any list; not even close to the end or to the -% beginning of section. Arseneau's code is capable of +% to say that such idiosyncrasies have not been reduced; but in +% any case in order to avoid such peculiar anomalies, it is +% sufficient to wrap the inserted object with a reasonable +% number of lines, i.e. by a reasonably long paragraph. +% +% The above implies that no wrapped object code should be specified +% in the source file close the end of a paragraph; again no object +% code should be inserted within any list; not even close to the end +% or to the beginning of section. Arseneau's code is capable of % specifying the wrapping number of lines such that two or more % paragraphs can be indented so as to wrap a longish insertion, % but it is wise to avoid such risky situations. Moreover, if the % inserted figure or table has a numbered caption, the number might -% not result in the correct order with the normal corresponding +% not result in the correct sequence of the normal corresponding % floating objects. % % Therefore the usefulness of the wrapping procedure depends very % much from the document author ability to move around his/her code % until a suitable position is found. Certainly a good place is -% within a longish first section at the beginning of a new chapter. +% within a longish first section paragraph at the beginning of a +% new chapter. % % The code of this package does not do anything to correct such % idiosyncrasies. They are caused by the limitations of the @@ -246,17 +248,17 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % \meta{number of indented lines} argument does not mean the total % number, but the correction number to add-to or subtract-from to the % value computed by the default mechanism devised by Arseneau. We assume -% that any user first uses the software to insert an object to be wrapped +% that all user first use the software to insert an object to be wrapped % by the surrounding text without specifying any value with the -% specific optional argument; then evaluates the result, and if the +% specific optional argument; then they evaluate the result, and if the % space below the wrapped object is too large, or if such space is -% too small s/he counts the necessary number of lines and specifies +% too small they count the necessary number of lines and specify % it to be processed during another document compilation. When the % object to be wrapped is tall, it is very easy to miscount the % necessary number of lines, while is is very easy to evaluate the % necessary small correction to the default computed value. % -% A third purpose of this package is to define a new environment, +% A furher purpose of this package is to define a new environment, % \Env{wraptext}, to wrap a framed text block typeset on a grey % background as if it were a figure. On \texttt{texstackexchange} % a solution was suggested to a user who was asking for such an @@ -269,11 +271,11 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % of the indented lines number would still be necessary. We added also % the possibility of optionally specifying the measure of the % wrapped text, even if this measure should not be too different -% from a half of the wrapping text measure: with a value too different -% from \texttt{0.5\cs{linewidth}} either the wrapped text has problems -% with inter word spaces and hyphenation because of the small measure, -% or, on the opposite, the indented lines of the wrapping text have -% similar problems. +% from a half of the wrapping text measure.In facts, with a value too +% different from \texttt{0.5\cs{linewidth}} either the wrapped text has +% problems with inter word spaces and hyphenation because of the small +% measure, or, on the opposite, the indented lines of the wrapping text +% have similar problems. % %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \section{Environment syntax} @@ -312,7 +314,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi %\section{Examples} %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % We display some examples by using fake objects such that suitably -% long paragraphs are available; some fake language long paragraphs are +% long paragraphs are available; some fake-language long-paragraphs are % obtained by means of the \pack{kantlipsum} package functionalities. % They contain paragraphs that look as Kant's sentences, but we % doubt that Immanuel Kant ever wrote such texts\dots @@ -322,7 +324,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % -%\begin{wrapfigure}{r}{50mm}* +%\begin{wrapfigure}{r}{50mm} %\centering\unitlength=1mm %\begin{picture}(40,30) %\polygon(0,0)(40,0)(40,30)(0,30) @@ -362,11 +364,11 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % case a \cs{centering} command might help to center the table % within the indention of the wrapping text. Nevertheless the % software can compute the object width if a zero value is specified -% or if the mandatory \meta{width} parameter is completely omitted; -% 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. +% or if the \meta{width} parameter is completely omitted together +% 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. % %\begin{wraptable}{l} %\centering @@ -404,9 +406,9 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % 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 +% caption might use 5~lines, and specified such a value as the % first (optional) argument to the environment, the result would -% be this poor one, with the last caption line overlapping the +% be the following poor one, with the last caption line overlapping the % wrapping text. % %\begin{wraptable}[5]{l} @@ -421,8 +423,6 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi %\end{wraptable} %\kant[2] % -% If -% %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \subsection{A wrapped text} %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -524,7 +524,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % and its default value amounts to half the current measure; it can % be specified but it should not be too different from 50\% the % current measure. For the standard environments this parameter value -% is mandatory, but, we recall, for the redefined environments +% is mandatory, but, we recall, only for the redefined environments % \env{wrapfigure} and \env{wraptable}, this braced argument is optional. % %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -532,20 +532,19 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Pictures and textual arrays may be floated by means of the standard % \amb{figure} and \amb{table} environments. But other floating -% objects may be defined by means of the \pack{float} package, -% just to name one, or classes. Besides floating, the main difference -% is the name of the caption “label”: Figure, Table, Algorithm, -% Example, and so on. +% objects may be defined by means of other packages, for example the +% \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. % % If floating is not necessary, this package (as well as the original % one) allows to use the underlying environment \Env{wrapfloat} % that uses the same syntax as \Env{wrapfigure} plus the mandatory % name of the new object: even a figure might be introduced without % using \amb{wrapfigure}, by using instead: -%\begin{flushleft}\ttfamily\obeylines -%\Benv{wrapfloat}\Marg{figure}\oarg{line number}\marg{placement}\% -%\quad \oarg{overhang}\marg{width}\meta{$\star$} -%\qquad\qquad\meta{image} +%\begin{flushleft}\setfontsize{9.275}\ttfamily\obeylines +%\Benv{wrapfloat}\Marg{figure}\oarg{line number}\marg{placement}\oarg{overhang}\marg{width}\meta{$\star$} +%\quad\qquad\meta{image} %\Eenv{wrapfloat} %\end{flushleft} % Another \meta{object} may be wrapped by using: @@ -588,7 +587,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi %\begin{quote} % Most, but not all, of the argument types defined by \pack{xparse} % are now supported at the kernel level. In particular, the types -% \texttt{g/G}, \texttt{l} and \texttt{u} are not provided by the +% \texttt{g/G}, \texttt{l} and \texttt{u}, are not provided by the % kernel code; these are \emph{deprecated} but still available by % explicitly loading \pack{xparse}. All other argument types are % now available directly within the \LaTeXe kernel. @@ -649,10 +648,10 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % and \pack{xfp} packages before loading \pack{wrapfig2}. % Notice that most of the \pack{xparse} package functionalities % at the date required for the format file are already included. The -% \pack{xparse} package has been available about in 2018; should the user -% have available a definitely older \TeX system installation, s/he +% \pack{xparse} package has been available about in 2018; should the users +% have available a definitely older \TeX system installation, they % should upgrade it, or must avoid using this \pack{wrapfig2} package -% and use the original one; if s/he needs to wrap text, s/he should +% and use the original one; if they need to wrap text, they should % resort to some ingenious tricks to do it. % % The opening command of the \Env{wrapfloat} environment receives @@ -696,10 +695,10 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % 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 % problems for its justification or the justification of the wrapping -% text. The framed box width is preset to 50\% of the normal text measure, -% but it can be optionally specified to a different value (not too -% different from 50\%), while for the other environments the wrapped -% material width is an \emph{optional braced parameter}. +% 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 +% too different from 50\%), while for the other environments the wrapped +% material width is an \emph{braced optional parameter}. % % For what concerns the \Env{wraptext} environment, see below, % because the code is a little more complicated and requires some @@ -709,23 +708,26 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % because the computation of the insertion block height is pretty % precise and at most the user might desire one line more or less % depending on the measure of the whole text, and that of the -% inserted block and/or the measure of the indented wrapped lines. +% inserted block and/or the measure of the indented wrapped 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. % % It is true that some of the input parameters specified to the opening -% command with \LaTeXiii are available also to the closing commands; see -% the last paragraph of section~2 in the \pack{xparse} documentation. +% command of any environment with \LaTeXiii are available also to the +% closing commands; see the last paragraph of section~2 in the +% \pack{xparse} documentation. % But the following definition, besides using special delimiters for % optional parameters, uses the separate opening and closing % macros of the \Env{wrapfloat} environment; such procedure % apparently breaks this second availability of the input parameters, % therefore it is necessary to save them into local macros or count -% registers (assignments of \TeX count registers are \emph{local}, -% while assignment of the \LaTeX\ named counters, through the +% registers (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. % -% The \cs{NWF@box} has been assigned at the beginning; remember -% that \LaTeXiii registers of any kind are not limited in number +% The \cs{NWF@box} box register has been assigned at the beginning; +% remember that \LaTeXiii registers of any kind are not limited in number % as they were some years ago even with \LaTeXe. % The last opening commands are conceived to box the object to be % wrapped, typeset within a \Env{minipage} with the default or @@ -785,7 +787,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % arguments. % % The main function of this environment is to handle the box that -% contains the figure, or the table, or the framed test, or what +% contains the figure, or the table, or the framed text, or what % else, so that the inserted box is preceded and followed by the % suitable vertical spaces, and it is possible to compute the % number of lines to be indented; often this computed number is correct; @@ -793,7 +795,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % within prohibited wrapping text, such number might need to be % corrected. As it can be seen the optional star is not among % the argument descriptors of the opening commands; it will be -% the following macro \cs{WR@wr} to take care of examining +% the following macro \cs{WR@wr} responsible of taking care of % the list of arguments and see if a star has been specified and % not yet read by the preceding commands. % @@ -855,7 +857,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % After these adjustments, it computes the box total height plus some % fixed amounts needed mostly to set the wrapped material below the % first wrapping text first line. Here is where the \LaTeXiii -% \cs{fpeval} computing macro comes into play so as to assign such +% \cs{fpeval} computing function comes into play so as to assign such % height to \cs{WF@size}. Some unusual macros are executed; they % were devised by Arseneau to deal with possibly floating wrapped % objects. The optional star is not accepted by this macro; if the user @@ -864,11 +866,11 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % the user specifies it for this environment, an asterisk appears % at the beginning of the wrapped text. % -% The mandatory \texttt{\#4} \meta{width} parameter (actually a -% \meta{optional braced parameter}) may be specified +% The braced \texttt{\#4} \meta{width} parameter (actually a +% \meta{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 hbox width as the working width +% boxing it into an hbox and using this box width as the working width % \begin{macrocode} \NewDocumentCommand\WF@wr{o m o m s}{% \xdef\WF@wfname{wrap\@captype\space}% @@ -1030,7 +1032,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi \fi \xdef\WF@place{\the\lccode\lccode\WF@place}% }% twice to get only l or r - \hbox to\z@{% llap o rlap depending on lor r; calc effective width + \hbox to\z@{% llap o rlap depending on l or r; calc effective width \@tempdima\wd\WF@box \@tempdimb\WF@ovh \advance\@tempdima-\@tempdimb \advance\@tempdima\columnsep \@tempdimb\hsize \advance\@tempdimb-\@tempdima @@ -1062,7 +1064,6 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi \aftergroup\WF@startwrapping \fi } - % \end{macrocode} % % Here comes the very important macro that counts the wrapping indented @@ -1074,14 +1075,13 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % fact that this macro cannot preview actions that have not % yet taken place when this macro is executed. % -% This macro is the one that counts the lines to be indented by -% rounding the division of the box height by the current base -% line skip. Notice that \texttt{WF@wrappedlines} is the name -% of a \LaTeX named counter, not of a \TeX numeric register; -% therefore special LaTeX commands, such as \cs{setocounter} or -% \cs{value}, have to be used in order to set or access the -% numerical value stored within the \TeX register associated -% to the \LaTeX counter name. +% This macro counts the lines to be indented by rounding the division +% of the box height by the current base line skip. Notice that +% \texttt{WF@wrappedlines} is the name of a \LaTeX named counter, +% not of a \TeX numeric register; therefore special LaTeX commands, +% such as \cs{setocounter} or \cs{value}, have to be used in order +% to set or access the numerical value stored within the \TeX +% register associated to the \LaTeX counter name. % \begin{macrocode} \def\WF@startwrapping{% \ifnum\WF@wli=\z@ % no number was specified @@ -1309,7 +1309,7 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % % Here there is some Arseneau's code that renders his \pack{wrapfig} % code compatible with \cs{newfloat} of class \class{memoir}, and -% with \cs{newfoatlist} of package \pack{ccaption}. We leave his code +% with \cs{newfloatlist} of package \pack{ccaption}. We leave his code % hereafter; but we did not test it with this package. % \begin{macrocode} \let\WF@floatstyhook\relax @@ -1370,13 +1370,13 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi % \end{macrocode} % We never described the package options; this code was present -% in Arseneau's code and ve leave it here, with the necessary -% package name change. We think that this \opz{verbose} option +% in Arseneau's code and we leave it here, with the necessary +% package-name changes. We think that this \opz{verbose} option % was and remains useless, since the instances of command % \cs{WF@info} were mostly commented out in the original code; % in any case, input of this code is stopped if the % \cs{DeclareOption} command is not defined; this command was -% defined with \LaTeXe; therefore this is a residual of the old +% defined with \LaTeXe; therefore might be a residual of the old % times when \LaTeXccix was still in use, more than 25 years % ago\dots % \begin{macrocode} -- cgit v1.2.3