summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-10-19 03:01:17 +0000
committerNorbert Preining <norbert@preining.info>2020-10-19 03:01:17 +0000
commit3fdf82ec77f470d0bf97c17c3085ef2fd58ea65f (patch)
treeb5a02fdc2b644489adba7459ebbf1d5d2f2739f5 /macros/latex/contrib
parent94b94cfd7a578d12bd5335c40e5f43400140c3f4 (diff)
CTAN sync 202010190301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/everypage/README.md7
-rw-r--r--macros/latex/contrib/everypage/everypage.dtx23
-rw-r--r--macros/latex/contrib/everypage/everypage.ins11
-rw-r--r--macros/latex/contrib/everypage/everypage.pdfbin0 -> 159952 bytes
-rw-r--r--macros/latex/contrib/flippdf/README23
-rw-r--r--macros/latex/contrib/flippdf/README.md28
-rw-r--r--macros/latex/contrib/flippdf/flippdf.dtx92
-rw-r--r--macros/latex/contrib/flippdf/flippdf.ins21
-rw-r--r--macros/latex/contrib/flippdf/flippdf.pdfbin134345 -> 135228 bytes
-rw-r--r--macros/latex/contrib/swfigure/README.txt34
-rw-r--r--macros/latex/contrib/swfigure/VSSfake.jpgbin0 -> 81784 bytes
-rw-r--r--macros/latex/contrib/swfigure/swfigure-examples.pdfbin547330 -> 593358 bytes
-rw-r--r--macros/latex/contrib/swfigure/swfigure-examples.tex37
-rw-r--r--macros/latex/contrib/swfigure/swfigure.dtx183
-rw-r--r--macros/latex/contrib/swfigure/swfigure.pdfbin456448 -> 456490 bytes
15 files changed, 252 insertions, 207 deletions
diff --git a/macros/latex/contrib/everypage/README.md b/macros/latex/contrib/everypage/README.md
index 6863d49865..365b3ee611 100644
--- a/macros/latex/contrib/everypage/README.md
+++ b/macros/latex/contrib/everypage/README.md
@@ -57,8 +57,7 @@ UPGRADE IS RECOMMENDED
## License
Package `everypage` may be distributed and/or modified under the conditions of
-the LaTeX Project Public License, version 1.3. This license is available at
-http://www.latex-project.org/lppl.txt and is part of all distributions of LaTeX
-version 2003/06/01 or later.
+the LaTeX Project Public License, version 1.3c. This license is available at
+https://www.latex-project.org/lppl/lppl-1-3c/.
-This work has the LPPL maintenance status "author-maintained".
+This work has the LPPL maintenance status "maintained".
diff --git a/macros/latex/contrib/everypage/everypage.dtx b/macros/latex/contrib/everypage/everypage.dtx
index e390b6b980..d23b6284b9 100644
--- a/macros/latex/contrib/everypage/everypage.dtx
+++ b/macros/latex/contrib/everypage/everypage.dtx
@@ -8,13 +8,14 @@
% a contribution to the LaTeX2e system.
% ---------------------------------------------
%
-% It may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, either version 1.3 of this licence, or
-% any later version. The latest version of this license is at
-% http://www.latex-project.org/lppl.txt and version 1.3 is part
-% of all distributions of LaTeX version 2003/06/01 or later.
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, version 1.3c.
+% This license is in
+% https://www.latex-project.org/lppl/lppl-1-3c/
+% and is part of all distributions of LaTeX later than
+% 2008-05-04.
%
-% This work has the LPPL maintenance status "author-maintained".
+% This work has the LPPL maintenance status "maintained".
%
% This program consists of the files listed in the README file
% included in the package.
@@ -46,9 +47,9 @@
% \CheckSum{71}
%
% \def\filename{everypage.dtx}
-% \def\fileversion{2.0}
-% \def\filedate{2020/10/11}
-% \def\docdate{2020/10/11}
+% \def\fileversion{2.0b}
+% \def\filedate{2020/10/17}
+% \def\docdate{2020/10/17}
%
% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
@@ -69,6 +70,8 @@
%
% \maketitle
%
+% \changes{R2.0b}{2020/10/17}{Fix statement about maintenance state.}
+%
% \section*{WARNING}
% \changes{R2.0}{2020/10/11}{Package is now in a `legacy' status.}
%
@@ -330,7 +333,7 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{everypage}%
- [2020/10/11 R2.0 Hooks to run on every page]
+ [2020/10/17 R2.0b Hooks to run on every page]
% \end{macrocode}
% Complain out loud about the package being obsolete.
% \begin{macrocode}
diff --git a/macros/latex/contrib/everypage/everypage.ins b/macros/latex/contrib/everypage/everypage.ins
index 2da7b69a6e..ea78f10b52 100644
--- a/macros/latex/contrib/everypage/everypage.ins
+++ b/macros/latex/contrib/everypage/everypage.ins
@@ -7,13 +7,12 @@
%% a contribution to the LaTeX2e system.
%% ---------------------------------------------
%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License, either version 1.3 of this licence, or
-%% any later version. The latest version of this license is at
-%% http://www.latex-project.org/lppl.txt and version 1.3 is part
-%% of all distributions of LaTeX version 2003/06/01 or later.
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, version 1.3c.
+%% This license is in
+%% https://www.latex-project.org/lppl/lppl-1-3c/
%%
-%% This work has the LPPL maintenance status "author-maintained".
+%% This work has the LPPL maintenance status "maintained".
%%
%% This program consists of the files listed in the README file
%% included in the package.
diff --git a/macros/latex/contrib/everypage/everypage.pdf b/macros/latex/contrib/everypage/everypage.pdf
new file mode 100644
index 0000000000..a321fd8df6
--- /dev/null
+++ b/macros/latex/contrib/everypage/everypage.pdf
Binary files differ
diff --git a/macros/latex/contrib/flippdf/README b/macros/latex/contrib/flippdf/README
deleted file mode 100644
index 77526cf4b5..0000000000
--- a/macros/latex/contrib/flippdf/README
+++ /dev/null
@@ -1,23 +0,0 @@
-The "flippdf" package extends LaTeX making it possible to typeset a "mirrored"
-version of the document. This is sometimes required by publishers who use
-printing processes that require "camera-ready" documents to be printable on
-transparent films, so that one reads the pages correctly by looking through the
-film (i.e., with the unprinted side of the film towards his eyes). This package
-requires "everypage" by the same author and works with pdfLaTeX only.
-
-The "flippdf" package is copyright 2006, 2020 by Sergio Callegari
-<sergio.callegari@gmail.com>
-
-It comprises this README file, as well as files
-flippdf.dtx
-flippf.ins
-
-To install the package, run LaTeX on the installation script
-flipdf.ins and follow the instructions provided by the script itself.
-
-"flippdf" may be distributed and/or modified under the conditions of
-the LaTeX Project Public License, version 1.3c. This license is at
-http://www.latex-project.org/lppl.txt and is part of all
-distributions of LaTeX version 2003/06/01 or later.
-
-This work has the LPPL maintenance status "author-maintained".
diff --git a/macros/latex/contrib/flippdf/README.md b/macros/latex/contrib/flippdf/README.md
new file mode 100644
index 0000000000..33c3b4def1
--- /dev/null
+++ b/macros/latex/contrib/flippdf/README.md
@@ -0,0 +1,28 @@
+# The `flippdf` package
+
+The `flippdf` package extends LaTeX making it possible to typeset a *mirrored*
+version of the document. This is sometimes required by publishers who use
+printing processes that require "camera-ready" documents to be printable on
+transparent films, so that one reads the pages correctly by looking through the
+film (i.e., with the unprinted side of the film towards his eyes). This package
+requires `everypage` by the same author and works with pdfLaTeX and luaLaTeX
+only and only in PDF output mode.
+
+The `flippdf` package is copyright 2006, 2020 by Sergio Callegari
+<sergio.callegari@gmail.com>
+
+It comprises this `README.md` file, as well as files
+- `flippdf.dtx`
+- `flippf.ins`
+
+To install the package, run LaTeX on the installation script
+flipdf.ins and follow the instructions provided by the script itself.
+
+
+## License
+
+Package `flippdf` may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, version 1.3c. This license is available at
+https://www.latex-project.org/lppl/lppl-1-3c/.
+
+This work has the LPPL maintenance status "maintained".
diff --git a/macros/latex/contrib/flippdf/flippdf.dtx b/macros/latex/contrib/flippdf/flippdf.dtx
index cc775ee113..e329d4f2a2 100644
--- a/macros/latex/contrib/flippdf/flippdf.dtx
+++ b/macros/latex/contrib/flippdf/flippdf.dtx
@@ -8,14 +8,16 @@
% a contribution to the LaTeX2e system.
% ---------------------------------------------
%
-% It may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of this licence.
-% This license is at http://www.latex-project.org/lppl.txt and is part
-% of all distributions of LaTeX version 2003/06/01 or later.
-%
-% This work has the LPPL maintenance status "author-maintained".
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, version 1.3c.
+% This license is in
+% https://www.latex-project.org/lppl/lppl-1-3c/
+% and is part of all distributions of LaTeX later than
+% 2008-05-04.
+%
+% This work has the LPPL maintenance status "maintained".
%
-% This program consists of the files listed in the README file
+% This program consists of the files listed in the README.md file
% included in the package.
%
%<*driver>
@@ -38,18 +40,19 @@
% \DoNotIndex{\NeedsTeXFormat, \documentclass}
% \DoNotIndex{\begin, \end}
% \DoNotIndex{\def, \gdef, \let, \newcommand}
-% \DoNotIndex{\ProvidesPackage, \RequirePackage, \usepackage}
+% \DoNotIndex{\ProvidesPackage, \RequirePackage, \usepackage, \PackageError}
% \DoNotIndex{\DeclareOption, \ProcessOptions}
-% \DoNotIndex{\ifx, \fi, \newif}
+% \DoNotIndex{\ifx, \fi, \newif, \else}
% \DoNotIndex{\paperwidth, \space, \strip@pt}
% \DoNotIndex{\maketitle, \title, \lipsum}
+% \DoNotIndex{\thispagestyle, \relax, \setcounter, \Large, \clearpage, \bigskip}
%
-% \CheckSum{22}
+% \CheckSum{40}
%
% \def\filename{flippdf.dtx}
-% \def\fileversion{1.0b}
-% \def\filedate{2020/10/11}
-% \def\docdate{2020/10/11}
+% \def\fileversion{1.1}
+% \def\filedate{2020/10/17}
+% \def\docdate{2020/10/17}
%
% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
@@ -71,14 +74,15 @@
% \maketitle
%
% \begin{abstract}
-% The \Lpack{pdfflip} package extends \hologo{pdfLaTeX} making it
-% possible to typeset a ``mirrored'' version of the document. This is
-% sometimes required by publishers who use photographic printing
-% processes that need ``camera-ready'' documents to be printable on
-% transparent films, so that one reads the pages correctly by looking
-% \emph{through} the film with the \emph{unprinted} side of the film
-% towards his eyes. This package requires \Lpack{everypage} by the same
-% author and works with \hologo{pdfLaTeX} only.
+% The \Lpack{pdfflip} package extends \hologo{pdfLaTeX} and
+% \hologo{LuaLaTeX} making it possible to typeset a ``mirrored'' version
+% of the document. This is sometimes required by publishers who use
+% photographic printing processes that need ``camera-ready'' documents
+% to be printable on transparent films, so that one reads the pages
+% correctly by looking \emph{through} the film with the \emph{unprinted}
+% side of the film towards his eyes. This package requires
+% \Lpack{everypage} by the same author and works exclusively with
+% \hologo{pdfLaTeX} and \hologo{LuaLaTeX} in PDF output mode.
% \end{abstract}
%
% \section{Introduction}
@@ -94,7 +98,8 @@
% by page basis.
%
% This package requires \Lpack{everypage} by the same author and works
-% with \hologo{pdfLaTeX} only.
+% exclusively with \hologo{pdfLaTeX} and \hologo{LuaLaTeX} in PDF output
+% mode.
%
% \section{User interface}
% By default, once loaded as:
@@ -185,22 +190,35 @@
%<*flippdf>
% \fi
% Announce the name and version of the package, that requires
-% \hologo{LaTeX2e} (actually \hologo{pdfLaTeX}).
+% \hologo{LaTeX2e} (actually \hologo{pdfLaTeX} or \hologo{LuaLaTeX}).
% \changes{R1.0b}{2020/10/11}{%
% Require \Lpack{everypage} package to be at least at its 2007/06/20 (R1.1)
% release.}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{flippdf}%
- [2020/10/11 1.0b Horizontal flipping of pages with pdfLaTeX]
+ [2020/10/17 1.1 Horizontal flipping of pages with pdfLaTeX]
% \end{macrocode}
%
% Assure that the dependence on \Lpack{everypage} is satisfied.
% \begin{macrocode}
\RequirePackage{everypage}[2007/06/20]
% \end{macrocode}
-% \begin{macro}{\if@sc@flippdf}
%
+% Depend on \Lpack{iftex} and error out if not working in PDF mode
+% \changes{R1.1}{2020/10/17}{Error out if output mode is not PDF.}%
+% \begin{macrocode}
+\RequirePackage{iftex}
+\AtBeginDocument{%
+ \ifpdf
+ \relax
+ \else
+ \PackageError{flippdf}{%
+ package only works in pdf output mode}%
+ \fi}
+% \end{macrocode}
+%
+% \begin{macro}{\if@sc@flippdf}
% Define a boolean variable to remember if pages are to be flipped or
% not.
% \begin{macrocode}
@@ -229,12 +247,26 @@
% \end{macrocode}
%
% And eventually, tell \LaTeX\ to flip every page, by using the
-% \Lpack{everypage} hook:
+% \Lpack{everypage} hook. First consider the case when running in
+% \hologo{pdfLaTeX}
% \begin{macrocode}
-\AddEverypageHook{%
- \if@sc@flippdf
- \pdfliteral direct {-1 0 0 1 \strip@pt\paperwidth\space 0 cm}
- \fi}
+\ifpdftex
+ \AddEverypageHook{%
+ \if@sc@flippdf
+ \pdfliteral direct {-1 0 0 1 \strip@pt\paperwidth\space 0 cm}%
+ \fi}%
+\fi
+% \end{macrocode}
+% Then consider the case when running in \hologo{LuaLaTeX}
+% \changes{R1.1}{2020/10/17}{Extend package to work also with
+% \hologo{LuaLaTeX}.}
+% \begin{macrocode}
+\ifluatex
+ \AddEverypageHook{%
+ \if@sc@flippdf
+ \pdfextension literal direct {-1 0 0 1 \strip@pt\paperwidth\space 0 cm}%
+ \fi}%
+\fi
% \end{macrocode}
% \iffalse
%</flippdf>
diff --git a/macros/latex/contrib/flippdf/flippdf.ins b/macros/latex/contrib/flippdf/flippdf.ins
index 0b91703047..b8f327f0b5 100644
--- a/macros/latex/contrib/flippdf/flippdf.ins
+++ b/macros/latex/contrib/flippdf/flippdf.ins
@@ -7,14 +7,16 @@
%% a contribution to the LaTeX2e system.
%% ---------------------------------------------
%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License, version 1.3c. This version of the
-%% license is at http://www.latex-project.org/lppl.txt and is part
-%% of all distributions of LaTeX version 2003/06/01 or later.
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, version 1.3c.
+%% This license is in
+%% https://www.latex-project.org/lppl/lppl-1-3c/
+%% and is part of all distributions of LaTeX later than
+%% 2008-05-04.
%%
-%% This work has the LPPL maintenance status "author-maintained".
+%% This work has the LPPL maintenance status "maintained".
%%
-%% This program consists of the files listed in the README file
+%% This program consists of the files listed in the README.md file
%% included in the package.
%%
%% This file will generate fast loadable files and documentation
@@ -74,9 +76,12 @@ necessarily be in the same archive or directory.)
\Msg{* - run flippdf.dtx through LaTeX}
\Msg{* - process flippdf.idx by:}
\Msg{* \space\space\space\space makeindex -s gind.ist flippdf}
-\Msg{* Process flippdf.glo by:}
+\Msg{* - process flippdf.glo by:}
\Msg{* \space\space\space\space makeindex -s gglo.ist -o flippdf.gls flippdf.glo}
-\Msg{* Re run through LaTeX the flippdf.dtx as necessary}
+\Msg{* - re run through LaTeX the flippdf.dtx as necessary}
+\Msg{* You may then want to move the test-flippdf*.tex files produced by}
+\Msg{* processing this ins file together with the documentation (e.g., in an}
+\Msg{* examples subdirectory}
\Msg{*}
\Msg{***********************************************************}
diff --git a/macros/latex/contrib/flippdf/flippdf.pdf b/macros/latex/contrib/flippdf/flippdf.pdf
index 12a1900edd..bfa6b881fa 100644
--- a/macros/latex/contrib/flippdf/flippdf.pdf
+++ b/macros/latex/contrib/flippdf/flippdf.pdf
Binary files differ
diff --git a/macros/latex/contrib/swfigure/README.txt b/macros/latex/contrib/swfigure/README.txt
index d92234b94d..50131c97c3 100644
--- a/macros/latex/contrib/swfigure/README.txt
+++ b/macros/latex/contrib/swfigure/README.txt
@@ -2,31 +2,29 @@
%% This is file `README.txt',
%% generated with the docstrip utility.
%%
-%% The original source files were:
-%%
-%% swfigure.dtx (with options: `readme')
-%%
%% Copyright (C) 2020 Claudio Beccari all rights reserved.
%% License information appended
%%
File README.txt for package swfigure
- [2020-10-13 v.0.9.08 Managing large and spread wide figures]
-This bundle contains file the swfigure.dtx and README.txt files.
+ [2020-10-18 v.0.9.11 Managing large and spread wide figures]
+This bundle contains the swfigure.dtx, swfigure-examples.tex,
+and README.txt files plus six fake figures with extension .jpg.
This file README.txt contains the licence, the status, and some
-general information. Save both in a .../source/latex/swfigure
-folder either in the main TeX system tree or in your personal
-tree.
+general information. Save the README.txt and swfigure.dtx file
+in a .../source/latex/swfigure folder either in the main TeX
+system tree or in your personal tree.
+Save the swfigure-examples.tex, the derived swfigures-examples.pdf,
+and the six .jpg files in folder .../doc/latex/swfigure.
-This swfigure.dtx file is a self extracting documented one.
-Run pdfLaTeX at least twice on this file in order to get all
-references correct, and you obtain the swfigure.pdf and the
-swfigure.sty files. After extraction move the .sty file to
-the .../tex/latex/swfigure folder, and move the .pdf file to
-the .../doc/latex/swfigure folder. From the original folder
-.../source/latex/swfigure move all files, except the .dtx and
-the .txt files, to the bin.
+Process the self extracting swfigure.dtx file with pdfLaTeX;
+repeat at least twice in order to get all references correct;
+you obtain the swfigure.pdf and the swfigure.sty files.
+After extraction move the .sty file to the .../tex/latex/swfigure
+folder, and move the .pdf file to the .../doc/latex/swfigure folder.
+From the original folder .../source/latex/swfigure move to the bin
+all files except the .dtx and the .txt ones.
The author disclaims any liability from every possible inconvenience
deriving from the use of this software; you use it at your own risk.
@@ -41,5 +39,3 @@ deriving from the use of this software; you use it at your own risk.
%% This work consists of files swfigure.dtx and READEME.txt, and the
%% derived files swfigure.sty and swfigure.pdf
%%
-%%
-%% End of file `README.txt'.
diff --git a/macros/latex/contrib/swfigure/VSSfake.jpg b/macros/latex/contrib/swfigure/VSSfake.jpg
new file mode 100644
index 0000000000..62119aedba
--- /dev/null
+++ b/macros/latex/contrib/swfigure/VSSfake.jpg
Binary files differ
diff --git a/macros/latex/contrib/swfigure/swfigure-examples.pdf b/macros/latex/contrib/swfigure/swfigure-examples.pdf
index 3cb6b772f8..e20f001fd6 100644
--- a/macros/latex/contrib/swfigure/swfigure-examples.pdf
+++ b/macros/latex/contrib/swfigure/swfigure-examples.pdf
Binary files differ
diff --git a/macros/latex/contrib/swfigure/swfigure-examples.tex b/macros/latex/contrib/swfigure/swfigure-examples.tex
index b16d24431c..b37eea4bc9 100644
--- a/macros/latex/contrib/swfigure/swfigure-examples.tex
+++ b/macros/latex/contrib/swfigure/swfigure-examples.tex
@@ -8,7 +8,7 @@
\providecommand*\diff{\mathop{}\!\mathrm{d}}
\providecommand\cs{}
- \renewcommand\cs[1]{\normalfont{\texttt{\char92#1}}}
+ \renewcommand\cs[1]{{\normalfont{\texttt{\char92#1}}}}
\providecommand\meta{}
\renewcommand\meta[1]{{\normalfont\textlangle\textit{#1}\textrangle}}
\providecommand\marg{}
@@ -60,10 +60,10 @@
\counterwithout{section}{chapter}
-\begin{document}
+\begin{document}\frenchspacing
\GetFileInfo{swfigure.sty}
\title{The \pack{swfigure} package --- Usage examples}
-\author{Claudio Beccari\thanks{Email: \texttt{claudio dot beccari at gmail dot com}}}
+\author{Claudio Beccari\qquad\texttt{\texttt{claudio dot beccari at gmail dot com}}}
\date{Version \fileversion~---~ Last revised \filedate}
\maketitle
@@ -83,25 +83,25 @@ As far as we can say, we know that Preview.app on Macs does not use any gap. Oku
If the \pack{hyperref} package is used the option \texttt{pdfpagelayout=TwoColumnRight} may be specified; some PDF viewers understand this setting, but not necessarily the spread view lacks the gap between the facing pages.
It is possible to see a spread wide figure in the next two pages; a fake figure is displayed and you see that the crossing of the diagonal and medial lines takes
-\DFimage[SW]{SWfakeimage}{A spread wide fake image}[fig:SWfake]%
+\DFimage[SW]{SWfakeimage}{A spread wide fake image}[fig:SWfake]
place exactly on the spine. It was composed with the following command:
-\begin{flushleft}\setfontsize{9.85}\ttfamily\obeylines
+\begin{ttsyntax}\setfontsize{9.85}%
... takes
-\cs{DFimage}Oarg{SW}\Marg{SWfakeimage}\Marg{A Spread Wide fake image}\Oarg{fig:SWfake}%
+\cs{DFimage}\Oarg{SW}\Marg{SWfakeimage}\Marg{A Spread Wide fake image}\Oarg{fig:SWfake}\%
place ...
-\end{flushleft}
+\end{ttsyntax}
-Other examples are shown in the following pages; the filling text is a generic text, not actually a non sense fake Latin wording such as that provided by the \pack{lipsum} package, but it is taken form package \pack{kantlipsum} where sentences appear as plain English, although we doubt that Emmanuel Kant wrote those very texts.
+Other examples are shown in the following pages; the filling text is a generic text, not actually a non sense fake Latin wording such as that provided by the \pack{lipsum} package, but it is taken form package \pack{kantlipsum} where sentences appear as plain English; those sentences appear as translations of Immanuel Kant's philosophic theories, although we doubt that he wrote those very texts.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{The user macro}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The only user macro defined by this package has the following syntax:
-\begin{ttsyntax}
+\begin{ttsyntax}\setfontsize{9.5}%
\cs{DFimage}\oarg{display mode}\marg{image file name}\oarg{lof entry}\%
-\qquad\marg{caption}\oarg{label}\parg{height correction}\aarg{line correction}
+\qquad\marg{caption}\oarg{label}\parg{height correction}\aarg{line correction}|\meta{width test}|
\end{ttsyntax}
The arguments are described in detail in the twin document \file{swfigure.pdf}. We shortly repeat their meanings.
\begin{description}[noitemsep]
@@ -118,16 +118,17 @@ The arguments are described in detail in the twin document \file{swfigure.pdf}.
%
\item[\meta{height correction}] is an optional argument with a preset value of 0.8, it reduces the image height by that value, in order to assure that the figure has enough space for the image and its caption; if captions are not “narrative” (too many sentences) the value of 0.8 should be suited in most cases; the user, while revising the document drafts might decide to use a different value, of course always not greater than~1. This correction may be used with some display modes that concern only one page, not a full spread.
%
-\item[\meta{line correction}] This optional integer number may correct the number of lines of the indention of the wrapping text around a tall and slim figure.
+\item[\meta{line correction}] This optional integer number may correct the number of lines of the indentation of the wrapping text around a tall and slim figure.
%
+\item[\meta{width test}] is an optional fractional number smaller than~0.5 (default \texttt{0.25}) used to check that in Vertical Slim mode the width of the scaled image does not get too small so as to leave sufficient space for e decently typeset caption; the zero value implies no test. See in page~\pageref{fig:VSSmessage} the message that is output if this width becomes too small.
\end{description}
We stress the first optional argument meaning, whose default value is \texttt{SW}. It specifies the \meta{display mode}.
\begin{description}[noitemsep]
%
-\item[\texttt{SW}] is the acronym that specifies the \meta{display mode} for a Spread Wide figure; it consists into a full spread, without any text, and with its caption typeset in the external margin of the odd numbered page in a vertical fashion. Since this display mode needs to start on an even page, the user should carefully find the proper place where to insert the user macro \cs{DGimage} (named as “steering” macro, since it decides which large figure style to use), because it starts a new page and possibly inserts a blank page if the new one is odd numbered.
+\item[\texttt{SW}] is the acronym that specifies the \meta{display mode} for a Spread Wide figure; it consists into a full spread, without any text, and with its caption typeset in the external margin of the odd numbered page typeset in vertical mode. Since this display mode needs to start on an even page, the user should carefully find the proper place where to insert the user macro \cs{DFimage} (named as “steering” macro, since it decides which large figure style to use), because it starts a new page and possibly inserts a blank page if the new one is odd numbered. The steering macro can be also inserted within a paragraph\footnote{remeber to leave a space before \cs{DFimage} and no space after the last argument.}, and after its complete expansion restores the vertical mode; nevertheless, even so, it may insert a blank page if the next page is odd numbered.
%
-\item[\texttt{HS}] refers to a Horizontal Slim image, that requires a spread wide display mode, such that the first of the facing pages is an even numbered one, and with some text beneath both half images; since the caption is under the right half, the space occupied by this part of the image is higher than that in the facing page, it is necessary to equalise these vertical spaces, and the specific code takes care of this constraint. Also in this case the user should carefully chose the place where to insert the steering macro.
+\item[\texttt{HS}] refers to a Horizontal Slim image, that requires a spread wide display mode, such that the first of the facing pages is an even numbered one, and with some text beneath both half images; since the caption is below the right half, the space occupied by this part of the image would be higher than that in the facing page, it is necessary to equalise these vertical spaces, and the specific code takes care of this constraint. Also in this case the user should carefully chose the place where to insert the steering macro.
%
\item[\texttt{VS}] This case refers to a Vertical Slim image. This situation requires a really slim image, so that if its “height over width” ratio (its aspect ratio) is smaller than~2, the macro does not insert anything, except a message in its place, that informs the user about the cause of this refusal and suggests other display modes. The procedure is based on the use of the \pack{wrapfig} functionalities; this package has several limitations that the user should check in its documentation. Nevertheless, if there is enough “normal” text available to wrap the figure, the result is quite good. There are two parameters to fine tune the wrapped image with its caption: the \meta{height correction} and the \meta{line correction}.
%
@@ -147,7 +148,11 @@ practical reason is a representation of, as far as I know, the things
in themselves; as I have shown elsewhere, the phenomena should only be
used as a canon for our understanding. The paralogisms of practical
reason are what first give rise to the architectonic of practical
-reason. As will easily be shown in the next section, reason would
+reason.
+
+\DFimage[HS]{HSfakeimage}{A Horizontal Slim fake image}[fig:HSfake]
+
+As will easily be shown in the next section, reason would
thereby be made to contradict, in view of these considerations, the
Ideal of practical reason, yet the manifold depends on the phenomena.
Necessity depends on, when thus treated as the practical employment of
@@ -156,8 +161,6 @@ Human reason depends on our sense perceptions, by means of analytic
unity. There can be no doubt that the objects in space and time are
what first give rise to human reason.
-\DFimage[HS]{HSfakeimage}{A Horizontal Slim fake image}[fig:HSfake]
-
Let us suppose that the noumena have nothing to do
with necessity, since knowledge of the Categories is a
posteriori. Hume tells us that the transcendental unity of
@@ -275,7 +278,6 @@ absolved.
\DFimage[RF]{RFfakeimage}{A large Rotated Figure fake image}[fig:RFfake]
-\DFimage[VS]{VSSfake}{A tall very slim image}[fig:VSSfale](0.65)<2>
As any dedicated reader can clearly see, the Ideal of
practical reason is a representation of, as far as I know, the things
in themselves; as I have shown elsewhere, the phenomena should only be
@@ -338,6 +340,7 @@ This could not be passed over in a complete system of transcendental
philosophy, but in a merely critical essay the simple mention of the
fact may suffice.
+\DFimage[VS]{VSSfake}{A tall very slim image}[fig:VSSfake](0.65)<2>\label{fig:VSSmessage}
Therefore, we can deduce that the objects in space and
time (and I assert, however, that this is the case) have lying before
them the objects in space and time. Because of our necessary ignorance
diff --git a/macros/latex/contrib/swfigure/swfigure.dtx b/macros/latex/contrib/swfigure/swfigure.dtx
index 4629fb398c..5da66dfc6f 100644
--- a/macros/latex/contrib/swfigure/swfigure.dtx
+++ b/macros/latex/contrib/swfigure/swfigure.dtx
@@ -4,7 +4,7 @@
%<*internal>
\begingroup
\input docstrip.tex
-\keepsilent
+%\keepsilent
\preamble
Copyright (C) 2020 Claudio Beccari all rights reserved.
@@ -45,7 +45,7 @@ files swfigure.sty and swfigure.pdf
%<+package>\ProvidesPackage{swfigure}%
%<+readme>File README.txt for package swfigure
%<*package|readme>
- [2020-10-13 v.0.9.08 Managing large and spread wide figures]
+ [2020-10-18 v.0.9.11 Managing large and spread wide figures]
%</package|readme>
%<*driver>
\documentclass[a4paper]{ltxdoc}\errorcontextlines=9
@@ -102,7 +102,7 @@ Managing large and spread wide figures}
\end{document}
%</driver>
% \fi
-%^^A \CheckSum{10}^^A Doesn't this work any more?
+% \CheckSum{10}^^A Doesn't this work any more?
%
% \begin{abstract}
% This package defines a single command that with different options can
@@ -116,8 +116,6 @@ Managing large and spread wide figures}
% uses.
% \end{abstract}
%
-%^^A \DFimage[SW]{SWfakeimage}{A large fake image}[fig:SWfake]
-%^^A It does not work with the page design of this document.
%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section{Introduction}
@@ -203,7 +201,7 @@ Managing large and spread wide figures}
% the |swfigure.zip| file from the Comprehensive \TeX\ Archive Network
% (CTAN), and decompress it either in the very folder where there is
% the document main or single document file or, for a general use, in
-% the user personal |texmf| tree; it is possible that the user should
+% the user |texmf| personal tree; it is possible that the user should
% directly create this personal tree; how to do it is described in the
% documentation of the user \TeX\ system distribution.
%
@@ -232,7 +230,7 @@ Managing large and spread wide figures}
% \texttt{SW} (Spread Wide image), \texttt{HS} (Horizontal Spread-wide
% image), and \texttt{VS} (Vertical Slim image).
%\item[\meta{image fie name}]
-% Is the name of the image graphic file; remember that the \LaTeX based
+% is the name of the image graphic file; remember that the \LaTeX based
% \TeX\ system typesetting programs accept graphic files in the formats
% with extensions \texttt{.pdf}, \texttt{.eps}, \texttt{.jpg},
% \texttt{.png}, and few other less common ones. It is not necessary to
@@ -242,14 +240,14 @@ Managing large and spread wide figures}
% \meta{caption} text, but if the latter is sort of lengthy, it is
% better to enter a shorter text in that list.
%\item[\meta{caption}]
-% is the caption text.
+% is the caption text.
%\item[\meta{label}]
-% this optional argument is the string that forms the argument of the
-% \cs{label} command; of course, if this argument is not specified,
-% the figure number and its page cannot be referenced with \cs{ref},
-% \cs{pageref} and other similar commands.
+% this optional argument is the string that forms the \cs{label} command
+% argument; of course, if this argument is not specified, the figure
+% number and its page cannot be referenced with \cs{ref}, \cs{pageref}
+% and other similar commands.
%\item[\meta{height correction}]
-% This normal parenthesis delimited optional argument is a fractional
+% is a round parenthesis delimited optional argument; it is a fractional
% number lower than~1 (default 0.8) with which to further scale the
% scaled image height to be included; it is used by some display modes,
% and it is ignored by others.
@@ -263,7 +261,7 @@ Managing large and spread wide figures}
%\item[\meta{width test}] this further vertical bars delimited argument
% is used only when dealing with vertical slim images; when they are
% scaled down in order to fit in the available space, their width may
-% become too small to allow a decently typeset caption underneath the
+% become too small to allow a decently typeset caption below the
% image. A test is made to compare the scaled image width with a
% fraction of the text block width in order to skip the image insertion
% if the image width becomes too small; the default value for this
@@ -287,33 +285,28 @@ Managing large and spread wide figures}
% does not know in advance the vertical space occupied by the caption,
% therefore the optional \meta{height correction} comes handy for
% small adjustments; this display mode is fully and freely floating,
-% although its positioning is fixed to~|[p]|.
+% although its positioning is fixed to~|[p]|, full only-float page.
%
%\item[\texttt{RF}]
% This display mode is convenient when the image
% aspect ratio is close to the reciprocal of the text block one. This
% mode accepts the \meta{height correction} in order to leave space
-% to the caption. It is a fully and freely floating object with the
+% for the caption. It is a fully and freely floating object with the
% same pros and cons as the \texttt{NF} display mode.
%
%\item[\texttt{SW}]
% This display mode is convenient when a really large
% image requires two pages to display all its details; its aspect ratio
-% should be close to the two page aspect ratio of the total space
+% should be close to the aspect ratio of the total space
% available for the two page spread; depending on the page design this
-% total space approximate value probably is close to~0.5.
+% total space approximate value is probably around~0.5.
% The object to be included in the document should start on an even
-% page, therefore it moves to the first even page available; this
-% implies that the last document page before the spread wide image
-% may be blank or may be shorter than the other text pages; the user
+% page, therefore it floats to the first even page available; this may
+% force a page break where the current page is not fully completed and
+% may be shorter than the other text pages; the user
% then should help the automatic positioning by choosing very carefully
-% where to insert the \cs{DFfigure} command in the source text; it can
-% even set it within a paragraph and the command provides a new page
-% just after the line that contains the \cs{DFfigure} command;
-% therefore if the paragraph is close to the end of an odd page and
-% the position of \cs{DFfigure} command is properly positioned within this
-% paragraph, the spread wide insertion would not disturb the quality
-% of the typeset document.
+% where to insert the \cs{DFfigure} command in the source text; possibly
+% the user should chose an end of paragraph close to the end of a page.
%
%\item[\texttt{HS}]
% This display mode is convenient when the initial image aspect
@@ -326,13 +319,13 @@ Managing large and spread wide figures}
%\item[\texttt{VS}]
% This mode is convenient for tall and slim figures with aspect ratio
% not lower than~2; but for obvious reasons, it should not be too
-% large, let's say not higher than about~3. As always this depends on
+% large, let's say not higher than about~3 or~4. As always this depends on
% the page design and the caption size. The limitations of the
-% underlying of the |wrapfig| package forbids its usage too close to
-% section headings, explicit lists and texts typeset in special modes
-% with different measure than normal text. Again it is up to the user
-% to chose where to insert the \cs{DFfigure} command. If the aspect
-% ratio of the image to include is lower than~2, this message is printed
+% underlying |wrapfig| package forbids its usage too close to
+% explicit lists and texts typeset in special modes with a different
+% measure than normal text. Again it is up to the user to chose
+% where to insert the \cs{DFfigure} command. If the aspect ratio of
+% the image to include is lower than~2, this message is printed
% in the document where the image should appear (of course with |#1|
% replaced by the actual image file name):\\
%\begin{minipage}{0.7\textwidth}
@@ -490,16 +483,35 @@ Managing large and spread wide figures}
}
% \end{macrocode}
-% The |\cleartoevenpage| command may already exist in the document class.
+% The |\cleartoeven| command may already exist in the document class.
% We prefer to make an absolute redefinition so as to be sure that it
-% performs as we need in this package. We tested with the |memoir|
-% class that already has such a command, and no problems were found
+% performs as we need in this package. In any case this new definition
+% may be used in such a way that the |\DFimage| user command may be used
+% also while typesetting in text mode, resuming text mode after complete
+% expansion. This is useful, especially for spread wide display modes,
+% to chose the most suitable place in the suorce file to place the
+% |\DFimace| command with its arguments; only with the |SW| mode it
+% is necessary to avoid any space after the last macro argument and the
+% text that follows it.
%
% \begin{macrocode}
-\DeclareRobustCommand\cleartoevenpage{%
- \clearpage\ifodd\value{page}\null\clearpage\fi}
+\newcommand\set@tmode@newpage{%
+\ifvmode
+ \@SWtmodefalse
+\else
+ \@SWtmodetrue
+ \@bsphack\vadjust{\vspace{0pt plus1fill}\@esphack\newpage}%
+\fi}
+
+\newcommand\reset@tmode{\if@SWtmode\expandafter\noindent\ignorespaces\fi}
+
+\NewDocumentCommand\cleartoeven{ o }{%
+ \IfValueTF{#1}%
+ {\set@tmode@newpage
+ \ifodd\value{page}\afterpage{#1}\else#1\fi}%
+ {\ifodd\value{page}\null\clearpage\fi}}
+
% \end{macrocode}
-%
% Now we define the “real” user macro necessary to chose the
% \meta{display mode} and the various parameters necessary for the
% desired one. See section~\ref{sec:Usage} on page\pageref{sec:Usage}
@@ -544,9 +556,9 @@ Managing large and spread wide figures}
{\PackageWarning{swfigure}%
{%
**************************************\MessageBreak
- Option #1\space is not valid \MessageBreak
- Nothing done \MessageBreak
- Image #2\space was not processed \MessageBreak
+ Option #1\space is not valid \MessageBreak
+ Nothing done \MessageBreak
+ Image #2\space was not processed \MessageBreak
**************************************\MessageBreak}%
}%
}%
@@ -556,7 +568,7 @@ Managing large and spread wide figures}
}%
% \end{macrocode}
-% In the following subsection the five specific display mode macros
+% In the following subsections the five specific display mode macros
% are examined and commented.
%^^A=====================================
% \subsection{The \cs{SWfigure} macro for Spread Wide images}
@@ -567,35 +579,34 @@ Managing large and spread wide figures}
%\end{ttsyntax}
% The various arguments have already been described; as you see the
% \meta{display mode} argument is not there anymore, as well as the
-% last two optional arguments of |\DFfigure|.
-%
-% The working strategy is the following: first the typesetting mode is
-% tested and, in case, a filling of the current line is
-% performed and, by means of a |\vadjust| \TeX\ native macro, a
-% |\newpage| command is executed; in any case a |\cleartoevenpapge|
-% is executed so as to be sure to start any action while an even page
-% is being processed. Then the initial image to be divided in two
-% halves is stored in a box; this box is examined in order
+% last two optional arguments of |\DFfigure|.Notice that the
+% \meta{caption} text, the third argument of this macro, is used also
+% to initialise the \meta{lof entry}, so that if the user doe not
+% specify such short caption entry, the default is identica to the
+% full caption.
+%
+% The working strategy is the following: the initial image to be divided
+% in two halves is stored in a box; this box is examined in order
% to find its total width and heigh, so as to be able to compute the
% aspect ratio. All other dimensions are examined to have available
% all the necessary data to display the image halves in the requested
% way.
%
% Notice that the |trim| option to |\includegraphics|, used to
-% divide the initial image in two exact halves, (apparently) must
+% divide the initial image in two exact halves, maybe should
% be used without specifying other options; but, most important,
-% it requires real numbers, not macros; therefore we have to make
+% it requires actual numbers, not macros; therefore we have to make
% use of the usual dirty trick of defining an expanded macro
% |\x| within a group that the macro itself closes upon its
-% expansion; in this way the principal part of the |\includegraphics|
+% expansion; in this way the optional argument of the |\includegraphics|
% macro contains only keywords and numbers and may be executed
% without errors.
%
% Let $W$ be the total spread width and $w$ be the initial image
% width; let $H$ be the text height and $h$ the initial image height;
% compute the $A_\mathrm{W}$ to be the aspect ratio of the spread
-% available space $H/W$. Similarly let $A_\mathrm{fig}$ aspect
-% ratio of the initial image; we have to scale the image with a
+% available space $H/W$. Similarly let $A_\mathrm{fig}$ be the initial
+% image aspect ratio; we have to scale the image with a
% scaling factor such that the image keeps its aspect ratio, but
% its scaled height does not exceed the text block height, and
% its scaled width does not exceed the spread width; of course the
@@ -615,27 +626,21 @@ Managing large and spread wide figures}
%\label{equ:ScalingFactor}
%\end{equation}
% This choice is made by testing the various ratios by means of
-% the L3 |\fptest| macro, that computes such ratios and compares them.
-% The commented line below shows exactly which lengths are used to
-% compute the ratios, and which comparison is executed. Once the
+% the L3 |\fptest| function, that computes such ratios and compares them.
+% The \meta{test} shows exactly which lengths are used to
+% compute the ratios, and which comparison is executed; the commented
+% line over the |\fptest| macro emphasises this correspondence. Once the
% scaling factors are found the boxes containing the half figures
% are scaled and further on are inserted in floating figure
-% environments; we use another dirty trick of matrioska dolls; this
+% environments; we use une of the dirty tricks: the matrioska dolls; this
% metaphor describes nested |\makeboxe|s used to mask their actual
-% widths, but capable to push the images towards the spread
-% spine.
+% widths, but capable to push the images towards the spread spine.
% Eventually the caption is set in the right margin of the right
% spread page, rotated $90^\circ$ counterclockwise.
+% The |cleartoeven| guaranties that the first float is set into an even
+% numbered page. A final |\clearpage| ensures that both floats are output.
% \begin{macrocode}
\NewDocumentCommand\SWfigure{m O{#3} m o}{%
-\ifvmode
- \@SWtmodefalse
-\else
- \@SWtmodetrue
- \csuse{@bsphack}%
- \vadjust{\vspace{0pt plus1fill}\csuse{@esphack}\newpage}%
-\fi
-\cleartoevenpage
\setbox\DFtotalimage=\hbox{\includegraphics{#1}}%
\DFwidth=\wd\DFtotalimage \DFhalfwidth=0.5\DFwidth
\DFheight=\ht\DFtotalimage
@@ -657,20 +662,22 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
\setbox\DFimageI=\hbox{\scalebox{\DFscalefactor}{\usebox{\DFimageI}}}%
\setbox\DFimageII=\hbox{\scalebox{\DFscalefactor}{\usebox{\DFimageII}}}%
%
-\begin{figure}[p]%
-\vbox to\textheight{\vss\hsize=\textwidth%\
-\makebox[\hsize][l]{\makebox[\FigSpace][r]{\box\DFimageI}}\vss}%
-\end{figure}\clearpage
+\cleartoeven[%
+ \begin{figure}[p]%
+ \vbox to\textheight{\vss\hsize=\textwidth%\
+ \makebox[\hsize][l]{\makebox[\FigSpace][r]{\box\DFimageI}}\vss}%
+ \end{figure}\clearpage
%
-\begin{figure}[p]%
-\vbox to\textheight{\vss\hsize=\textwidth
-\makebox[\hsize][r]{\makebox[\FigSpace][l]{\box\DFimageII}%
+ \begin{figure}[p]%
+ \vbox to\textheight{\vss\hsize=\textwidth
+ \makebox[\hsize][r]{\makebox[\FigSpace][l]{\box\DFimageII}%
% Rotated caption in the right page
-\makebox(0,0)[lb]{\hspace*{1em}\raisebox{0.5\textheight}{%
-\rotatebox[origin=tc]{90}{\DFcaption[#2]{#3}[#4]%
-%
-}}}}\vss}%
-\end{figure}\clearpage\if@SWtmode\noindent\fi}
+ \makebox(0,0)[lb]{\hspace*{1em}\raisebox{0.5\textheight}{%
+ \rotatebox[origin=tc]{90}{\DFcaption[#2]{#3}[#4]%
+ %
+ }}}}\vss}%
+ \end{figure}%
+]\clearpage\reset@tmode}
% \end{macrocode}
%^^A========================================
@@ -830,14 +837,10 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
% the same hight and depth as the right page one.
% \begin{macrocode}
\NewDocumentCommand\HSfigure{m o m o d()}{%
- \unless\ifvmode
- \csuse{@bsphack}%
- \vadjust{\vspace{0pt plus1fill}\csuse{@esphack}\newpage}%
- \fi
- \cleartoevenpage
+ \cleartoeven
\setbox\DFtotalimage=\hbox{\includegraphics{#1}}
\DFwidth=\wd\DFtotalimage \DFhalfwidth=0.5\DFwidth
- \FigSpace=0.5\spreadwidth% W
+ \FigSpace=0.5\spreadwidth%
%
\setbox\DFimageI\hbox{\bgroup
\edef\x{\egroup\noexpand\includegraphics*[%
diff --git a/macros/latex/contrib/swfigure/swfigure.pdf b/macros/latex/contrib/swfigure/swfigure.pdf
index bf2200369f..b0501e26b6 100644
--- a/macros/latex/contrib/swfigure/swfigure.pdf
+++ b/macros/latex/contrib/swfigure/swfigure.pdf
Binary files differ